diff --git a/generated/google/apis/adexchangebuyer_v1_3.rb b/generated/google/apis/adexchangebuyer_v1_3.rb deleted file mode 100644 index be15fde6b..000000000 --- a/generated/google/apis/adexchangebuyer_v1_3.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adexchangebuyer_v1_3/classes.rb b/generated/google/apis/adexchangebuyer_v1_3/classes.rb deleted file mode 100644 index c9712856a..000000000 --- a/generated/google/apis/adexchangebuyer_v1_3/classes.rb +++ /dev/null @@ -1,1124 +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 - - # Configuration data for an Ad Exchange buyer account. - class Account - include Google::Apis::Core::Hashable - - # Your bidder locations that have distinct URLs. - # Corresponds to the JSON property `bidderLocation` - # @return [Array] - attr_accessor :bidder_location - - # The nid parameter value used in cookie match requests. Please contact your - # technical account manager if you need to change this. - # Corresponds to the JSON property `cookieMatchingNid` - # @return [String] - attr_accessor :cookie_matching_nid - - # The base URL used in cookie match requests. - # Corresponds to the JSON property `cookieMatchingUrl` - # @return [String] - attr_accessor :cookie_matching_url - - # Account id. - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The maximum number of active creatives that an account can have, where a - # creative is active if it was inserted or bid with in the last 30 days. Please - # contact your technical account manager if you need to change this. - # Corresponds to the JSON property `maximumActiveCreatives` - # @return [Fixnum] - attr_accessor :maximum_active_creatives - - # The sum of all bidderLocation.maximumQps values cannot exceed this. Please - # contact your technical account manager if you need to change this. - # Corresponds to the JSON property `maximumTotalQps` - # @return [Fixnum] - attr_accessor :maximum_total_qps - - # The number of creatives that this account inserted or bid with in the last 30 - # days. - # Corresponds to the JSON property `numberActiveCreatives` - # @return [Fixnum] - attr_accessor :number_active_creatives - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bidder_location = args[:bidder_location] unless args[:bidder_location].nil? - @cookie_matching_nid = args[:cookie_matching_nid] unless args[:cookie_matching_nid].nil? - @cookie_matching_url = args[:cookie_matching_url] unless args[:cookie_matching_url].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @maximum_active_creatives = args[:maximum_active_creatives] unless args[:maximum_active_creatives].nil? - @maximum_total_qps = args[:maximum_total_qps] unless args[:maximum_total_qps].nil? - @number_active_creatives = args[:number_active_creatives] unless args[:number_active_creatives].nil? - end - - # - class BidderLocation - include Google::Apis::Core::Hashable - - # The maximum queries per second the Ad Exchange will send. - # Corresponds to the JSON property `maximumQps` - # @return [Fixnum] - attr_accessor :maximum_qps - - # The geographical region the Ad Exchange should send requests from. Only used - # by some quota systems, but always setting the value is recommended. Allowed - # values: - # - ASIA - # - EUROPE - # - US_EAST - # - US_WEST - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # The URL to which the Ad Exchange will send bid requests. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @maximum_qps = args[:maximum_qps] unless args[:maximum_qps].nil? - @region = args[:region] unless args[:region].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - - # An account feed lists Ad Exchange buyer accounts that the user has access to. - # Each entry in the feed corresponds to a single buyer account. - class AccountsList - include Google::Apis::Core::Hashable - - # A list of accounts. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The configuration data for an Ad Exchange billing info. - class BillingInfo - include Google::Apis::Core::Hashable - - # Account id. - # Corresponds to the JSON property `accountId` - # @return [Fixnum] - attr_accessor :account_id - - # Account name. - # Corresponds to the JSON property `accountName` - # @return [String] - attr_accessor :account_name - - # A list of adgroup IDs associated with this particular account. These IDs may - # show up as part of a realtime bidding BidRequest, which indicates a bid - # request for this account. - # Corresponds to the JSON property `billingId` - # @return [Array] - attr_accessor :billing_id - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @account_name = args[:account_name] unless args[:account_name].nil? - @billing_id = args[:billing_id] unless args[:billing_id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A billing info feed lists Billing Info the Ad Exchange buyer account has - # access to. Each entry in the feed corresponds to a single billing info. - class BillingInfoList - include Google::Apis::Core::Hashable - - # A list of billing info relevant for your account. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The configuration data for Ad Exchange RTB - Budget API. - class Budget - include Google::Apis::Core::Hashable - - # The id of the account. This is required for get and update requests. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The billing id to determine which adgroup to provide budget information for. - # This is required for get and update requests. - # Corresponds to the JSON property `billingId` - # @return [String] - attr_accessor :billing_id - - # The budget amount to apply for the billingId provided. This is required for - # update requests. - # Corresponds to the JSON property `budgetAmount` - # @return [String] - attr_accessor :budget_amount - - # The currency code for the buyer. This cannot be altered here. - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - # The unique id that describes this item. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of the resource, i.e. "adexchangebuyer#budget". - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @billing_id = args[:billing_id] unless args[:billing_id].nil? - @budget_amount = args[:budget_amount] unless args[:budget_amount].nil? - @currency_code = args[:currency_code] unless args[:currency_code].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A creative and its classification data. - class Creative - include Google::Apis::Core::Hashable - - # The HTML snippet that displays the ad when inserted in the web page. If set, - # videoURL should not be set. - # Corresponds to the JSON property `HTMLSnippet` - # @return [String] - attr_accessor :html_snippet - - # Account id. - # Corresponds to the JSON property `accountId` - # @return [Fixnum] - attr_accessor :account_id - - # Detected advertiser id, if any. Read-only. This field should not be set in - # requests. - # Corresponds to the JSON property `advertiserId` - # @return [Array] - attr_accessor :advertiser_id - - # The name of the company being advertised in the creative. - # Corresponds to the JSON property `advertiserName` - # @return [String] - attr_accessor :advertiser_name - - # The agency id for this creative. - # Corresponds to the JSON property `agencyId` - # @return [String] - attr_accessor :agency_id - - # All attributes for the ads that may be shown from this snippet. - # Corresponds to the JSON property `attribute` - # @return [Array] - attr_accessor :attribute - - # A buyer-specific id identifying the creative in this ad. - # Corresponds to the JSON property `buyerCreativeId` - # @return [String] - attr_accessor :buyer_creative_id - - # The set of destination urls for the snippet. - # Corresponds to the JSON property `clickThroughUrl` - # @return [Array] - attr_accessor :click_through_url - - # Shows any corrections that were applied to this creative. Read-only. This - # field should not be set in requests. - # Corresponds to the JSON property `corrections` - # @return [Array] - attr_accessor :corrections - - # The reasons for disapproval, if any. Note that not all disapproval reasons may - # be categorized, so it is possible for the creative to have a status of - # DISAPPROVED with an empty list for disapproval_reasons. In this case, please - # reach out to your TAM to help debug the issue. Read-only. This field should - # not be set in requests. - # Corresponds to the JSON property `disapprovalReasons` - # @return [Array] - attr_accessor :disapproval_reasons - - # The filtering reasons for the creative. Read-only. This field should not be - # set in requests. - # Corresponds to the JSON property `filteringReasons` - # @return [Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons] - attr_accessor :filtering_reasons - - # Ad height. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Detected product categories, if any. Read-only. This field should not be set - # in requests. - # Corresponds to the JSON property `productCategories` - # @return [Array] - attr_accessor :product_categories - - # All restricted categories for the ads that may be shown from this snippet. - # Corresponds to the JSON property `restrictedCategories` - # @return [Array] - attr_accessor :restricted_categories - - # Detected sensitive categories, if any. Read-only. This field should not be set - # in requests. - # Corresponds to the JSON property `sensitiveCategories` - # @return [Array] - attr_accessor :sensitive_categories - - # Creative serving status. Read-only. This field should not be set in requests. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # All vendor types for the ads that may be shown from this snippet. - # Corresponds to the JSON property `vendorType` - # @return [Array] - attr_accessor :vendor_type - - # The url to fetch a video ad. If set, HTMLSnippet should not be set. - # Corresponds to the JSON property `videoURL` - # @return [String] - attr_accessor :video_url - - # Ad width. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @html_snippet = args[:html_snippet] unless args[:html_snippet].nil? - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_name = args[:advertiser_name] unless args[:advertiser_name].nil? - @agency_id = args[:agency_id] unless args[:agency_id].nil? - @attribute = args[:attribute] unless args[:attribute].nil? - @buyer_creative_id = args[:buyer_creative_id] unless args[:buyer_creative_id].nil? - @click_through_url = args[:click_through_url] unless args[:click_through_url].nil? - @corrections = args[:corrections] unless args[:corrections].nil? - @disapproval_reasons = args[:disapproval_reasons] unless args[:disapproval_reasons].nil? - @filtering_reasons = args[:filtering_reasons] unless args[:filtering_reasons].nil? - @height = args[:height] unless args[:height].nil? - @kind = args[:kind] unless args[:kind].nil? - @product_categories = args[:product_categories] unless args[:product_categories].nil? - @restricted_categories = args[:restricted_categories] unless args[:restricted_categories].nil? - @sensitive_categories = args[:sensitive_categories] unless args[:sensitive_categories].nil? - @status = args[:status] unless args[:status].nil? - @vendor_type = args[:vendor_type] unless args[:vendor_type].nil? - @video_url = args[:video_url] unless args[:video_url].nil? - @width = args[:width] unless args[:width].nil? - end - - # - class Correction - include Google::Apis::Core::Hashable - - # Additional details about the correction. - # Corresponds to the JSON property `details` - # @return [Array] - attr_accessor :details - - # The type of correction that was applied to the creative. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] unless args[:details].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - - # - class DisapprovalReason - include Google::Apis::Core::Hashable - - # Additional details about the reason for disapproval. - # Corresponds to the JSON property `details` - # @return [Array] - attr_accessor :details - - # The categorized reason for disapproval. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] unless args[:details].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - - # The filtering reasons for the creative. Read-only. This field should not be - # set in requests. - class FilteringReasons - include Google::Apis::Core::Hashable - - # The date in ISO 8601 format for the data. The data is collected from 00:00:00 - # to 23:59:59 in PST. - # Corresponds to the JSON property `date` - # @return [String] - attr_accessor :date - - # The filtering reasons. - # Corresponds to the JSON property `reasons` - # @return [Array] - attr_accessor :reasons - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @date = args[:date] unless args[:date].nil? - @reasons = args[:reasons] unless args[:reasons].nil? - end - - # - class Reason - include Google::Apis::Core::Hashable - - # The number of times the creative was filtered for the status. The count is - # aggregated across all publishers on the exchange. - # Corresponds to the JSON property `filteringCount` - # @return [String] - attr_accessor :filtering_count - - # The filtering status code. Please refer to the creative-status-codes.txt file - # for different statuses. - # Corresponds to the JSON property `filteringStatus` - # @return [Fixnum] - attr_accessor :filtering_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filtering_count = args[:filtering_count] unless args[:filtering_count].nil? - @filtering_status = args[:filtering_status] unless args[:filtering_status].nil? - end - end - end - end - - # The creatives feed lists the active creatives for the Ad Exchange buyer - # accounts that the user has access to. Each entry in the feed corresponds to a - # single creative. - class CreativesList - include Google::Apis::Core::Hashable - - # A list of creatives. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Continuation token used to page through creatives. To retrieve the next page - # of results, set the next request's "pageToken" value to this. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] 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 - - # The configuration data for an Ad Exchange direct deal. - class DirectDeal - include Google::Apis::Core::Hashable - - # The account id of the buyer this deal is for. - # Corresponds to the JSON property `accountId` - # @return [Fixnum] - attr_accessor :account_id - - # The name of the advertiser this deal is for. - # Corresponds to the JSON property `advertiser` - # @return [String] - attr_accessor :advertiser - - # 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 - - # End time for when this deal stops being active. If not set then this deal is - # valid until manually disabled by the publisher. In seconds since the epoch. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # The fixed price for this direct deal. In cpm micros of currency according to - # currency_code. If set, then this 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 - - # Deal id. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Deal name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The minimum price for this direct deal. In cpm micros of currency according to - # currency_code. If set, then this deal is eligible for the private exchange - # tier of buying (below fixed price priority, run as a second price auction). - # Corresponds to the JSON property `privateExchangeMinCpm` - # @return [String] - attr_accessor :private_exchange_min_cpm - - # If true, the publisher has opted to have their blocks ignored when a creative - # is bid with for this deal. - # Corresponds to the JSON property `publisherBlocksOverriden` - # @return [Boolean] - attr_accessor :publisher_blocks_overriden - alias_method :publisher_blocks_overriden?, :publisher_blocks_overriden - - # The name of the publisher offering this direct deal. - # Corresponds to the JSON property `sellerNetwork` - # @return [String] - attr_accessor :seller_network - - # Start time for when this deal becomes active. If not set then this deal is - # active immediately upon creation. In seconds since the 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser = args[:advertiser] unless args[:advertiser].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? - @name = args[:name] unless args[:name].nil? - @private_exchange_min_cpm = args[:private_exchange_min_cpm] unless args[:private_exchange_min_cpm].nil? - @publisher_blocks_overriden = args[:publisher_blocks_overriden] unless args[:publisher_blocks_overriden].nil? - @seller_network = args[:seller_network] unless args[:seller_network].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - end - end - - # A direct deals feed lists Direct Deals the Ad Exchange buyer account has - # access to. This includes direct deals set up for the buyer account as well as - # its merged stream seats. - class DirectDealsList - include Google::Apis::Core::Hashable - - # A list of direct deals relevant for your account. - # Corresponds to the JSON property `directDeals` - # @return [Array] - attr_accessor :direct_deals - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @direct_deals = args[:direct_deals] unless args[:direct_deals].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The configuration data for an Ad Exchange performance report list. - class PerformanceReport - include Google::Apis::Core::Hashable - - # The number of bid responses with an ad. - # Corresponds to the JSON property `bidRate` - # @return [Float] - attr_accessor :bid_rate - - # The number of bid requests sent to your bidder. - # Corresponds to the JSON property `bidRequestRate` - # @return [Float] - attr_accessor :bid_request_rate - - # Rate of various prefiltering statuses per match. Please refer to the callout- - # status-codes.txt file for different statuses. - # Corresponds to the JSON property `calloutStatusRate` - # @return [Array] - attr_accessor :callout_status_rate - - # Average QPS for cookie matcher operations. - # Corresponds to the JSON property `cookieMatcherStatusRate` - # @return [Array] - attr_accessor :cookie_matcher_status_rate - - # Rate of ads with a given status. Please refer to the creative-status-codes.txt - # file for different statuses. - # Corresponds to the JSON property `creativeStatusRate` - # @return [Array] - attr_accessor :creative_status_rate - - # The number of bid responses that were filtered due to a policy violation or - # other errors. - # Corresponds to the JSON property `filteredBidRate` - # @return [Float] - attr_accessor :filtered_bid_rate - - # Average QPS for hosted match operations. - # Corresponds to the JSON property `hostedMatchStatusRate` - # @return [Array] - attr_accessor :hosted_match_status_rate - - # The number of potential queries based on your pretargeting settings. - # Corresponds to the JSON property `inventoryMatchRate` - # @return [Float] - attr_accessor :inventory_match_rate - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The 50th percentile round trip latency(ms) as perceived from Google servers - # for the duration period covered by the report. - # Corresponds to the JSON property `latency50thPercentile` - # @return [Float] - attr_accessor :latency_50th_percentile - - # The 85th percentile round trip latency(ms) as perceived from Google servers - # for the duration period covered by the report. - # Corresponds to the JSON property `latency85thPercentile` - # @return [Float] - attr_accessor :latency_85th_percentile - - # The 95th percentile round trip latency(ms) as perceived from Google servers - # for the duration period covered by the report. - # Corresponds to the JSON property `latency95thPercentile` - # @return [Float] - attr_accessor :latency_95th_percentile - - # Rate of various quota account statuses per quota check. - # Corresponds to the JSON property `noQuotaInRegion` - # @return [Float] - attr_accessor :no_quota_in_region - - # Rate of various quota account statuses per quota check. - # Corresponds to the JSON property `outOfQuota` - # @return [Float] - attr_accessor :out_of_quota - - # Average QPS for pixel match requests from clients. - # Corresponds to the JSON property `pixelMatchRequests` - # @return [Float] - attr_accessor :pixel_match_requests - - # Average QPS for pixel match responses from clients. - # Corresponds to the JSON property `pixelMatchResponses` - # @return [Float] - attr_accessor :pixel_match_responses - - # The configured quota limits for this account. - # Corresponds to the JSON property `quotaConfiguredLimit` - # @return [Float] - attr_accessor :quota_configured_limit - - # The throttled quota limits for this account. - # Corresponds to the JSON property `quotaThrottledLimit` - # @return [Float] - attr_accessor :quota_throttled_limit - - # The trading location of this data. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # The number of properly formed bid responses received by our servers within the - # deadline. - # Corresponds to the JSON property `successfulRequestRate` - # @return [Float] - attr_accessor :successful_request_rate - - # The unix timestamp of the starting time of this performance data. - # Corresponds to the JSON property `timestamp` - # @return [String] - attr_accessor :timestamp - - # The number of bid responses that were unsuccessful due to timeouts, incorrect - # formatting, etc. - # Corresponds to the JSON property `unsuccessfulRequestRate` - # @return [Float] - attr_accessor :unsuccessful_request_rate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bid_rate = args[:bid_rate] unless args[:bid_rate].nil? - @bid_request_rate = args[:bid_request_rate] unless args[:bid_request_rate].nil? - @callout_status_rate = args[:callout_status_rate] unless args[:callout_status_rate].nil? - @cookie_matcher_status_rate = args[:cookie_matcher_status_rate] unless args[:cookie_matcher_status_rate].nil? - @creative_status_rate = args[:creative_status_rate] unless args[:creative_status_rate].nil? - @filtered_bid_rate = args[:filtered_bid_rate] unless args[:filtered_bid_rate].nil? - @hosted_match_status_rate = args[:hosted_match_status_rate] unless args[:hosted_match_status_rate].nil? - @inventory_match_rate = args[:inventory_match_rate] unless args[:inventory_match_rate].nil? - @kind = args[:kind] unless args[:kind].nil? - @latency_50th_percentile = args[:latency_50th_percentile] unless args[:latency_50th_percentile].nil? - @latency_85th_percentile = args[:latency_85th_percentile] unless args[:latency_85th_percentile].nil? - @latency_95th_percentile = args[:latency_95th_percentile] unless args[:latency_95th_percentile].nil? - @no_quota_in_region = args[:no_quota_in_region] unless args[:no_quota_in_region].nil? - @out_of_quota = args[:out_of_quota] unless args[:out_of_quota].nil? - @pixel_match_requests = args[:pixel_match_requests] unless args[:pixel_match_requests].nil? - @pixel_match_responses = args[:pixel_match_responses] unless args[:pixel_match_responses].nil? - @quota_configured_limit = args[:quota_configured_limit] unless args[:quota_configured_limit].nil? - @quota_throttled_limit = args[:quota_throttled_limit] unless args[:quota_throttled_limit].nil? - @region = args[:region] unless args[:region].nil? - @successful_request_rate = args[:successful_request_rate] unless args[:successful_request_rate].nil? - @timestamp = args[:timestamp] unless args[:timestamp].nil? - @unsuccessful_request_rate = args[:unsuccessful_request_rate] unless args[:unsuccessful_request_rate].nil? - end - end - - # The configuration data for an Ad Exchange performance report list. https:// - # sites.google.com/a/google.com/adx-integration/Home/engineering/binary-releases/ - # rtb-api-release https://cs.corp.google.com/#piper///depot/google3/contentads/ - # adx/tools/rtb_api/adxrtb.py - class PerformanceReportList - include Google::Apis::Core::Hashable - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A list of performance reports relevant for the account. - # Corresponds to the JSON property `performanceReport` - # @return [Array] - attr_accessor :performance_report - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @performance_report = args[:performance_report] unless args[:performance_report].nil? - end - end - - # - class PretargetingConfig - include Google::Apis::Core::Hashable - - # The id for billing purposes, provided for reference. Leave this field blank - # for insert requests; the id will be generated automatically. - # Corresponds to the JSON property `billingId` - # @return [String] - attr_accessor :billing_id - - # The config id; generated automatically. Leave this field blank for insert - # requests. - # Corresponds to the JSON property `configId` - # @return [String] - attr_accessor :config_id - - # The name of the config. Must be unique. Required for all requests. - # Corresponds to the JSON property `configName` - # @return [String] - attr_accessor :config_name - - # List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or - # PRETARGETING_CREATIVE_TYPE_VIDEO. - # Corresponds to the JSON property `creativeType` - # @return [Array] - attr_accessor :creative_type - - # Requests which allow one of these (width, height) pairs will match. All pairs - # must be supported ad dimensions. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # Requests with any of these content labels will not match. Values are from - # content-labels.txt in the downloadable files section. - # Corresponds to the JSON property `excludedContentLabels` - # @return [Array] - attr_accessor :excluded_content_labels - - # Requests containing any of these geo criteria ids will not match. - # Corresponds to the JSON property `excludedGeoCriteriaIds` - # @return [Array] - attr_accessor :excluded_geo_criteria_ids - - # Requests containing any of these placements will not match. - # Corresponds to the JSON property `excludedPlacements` - # @return [Array] - attr_accessor :excluded_placements - - # Requests containing any of these users list ids will not match. - # Corresponds to the JSON property `excludedUserLists` - # @return [Array] - attr_accessor :excluded_user_lists - - # Requests containing any of these vertical ids will not match. Values are from - # the publisher-verticals.txt file in the downloadable files section. - # Corresponds to the JSON property `excludedVerticals` - # @return [Array] - attr_accessor :excluded_verticals - - # Requests containing any of these geo criteria ids will match. - # Corresponds to the JSON property `geoCriteriaIds` - # @return [Array] - attr_accessor :geo_criteria_ids - - # Whether this config is active. Required for all requests. - # Corresponds to the JSON property `isActive` - # @return [Boolean] - attr_accessor :is_active - alias_method :is_active?, :is_active - - # The kind of the resource, i.e. "adexchangebuyer#pretargetingConfig". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Request containing any of these language codes will match. - # Corresponds to the JSON property `languages` - # @return [Array] - attr_accessor :languages - - # Requests containing any of these mobile carrier ids will match. Values are - # from mobile-carriers.csv in the downloadable files section. - # Corresponds to the JSON property `mobileCarriers` - # @return [Array] - attr_accessor :mobile_carriers - - # Requests containing any of these mobile device ids will match. Values are from - # mobile-devices.csv in the downloadable files section. - # Corresponds to the JSON property `mobileDevices` - # @return [Array] - attr_accessor :mobile_devices - - # Requests containing any of these mobile operating system version ids will - # match. Values are from mobile-os.csv in the downloadable files section. - # Corresponds to the JSON property `mobileOperatingSystemVersions` - # @return [Array] - attr_accessor :mobile_operating_system_versions - - # Requests containing any of these placements will match. - # Corresponds to the JSON property `placements` - # @return [Array] - attr_accessor :placements - - # Requests matching any of these platforms will match. Possible values are - # PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and - # PRETARGETING_PLATFORM_TABLET. - # Corresponds to the JSON property `platforms` - # @return [Array] - attr_accessor :platforms - - # Creative attributes should be declared here if all creatives corresponding to - # this pretargeting configuration have that creative attribute. Values are from - # pretargetable-creative-attributes.txt in the downloadable files section. - # Corresponds to the JSON property `supportedCreativeAttributes` - # @return [Array] - attr_accessor :supported_creative_attributes - - # Requests containing any of these user list ids will match. - # Corresponds to the JSON property `userLists` - # @return [Array] - attr_accessor :user_lists - - # Requests that allow any of these vendor ids will match. Values are from - # vendors.txt in the downloadable files section. - # Corresponds to the JSON property `vendorTypes` - # @return [Array] - attr_accessor :vendor_types - - # Requests containing any of these vertical ids will match. - # Corresponds to the JSON property `verticals` - # @return [Array] - attr_accessor :verticals - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @billing_id = args[:billing_id] unless args[:billing_id].nil? - @config_id = args[:config_id] unless args[:config_id].nil? - @config_name = args[:config_name] unless args[:config_name].nil? - @creative_type = args[:creative_type] unless args[:creative_type].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @excluded_content_labels = args[:excluded_content_labels] unless args[:excluded_content_labels].nil? - @excluded_geo_criteria_ids = args[:excluded_geo_criteria_ids] unless args[:excluded_geo_criteria_ids].nil? - @excluded_placements = args[:excluded_placements] unless args[:excluded_placements].nil? - @excluded_user_lists = args[:excluded_user_lists] unless args[:excluded_user_lists].nil? - @excluded_verticals = args[:excluded_verticals] unless args[:excluded_verticals].nil? - @geo_criteria_ids = args[:geo_criteria_ids] unless args[:geo_criteria_ids].nil? - @is_active = args[:is_active] unless args[:is_active].nil? - @kind = args[:kind] unless args[:kind].nil? - @languages = args[:languages] unless args[:languages].nil? - @mobile_carriers = args[:mobile_carriers] unless args[:mobile_carriers].nil? - @mobile_devices = args[:mobile_devices] unless args[:mobile_devices].nil? - @mobile_operating_system_versions = args[:mobile_operating_system_versions] unless args[:mobile_operating_system_versions].nil? - @placements = args[:placements] unless args[:placements].nil? - @platforms = args[:platforms] unless args[:platforms].nil? - @supported_creative_attributes = args[:supported_creative_attributes] unless args[:supported_creative_attributes].nil? - @user_lists = args[:user_lists] unless args[:user_lists].nil? - @vendor_types = args[:vendor_types] unless args[:vendor_types].nil? - @verticals = args[:verticals] unless args[:verticals].nil? - end - - # - class Dimension - include Google::Apis::Core::Hashable - - # Height in pixels. - # Corresponds to the JSON property `height` - # @return [String] - attr_accessor :height - - # Width in pixels. - # Corresponds to the JSON property `width` - # @return [String] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @height = args[:height] unless args[:height].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # - class ExcludedPlacement - include Google::Apis::Core::Hashable - - # The value of the placement. Interpretation depends on the placement type, e.g. - # URL for a site placement, channel name for a channel placement, app id for a - # mobile app placement. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - # The type of the placement. - # 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) - @token = args[:token] unless args[:token].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class Placement - include Google::Apis::Core::Hashable - - # The value of the placement. Interpretation depends on the placement type, e.g. - # URL for a site placement, channel name for a channel placement, app id for a - # mobile app placement. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - # The type of the placement. - # 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) - @token = args[:token] unless args[:token].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # - class PretargetingConfigList - include Google::Apis::Core::Hashable - - # A list of pretargeting configs - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - end - end -end diff --git a/generated/google/apis/adexchangebuyer_v1_3/representations.rb b/generated/google/apis/adexchangebuyer_v1_3/representations.rb deleted file mode 100644 index 2e739ce62..000000000 --- a/generated/google/apis/adexchangebuyer_v1_3/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adexchangebuyer_v1_3/service.rb b/generated/google/apis/adexchangebuyer_v1_3/service.rb deleted file mode 100644 index 44b938747..000000000 --- a/generated/google/apis/adexchangebuyer_v1_3/service.rb +++ /dev/null @@ -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] account_id - # When specified, only creatives for the given account ids are returned. - # @param [Array, 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 diff --git a/generated/google/apis/adexchangeseller_v2_0.rb b/generated/google/apis/adexchangeseller_v2_0.rb deleted file mode 100644 index 3bc7b2eff..000000000 --- a/generated/google/apis/adexchangeseller_v2_0.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adexchangeseller_v2_0/classes.rb b/generated/google/apis/adexchangeseller_v2_0/classes.rb deleted file mode 100644 index 3c6f838dd..000000000 --- a/generated/google/apis/adexchangeseller_v2_0/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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>] - 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] - attr_accessor :totals - - # Any warnings associated with generation of the report. - # Corresponds to the JSON property `warnings` - # @return [Array] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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 diff --git a/generated/google/apis/adexchangeseller_v2_0/representations.rb b/generated/google/apis/adexchangeseller_v2_0/representations.rb deleted file mode 100644 index 564fe91cb..000000000 --- a/generated/google/apis/adexchangeseller_v2_0/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adexchangeseller_v2_0/service.rb b/generated/google/apis/adexchangeseller_v2_0/service.rb deleted file mode 100644 index 9b64189ac..000000000 --- a/generated/google/apis/adexchangeseller_v2_0/service.rb +++ /dev/null @@ -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] 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] 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] metric - # Numeric columns to include in the report. - # @param [Array, 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 diff --git a/generated/google/apis/admin_directory_v1.rb b/generated/google/apis/admin_directory_v1.rb deleted file mode 100644 index 374940427..000000000 --- a/generated/google/apis/admin_directory_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/admin_directory_v1/classes.rb b/generated/google/apis/admin_directory_v1/classes.rb deleted file mode 100644 index 6a1530450..000000000 --- a/generated/google/apis/admin_directory_v1/classes.rb +++ /dev/null @@ -1,2389 +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 - - # JSON template for Alias object in Directory API. - class Alias - include Google::Apis::Core::Hashable - - # A alias email - # Corresponds to the JSON property `alias` - # @return [String] - attr_accessor :alias - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Unique id of the group (Read-only) Unique id of the user (Read-only) - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Group's primary email (Read-only) User's primary email (Read-only) - # Corresponds to the JSON property `primaryEmail` - # @return [String] - attr_accessor :primary_email - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alias = args[:alias] unless args[:alias].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @primary_email = args[:primary_email] unless args[:primary_email].nil? - end - end - - # JSON response template to list aliases in Directory API. - class Aliases - include Google::Apis::Core::Hashable - - # List of alias objects. - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # 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) - @aliases = args[:aliases] unless args[:aliases].nil? - @etag = args[:etag] unless args[:etag].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The template that returns individual ASP (Access Code) data. - class Asp - include Google::Apis::Core::Hashable - - # The unique ID of the ASP. - # Corresponds to the JSON property `codeId` - # @return [Fixnum] - attr_accessor :code_id - - # The time when the ASP was created. Expressed in Unix time format. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # ETag of the ASP. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The type of the API resource. This is always admin#directory#asp. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The time when the ASP was last used. Expressed in Unix time format. - # Corresponds to the JSON property `lastTimeUsed` - # @return [String] - attr_accessor :last_time_used - - # The name of the application that the user, represented by their userId, - # entered when the ASP was created. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The unique ID of the user who issued the ASP. - # Corresponds to the JSON property `userKey` - # @return [String] - attr_accessor :user_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code_id = args[:code_id] unless args[:code_id].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @etag = args[:etag] unless args[:etag].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_time_used = args[:last_time_used] unless args[:last_time_used].nil? - @name = args[:name] unless args[:name].nil? - @user_key = args[:user_key] unless args[:user_key].nil? - end - end - - # - class Asps - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # A list of ASP resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of the API resource. This is always admin#directory#aspList. - # 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 - - # 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] - 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 Chrome Os Device resource in Directory API. - class ChromeOsDevice - include Google::Apis::Core::Hashable - - # List of active time ranges (Read-only) - # Corresponds to the JSON property `activeTimeRanges` - # @return [Array] - attr_accessor :active_time_ranges - - # AssetId specified during enrollment or through later annotation - # Corresponds to the JSON property `annotatedAssetId` - # @return [String] - attr_accessor :annotated_asset_id - - # Address or location of the device as noted by the administrator - # Corresponds to the JSON property `annotatedLocation` - # @return [String] - attr_accessor :annotated_location - - # User of the device - # Corresponds to the JSON property `annotatedUser` - # @return [String] - attr_accessor :annotated_user - - # Chromebook boot mode (Read-only) - # Corresponds to the JSON property `bootMode` - # @return [String] - attr_accessor :boot_mode - - # Unique identifier of Chrome OS Device (Read-only) - # Corresponds to the JSON property `deviceId` - # @return [String] - attr_accessor :device_id - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Chromebook Mac Address on ethernet network interface (Read-only) - # Corresponds to the JSON property `ethernetMacAddress` - # @return [String] - attr_accessor :ethernet_mac_address - - # Chromebook firmware version (Read-only) - # Corresponds to the JSON property `firmwareVersion` - # @return [String] - attr_accessor :firmware_version - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Date and time the device was last enrolled (Read-only) - # Corresponds to the JSON property `lastEnrollmentTime` - # @return [DateTime] - attr_accessor :last_enrollment_time - - # Date and time the device was last synchronized with the policy settings in the - # Google Apps administrator control panel (Read-only) - # Corresponds to the JSON property `lastSync` - # @return [DateTime] - attr_accessor :last_sync - - # Chromebook Mac Address on wifi network interface (Read-only) - # Corresponds to the JSON property `macAddress` - # @return [String] - attr_accessor :mac_address - - # Mobile Equipment identifier for the 3G mobile card in the Chromebook (Read- - # only) - # Corresponds to the JSON property `meid` - # @return [String] - attr_accessor :meid - - # Chromebook Model (Read-only) - # Corresponds to the JSON property `model` - # @return [String] - attr_accessor :model - - # Notes added by the administrator - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # Chromebook order number (Read-only) - # Corresponds to the JSON property `orderNumber` - # @return [String] - attr_accessor :order_number - - # OrgUnit of the device - # Corresponds to the JSON property `orgUnitPath` - # @return [String] - attr_accessor :org_unit_path - - # Chromebook Os Version (Read-only) - # Corresponds to the JSON property `osVersion` - # @return [String] - attr_accessor :os_version - - # Chromebook platform version (Read-only) - # Corresponds to the JSON property `platformVersion` - # @return [String] - attr_accessor :platform_version - - # List of recent device users, in descending order by last login time (Read-only) - # Corresponds to the JSON property `recentUsers` - # @return [Array] - attr_accessor :recent_users - - # Chromebook serial number (Read-only) - # Corresponds to the JSON property `serialNumber` - # @return [String] - attr_accessor :serial_number - - # status of the device (Read-only) - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Final date the device will be supported (Read-only) - # Corresponds to the JSON property `supportEndDate` - # @return [DateTime] - attr_accessor :support_end_date - - # Will Chromebook auto renew after support end date (Read-only) - # Corresponds to the JSON property `willAutoRenew` - # @return [Boolean] - attr_accessor :will_auto_renew - alias_method :will_auto_renew?, :will_auto_renew - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active_time_ranges = args[:active_time_ranges] unless args[:active_time_ranges].nil? - @annotated_asset_id = args[:annotated_asset_id] unless args[:annotated_asset_id].nil? - @annotated_location = args[:annotated_location] unless args[:annotated_location].nil? - @annotated_user = args[:annotated_user] unless args[:annotated_user].nil? - @boot_mode = args[:boot_mode] unless args[:boot_mode].nil? - @device_id = args[:device_id] unless args[:device_id].nil? - @etag = args[:etag] unless args[:etag].nil? - @ethernet_mac_address = args[:ethernet_mac_address] unless args[:ethernet_mac_address].nil? - @firmware_version = args[:firmware_version] unless args[:firmware_version].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_enrollment_time = args[:last_enrollment_time] unless args[:last_enrollment_time].nil? - @last_sync = args[:last_sync] unless args[:last_sync].nil? - @mac_address = args[:mac_address] unless args[:mac_address].nil? - @meid = args[:meid] unless args[:meid].nil? - @model = args[:model] unless args[:model].nil? - @notes = args[:notes] unless args[:notes].nil? - @order_number = args[:order_number] unless args[:order_number].nil? - @org_unit_path = args[:org_unit_path] unless args[:org_unit_path].nil? - @os_version = args[:os_version] unless args[:os_version].nil? - @platform_version = args[:platform_version] unless args[:platform_version].nil? - @recent_users = args[:recent_users] unless args[:recent_users].nil? - @serial_number = args[:serial_number] unless args[:serial_number].nil? - @status = args[:status] unless args[:status].nil? - @support_end_date = args[:support_end_date] unless args[:support_end_date].nil? - @will_auto_renew = args[:will_auto_renew] unless args[:will_auto_renew].nil? - end - - # - class ActiveTimeRange - include Google::Apis::Core::Hashable - - # Duration in milliseconds - # Corresponds to the JSON property `activeTime` - # @return [Fixnum] - attr_accessor :active_time - - # Date of usage - # Corresponds to the JSON property `date` - # @return [Date] - attr_accessor :date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active_time = args[:active_time] unless args[:active_time].nil? - @date = args[:date] unless args[:date].nil? - end - end - - # - class RecentUser - include Google::Apis::Core::Hashable - - # Email address of the user. Present only if the user type is managed - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The type of the user - # 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) - @email = args[:email] unless args[:email].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # JSON response template for List Chrome OS Devices operation in Directory API. - class ChromeOsDevices - include Google::Apis::Core::Hashable - - # List of Chrome OS Device objects. - # Corresponds to the JSON property `chromeosdevices` - # @return [Array] - attr_accessor :chromeosdevices - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access next page of this result. - # 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) - @chromeosdevices = args[:chromeosdevices] unless args[:chromeosdevices].nil? - @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? - end - end - - # JSON template for Group resource in Directory API. - class Group - include Google::Apis::Core::Hashable - - # Is the group created by admin (Read-only) * - # Corresponds to the JSON property `adminCreated` - # @return [Boolean] - attr_accessor :admin_created - alias_method :admin_created?, :admin_created - - # List of aliases (Read-only) - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - - # Description of the group - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Group direct members count - # Corresponds to the JSON property `directMembersCount` - # @return [String] - attr_accessor :direct_members_count - - # Email of Group - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Unique identifier of Group (Read-only) - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Group name - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # List of non editable aliases (Read-only) - # Corresponds to the JSON property `nonEditableAliases` - # @return [Array] - attr_accessor :non_editable_aliases - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @admin_created = args[:admin_created] unless args[:admin_created].nil? - @aliases = args[:aliases] unless args[:aliases].nil? - @description = args[:description] unless args[:description].nil? - @direct_members_count = args[:direct_members_count] unless args[:direct_members_count].nil? - @email = args[:email] unless args[:email].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @non_editable_aliases = args[:non_editable_aliases] unless args[:non_editable_aliases].nil? - end - end - - # JSON response template for List Groups operation in Directory API. - class Groups - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # List of group objects. - # Corresponds to the JSON property `groups` - # @return [Array] - attr_accessor :groups - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access next page of this result. - # 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? - @groups = args[:groups] unless args[:groups].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 Member resource in Directory API. - class Member - include Google::Apis::Core::Hashable - - # Email of member (Read-only) - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Unique identifier of customer member (Read-only) Unique identifier of group ( - # Read-only) Unique identifier of member (Read-only) - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Role of member - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # Type of member (Immutable) - # 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) - @email = args[:email] unless args[:email].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @role = args[:role] unless args[:role].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # JSON response template for List Members operation in Directory API. - class Members - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # List of member objects. - # Corresponds to the JSON property `members` - # @return [Array] - attr_accessor :members - - # Token used to access next page of this result. - # 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? - @kind = args[:kind] unless args[:kind].nil? - @members = args[:members] unless args[:members].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # JSON template for Mobile Device resource in Directory API. - class MobileDevice - include Google::Apis::Core::Hashable - - # List of applications installed on Mobile Device - # Corresponds to the JSON property `applications` - # @return [Array] - attr_accessor :applications - - # Mobile Device Baseband version (Read-only) - # Corresponds to the JSON property `basebandVersion` - # @return [String] - attr_accessor :baseband_version - - # Mobile Device Build number (Read-only) - # Corresponds to the JSON property `buildNumber` - # @return [String] - attr_accessor :build_number - - # The default locale used on the Mobile Device (Read-only) - # Corresponds to the JSON property `defaultLanguage` - # @return [String] - attr_accessor :default_language - - # Mobile Device compromised status (Read-only) - # Corresponds to the JSON property `deviceCompromisedStatus` - # @return [String] - attr_accessor :device_compromised_status - - # Mobile Device serial number (Read-only) - # Corresponds to the JSON property `deviceId` - # @return [String] - attr_accessor :device_id - - # List of owner user's email addresses (Read-only) - # Corresponds to the JSON property `email` - # @return [Array] - attr_accessor :email - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Date and time the device was first synchronized with the policy settings in - # the Google Apps administrator control panel (Read-only) - # Corresponds to the JSON property `firstSync` - # @return [DateTime] - attr_accessor :first_sync - - # Mobile Device Hardware Id (Read-only) - # Corresponds to the JSON property `hardwareId` - # @return [String] - attr_accessor :hardware_id - - # Mobile Device IMEI number (Read-only) - # Corresponds to the JSON property `imei` - # @return [String] - attr_accessor :imei - - # Mobile Device Kernel version (Read-only) - # Corresponds to the JSON property `kernelVersion` - # @return [String] - attr_accessor :kernel_version - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Date and time the device was last synchronized with the policy settings in the - # Google Apps administrator control panel (Read-only) - # Corresponds to the JSON property `lastSync` - # @return [DateTime] - attr_accessor :last_sync - - # Boolean indicating if this account is on owner/primary profile or not (Read- - # only) - # Corresponds to the JSON property `managedAccountIsOnOwnerProfile` - # @return [Boolean] - attr_accessor :managed_account_is_on_owner_profile - alias_method :managed_account_is_on_owner_profile?, :managed_account_is_on_owner_profile - - # Mobile Device MEID number (Read-only) - # Corresponds to the JSON property `meid` - # @return [String] - attr_accessor :meid - - # Name of the model of the device - # Corresponds to the JSON property `model` - # @return [String] - attr_accessor :model - - # List of owner user's names (Read-only) - # Corresponds to the JSON property `name` - # @return [Array] - attr_accessor :name - - # Mobile Device mobile or network operator (if available) (Read-only) - # Corresponds to the JSON property `networkOperator` - # @return [String] - attr_accessor :network_operator - - # Name of the mobile operating system - # Corresponds to the JSON property `os` - # @return [String] - attr_accessor :os - - # Unique identifier of Mobile Device (Read-only) - # Corresponds to the JSON property `resourceId` - # @return [String] - attr_accessor :resource_id - - # Mobile Device SSN or Serial Number (Read-only) - # Corresponds to the JSON property `serialNumber` - # @return [String] - attr_accessor :serial_number - - # Status of the device (Read-only) - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The type of device (Read-only) - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Mobile Device user agent - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # Mobile Device WiFi MAC address (Read-only) - # Corresponds to the JSON property `wifiMacAddress` - # @return [String] - attr_accessor :wifi_mac_address - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @applications = args[:applications] unless args[:applications].nil? - @baseband_version = args[:baseband_version] unless args[:baseband_version].nil? - @build_number = args[:build_number] unless args[:build_number].nil? - @default_language = args[:default_language] unless args[:default_language].nil? - @device_compromised_status = args[:device_compromised_status] unless args[:device_compromised_status].nil? - @device_id = args[:device_id] unless args[:device_id].nil? - @email = args[:email] unless args[:email].nil? - @etag = args[:etag] unless args[:etag].nil? - @first_sync = args[:first_sync] unless args[:first_sync].nil? - @hardware_id = args[:hardware_id] unless args[:hardware_id].nil? - @imei = args[:imei] unless args[:imei].nil? - @kernel_version = args[:kernel_version] unless args[:kernel_version].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_sync = args[:last_sync] unless args[:last_sync].nil? - @managed_account_is_on_owner_profile = args[:managed_account_is_on_owner_profile] unless args[:managed_account_is_on_owner_profile].nil? - @meid = args[:meid] unless args[:meid].nil? - @model = args[:model] unless args[:model].nil? - @name = args[:name] unless args[:name].nil? - @network_operator = args[:network_operator] unless args[:network_operator].nil? - @os = args[:os] unless args[:os].nil? - @resource_id = args[:resource_id] unless args[:resource_id].nil? - @serial_number = args[:serial_number] unless args[:serial_number].nil? - @status = args[:status] unless args[:status].nil? - @type = args[:type] unless args[:type].nil? - @user_agent = args[:user_agent] unless args[:user_agent].nil? - @wifi_mac_address = args[:wifi_mac_address] unless args[:wifi_mac_address].nil? - end - - # - class Application - include Google::Apis::Core::Hashable - - # Display name of application - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Package name of application - # Corresponds to the JSON property `packageName` - # @return [String] - attr_accessor :package_name - - # List of Permissions for application - # Corresponds to the JSON property `permission` - # @return [Array] - attr_accessor :permission - - # Version code of application - # Corresponds to the JSON property `versionCode` - # @return [Fixnum] - attr_accessor :version_code - - # Version name of application - # Corresponds to the JSON property `versionName` - # @return [String] - attr_accessor :version_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? - @package_name = args[:package_name] unless args[:package_name].nil? - @permission = args[:permission] unless args[:permission].nil? - @version_code = args[:version_code] unless args[:version_code].nil? - @version_name = args[:version_name] unless args[:version_name].nil? - end - end - end - - # JSON request template for firing commands on Mobile Device in Directory - # Devices API. - class MobileDeviceAction - include Google::Apis::Core::Hashable - - # Action to be taken on the Mobile Device - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @action = args[:action] unless args[:action].nil? - end - end - - # JSON response template for List Mobile Devices operation in Directory API. - class MobileDevices - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # List of Mobile Device objects. - # Corresponds to the JSON property `mobiledevices` - # @return [Array] - attr_accessor :mobiledevices - - # Token used to access next page of this result. - # 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? - @kind = args[:kind] unless args[:kind].nil? - @mobiledevices = args[:mobiledevices] unless args[:mobiledevices].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Template for a notification resource. - class Notification - include Google::Apis::Core::Hashable - - # Body of the notification (Read-only) - # Corresponds to the JSON property `body` - # @return [String] - attr_accessor :body - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Address from which the notification is received (Read-only) - # Corresponds to the JSON property `fromAddress` - # @return [String] - attr_accessor :from_address - - # Boolean indicating whether the notification is unread or not. - # Corresponds to the JSON property `isUnread` - # @return [Boolean] - attr_accessor :is_unread - alias_method :is_unread?, :is_unread - - # The type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `notificationId` - # @return [String] - attr_accessor :notification_id - - # Time at which notification was sent (Read-only) - # Corresponds to the JSON property `sendTime` - # @return [DateTime] - attr_accessor :send_time - - # Subject of the notification (Read-only) - # Corresponds to the JSON property `subject` - # @return [String] - attr_accessor :subject - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @body = args[:body] unless args[:body].nil? - @etag = args[:etag] unless args[:etag].nil? - @from_address = args[:from_address] unless args[:from_address].nil? - @is_unread = args[:is_unread] unless args[:is_unread].nil? - @kind = args[:kind] unless args[:kind].nil? - @notification_id = args[:notification_id] unless args[:notification_id].nil? - @send_time = args[:send_time] unless args[:send_time].nil? - @subject = args[:subject] unless args[:subject].nil? - end - end - - # Template for notifications list response. - class Notifications - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # List of notifications in this page. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token for fetching the next page of notifications. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Number of unread notification for the domain. - # Corresponds to the JSON property `unreadNotificationsCount` - # @return [Fixnum] - attr_accessor :unread_notifications_count - - 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? - @unread_notifications_count = args[:unread_notifications_count] unless args[:unread_notifications_count].nil? - end - end - - # JSON template for Org Unit resource in Directory API. - class OrgUnit - include Google::Apis::Core::Hashable - - # Should block inheritance - # Corresponds to the JSON property `blockInheritance` - # @return [Boolean] - attr_accessor :block_inheritance - alias_method :block_inheritance?, :block_inheritance - - # Description of OrgUnit - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of OrgUnit - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Id of OrgUnit - # Corresponds to the JSON property `orgUnitId` - # @return [String] - attr_accessor :org_unit_id - - # Path of OrgUnit - # Corresponds to the JSON property `orgUnitPath` - # @return [String] - attr_accessor :org_unit_path - - # Id of parent OrgUnit - # Corresponds to the JSON property `parentOrgUnitId` - # @return [String] - attr_accessor :parent_org_unit_id - - # Path of parent OrgUnit - # Corresponds to the JSON property `parentOrgUnitPath` - # @return [String] - attr_accessor :parent_org_unit_path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @block_inheritance = args[:block_inheritance] unless args[:block_inheritance].nil? - @description = args[:description] unless args[:description].nil? - @etag = args[:etag] unless args[:etag].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @org_unit_id = args[:org_unit_id] unless args[:org_unit_id].nil? - @org_unit_path = args[:org_unit_path] unless args[:org_unit_path].nil? - @parent_org_unit_id = args[:parent_org_unit_id] unless args[:parent_org_unit_id].nil? - @parent_org_unit_path = args[:parent_org_unit_path] unless args[:parent_org_unit_path].nil? - end - end - - # JSON response template for List Organization Units operation in Directory API. - class OrgUnits - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # List of user objects. - # Corresponds to the JSON property `organizationUnits` - # @return [Array] - attr_accessor :organization_units - - 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? - @organization_units = args[:organization_units] unless args[:organization_units].nil? - end - end - - # JSON template for Schema resource in Directory API. - class Schema - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Fields of Schema - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Unique identifier of Schema (Read-only) - # Corresponds to the JSON property `schemaId` - # @return [String] - attr_accessor :schema_id - - # Schema name - # Corresponds to the JSON property `schemaName` - # @return [String] - attr_accessor :schema_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @fields = args[:fields] unless args[:fields].nil? - @kind = args[:kind] unless args[:kind].nil? - @schema_id = args[:schema_id] unless args[:schema_id].nil? - @schema_name = args[:schema_name] unless args[:schema_name].nil? - end - end - - # JSON template for FieldSpec resource for Schemas in Directory API. - class SchemaFieldSpec - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Unique identifier of Field (Read-only) - # Corresponds to the JSON property `fieldId` - # @return [String] - attr_accessor :field_id - - # Name of the field. - # Corresponds to the JSON property `fieldName` - # @return [String] - attr_accessor :field_name - - # Type of the field. - # Corresponds to the JSON property `fieldType` - # @return [String] - attr_accessor :field_type - - # Boolean specifying whether the field is indexed or not. - # Corresponds to the JSON property `indexed` - # @return [Boolean] - attr_accessor :indexed - alias_method :indexed?, :indexed - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Boolean specifying whether this is a multi-valued field or not. - # Corresponds to the JSON property `multiValued` - # @return [Boolean] - attr_accessor :multi_valued - alias_method :multi_valued?, :multi_valued - - # Indexing spec for a numeric field. By default, only exact match queries will - # be supported for numeric fields. Setting the numericIndexingSpec allows range - # queries to be supported. - # Corresponds to the JSON property `numericIndexingSpec` - # @return [Google::Apis::AdminDirectoryV1::SchemaFieldSpec::NumericIndexingSpec] - attr_accessor :numeric_indexing_spec - - # Read ACLs on the field specifying who can view values of this field. Valid - # values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF". - # Corresponds to the JSON property `readAccessType` - # @return [String] - attr_accessor :read_access_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @field_id = args[:field_id] unless args[:field_id].nil? - @field_name = args[:field_name] unless args[:field_name].nil? - @field_type = args[:field_type] unless args[:field_type].nil? - @indexed = args[:indexed] unless args[:indexed].nil? - @kind = args[:kind] unless args[:kind].nil? - @multi_valued = args[:multi_valued] unless args[:multi_valued].nil? - @numeric_indexing_spec = args[:numeric_indexing_spec] unless args[:numeric_indexing_spec].nil? - @read_access_type = args[:read_access_type] unless args[:read_access_type].nil? - end - - # Indexing spec for a numeric field. By default, only exact match queries will - # be supported for numeric fields. Setting the numericIndexingSpec allows range - # queries to be supported. - class NumericIndexingSpec - include Google::Apis::Core::Hashable - - # Maximum value of this field. This is meant to be indicative rather than - # enforced. Values outside this range will still be indexed, but search may not - # be as performant. - # Corresponds to the JSON property `maxValue` - # @return [Float] - attr_accessor :max_value - - # Minimum value of this field. This is meant to be indicative rather than - # enforced. Values outside this range will still be indexed, but search may not - # be as performant. - # Corresponds to the JSON property `minValue` - # @return [Float] - attr_accessor :min_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max_value = args[:max_value] unless args[:max_value].nil? - @min_value = args[:min_value] unless args[:min_value].nil? - end - end - end - - # JSON response template for List Schema operation in Directory API. - class Schemas - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # List of UserSchema objects. - # Corresponds to the JSON property `schemas` - # @return [Array] - attr_accessor :schemas - - 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? - @schemas = args[:schemas] unless args[:schemas].nil? - end - end - - # JSON template for token resource in Directory API. - class Token - include Google::Apis::Core::Hashable - - # Whether the application is registered with Google. The value is true if the - # application has an anonymous Client ID. - # Corresponds to the JSON property `anonymous` - # @return [Boolean] - attr_accessor :anonymous - alias_method :anonymous?, :anonymous - - # The Client ID of the application the token is issued to. - # Corresponds to the JSON property `clientId` - # @return [String] - attr_accessor :client_id - - # The displayable name of the application the token is issued to. - # Corresponds to the JSON property `displayText` - # @return [String] - attr_accessor :display_text - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The type of the API resource. This is always admin#directory#token. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Whether the token is issued to an installed application. The value is true if - # the application is installed to a desktop or mobile device. - # Corresponds to the JSON property `nativeApp` - # @return [Boolean] - attr_accessor :native_app - alias_method :native_app?, :native_app - - # A list of authorization scopes the application is granted. - # Corresponds to the JSON property `scopes` - # @return [Array] - attr_accessor :scopes - - # The unique ID of the user that issued the token. - # Corresponds to the JSON property `userKey` - # @return [String] - attr_accessor :user_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @anonymous = args[:anonymous] unless args[:anonymous].nil? - @client_id = args[:client_id] unless args[:client_id].nil? - @display_text = args[:display_text] unless args[:display_text].nil? - @etag = args[:etag] unless args[:etag].nil? - @kind = args[:kind] unless args[:kind].nil? - @native_app = args[:native_app] unless args[:native_app].nil? - @scopes = args[:scopes] unless args[:scopes].nil? - @user_key = args[:user_key] unless args[:user_key].nil? - end - end - - # JSON response template for List tokens operation in Directory API. - class Tokens - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # A list of Token resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of the API resource. This is always admin#directory#tokenList. - # 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 - - # JSON template for User object in Directory API. - class User - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `addresses` - # @return [Object] - attr_accessor :addresses - - # Indicates if user has agreed to terms (Read-only) - # Corresponds to the JSON property `agreedToTerms` - # @return [Boolean] - attr_accessor :agreed_to_terms - alias_method :agreed_to_terms?, :agreed_to_terms - - # List of aliases (Read-only) - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - - # Boolean indicating if the user should change password in next login - # Corresponds to the JSON property `changePasswordAtNextLogin` - # @return [Boolean] - attr_accessor :change_password_at_next_login - alias_method :change_password_at_next_login?, :change_password_at_next_login - - # User's Google account creation time. (Read-only) - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # Custom fields of the user. - # Corresponds to the JSON property `customSchemas` - # @return [Hash>] - attr_accessor :custom_schemas - - # CustomerId of User (Read-only) - # Corresponds to the JSON property `customerId` - # @return [String] - attr_accessor :customer_id - - # - # Corresponds to the JSON property `deletionTime` - # @return [DateTime] - attr_accessor :deletion_time - - # - # Corresponds to the JSON property `emails` - # @return [Object] - attr_accessor :emails - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # - # Corresponds to the JSON property `externalIds` - # @return [Object] - attr_accessor :external_ids - - # Hash function name for password. Supported are MD5, SHA-1 and crypt - # Corresponds to the JSON property `hashFunction` - # @return [String] - attr_accessor :hash_function - - # Unique identifier of User (Read-only) - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # Corresponds to the JSON property `ims` - # @return [Object] - attr_accessor :ims - - # Boolean indicating if user is included in Global Address List - # Corresponds to the JSON property `includeInGlobalAddressList` - # @return [Boolean] - attr_accessor :include_in_global_address_list - alias_method :include_in_global_address_list?, :include_in_global_address_list - - # Boolean indicating if ip is whitelisted - # Corresponds to the JSON property `ipWhitelisted` - # @return [Boolean] - attr_accessor :ip_whitelisted - alias_method :ip_whitelisted?, :ip_whitelisted - - # Boolean indicating if the user is admin (Read-only) - # Corresponds to the JSON property `isAdmin` - # @return [Boolean] - attr_accessor :is_admin - alias_method :is_admin?, :is_admin - - # Boolean indicating if the user is delegated admin (Read-only) - # Corresponds to the JSON property `isDelegatedAdmin` - # @return [Boolean] - attr_accessor :is_delegated_admin - alias_method :is_delegated_admin?, :is_delegated_admin - - # Is mailbox setup (Read-only) - # Corresponds to the JSON property `isMailboxSetup` - # @return [Boolean] - attr_accessor :is_mailbox_setup - alias_method :is_mailbox_setup?, :is_mailbox_setup - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # User's last login time. (Read-only) - # Corresponds to the JSON property `lastLoginTime` - # @return [DateTime] - attr_accessor :last_login_time - - # JSON template for name of a user in Directory API. - # Corresponds to the JSON property `name` - # @return [Google::Apis::AdminDirectoryV1::UserName] - attr_accessor :name - - # List of non editable aliases (Read-only) - # Corresponds to the JSON property `nonEditableAliases` - # @return [Array] - attr_accessor :non_editable_aliases - - # - # Corresponds to the JSON property `notes` - # @return [Object] - attr_accessor :notes - - # OrgUnit of User - # Corresponds to the JSON property `orgUnitPath` - # @return [String] - attr_accessor :org_unit_path - - # - # Corresponds to the JSON property `organizations` - # @return [Object] - attr_accessor :organizations - - # User's password - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # - # Corresponds to the JSON property `phones` - # @return [Object] - attr_accessor :phones - - # username of User - # Corresponds to the JSON property `primaryEmail` - # @return [String] - attr_accessor :primary_email - - # - # Corresponds to the JSON property `relations` - # @return [Object] - attr_accessor :relations - - # Indicates if user is suspended - # Corresponds to the JSON property `suspended` - # @return [Boolean] - attr_accessor :suspended - alias_method :suspended?, :suspended - - # Suspension reason if user is suspended (Read-only) - # Corresponds to the JSON property `suspensionReason` - # @return [String] - attr_accessor :suspension_reason - - # ETag of the user's photo (Read-only) - # Corresponds to the JSON property `thumbnailPhotoEtag` - # @return [String] - attr_accessor :thumbnail_photo_etag - - # Photo Url of the user (Read-only) - # Corresponds to the JSON property `thumbnailPhotoUrl` - # @return [String] - attr_accessor :thumbnail_photo_url - - # - # Corresponds to the JSON property `websites` - # @return [Object] - attr_accessor :websites - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @addresses = args[:addresses] unless args[:addresses].nil? - @agreed_to_terms = args[:agreed_to_terms] unless args[:agreed_to_terms].nil? - @aliases = args[:aliases] unless args[:aliases].nil? - @change_password_at_next_login = args[:change_password_at_next_login] unless args[:change_password_at_next_login].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @custom_schemas = args[:custom_schemas] unless args[:custom_schemas].nil? - @customer_id = args[:customer_id] unless args[:customer_id].nil? - @deletion_time = args[:deletion_time] unless args[:deletion_time].nil? - @emails = args[:emails] unless args[:emails].nil? - @etag = args[:etag] unless args[:etag].nil? - @external_ids = args[:external_ids] unless args[:external_ids].nil? - @hash_function = args[:hash_function] unless args[:hash_function].nil? - @id = args[:id] unless args[:id].nil? - @ims = args[:ims] unless args[:ims].nil? - @include_in_global_address_list = args[:include_in_global_address_list] unless args[:include_in_global_address_list].nil? - @ip_whitelisted = args[:ip_whitelisted] unless args[:ip_whitelisted].nil? - @is_admin = args[:is_admin] unless args[:is_admin].nil? - @is_delegated_admin = args[:is_delegated_admin] unless args[:is_delegated_admin].nil? - @is_mailbox_setup = args[:is_mailbox_setup] unless args[:is_mailbox_setup].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_login_time = args[:last_login_time] unless args[:last_login_time].nil? - @name = args[:name] unless args[:name].nil? - @non_editable_aliases = args[:non_editable_aliases] unless args[:non_editable_aliases].nil? - @notes = args[:notes] unless args[:notes].nil? - @org_unit_path = args[:org_unit_path] unless args[:org_unit_path].nil? - @organizations = args[:organizations] unless args[:organizations].nil? - @password = args[:password] unless args[:password].nil? - @phones = args[:phones] unless args[:phones].nil? - @primary_email = args[:primary_email] unless args[:primary_email].nil? - @relations = args[:relations] unless args[:relations].nil? - @suspended = args[:suspended] unless args[:suspended].nil? - @suspension_reason = args[:suspension_reason] unless args[:suspension_reason].nil? - @thumbnail_photo_etag = args[:thumbnail_photo_etag] unless args[:thumbnail_photo_etag].nil? - @thumbnail_photo_url = args[:thumbnail_photo_url] unless args[:thumbnail_photo_url].nil? - @websites = args[:websites] unless args[:websites].nil? - end - end - - # JSON template for About (notes) of a user in Directory API. - class UserAbout - include Google::Apis::Core::Hashable - - # About entry can have a type which indicates the content type. It can either be - # plain or html. By default, notes contents are assumed to contain plain text. - # Corresponds to the JSON property `contentType` - # @return [String] - attr_accessor :content_type - - # Actual value of notes. - # 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) - @content_type = args[:content_type] unless args[:content_type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # JSON template for address. - class UserAddress - include Google::Apis::Core::Hashable - - # Country. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # Country code. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # Custom type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # Extended Address. - # Corresponds to the JSON property `extendedAddress` - # @return [String] - attr_accessor :extended_address - - # Formatted address. - # Corresponds to the JSON property `formatted` - # @return [String] - attr_accessor :formatted - - # Locality. - # Corresponds to the JSON property `locality` - # @return [String] - attr_accessor :locality - - # Other parts of address. - # Corresponds to the JSON property `poBox` - # @return [String] - attr_accessor :po_box - - # Postal code. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # If this is user's primary address. Only one entry could be marked as primary. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Region. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # User supplied address was structured. Structured addresses are NOT supported - # at this time. You might be able to write structured addresses, but any values - # will eventually be clobbered. - # Corresponds to the JSON property `sourceIsStructured` - # @return [Boolean] - attr_accessor :source_is_structured - alias_method :source_is_structured?, :source_is_structured - - # Street. - # Corresponds to the JSON property `streetAddress` - # @return [String] - attr_accessor :street_address - - # Each entry can have a type which indicates standard values of that entry. For - # example address could be of home, work etc. In addition to the standard type, - # an entry can have a custom type and can take any value. Such type should have - # the CUSTOM value as type and also have a customType value. - # 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) - @country = args[:country] unless args[:country].nil? - @country_code = args[:country_code] unless args[:country_code].nil? - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @extended_address = args[:extended_address] unless args[:extended_address].nil? - @formatted = args[:formatted] unless args[:formatted].nil? - @locality = args[:locality] unless args[:locality].nil? - @po_box = args[:po_box] unless args[:po_box].nil? - @postal_code = args[:postal_code] unless args[:postal_code].nil? - @primary = args[:primary] unless args[:primary].nil? - @region = args[:region] unless args[:region].nil? - @source_is_structured = args[:source_is_structured] unless args[:source_is_structured].nil? - @street_address = args[:street_address] unless args[:street_address].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # JSON template for an email. - class UserEmail - include Google::Apis::Core::Hashable - - # Email id of the user. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # Custom Type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # If this is user's primary email. Only one entry could be marked as primary. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Each entry can have a type which indicates standard types of that entry. For - # example email could be of home, work etc. In addition to the standard type, an - # entry can have a custom type and can take any value Such types should have the - # CUSTOM value as type and also have a customType value. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address = args[:address] unless args[:address].nil? - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @primary = args[:primary] unless args[:primary].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # JSON template for an externalId entry. - class UserExternalId - include Google::Apis::Core::Hashable - - # Custom type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # The type of the Id. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The value of the id. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # JSON template for instant messenger of an user. - class UserIm - include Google::Apis::Core::Hashable - - # Custom protocol. - # Corresponds to the JSON property `customProtocol` - # @return [String] - attr_accessor :custom_protocol - - # Custom type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # Instant messenger id. - # Corresponds to the JSON property `im` - # @return [String] - attr_accessor :im - - # If this is user's primary im. Only one entry could be marked as primary. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Protocol used in the instant messenger. It should be one of the values from - # ImProtocolTypes map. Similar to type, it can take a CUSTOM value and specify - # the custom name in customProtocol field. - # Corresponds to the JSON property `protocol` - # @return [String] - attr_accessor :protocol - - # Each entry can have a type which indicates standard types of that entry. For - # example instant messengers could be of home, work etc. In addition to the - # standard type, an entry can have a custom type and can take any value. Such - # types should have the CUSTOM value as type and also have a customType value. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_protocol = args[:custom_protocol] unless args[:custom_protocol].nil? - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @im = args[:im] unless args[:im].nil? - @primary = args[:primary] unless args[:primary].nil? - @protocol = args[:protocol] unless args[:protocol].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # JSON request template for setting/revoking admin status of a user in Directory - # API. - class UserMakeAdmin - include Google::Apis::Core::Hashable - - # Boolean indicating new admin status of the user - # Corresponds to the JSON property `status` - # @return [Boolean] - attr_accessor :status - alias_method :status?, :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] unless args[:status].nil? - end - end - - # JSON template for name of a user in Directory API. - class UserName - include Google::Apis::Core::Hashable - - # Last Name - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # Full Name - # Corresponds to the JSON property `fullName` - # @return [String] - attr_accessor :full_name - - # First Name - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @family_name = args[:family_name] unless args[:family_name].nil? - @full_name = args[:full_name] unless args[:full_name].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - end - end - - # JSON template for an organization entry. - class UserOrganization - include Google::Apis::Core::Hashable - - # The cost center of the users department. - # Corresponds to the JSON property `costCenter` - # @return [String] - attr_accessor :cost_center - - # Custom type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # Department within the organization. - # Corresponds to the JSON property `department` - # @return [String] - attr_accessor :department - - # Description of the organization. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The domain to which the organization belongs to. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # Location of the organization. This need not be fully qualified address. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # Name of the organization - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # If it user's primary organization. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Symbol of the organization. - # Corresponds to the JSON property `symbol` - # @return [String] - attr_accessor :symbol - - # Title (designation) of the user in the organization. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Each entry can have a type which indicates standard types of that entry. For - # example organization could be of school, work etc. In addition to the standard - # type, an entry can have a custom type and can give it any name. Such types - # should have the CUSTOM value as type and also have a CustomType value. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cost_center = args[:cost_center] unless args[:cost_center].nil? - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @department = args[:department] unless args[:department].nil? - @description = args[:description] unless args[:description].nil? - @domain = args[:domain] unless args[:domain].nil? - @location = args[:location] unless args[:location].nil? - @name = args[:name] unless args[:name].nil? - @primary = args[:primary] unless args[:primary].nil? - @symbol = args[:symbol] unless args[:symbol].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # JSON template for a phone entry. - class UserPhone - include Google::Apis::Core::Hashable - - # Custom Type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # If this is user's primary phone or not. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Each entry can have a type which indicates standard types of that entry. For - # example phone could be of home_fax, work, mobile etc. In addition to the - # standard type, an entry can have a custom type and can give it any name. Such - # types should have the CUSTOM value as type and also have a customType value. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Phone number. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @primary = args[:primary] unless args[:primary].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # JSON template for Photo object in Directory API. - class UserPhoto - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Height in pixels of the photo - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Unique identifier of User (Read-only) - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Mime Type of the photo - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # Base64 encoded photo data - # Corresponds to the JSON property `photoData` - # @return [String] - attr_accessor :photo_data - - # Primary email of User (Read-only) - # Corresponds to the JSON property `primaryEmail` - # @return [String] - attr_accessor :primary_email - - # Width in pixels of the photo - # 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) - @etag = args[:etag] unless args[:etag].nil? - @height = args[:height] unless args[:height].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - @photo_data = args[:photo_data] unless args[:photo_data].nil? - @primary_email = args[:primary_email] unless args[:primary_email].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # JSON template for a relation entry. - class UserRelation - include Google::Apis::Core::Hashable - - # Custom Type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # The relation of the user. Some of the possible values are mother, father, - # sister, brother, manager, assistant, partner. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The name of the relation. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # JSON request template to undelete a user in Directory API. - class UserUndelete - include Google::Apis::Core::Hashable - - # OrgUnit of User - # Corresponds to the JSON property `orgUnitPath` - # @return [String] - attr_accessor :org_unit_path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @org_unit_path = args[:org_unit_path] unless args[:org_unit_path].nil? - end - end - - # JSON template for a website entry. - class UserWebsite - include Google::Apis::Core::Hashable - - # Custom Type. - # Corresponds to the JSON property `customType` - # @return [String] - attr_accessor :custom_type - - # If this is user's primary website or not. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Each entry can have a type which indicates standard types of that entry. For - # example website could be of home, work, blog etc. In addition to the standard - # type, an entry can have a custom type and can give it any name. Such types - # should have the CUSTOM value as type and also have a customType value. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Website. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_type = args[:custom_type] unless args[:custom_type].nil? - @primary = args[:primary] unless args[:primary].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # JSON response template for List Users operation in Apps Directory API. - class Users - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access next page of this result. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Event that triggered this response (only used in case of Push Response) - # Corresponds to the JSON property `trigger_event` - # @return [String] - attr_accessor :trigger_event - - # List of user objects. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - 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? - @trigger_event = args[:trigger_event] unless args[:trigger_event].nil? - @users = args[:users] unless args[:users].nil? - end - end - - # JSON template for verification codes in Directory API. - class VerificationCode - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The type of the resource. This is always admin#directory#verificationCode. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The obfuscated unique ID of the user. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - # A current verification code for the user. Invalidated or used verification - # codes are not returned as part of the result. - # Corresponds to the JSON property `verificationCode` - # @return [String] - attr_accessor :verification_code - - 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? - @user_id = args[:user_id] unless args[:user_id].nil? - @verification_code = args[:verification_code] unless args[:verification_code].nil? - end - end - - # JSON response template for List verification codes operation in Directory API. - class VerificationCodes - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # A list of verification code resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of the resource. This is always admin#directory#verificationCodesList. - # 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 - end - end -end diff --git a/generated/google/apis/admin_directory_v1/representations.rb b/generated/google/apis/admin_directory_v1/representations.rb deleted file mode 100644 index 65e5e1fa5..000000000 --- a/generated/google/apis/admin_directory_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/admin_directory_v1/service.rb b/generated/google/apis/admin_directory_v1/service.rb deleted file mode 100644 index bd6bd4289..000000000 --- a/generated/google/apis/admin_directory_v1/service.rb +++ /dev/null @@ -1,2805 +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 AdminDirectoryV1 - # 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. - # - # @example - # require 'google/apis/admin_directory_v1' - # - # Admin = Google::Apis::AdminDirectoryV1 # Alias the module - # service = Admin::DirectoryService.new - # - # @see https://developers.google.com/admin-sdk/directory/ - class DirectoryService < 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/directory/v1/') - end - - # Delete an ASP issued by a user. - # @param [String] user_key - # Identifies the user in the API request. The value can be the user's primary - # email address, alias email address, or unique user ID. - # @param [Fixnum] code_id - # The unique ID of the ASP to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_asp(user_key, code_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/asps/{codeId}' - command = make_simple_command(:delete, path, options) - command.params['userKey'] = user_key unless user_key.nil? - command.params['codeId'] = code_id unless code_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 an ASP issued by a user. - # @param [String] user_key - # Identifies the user in the API request. The value can be the user's primary - # email address, alias email address, or unique user ID. - # @param [Fixnum] code_id - # The unique ID of the ASP. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Asp] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Asp] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_asp(user_key, code_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/asps/{codeId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Asp::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Asp - command.params['userKey'] = user_key unless user_key.nil? - command.params['codeId'] = code_id unless code_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 ASPs issued by a user. - # @param [String] user_key - # Identifies the user in the API request. The value can be the user's primary - # email address, alias email address, or unique user 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::AdminDirectoryV1::Asps] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Asps] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_asps(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/asps' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Asps::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Asps - command.params['userKey'] = user_key unless user_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 - - # Stop watching resources through this channel - # @param [Google::Apis::AdminDirectoryV1::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/directory_v1/channels/stop' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::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 - - # Retrieve Chrome OS Device - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] device_id - # Immutable id of Chrome OS Device - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AdminDirectoryV1::ChromeOsDevice] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_chrome_os_device(customer_id, device_id, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/chromeos/{deviceId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation - command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['deviceId'] = device_id unless device_id.nil? - command.query['projection'] = projection unless projection.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 - - # Retrieve all Chrome OS Devices of a customer (paginated) - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Fixnum] max_results - # Maximum number of results to return. Default is 100 - # @param [String] order_by - # Column to use for sorting results - # @param [String] page_token - # Token to specify next page in the list - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] query - # Search string in the format given at http://support.google.com/chromeos/a/bin/ - # answer.py?hl=en&answer=1698333 - # @param [String] sort_order - # Whether to return results in ascending or descending order. Only of use when - # orderBy is also used - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::ChromeOsDevices] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevices] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_chrome_os_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/chromeos' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevices::Representation - command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevices - command.params['customerId'] = customer_id unless customer_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projection'] = projection unless projection.nil? - command.query['query'] = query unless query.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update Chrome OS Device. This method supports patch semantics. - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] device_id - # Immutable id of Chrome OS Device - # @param [Google::Apis::AdminDirectoryV1::ChromeOsDevice] chrome_os_device_object - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AdminDirectoryV1::ChromeOsDevice] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/chromeos/{deviceId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation - command.request_object = chrome_os_device_object - command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation - command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['deviceId'] = device_id unless device_id.nil? - command.query['projection'] = projection unless projection.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update Chrome OS Device - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] device_id - # Immutable id of Chrome OS Device - # @param [Google::Apis::AdminDirectoryV1::ChromeOsDevice] chrome_os_device_object - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AdminDirectoryV1::ChromeOsDevice] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/chromeos/{deviceId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation - command.request_object = chrome_os_device_object - command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation - command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['deviceId'] = device_id unless device_id.nil? - command.query['projection'] = projection unless projection.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 Group - # @param [String] group_key - # Email or immutable Id of the group - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_group(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}' - command = make_simple_command(:delete, path, options) - command.params['groupKey'] = group_key unless group_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 - - # Retrieve Group - # @param [String] group_key - # Email or immutable Id of the group - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AdminDirectoryV1::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_group(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Group - command.params['groupKey'] = group_key unless group_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 - - # Create Group - # @param [Google::Apis::AdminDirectoryV1::Group] group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_group(group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Group - 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 - - # Retrieve all groups in a domain (paginated) - # @param [String] customer - # Immutable id of the Google Apps account. In case of multi-domain, to fetch all - # groups for a customer, fill this field instead of domain. - # @param [String] domain - # Name of the domain. Fill this field to get groups from only this domain. To - # return all groups in a multi-domain fill customer field instead. - # @param [Fixnum] max_results - # Maximum number of results to return. Default is 200 - # @param [String] page_token - # Token to specify next page in the list - # @param [String] user_key - # Email or immutable Id of the user if only those groups are to be listed, the - # given user is a member of. If Id, it should match with id of user object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::Groups] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Groups] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_groups(customer: nil, domain: nil, max_results: nil, page_token: nil, user_key: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Groups::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Groups - command.query['customer'] = customer unless customer.nil? - command.query['domain'] = domain unless domain.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['userKey'] = user_key unless user_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 - - # Update Group. This method supports patch semantics. - # @param [String] group_key - # Email or immutable Id of the group. If Id, it should match with id of group - # object - # @param [Google::Apis::AdminDirectoryV1::Group] group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_group(group_key, group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Group - command.params['groupKey'] = group_key unless group_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 - - # Update Group - # @param [String] group_key - # Email or immutable Id of the group. If Id, it should match with id of group - # object - # @param [Google::Apis::AdminDirectoryV1::Group] group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_group(group_key, group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Group - command.params['groupKey'] = group_key unless group_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 - - # Remove a alias for the group - # @param [String] group_key - # Email or immutable Id of the group - # @param [String] group_alias - # The alias to be removed - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_group_alias(group_key, group_alias, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/aliases/{alias}' - command = make_simple_command(:delete, path, options) - command.params['groupKey'] = group_key unless group_key.nil? - command.params['alias'] = group_alias unless group_alias.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 - - # Add a alias for the group - # @param [String] group_key - # Email or immutable Id of the group - # @param [Google::Apis::AdminDirectoryV1::Alias] alias_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::AdminDirectoryV1::Alias] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Alias] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_group_alias(group_key, alias_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/aliases' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation - command.request_object = alias_object - command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Alias - command.params['groupKey'] = group_key unless group_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 - - # List all aliases for a group - # @param [String] group_key - # Email or immutable Id of the group - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AdminDirectoryV1::Aliases] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Aliases] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group_aliases(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/aliases' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Aliases - command.params['groupKey'] = group_key unless group_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 - - # Remove membership. - # @param [String] group_key - # Email or immutable Id of the group - # @param [String] member_key - # Email or immutable Id of the member - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_member(group_key, member_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/members/{memberKey}' - command = make_simple_command(:delete, path, options) - command.params['groupKey'] = group_key unless group_key.nil? - command.params['memberKey'] = member_key unless member_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 - - # Retrieve Group Member - # @param [String] group_key - # Email or immutable Id of the group - # @param [String] member_key - # Email or immutable Id of the member - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Member] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Member] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_member(group_key, member_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/members/{memberKey}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Member - command.params['groupKey'] = group_key unless group_key.nil? - command.params['memberKey'] = member_key unless member_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 - - # Add user to the specified group. - # @param [String] group_key - # Email or immutable Id of the group - # @param [Google::Apis::AdminDirectoryV1::Member] member_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::AdminDirectoryV1::Member] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Member] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_member(group_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/members' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation - command.request_object = member_object - command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Member - command.params['groupKey'] = group_key unless group_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 - - # Retrieve all members in a group (paginated) - # @param [String] group_key - # Email or immutable Id of the group - # @param [Fixnum] max_results - # Maximum number of results to return. Default is 200 - # @param [String] page_token - # Token to specify next page in the list - # @param [String] roles - # Comma separated role values to filter list results on. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Members] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Members] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_members(group_key, max_results: nil, page_token: nil, roles: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/members' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Members::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Members - command.params['groupKey'] = group_key unless group_key.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.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 - - # Update membership of a user in the specified group. This method supports patch - # semantics. - # @param [String] group_key - # Email or immutable Id of the group. If Id, it should match with id of group - # object - # @param [String] member_key - # Email or immutable Id of the user. If Id, it should match with id of member - # object - # @param [Google::Apis::AdminDirectoryV1::Member] member_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::AdminDirectoryV1::Member] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Member] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/members/{memberKey}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation - command.request_object = member_object - command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Member - command.params['groupKey'] = group_key unless group_key.nil? - command.params['memberKey'] = member_key unless member_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 - - # Update membership of a user in the specified group. - # @param [String] group_key - # Email or immutable Id of the group. If Id, it should match with id of group - # object - # @param [String] member_key - # Email or immutable Id of the user. If Id, it should match with id of member - # object - # @param [Google::Apis::AdminDirectoryV1::Member] member_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::AdminDirectoryV1::Member] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Member] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups/{groupKey}/members/{memberKey}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation - command.request_object = member_object - command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Member - command.params['groupKey'] = group_key unless group_key.nil? - command.params['memberKey'] = member_key unless member_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 - - # Take action on Mobile Device - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] resource_id - # Immutable id of Mobile Device - # @param [Google::Apis::AdminDirectoryV1::MobileDeviceAction] mobile_device_action_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 action_mobile_device(customer_id, resource_id, mobile_device_action_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/mobile/{resourceId}/action' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::MobileDeviceAction::Representation - command.request_object = mobile_device_action_object - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['resourceId'] = resource_id unless resource_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 - - # Delete Mobile Device - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] resource_id - # Immutable id of Mobile Device - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_mobile_device(customer_id, resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/mobile/{resourceId}' - command = make_simple_command(:delete, path, options) - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['resourceId'] = resource_id unless resource_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 - - # Retrieve Mobile Device - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] resource_id - # Immutable id of Mobile Device - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AdminDirectoryV1::MobileDevice] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::MobileDevice] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mobile_device(customer_id, resource_id, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/mobile/{resourceId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevice::Representation - command.response_class = Google::Apis::AdminDirectoryV1::MobileDevice - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['resourceId'] = resource_id unless resource_id.nil? - command.query['projection'] = projection unless projection.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 - - # Retrieve all Mobile Devices of a customer (paginated) - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Fixnum] max_results - # Maximum number of results to return. Default is 100 - # @param [String] order_by - # Column to use for sorting results - # @param [String] page_token - # Token to specify next page in the list - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] query - # Search string in the format given at http://support.google.com/a/bin/answer.py? - # hl=en&answer=1408863#search - # @param [String] sort_order - # Whether to return results in ascending or descending order. Only of use when - # orderBy is also used - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::MobileDevices] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::MobileDevices] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mobile_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/devices/mobile' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevices::Representation - command.response_class = Google::Apis::AdminDirectoryV1::MobileDevices - command.params['customerId'] = customer_id unless customer_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projection'] = projection unless projection.nil? - command.query['query'] = query unless query.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 notification - # @param [String] customer - # The unique ID for the customer's Google account. The customerId is also - # returned as part of the Users resource. - # @param [String] notification_id - # The unique ID of the notification. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_notification(customer, notification_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customer}/notifications/{notificationId}' - command = make_simple_command(:delete, path, options) - command.params['customer'] = customer unless customer.nil? - command.params['notificationId'] = notification_id unless notification_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 notification. - # @param [String] customer - # The unique ID for the customer's Google account. The customerId is also - # returned as part of the Users resource. - # @param [String] notification_id - # The unique ID of the notification. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Notification] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Notification] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_notification(customer, notification_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customer}/notifications/{notificationId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Notification - command.params['customer'] = customer unless customer.nil? - command.params['notificationId'] = notification_id unless notification_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 notifications. - # @param [String] customer - # The unique ID for the customer's Google account. - # @param [String] language - # The ISO 639-1 code of the language notifications are returned in. The default - # is English (en). - # @param [Fixnum] max_results - # Maximum number of notifications to return per page. The default is 100. - # @param [String] page_token - # The token to specify the page of results 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::AdminDirectoryV1::Notifications] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Notifications] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_notifications(customer, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customer}/notifications' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Notifications::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Notifications - command.params['customer'] = customer unless customer.nil? - command.query['language'] = language unless language.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 - - # Updates a notification. This method supports patch semantics. - # @param [String] customer - # The unique ID for the customer's Google account. - # @param [String] notification_id - # The unique ID of the notification. - # @param [Google::Apis::AdminDirectoryV1::Notification] notification_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::AdminDirectoryV1::Notification] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Notification] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_notification(customer, notification_id, notification_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customer}/notifications/{notificationId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Notification::Representation - command.request_object = notification_object - command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Notification - command.params['customer'] = customer unless customer.nil? - command.params['notificationId'] = notification_id unless notification_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a notification. - # @param [String] customer - # The unique ID for the customer's Google account. - # @param [String] notification_id - # The unique ID of the notification. - # @param [Google::Apis::AdminDirectoryV1::Notification] notification_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::AdminDirectoryV1::Notification] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Notification] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_notification(customer, notification_id, notification_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customer}/notifications/{notificationId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Notification::Representation - command.request_object = notification_object - command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Notification - command.params['customer'] = customer unless customer.nil? - command.params['notificationId'] = notification_id unless notification_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 - - # Remove Organization Unit - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Array, String] org_unit_path - # Full path of the organization unit or its 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 [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_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/orgunits{/orgUnitPath*}' - command = make_simple_command(:delete, path, options) - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieve Organization Unit - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Array, String] org_unit_path - # Full path of the organization unit or its 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::AdminDirectoryV1::OrgUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::OrgUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/orgunits{/orgUnitPath*}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation - command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Add Organization Unit - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_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::AdminDirectoryV1::OrgUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::OrgUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_org_unit(customer_id, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/orgunits' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation - command.request_object = org_unit_object - command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation - command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit - command.params['customerId'] = customer_id unless customer_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 - - # Retrieve all Organization Units - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] org_unit_path - # the URL-encoded organization unit's path or its Id - # @param [String] type - # Whether to return all sub-organizations or just immediate children - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::OrgUnits] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::OrgUnits] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_org_units(customer_id, org_unit_path: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/orgunits' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnits::Representation - command.response_class = Google::Apis::AdminDirectoryV1::OrgUnits - command.params['customerId'] = customer_id unless customer_id.nil? - command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil? - command.query['type'] = type unless type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update Organization Unit. This method supports patch semantics. - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Array, String] org_unit_path - # Full path of the organization unit or its Id - # @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_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::AdminDirectoryV1::OrgUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::OrgUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/orgunits{/orgUnitPath*}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation - command.request_object = org_unit_object - command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation - command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update Organization Unit - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Array, String] org_unit_path - # Full path of the organization unit or its Id - # @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_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::AdminDirectoryV1::OrgUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::OrgUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/orgunits{/orgUnitPath*}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation - command.request_object = org_unit_object - command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation - command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete schema - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] schema_key - # Name or immutable Id of the schema - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_schema(customer_id, schema_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/schemas/{schemaKey}' - command = make_simple_command(:delete, path, options) - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['schemaKey'] = schema_key unless schema_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 - - # Retrieve schema - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] schema_key - # Name or immutable Id of the schema - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Schema] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Schema] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schema(customer_id, schema_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/schemas/{schemaKey}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Schema - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['schemaKey'] = schema_key unless schema_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 - - # Create schema. - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [Google::Apis::AdminDirectoryV1::Schema] schema_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::AdminDirectoryV1::Schema] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Schema] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schema(customer_id, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/schemas' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation - command.request_object = schema_object - command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Schema - command.params['customerId'] = customer_id unless customer_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 - - # Retrieve all schemas for a customer - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::Schemas] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Schemas] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schemas(customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/schemas' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Schemas::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Schemas - command.params['customerId'] = customer_id unless customer_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 - - # Update schema. This method supports patch semantics. - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] schema_key - # Name or immutable Id of the schema. - # @param [Google::Apis::AdminDirectoryV1::Schema] schema_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::AdminDirectoryV1::Schema] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Schema] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/schemas/{schemaKey}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation - command.request_object = schema_object - command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Schema - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['schemaKey'] = schema_key unless schema_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 - - # Update schema - # @param [String] customer_id - # Immutable id of the Google Apps account - # @param [String] schema_key - # Name or immutable Id of the schema. - # @param [Google::Apis::AdminDirectoryV1::Schema] schema_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::AdminDirectoryV1::Schema] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Schema] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customer/{customerId}/schemas/{schemaKey}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation - command.request_object = schema_object - command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Schema - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['schemaKey'] = schema_key unless schema_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 - - # Delete all access tokens issued by a user for an application. - # @param [String] user_key - # Identifies the user in the API request. The value can be the user's primary - # email address, alias email address, or unique user ID. - # @param [String] client_id - # The Client ID of the application the token is issued to. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_token(user_key, client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/tokens/{clientId}' - command = make_simple_command(:delete, path, options) - command.params['userKey'] = user_key unless user_key.nil? - command.params['clientId'] = client_id unless client_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 an access token issued by a user. - # @param [String] user_key - # Identifies the user in the API request. The value can be the user's primary - # email address, alias email address, or unique user ID. - # @param [String] client_id - # The Client ID of the application the token is issued to. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Token] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Token] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_token(user_key, client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/tokens/{clientId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Token::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Token - command.params['userKey'] = user_key unless user_key.nil? - command.params['clientId'] = client_id unless client_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 set of tokens specified user has issued to 3rd party applications. - # @param [String] user_key - # Identifies the user in the API request. The value can be the user's primary - # email address, alias email address, or unique user 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::AdminDirectoryV1::Tokens] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Tokens] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tokens(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/tokens' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Tokens::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Tokens - command.params['userKey'] = user_key unless user_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 - - # Delete user - # @param [String] user_key - # Email or immutable Id of the 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 [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_user(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}' - command = make_simple_command(:delete, path, options) - command.params['userKey'] = user_key unless user_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 - - # retrieve user - # @param [String] user_key - # Email or immutable Id of the user - # @param [String] custom_field_mask - # Comma-separated list of schema names. All fields from these schemas are - # fetched. This should only be set when projection=custom. - # @param [String] projection - # What subset of fields to fetch for this user. - # @param [String] view_type - # Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the 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::AdminDirectoryV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_user(user_key, custom_field_mask: nil, projection: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation - command.response_class = Google::Apis::AdminDirectoryV1::User - command.params['userKey'] = user_key unless user_key.nil? - command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil? - command.query['projection'] = projection unless projection.nil? - command.query['viewType'] = view_type unless view_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # create user. - # @param [Google::Apis::AdminDirectoryV1::User] user_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_user(user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation - command.response_class = Google::Apis::AdminDirectoryV1::User - 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 - - # Retrieve either deleted users or all users in a domain (paginated) - # @param [String] custom_field_mask - # Comma-separated list of schema names. All fields from these schemas are - # fetched. This should only be set when projection=custom. - # @param [String] customer - # Immutable id of the Google Apps account. In case of multi-domain, to fetch all - # users for a customer, fill this field instead of domain. - # @param [String] domain - # Name of the domain. Fill this field to get users from only this domain. To - # return all users in a multi-domain fill customer field instead. - # @param [String] event - # Event on which subscription is intended (if subscribing) - # @param [Fixnum] max_results - # Maximum number of results to return. Default is 100. Max allowed is 500 - # @param [String] order_by - # Column to use for sorting results - # @param [String] page_token - # Token to specify next page in the list - # @param [String] projection - # What subset of fields to fetch for this user. - # @param [String] query - # Query string search. Should be of the form "". Complete documentation is at - # https://developers.google.com/admin-sdk/directory/v1/guides/search-users - # @param [String] show_deleted - # If set to true retrieves the list of deleted users. Default is false - # @param [String] sort_order - # Whether to return results in ascending or descending order. - # @param [String] view_type - # Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the 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::AdminDirectoryV1::Users] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Users] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_users(custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Users::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Users - command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil? - command.query['customer'] = customer unless customer.nil? - command.query['domain'] = domain unless domain.nil? - command.query['event'] = event unless event.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projection'] = projection unless projection.nil? - command.query['query'] = query unless query.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['viewType'] = view_type unless view_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # change admin status of a user - # @param [String] user_key - # Email or immutable Id of the user as admin - # @param [Google::Apis::AdminDirectoryV1::UserMakeAdmin] user_make_admin_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 make_admin_user(user_key, user_make_admin_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/makeAdmin' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::UserMakeAdmin::Representation - command.request_object = user_make_admin_object - command.params['userKey'] = user_key unless user_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 - - # update user. This method supports patch semantics. - # @param [String] user_key - # Email or immutable Id of the user. If Id, it should match with id of user - # object - # @param [Google::Apis::AdminDirectoryV1::User] user_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_user(user_key, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation - command.response_class = Google::Apis::AdminDirectoryV1::User - command.params['userKey'] = user_key unless user_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 - - # Undelete a deleted user - # @param [String] user_key - # The immutable id of the user - # @param [Google::Apis::AdminDirectoryV1::UserUndelete] user_undelete_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 undelete_user(user_key, user_undelete_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/undelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::UserUndelete::Representation - command.request_object = user_undelete_object - command.params['userKey'] = user_key unless user_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 - - # update user - # @param [String] user_key - # Email or immutable Id of the user. If Id, it should match with id of user - # object - # @param [Google::Apis::AdminDirectoryV1::User] user_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_user(user_key, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation - command.response_class = Google::Apis::AdminDirectoryV1::User - command.params['userKey'] = user_key unless user_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 - - # Watch for changes in users list - # @param [Google::Apis::AdminDirectoryV1::Channel] channel_object - # @param [String] custom_field_mask - # Comma-separated list of schema names. All fields from these schemas are - # fetched. This should only be set when projection=custom. - # @param [String] customer - # Immutable id of the Google Apps account. In case of multi-domain, to fetch all - # users for a customer, fill this field instead of domain. - # @param [String] domain - # Name of the domain. Fill this field to get users from only this domain. To - # return all users in a multi-domain fill customer field instead. - # @param [String] event - # Event on which subscription is intended (if subscribing) - # @param [Fixnum] max_results - # Maximum number of results to return. Default is 100. Max allowed is 500 - # @param [String] order_by - # Column to use for sorting results - # @param [String] page_token - # Token to specify next page in the list - # @param [String] projection - # What subset of fields to fetch for this user. - # @param [String] query - # Query string search. Should be of the form "". Complete documentation is at - # https://developers.google.com/admin-sdk/directory/v1/guides/search-users - # @param [String] show_deleted - # If set to true retrieves the list of deleted users. Default is false - # @param [String] sort_order - # Whether to return results in ascending or descending order. - # @param [String] view_type - # Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the 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::AdminDirectoryV1::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::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_user(channel_object = nil, custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Channel - command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil? - command.query['customer'] = customer unless customer.nil? - command.query['domain'] = domain unless domain.nil? - command.query['event'] = event unless event.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projection'] = projection unless projection.nil? - command.query['query'] = query unless query.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['viewType'] = view_type unless view_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Remove a alias for the user - # @param [String] user_key - # Email or immutable Id of the user - # @param [String] user_alias - # The alias to be removed - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_user_alias(user_key, user_alias, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/aliases/{alias}' - command = make_simple_command(:delete, path, options) - command.params['userKey'] = user_key unless user_key.nil? - command.params['alias'] = user_alias unless user_alias.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 - - # Add a alias for the user - # @param [String] user_key - # Email or immutable Id of the user - # @param [Google::Apis::AdminDirectoryV1::Alias] alias_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::AdminDirectoryV1::Alias] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Alias] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_user_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/aliases' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation - command.request_object = alias_object - command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Alias - command.params['userKey'] = user_key unless user_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 - - # List all aliases for a user - # @param [String] user_key - # Email or immutable Id of the user - # @param [String] event - # Event on which subscription is intended (if subscribing) - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Aliases] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::Aliases] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_aliases(user_key, event: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/aliases' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Aliases - command.params['userKey'] = user_key unless user_key.nil? - command.query['event'] = event unless event.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 - - # Watch for changes in user aliases list - # @param [String] user_key - # Email or immutable Id of the user - # @param [Google::Apis::AdminDirectoryV1::Channel] channel_object - # @param [String] event - # Event on which subscription is intended (if subscribing) - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdminDirectoryV1::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::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_user_alias(user_key, channel_object = nil, event: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/aliases/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation - command.response_class = Google::Apis::AdminDirectoryV1::Channel - command.params['userKey'] = user_key unless user_key.nil? - command.query['event'] = event unless event.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 - - # Remove photos for the user - # @param [String] user_key - # Email or immutable Id of the 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 [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_user_photo(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/photos/thumbnail' - command = make_simple_command(:delete, path, options) - command.params['userKey'] = user_key unless user_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 - - # Retrieve photo of a user - # @param [String] user_key - # Email or immutable Id of the 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::AdminDirectoryV1::UserPhoto] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::UserPhoto] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_photo(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/photos/thumbnail' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation - command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto - command.params['userKey'] = user_key unless user_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 - - # Add a photo for the user. This method supports patch semantics. - # @param [String] user_key - # Email or immutable Id of the user - # @param [Google::Apis::AdminDirectoryV1::UserPhoto] user_photo_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::AdminDirectoryV1::UserPhoto] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::UserPhoto] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/photos/thumbnail' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation - command.request_object = user_photo_object - command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation - command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto - command.params['userKey'] = user_key unless user_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 - - # Add a photo for the user - # @param [String] user_key - # Email or immutable Id of the user - # @param [Google::Apis::AdminDirectoryV1::UserPhoto] user_photo_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::AdminDirectoryV1::UserPhoto] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::UserPhoto] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/photos/thumbnail' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation - command.request_object = user_photo_object - command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation - command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto - command.params['userKey'] = user_key unless user_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 - - # Generate new backup verification codes for the user. - # @param [String] user_key - # Email or immutable Id of the 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 [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 generate_verification_code(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/verificationCodes/generate' - command = make_simple_command(:post, path, options) - command.params['userKey'] = user_key unless user_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 - - # Invalidate the current backup verification codes for the user. - # @param [String] user_key - # Email or immutable Id of the 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 [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 invalidate_verification_code(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/verificationCodes/invalidate' - command = make_simple_command(:post, path, options) - command.params['userKey'] = user_key unless user_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 - - # Returns the current set of valid backup verification codes for the specified - # user. - # @param [String] user_key - # Identifies the user in the API request. The value can be the user's primary - # email address, alias email address, or unique user 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::AdminDirectoryV1::VerificationCodes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdminDirectoryV1::VerificationCodes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_verification_codes(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userKey}/verificationCodes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdminDirectoryV1::VerificationCodes::Representation - command.response_class = Google::Apis::AdminDirectoryV1::VerificationCodes - command.params['userKey'] = user_key unless user_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 - - 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 diff --git a/generated/google/apis/admin_reports_v1.rb b/generated/google/apis/admin_reports_v1.rb deleted file mode 100644 index 59ccddb05..000000000 --- a/generated/google/apis/admin_reports_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/admin_reports_v1/classes.rb b/generated/google/apis/admin_reports_v1/classes.rb deleted file mode 100644 index 17fd1d02b..000000000 --- a/generated/google/apis/admin_reports_v1/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - attr_accessor :multi_int_value - - # Multi-string value of the parameter. - # Corresponds to the JSON property `multiValue` - # @return [Array] - 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] - 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] - 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>] - 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] - attr_accessor :usage_reports - - # Warnings if any. - # Corresponds to the JSON property `warnings` - # @return [Array] - 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] - 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 diff --git a/generated/google/apis/admin_reports_v1/representations.rb b/generated/google/apis/admin_reports_v1/representations.rb deleted file mode 100644 index dccc8c3b1..000000000 --- a/generated/google/apis/admin_reports_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/admin_reports_v1/service.rb b/generated/google/apis/admin_reports_v1/service.rb deleted file mode 100644 index d4052a259..000000000 --- a/generated/google/apis/admin_reports_v1/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adsense_v1_4.rb b/generated/google/apis/adsense_v1_4.rb deleted file mode 100644 index 038f13b30..000000000 --- a/generated/google/apis/adsense_v1_4.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adsense_v1_4/classes.rb b/generated/google/apis/adsense_v1_4/classes.rb deleted file mode 100644 index 5e0928a10..000000000 --- a/generated/google/apis/adsense_v1_4/classes.rb +++ /dev/null @@ -1,1279 +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 - 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 adsense#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 - - # Whether this account is premium. - # Corresponds to the JSON property `premium` - # @return [Boolean] - attr_accessor :premium - alias_method :premium?, :premium - - # Sub accounts of the this account. - # Corresponds to the JSON property `subAccounts` - # @return [Array] - attr_accessor :sub_accounts - - # AdSense timezone of this account. - # Corresponds to the JSON property `timezone` - # @return [String] - attr_accessor :timezone - - 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? - @premium = args[:premium] unless args[:premium].nil? - @sub_accounts = args[:sub_accounts] unless args[:sub_accounts].nil? - @timezone = args[:timezone] unless args[:timezone].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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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 - - # ARC review mode this ad client is in. Empty if the client is not opted in to - # ARC. Possible values: POST_REVIEW, AUTOMATIC_PRE_REVIEW. - # Corresponds to the JSON property `arcReviewMode` - # @return [String] - attr_accessor :arc_review_mode - - # 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 adsense#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? - @arc_review_mode = args[:arc_review_mode] unless args[:arc_review_mode].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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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 adsense#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 which are 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::AdsenseV1_4::AdStyle::Colors] - attr_accessor :colors - - # The style of the corners in the ad. - # 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::AdsenseV1_4::AdStyle::Font] - attr_accessor :font - - # Kind this is, in this case adsense#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 which are 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. - # Corresponds to the JSON property `family` - # @return [String] - attr_accessor :family - - # The size of the font. - # 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::AdsenseV1_4::AdUnit::ContentAdsSettings] - attr_accessor :content_ads_settings - - # Custom style information specific to this ad unit. - # Corresponds to the JSON property `customStyle` - # @return [Google::Apis::AdsenseV1_4::AdStyle] - attr_accessor :custom_style - - # Settings specific to feed ads (AFF). - # Corresponds to the JSON property `feedAdsSettings` - # @return [Google::Apis::AdsenseV1_4::AdUnit::FeedAdsSettings] - attr_accessor :feed_ads_settings - - # 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 adsense#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::AdsenseV1_4::AdUnit::MobileContentAdsSettings] - attr_accessor :mobile_content_ads_settings - - # Name of this ad unit. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # ID of the saved ad style which holds this ad unit's style information. - # Corresponds to the JSON property `savedStyleId` - # @return [String] - attr_accessor :saved_style_id - - # 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? - @feed_ads_settings = args[:feed_ads_settings] unless args[:feed_ads_settings].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? - @saved_style_id = args[:saved_style_id] unless args[:saved_style_id].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::AdsenseV1_4::AdUnit::ContentAdsSettings::BackupOption] - attr_accessor :backup_option - - # 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) - @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. - # 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 feed ads (AFF). - class FeedAdsSettings - include Google::Apis::Core::Hashable - - # The position of the ads relative to the feed entries. - # Corresponds to the JSON property `adPosition` - # @return [String] - attr_accessor :ad_position - - # The frequency at which ads should appear in the feed (i.e. every N entries). - # Corresponds to the JSON property `frequency` - # @return [Fixnum] - attr_accessor :frequency - - # The minimum length an entry should be in order to have attached ads. - # Corresponds to the JSON property `minimumWordCount` - # @return [Fixnum] - attr_accessor :minimum_word_count - - # The type of ads which should appear. - # 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) - @ad_position = args[:ad_position] unless args[:ad_position].nil? - @frequency = args[:frequency] unless args[:frequency].nil? - @minimum_word_count = args[:minimum_word_count] unless args[:minimum_word_count].nil? - @type = args[:type] unless args[:type].nil? - 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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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 GenerateReportResponse - 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] - attr_accessor :averages - - # The requested end date in yyyy-mm-dd format. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - # 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] - attr_accessor :headers - - # Kind this is, in this case adsense#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>] - attr_accessor :rows - - # The requested start date in yyyy-mm-dd format. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - # 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] - attr_accessor :totals - - # Any warnings associated with generation of the report. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @averages = args[:averages] unless args[:averages].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @headers = args[:headers] unless args[:headers].nil? - @kind = args[:kind] unless args[:kind].nil? - @rows = args[:rows] unless args[:rows].nil? - @start_date = args[:start_date] unless args[:start_date].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 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 - - # Whether this alert can be dismissed. - # Corresponds to the JSON property `isDismissible` - # @return [Boolean] - attr_accessor :is_dismissible - alias_method :is_dismissible?, :is_dismissible - - # Kind of resource this is, in this case adsense#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? - @is_dismissible = args[:is_dismissible] unless args[:is_dismissible].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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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 adsense#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::AdsenseV1_4::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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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 Payment - include Google::Apis::Core::Hashable - - # Unique identifier of this Payment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Kind of resource this is, in this case adsense#payment. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The amount to be paid. - # Corresponds to the JSON property `paymentAmount` - # @return [String] - attr_accessor :payment_amount - - # The currency code for the amount to be paid. - # Corresponds to the JSON property `paymentAmountCurrencyCode` - # @return [String] - attr_accessor :payment_amount_currency_code - - # The date this payment was/will be credited to the user, or none if the payment - # threshold has not been met. - # Corresponds to the JSON property `paymentDate` - # @return [String] - attr_accessor :payment_date - - 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? - @payment_amount = args[:payment_amount] unless args[:payment_amount].nil? - @payment_amount_currency_code = args[:payment_amount_currency_code] unless args[:payment_amount_currency_code].nil? - @payment_date = args[:payment_date] unless args[:payment_date].nil? - end - end - - # - class Payments - include Google::Apis::Core::Hashable - - # The list of Payments for the account. One or both of a) the account's most - # recent payment; and b) the account's upcoming payment. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Kind of list this is, in this case adsense#payments. - # 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 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] - 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] - 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 adsense#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] - 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] - 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] - 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 SavedAdStyle - include Google::Apis::Core::Hashable - - # The AdStyle itself. - # Corresponds to the JSON property `adStyle` - # @return [Google::Apis::AdsenseV1_4::AdStyle] - attr_accessor :ad_style - - # Unique identifier of this saved ad style. 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 adsense#savedAdStyle. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The user selected name of this SavedAdStyle. - # 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) - @ad_style = args[:ad_style] unless args[:ad_style].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 SavedAdStyles - 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 ad styles returned in this list response. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Kind of list this is, in this case adsense#savedAdStyles. - # 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 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 adsense#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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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 adsense#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] - attr_accessor :items - - # Kind of list this is, in this case adsense#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 diff --git a/generated/google/apis/adsense_v1_4/representations.rb b/generated/google/apis/adsense_v1_4/representations.rb deleted file mode 100644 index d2ca753ba..000000000 --- a/generated/google/apis/adsense_v1_4/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adsense_v1_4/service.rb b/generated/google/apis/adsense_v1_4/service.rb deleted file mode 100644 index 0b1b3d62b..000000000 --- a/generated/google/apis/adsense_v1_4/service.rb +++ /dev/null @@ -1,1752 +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 AdsenseV1_4 - # AdSense Management API - # - # Gives AdSense publishers access to their inventory and the ability to generate - # reports - # - # @example - # require 'google/apis/adsense_v1_4' - # - # Adsense = Google::Apis::AdsenseV1_4 # Alias the module - # service = Adsense::AdSenseService.new - # - # @see https://developers.google.com/adsense/management/ - class AdSenseService < 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/', 'adsense/v1.4/') - end - - # Get information about the selected AdSense account. - # @param [String] account_id - # Account to get information about. - # @param [Boolean] tree - # Whether the tree of sub accounts should be returned. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AdsenseV1_4::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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, tree: nil, 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::AdsenseV1_4::Account::Representation - command.response_class = Google::Apis::AdsenseV1_4::Account - command.params['accountId'] = account_id unless account_id.nil? - command.query['tree'] = tree unless tree.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 AdSense 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::AdsenseV1_4::Accounts] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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::AdsenseV1_4::Accounts::Representation - command.response_class = Google::Apis::AdsenseV1_4::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 the specified account. - # @param [String] account_id - # Account for which to list ad clients. - # @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::AdsenseV1_4::AdClients] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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::AdsenseV1_4::AdClients::Representation - command.response_class = Google::Apis::AdsenseV1_4::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 - - # Gets the specified ad unit in the specified ad client for the specified - # account. - # @param [String] account_id - # Account to which the ad client belongs. - # @param [String] ad_client_id - # Ad client for which to get the ad unit. - # @param [String] ad_unit_id - # Ad unit to retrieve. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdUnit - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get ad code for the specified ad unit. - # @param [String] account_id - # Account which contains the ad client. - # @param [String] ad_client_id - # Ad client with contains the ad unit. - # @param [String] ad_unit_id - # Ad unit to get the code 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::AdsenseV1_4::AdCode] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdCode] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdCode - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all ad units in the specified ad client for the specified account. - # @param [String] account_id - # Account to which the ad client belongs. - # @param [String] ad_client_id - # Ad client for which to list ad units. - # @param [Boolean] include_inactive - # Whether to include inactive ad units. Default: true. - # @param [Fixnum] max_results - # The maximum number of ad units to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through ad units. To retrieve the next page, - # set this parameter to the value of "nextPageToken" from the previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdUnits] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_ad_units(account_id, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdUnits - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['includeInactive'] = include_inactive unless include_inactive.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all custom channels which the specified ad unit belongs to. - # @param [String] account_id - # Account to which the ad client belongs. - # @param [String] ad_client_id - # Ad client which contains the ad unit. - # @param [String] ad_unit_id - # Ad unit for which to list custom channels. - # @param [Fixnum] max_results - # The maximum number of custom channels to include in the response, used for - # paging. - # @param [String] page_token - # A continuation token, used to page through custom channels. To retrieve the - # next page, set this parameter to the value of "nextPageToken" from the - # previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_ad_unit_custom_channels(account_id, ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/customchannels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation - command.response_class = Google::Apis::AdsenseV1_4::CustomChannels - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Dismiss (delete) the specified alert from the specified publisher AdSense - # account. - # @param [String] account_id - # Account which contains the ad unit. - # @param [String] alert_id - # Alert 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_account_alert(account_id, alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/alerts/{alertId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['alertId'] = alert_id unless alert_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 alerts for the specified AdSense account. - # @param [String] account_id - # Account for which to retrieve 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::AdsenseV1_4::Alerts] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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::AdsenseV1_4::Alerts::Representation - command.response_class = Google::Apis::AdsenseV1_4::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 for the - # specified account. - # @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::AdsenseV1_4::CustomChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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::AdsenseV1_4::CustomChannel::Representation - command.response_class = Google::Apis::AdsenseV1_4::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 the specified 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::AdsenseV1_4::CustomChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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::AdsenseV1_4::CustomChannels::Representation - command.response_class = Google::Apis::AdsenseV1_4::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 all ad units in the specified custom channel. - # @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 for which to list ad units. - # @param [Boolean] include_inactive - # Whether to include inactive ad units. Default: true. - # @param [Fixnum] max_results - # The maximum number of ad units to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through ad units. To retrieve the next page, - # set this parameter to the value of "nextPageToken" from the previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdUnits] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_custom_channel_ad_units(account_id, ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}/adunits' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdUnits - 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['includeInactive'] = include_inactive unless include_inactive.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List the payments for the specified AdSense account. - # @param [String] account_id - # Account for which to retrieve the payments. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdsenseV1_4::Payments] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::Payments] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_payments(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/payments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation - command.response_class = Google::Apis::AdsenseV1_4::Payments - 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 AdSense 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 upon which to report. - # @param [String] currency - # Optional currency to use when reporting on monetary metrics. Defaults to the - # account's currency if not set. - # @param [Array, 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] 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] metric - # Numeric columns to include in the report. - # @param [Array, 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 [Boolean] use_timezone_reporting - # Whether the report should be generated in the AdSense account's local timezone. - # If false default PST/PDT timezone will be used. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdsenseV1_4::GenerateReportResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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, currency: nil, dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, use_timezone_reporting: 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::AdsenseV1_4::GenerateReportResponse::Representation - command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse - command.params['accountId'] = account_id unless account_id.nil? - command.query['currency'] = currency unless currency.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['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.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 AdSense report based on the saved report ID sent in the query - # parameters. - # @param [String] account_id - # Account to which the saved reports belong. - # @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::AdsenseV1_4::GenerateReportResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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::AdsenseV1_4::GenerateReportResponse::Representation - command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse - 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 the specified AdSense account. - # @param [String] account_id - # Account to which the saved reports belong. - # @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::AdsenseV1_4::SavedReports] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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::AdsenseV1_4::SavedReports::Representation - command.response_class = Google::Apis::AdsenseV1_4::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 a specific saved ad style for the specified account. - # @param [String] account_id - # Account for which to get the saved ad style. - # @param [String] saved_ad_style_id - # Saved ad style 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::AdsenseV1_4::SavedAdStyle] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::SavedAdStyle] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_saved_ad_style(account_id, saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/savedadstyles/{savedAdStyleId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation - command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle - command.params['accountId'] = account_id unless account_id.nil? - command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_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 saved ad styles in the specified account. - # @param [String] account_id - # Account for which to list saved ad styles. - # @param [Fixnum] max_results - # The maximum number of saved ad styles to include in the response, used for - # paging. - # @param [String] page_token - # A continuation token, used to page through saved ad styles. 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::AdsenseV1_4::SavedAdStyles] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::SavedAdStyles] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad_styles(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/savedadstyles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation - command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles - 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 the specified 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::AdsenseV1_4::UrlChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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::AdsenseV1_4::UrlChannels::Representation - command.response_class = Google::Apis::AdsenseV1_4::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 - - # List all ad clients in this AdSense account. - # @param [Fixnum] max_results - # The maximum number of ad clients to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through ad clients. To retrieve the next - # page, set this parameter to the value of "nextPageToken" from the previous - # response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::AdClients] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdClients::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdClients - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified ad unit in the specified ad client. - # @param [String] ad_client_id - # Ad client for which to get the ad unit. - # @param [String] ad_unit_id - # Ad unit to retrieve. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/adunits/{adUnitId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdUnit - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get ad code for the specified ad unit. - # @param [String] ad_client_id - # Ad client with contains the ad unit. - # @param [String] ad_unit_id - # Ad unit to get the code 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::AdsenseV1_4::AdCode] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdCode] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad_code_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/adunits/{adUnitId}/adcode' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdCode - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all ad units in the specified ad client for this AdSense account. - # @param [String] ad_client_id - # Ad client for which to list ad units. - # @param [Boolean] include_inactive - # Whether to include inactive ad units. Default: true. - # @param [Fixnum] max_results - # The maximum number of ad units to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through ad units. To retrieve the next page, - # set this parameter to the value of "nextPageToken" from the previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdUnits] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_ad_units(ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/adunits' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdUnits - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['includeInactive'] = include_inactive unless include_inactive.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all custom channels which the specified ad unit belongs to. - # @param [String] ad_client_id - # Ad client which contains the ad unit. - # @param [String] ad_unit_id - # Ad unit for which to list custom channels. - # @param [Fixnum] max_results - # The maximum number of custom channels to include in the response, used for - # paging. - # @param [String] page_token - # A continuation token, used to page through custom channels. To retrieve the - # next page, set this parameter to the value of "nextPageToken" from the - # previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_ad_unit_custom_channels(ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/adunits/{adUnitId}/customchannels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation - command.response_class = Google::Apis::AdsenseV1_4::CustomChannels - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Dismiss (delete) the specified alert from the publisher's AdSense account. - # @param [String] alert_id - # Alert 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_alert(alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'alerts/{alertId}' - command = make_simple_command(:delete, path, options) - command.params['alertId'] = alert_id unless alert_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 alerts for this AdSense account. - # @param [String] locale - # The locale to use for translating alert messages. The account locale will be - # used if this is not supplied. The AdSense default (English) will be used if - # the supplied locale is invalid or unsupported. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::Alerts] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::Alerts] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_alerts(locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'alerts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::Alerts::Representation - command.response_class = Google::Apis::AdsenseV1_4::Alerts - command.query['locale'] = locale unless locale.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get the specified custom channel from the specified ad client. - # @param [String] ad_client_id - # Ad client which contains the custom channel. - # @param [String] custom_channel_id - # Custom channel to retrieve. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels/{customChannelId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::CustomChannel::Representation - command.response_class = Google::Apis::AdsenseV1_4::CustomChannel - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all custom channels in the specified ad client for this AdSense account. - # @param [String] ad_client_id - # Ad client for which to list custom channels. - # @param [Fixnum] max_results - # The maximum number of custom channels to include in the response, used for - # paging. - # @param [String] page_token - # A continuation token, used to page through custom channels. To retrieve the - # next page, set this parameter to the value of "nextPageToken" from the - # previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation - command.response_class = Google::Apis::AdsenseV1_4::CustomChannels - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all ad units in the specified custom channel. - # @param [String] ad_client_id - # Ad client which contains the custom channel. - # @param [String] custom_channel_id - # Custom channel for which to list ad units. - # @param [Boolean] include_inactive - # Whether to include inactive ad units. Default: true. - # @param [Fixnum] max_results - # The maximum number of ad units to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through ad units. To retrieve the next page, - # set this parameter to the value of "nextPageToken" from the previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::AdUnits] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_custom_channel_ad_units(ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels/{customChannelId}/adunits' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation - command.response_class = Google::Apis::AdsenseV1_4::AdUnits - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil? - command.query['includeInactive'] = include_inactive unless include_inactive.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List the metadata for the dimensions available to this AdSense account. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_metadata_dimensions(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'metadata/dimensions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation - command.response_class = Google::Apis::AdsenseV1_4::Metadata - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List the metadata for the metrics available to this AdSense account. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_metadata_metrics(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'metadata/metrics' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation - command.response_class = Google::Apis::AdsenseV1_4::Metadata - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List the payments for this AdSense account. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::Payments] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::Payments] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_payments(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'payments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation - command.response_class = Google::Apis::AdsenseV1_4::Payments - 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 AdSense 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 [Array, String] account_id - # Accounts upon which to report. - # @param [String] currency - # Optional currency to use when reporting on monetary metrics. Defaults to the - # account's currency if not set. - # @param [Array, 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] 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] metric - # Numeric columns to include in the report. - # @param [Array, 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 [Boolean] use_timezone_reporting - # Whether the report should be generated in the AdSense account's local timezone. - # If false default PST/PDT timezone will be used. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdsenseV1_4::GenerateReportResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def generate_report(account_id: nil, currency: nil, dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, use_timezone_reporting: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = '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::AdsenseV1_4::GenerateReportResponse::Representation - command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse - command.query['accountId'] = account_id unless account_id.nil? - command.query['currency'] = currency unless currency.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['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.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 AdSense report based on the saved report ID sent in the query - # parameters. - # @param [String] saved_report_id - # The saved report to retrieve. - # @param [String] locale - # Optional locale to use for translating report output to a local language. - # Defaults to "en_US" if not specified. - # @param [Fixnum] max_results - # The maximum number of rows of report data to return. - # @param [Fixnum] start_index - # Index of the first row of report data to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_saved_report(saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reports/{savedReportId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation - command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse - 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 AdSense account. - # @param [Fixnum] max_results - # The maximum number of saved reports to include in the response, used for - # paging. - # @param [String] page_token - # A continuation token, used to page through saved reports. To retrieve the next - # page, set this parameter to the value of "nextPageToken" from the previous - # response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::SavedReports] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_saved_reports(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reports/saved' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::SavedReports::Representation - command.response_class = Google::Apis::AdsenseV1_4::SavedReports - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a specific saved ad style from the user's account. - # @param [String] saved_ad_style_id - # Saved ad style 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::AdsenseV1_4::SavedAdStyle] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::SavedAdStyle] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_saved_ad_style(saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'savedadstyles/{savedAdStyleId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation - command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle - command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_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 saved ad styles in the user's account. - # @param [Fixnum] max_results - # The maximum number of saved ad styles to include in the response, used for - # paging. - # @param [String] page_token - # A continuation token, used to page through saved ad styles. 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::AdsenseV1_4::SavedAdStyles] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::SavedAdStyles] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_saved_ad_styles(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'savedadstyles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation - command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles - 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 AdSense account. - # @param [String] ad_client_id - # Ad client for which to list URL channels. - # @param [Fixnum] max_results - # The maximum number of URL channels to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through URL channels. To retrieve the next - # page, set this parameter to the value of "nextPageToken" from the previous - # response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsenseV1_4::UrlChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsenseV1_4::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_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/urlchannels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsenseV1_4::UrlChannels::Representation - command.response_class = Google::Apis::AdsenseV1_4::UrlChannels - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - end - end - end - end -end diff --git a/generated/google/apis/adsensehost_v4_1.rb b/generated/google/apis/adsensehost_v4_1.rb deleted file mode 100644 index d8f07b720..000000000 --- a/generated/google/apis/adsensehost_v4_1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adsensehost_v4_1/classes.rb b/generated/google/apis/adsensehost_v4_1/classes.rb deleted file mode 100644 index 73a1aaeea..000000000 --- a/generated/google/apis/adsensehost_v4_1/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - 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] - 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] - 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] - 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>] - 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] - attr_accessor :totals - - # Any warnings associated with generation of the report. - # Corresponds to the JSON property `warnings` - # @return [Array] - 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] - 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 diff --git a/generated/google/apis/adsensehost_v4_1/representations.rb b/generated/google/apis/adsensehost_v4_1/representations.rb deleted file mode 100644 index 204124a36..000000000 --- a/generated/google/apis/adsensehost_v4_1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/adsensehost_v4_1/service.rb b/generated/google/apis/adsensehost_v4_1/service.rb deleted file mode 100644 index eb8a4f2f0..000000000 --- a/generated/google/apis/adsensehost_v4_1/service.rb +++ /dev/null @@ -1,1190 +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 AdsensehostV4_1 - # AdSense Host API - # - # Gives AdSense Hosts access to report generation, ad code generation, and - # publisher management capabilities. - # - # @example - # require 'google/apis/adsensehost_v4_1' - # - # Adsensehost = Google::Apis::AdsensehostV4_1 # Alias the module - # service = Adsensehost::AdSenseHostService.new - # - # @see https://developers.google.com/adsense/host/ - class AdSenseHostService < 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/', 'adsensehost/v4.1/') - end - - # Get information about the selected associated AdSense account. - # @param [String] account_id - # Account 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::AdsensehostV4_1::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::Account] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::Account::Representation - command.response_class = Google::Apis::AdsensehostV4_1::Account - command.params['accountId'] = account_id unless account_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List hosted accounts associated with this AdSense account by ad client id. - # @param [Array, String] filter_ad_client_id - # Ad clients to list accounts 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::AdsensehostV4_1::Accounts] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::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(filter_ad_client_id: 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::AdsensehostV4_1::Accounts::Representation - command.response_class = Google::Apis::AdsensehostV4_1::Accounts - command.query['filterAdClientId'] = filter_ad_client_id unless filter_ad_client_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 one of the ad clients in the specified publisher's - # AdSense account. - # @param [String] account_id - # Account which contains the ad client. - # @param [String] ad_client_id - # Ad client to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClient] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdClient] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad_client(account_id, ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdClient - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_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 hosted ad clients in the specified hosted account. - # @param [String] account_id - # Account for which to list ad clients. - # @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::AdsensehostV4_1::AdClients] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdClients] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_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::AdsensehostV4_1::AdClients::Representation - command.response_class = Google::Apis::AdsensehostV4_1::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 - - # Delete the specified ad unit from the specified publisher AdSense account. - # @param [String] account_id - # Account which contains the ad unit. - # @param [String] ad_client_id - # Ad client for which to get ad unit. - # @param [String] ad_unit_id - # Ad unit 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::AdsensehostV4_1::AdUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdUnit - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get the specified host ad unit in this AdSense account. - # @param [String] account_id - # Account which contains the ad unit. - # @param [String] ad_client_id - # Ad client for which to get ad unit. - # @param [String] ad_unit_id - # Ad unit to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdUnit - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get ad code for the specified ad unit, attaching the specified host custom - # channels. - # @param [String] account_id - # Account which contains the ad client. - # @param [String] ad_client_id - # Ad client with contains the ad unit. - # @param [String] ad_unit_id - # Ad unit to get the code for. - # @param [Array, String] host_custom_channel_id - # Host custom channel to attach to the ad code. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdsensehostV4_1::AdCode] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdCode] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, host_custom_channel_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AdCode::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdCode - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['hostCustomChannelId'] = host_custom_channel_id unless host_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 - - # Insert the supplied ad unit into the specified publisher AdSense account. - # @param [String] account_id - # Account which will contain the ad unit. - # @param [String] ad_client_id - # Ad client into which to insert the ad unit. - # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_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::AdsensehostV4_1::AdUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.request_object = ad_unit_object - command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdUnit - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all ad units in the specified publisher's AdSense account. - # @param [String] account_id - # Account which contains the ad client. - # @param [String] ad_client_id - # Ad client for which to list ad units. - # @param [Boolean] include_inactive - # Whether to include inactive ad units. Default: true. - # @param [Fixnum] max_results - # The maximum number of ad units to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through ad units. To retrieve the next page, - # set this parameter to the value of "nextPageToken" from the previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnits] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdUnits] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_ad_units(account_id, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AdUnits::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdUnits - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['includeInactive'] = include_inactive unless include_inactive.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update the supplied ad unit in the specified publisher AdSense account. This - # method supports patch semantics. - # @param [String] account_id - # Account which contains the ad client. - # @param [String] ad_client_id - # Ad client which contains the ad unit. - # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_object - # @param [String] ad_unit_id - # Ad unit to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, ad_unit_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.request_object = ad_unit_object - command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdUnit - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['adUnitId'] = ad_unit_id unless ad_unit_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update the supplied ad unit in the specified publisher AdSense account. - # @param [String] account_id - # Account which contains the ad client. - # @param [String] ad_client_id - # Ad client which contains the ad unit. - # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_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::AdsensehostV4_1::AdUnit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdUnit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/adclients/{adClientId}/adunits' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.request_object = ad_unit_object - command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdUnit - command.params['accountId'] = account_id unless account_id.nil? - command.params['adClientId'] = ad_client_id unless ad_client_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 AdSense 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 - # Hosted account upon which to report. - # @param [Array, 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] 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] metric - # Numeric columns to include in the report. - # @param [Array, 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 [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def generate_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, options: nil, &block) - path = 'accounts/{accountId}/reports' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation - command.response_class = Google::Apis::AdsensehostV4_1::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 - - # Get information about one of the ad clients in the Host AdSense account. - # @param [String] ad_client_id - # Ad client to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClient] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdClient] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad_client(ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdClient - command.params['adClientId'] = ad_client_id unless ad_client_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 host ad clients in this AdSense account. - # @param [Fixnum] max_results - # The maximum number of ad clients to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through ad clients. To retrieve the next - # page, set this parameter to the value of "nextPageToken" from the previous - # response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClients] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AdClients] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AdClients::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AdClients - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Create an association session for initiating an association with an AdSense - # user. - # @param [Array, String] product_code - # Products to associate with the user. - # @param [String] user_locale - # The preferred locale of the user. - # @param [String] website_locale - # The locale of the user's hosted website. - # @param [String] website_url - # The URL of the user's hosted website. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdsensehostV4_1::AssociationSession] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AssociationSession] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def start_association_session(product_code: nil, user_locale: nil, website_locale: nil, website_url: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'associationsessions/start' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession - command.query['productCode'] = product_code unless product_code.nil? - command.query['userLocale'] = user_locale unless user_locale.nil? - command.query['websiteLocale'] = website_locale unless website_locale.nil? - command.query['websiteUrl'] = website_url unless website_url.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 - - # Verify an association session after the association callback returns from - # AdSense signup. - # @param [String] token - # The token returned to the association callback URL. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AdsensehostV4_1::AssociationSession] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::AssociationSession] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def verify_association_session(token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'associationsessions/verify' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation - command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession - command.query['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete a specific custom channel from the host AdSense account. - # @param [String] ad_client_id - # Ad client from which to delete the custom channel. - # @param [String] custom_channel_id - # Custom channel 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::AdsensehostV4_1::CustomChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::CustomChannel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels/{customChannelId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a specific custom channel from the host AdSense account. - # @param [String] ad_client_id - # Ad client from which to get the custom channel. - # @param [String] custom_channel_id - # Custom channel to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::CustomChannel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels/{customChannelId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Add a new custom channel to the host AdSense account. - # @param [String] ad_client_id - # Ad client to which the new custom channel will be added. - # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_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 [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::CustomChannel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.request_object = custom_channel_object - command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel - command.params['adClientId'] = ad_client_id unless ad_client_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 host custom channels in this AdSense account. - # @param [String] ad_client_id - # Ad client for which to list custom channels. - # @param [Fixnum] max_results - # The maximum number of custom channels to include in the response, used for - # paging. - # @param [String] page_token - # A continuation token, used to page through custom channels. To retrieve the - # next page, set this parameter to the value of "nextPageToken" from the - # previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::CustomChannels] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannels::Representation - command.response_class = Google::Apis::AdsensehostV4_1::CustomChannels - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update a custom channel in the host AdSense account. This method supports - # patch semantics. - # @param [String] ad_client_id - # Ad client in which the custom channel will be updated. - # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_channel_object - # @param [String] custom_channel_id - # Custom channel to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::CustomChannel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_custom_channel(ad_client_id, custom_channel_object = nil, custom_channel_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.request_object = custom_channel_object - command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['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 - - # Update a custom channel in the host AdSense account. - # @param [String] ad_client_id - # Ad client in which the custom channel will be updated. - # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_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 [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::CustomChannel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/customchannels' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.request_object = custom_channel_object - command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation - command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel - command.params['adClientId'] = ad_client_id unless ad_client_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 AdSense 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 [Array, 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] 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] metric - # Numeric columns to include in the report. - # @param [Array, 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 [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def generate_report(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, options: nil, &block) - path = 'reports' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation - command.response_class = Google::Apis::AdsensehostV4_1::Report - command.query['dimension'] = dimension unless dimension.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['filter'] = filter unless filter.nil? - command.query['locale'] = locale unless locale.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['metric'] = metric unless metric.nil? - command.query['sort'] = sort unless sort.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete a URL channel from the host AdSense account. - # @param [String] ad_client_id - # Ad client from which to delete the URL channel. - # @param [String] url_channel_id - # URL channel 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::AdsensehostV4_1::UrlChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::UrlChannel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_url_channel(ad_client_id, url_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/urlchannels/{urlChannelId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation - command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.params['urlChannelId'] = url_channel_id unless url_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 - - # Add a new URL channel to the host AdSense account. - # @param [String] ad_client_id - # Ad client to which the new URL channel will be added. - # @param [Google::Apis::AdsensehostV4_1::UrlChannel] url_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 [Google::Apis::AdsensehostV4_1::UrlChannel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::UrlChannel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_url_channel(ad_client_id, url_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/urlchannels' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation - command.request_object = url_channel_object - command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation - command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel - command.params['adClientId'] = ad_client_id unless ad_client_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 host URL channels in the host AdSense account. - # @param [String] ad_client_id - # Ad client for which to list URL channels. - # @param [Fixnum] max_results - # The maximum number of URL channels to include in the response, used for paging. - # @param [String] page_token - # A continuation token, used to page through URL channels. To retrieve the next - # page, set this parameter to the value of "nextPageToken" from the previous - # response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AdsensehostV4_1::UrlChannels] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AdsensehostV4_1::UrlChannels] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'adclients/{adClientId}/urlchannels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannels::Representation - command.response_class = Google::Apis::AdsensehostV4_1::UrlChannels - command.params['adClientId'] = ad_client_id unless ad_client_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - end - end - end - end -end diff --git a/generated/google/apis/analytics_v3.rb b/generated/google/apis/analytics_v3.rb deleted file mode 100644 index 4e4136f1e..000000000 --- a/generated/google/apis/analytics_v3.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/analytics_v3/classes.rb b/generated/google/apis/analytics_v3/classes.rb deleted file mode 100644 index 2d1893e7d..000000000 --- a/generated/google/apis/analytics_v3/classes.rb +++ /dev/null @@ -1,5113 +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 AnalyticsV3 - - # JSON template for Analytics account entry. - class Account - include Google::Apis::Core::Hashable - - # Child link for an account entry. Points to the list of web properties for this - # account. - # Corresponds to the JSON property `childLink` - # @return [Google::Apis::AnalyticsV3::Account::ChildLink] - attr_accessor :child_link - - # Time the account was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Account ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for Analytics account. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Account name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Permissions the user has for this account. - # Corresponds to the JSON property `permissions` - # @return [Google::Apis::AnalyticsV3::Account::Permissions] - attr_accessor :permissions - - # Link for this account. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Time the account was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @child_link = args[:child_link] unless args[:child_link].nil? - @created = args[:created] unless args[:created].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @permissions = args[:permissions] unless args[:permissions].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - end - - # Child link for an account entry. Points to the list of web properties for this - # account. - class ChildLink - include Google::Apis::Core::Hashable - - # Link to the list of web properties for this account. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Type of the child link. Its value is "analytics#webproperties". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Permissions the user has for this account. - class Permissions - include Google::Apis::Core::Hashable - - # All the permissions that the user has for this account. These include any - # implied permissions (e.g., EDIT implies VIEW). - # Corresponds to the JSON property `effective` - # @return [Array] - attr_accessor :effective - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @effective = args[:effective] unless args[:effective].nil? - end - end - end - - # JSON template for a linked account. - class AccountRef - include Google::Apis::Core::Hashable - - # Link for this account. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Account ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Analytics account reference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Account 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) - @href = args[:href] unless args[:href].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # An AccountSummary collection lists a summary of accounts, properties and views - # (profiles) to which the user has access. Each resource in the collection - # corresponds to a single AccountSummary. - class AccountSummaries - include Google::Apis::Core::Hashable - - # A list of AccountSummaries. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this AccountSummary collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this AccountSummary collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for an Analytics AccountSummary. An AccountSummary is a - # lightweight tree comprised of properties/profiles. - class AccountSummary - include Google::Apis::Core::Hashable - - # Account ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for Analytics AccountSummary. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Account name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # List of web properties under this account. - # Corresponds to the JSON property `webProperties` - # @return [Array] - attr_accessor :web_properties - - 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? - @web_properties = args[:web_properties] unless args[:web_properties].nil? - end - end - - # JSON template for an Analytics account ticket. The account ticket consists of - # the ticket ID and the basic information for the account, property and profile. - class AccountTicket - include Google::Apis::Core::Hashable - - # JSON template for Analytics account entry. - # Corresponds to the JSON property `account` - # @return [Google::Apis::AnalyticsV3::Account] - attr_accessor :account - - # Account ticket ID used to access the account ticket. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for account ticket. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # JSON template for an Analytics view (profile). - # Corresponds to the JSON property `profile` - # @return [Google::Apis::AnalyticsV3::Profile] - attr_accessor :profile - - # Redirect URI where the user will be sent after accepting Terms of Service. - # Must be configured in APIs console as a callback URL. - # Corresponds to the JSON property `redirectUri` - # @return [String] - attr_accessor :redirect_uri - - # JSON template for an Analytics web property. - # Corresponds to the JSON property `webproperty` - # @return [Google::Apis::AnalyticsV3::Webproperty] - attr_accessor :webproperty - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account = args[:account] unless args[:account].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @profile = args[:profile] unless args[:profile].nil? - @redirect_uri = args[:redirect_uri] unless args[:redirect_uri].nil? - @webproperty = args[:webproperty] unless args[:webproperty].nil? - end - end - - # An account collection provides a list of Analytics accounts to which a user - # has access. The account collection is the entry point to all management - # information. Each resource in the collection corresponds to a single Analytics - # account. - class Accounts - include Google::Apis::Core::Hashable - - # A list of accounts. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of entries the response can contain, regardless of the - # actual number of entries returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Next link for this account collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Previous link for this account collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the entries, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for an AdWords account. - class AdWordsAccount - include Google::Apis::Core::Hashable - - # True if auto-tagging is enabled on the AdWords account. Read-only after the - # insert operation. - # Corresponds to the JSON property `autoTaggingEnabled` - # @return [Boolean] - attr_accessor :auto_tagging_enabled - alias_method :auto_tagging_enabled?, :auto_tagging_enabled - - # Customer ID. This field is required when creating an AdWords link. - # Corresponds to the JSON property `customerId` - # @return [String] - attr_accessor :customer_id - - # Resource type for AdWords account. - # 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) - @auto_tagging_enabled = args[:auto_tagging_enabled] unless args[:auto_tagging_enabled].nil? - @customer_id = args[:customer_id] unless args[:customer_id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Request template for the delete upload data request. - class DeleteUploadDataRequest - include Google::Apis::Core::Hashable - - # A list of upload UIDs. - # Corresponds to the JSON property `customDataImportUids` - # @return [Array] - attr_accessor :custom_data_import_uids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_data_import_uids = args[:custom_data_import_uids] unless args[:custom_data_import_uids].nil? - end - end - - # JSON template for a metadata column. - class Column - include Google::Apis::Core::Hashable - - # Map of attribute name and value for this column. - # Corresponds to the JSON property `attributes` - # @return [Hash] - attr_accessor :attributes - - # Column id. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for Analytics column. - # 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) - @attributes = args[:attributes] unless args[:attributes].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Lists columns (dimensions and metrics) for a particular report type. - class Columns - include Google::Apis::Core::Hashable - - # List of attributes names returned by columns. - # Corresponds to the JSON property `attributeNames` - # @return [Array] - attr_accessor :attribute_names - - # Etag of collection. This etag can be compared with the last response etag to - # check if response has changed. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # List of columns for a report type. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Total number of columns returned in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attribute_names = args[:attribute_names] unless args[:attribute_names].nil? - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - end - end - - # JSON template for an Analytics custom data source. - class CustomDataSource - include Google::Apis::Core::Hashable - - # Account ID to which this custom data source belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # - # Corresponds to the JSON property `childLink` - # @return [Google::Apis::AnalyticsV3::CustomDataSource::ChildLink] - attr_accessor :child_link - - # Time this custom data source was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Description of custom data source. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Custom data source ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # Corresponds to the JSON property `importBehavior` - # @return [String] - attr_accessor :import_behavior - - # Resource type for Analytics custom data source. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this custom data source. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent link for this custom data source. Points to the web property to which - # this custom data source belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::CustomDataSource::ParentLink] - attr_accessor :parent_link - - # IDs of views (profiles) linked to the custom data source. - # Corresponds to the JSON property `profilesLinked` - # @return [Array] - attr_accessor :profiles_linked - - # Link for this Analytics custom data source. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Type of the custom data source. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Time this custom data source was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # - # Corresponds to the JSON property `uploadType` - # @return [String] - attr_accessor :upload_type - - # Web property ID of the form UA-XXXXX-YY to which this custom data source - # belongs. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @child_link = args[:child_link] unless args[:child_link].nil? - @created = args[:created] unless args[:created].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @import_behavior = args[:import_behavior] unless args[:import_behavior].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @profiles_linked = args[:profiles_linked] unless args[:profiles_linked].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @type = args[:type] unless args[:type].nil? - @updated = args[:updated] unless args[:updated].nil? - @upload_type = args[:upload_type] unless args[:upload_type].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - - # - class ChildLink - include Google::Apis::Core::Hashable - - # Link to the list of daily uploads for this custom data source. Link to the - # list of uploads for this custom data source. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Value is "analytics#dailyUploads". Value is "analytics#uploads". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Parent link for this custom data source. Points to the web property to which - # this custom data source belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the web property to which this custom data source belongs. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Value is "analytics#webproperty". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # Lists Analytics custom data sources to which the user has access. Each - # resource in the collection corresponds to a single Analytics custom data - # source. - class CustomDataSources - include Google::Apis::Core::Hashable - - # Collection of custom data sources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this custom data source collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this custom data source collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for Analytics Custom Dimension. - class CustomDimension - include Google::Apis::Core::Hashable - - # Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Boolean indicating whether the custom dimension is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Time the custom dimension was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Custom dimension ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Index of the custom dimension. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # Kind value for a custom dimension. Set to "analytics#customDimension". It is a - # read-only field. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the custom dimension. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent link for the custom dimension. Points to the property to which the - # custom dimension belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::CustomDimension::ParentLink] - attr_accessor :parent_link - - # Scope of the custom dimension: HIT, SESSION, USER or PRODUCT. - # Corresponds to the JSON property `scope` - # @return [String] - attr_accessor :scope - - # Link for the custom dimension - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Time the custom dimension was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Property ID. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @created = args[:created] unless args[:created].nil? - @id = args[:id] unless args[:id].nil? - @index = args[:index] unless args[:index].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @scope = args[:scope] unless args[:scope].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - - # Parent link for the custom dimension. Points to the property to which the - # custom dimension belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the property to which the custom dimension belongs. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Type of the parent link. Set to "analytics#webproperty". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # A custom dimension collection lists Analytics custom dimensions to which the - # user has access. Each resource in the collection corresponds to a single - # Analytics custom dimension. - class CustomDimensions - include Google::Apis::Core::Hashable - - # Collection of custom dimensions. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this custom dimension collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this custom dimension collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for Analytics Custom Metric. - class CustomMetric - include Google::Apis::Core::Hashable - - # Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Boolean indicating whether the custom metric is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Time the custom metric was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Custom metric ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Index of the custom metric. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # Kind value for a custom metric. Set to "analytics#customMetric". It is a read- - # only field. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Max value of custom metric. - # Corresponds to the JSON property `max_value` - # @return [String] - attr_accessor :max_value - - # Min value of custom metric. - # Corresponds to the JSON property `min_value` - # @return [String] - attr_accessor :min_value - - # Name of the custom metric. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent link for the custom metric. Points to the property to which the custom - # metric belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::CustomMetric::ParentLink] - attr_accessor :parent_link - - # Scope of the custom metric: HIT or PRODUCT. - # Corresponds to the JSON property `scope` - # @return [String] - attr_accessor :scope - - # Link for the custom metric - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Data type of custom metric. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Time the custom metric was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Property ID. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @created = args[:created] unless args[:created].nil? - @id = args[:id] unless args[:id].nil? - @index = args[:index] unless args[:index].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_value = args[:max_value] unless args[:max_value].nil? - @min_value = args[:min_value] unless args[:min_value].nil? - @name = args[:name] unless args[:name].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @scope = args[:scope] unless args[:scope].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @type = args[:type] unless args[:type].nil? - @updated = args[:updated] unless args[:updated].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - - # Parent link for the custom metric. Points to the property to which the custom - # metric belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the property to which the custom metric belongs. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Type of the parent link. Set to "analytics#webproperty". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # A custom metric collection lists Analytics custom metrics to which the user - # has access. Each resource in the collection corresponds to a single Analytics - # custom metric. - class CustomMetrics - include Google::Apis::Core::Hashable - - # Collection of custom metrics. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this custom metric collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this custom metric collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for Analytics Entity AdWords Link. - class EntityAdWordsLink - include Google::Apis::Core::Hashable - - # A list of AdWords client accounts. These cannot be MCC accounts. This field is - # required when creating an AdWords link. It cannot be empty. - # Corresponds to the JSON property `adWordsAccounts` - # @return [Array] - attr_accessor :ad_words_accounts - - # Web property being linked. - # Corresponds to the JSON property `entity` - # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink::Entity] - attr_accessor :entity - - # Entity AdWords link ID - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for entity AdWords link. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the link. This field is required when creating an AdWords link. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # IDs of linked Views (Profiles) represented as strings. - # Corresponds to the JSON property `profileIds` - # @return [Array] - attr_accessor :profile_ids - - # URL link for this Google Analytics - Google AdWords link. - # 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) - @ad_words_accounts = args[:ad_words_accounts] unless args[:ad_words_accounts].nil? - @entity = args[:entity] unless args[:entity].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @profile_ids = args[:profile_ids] unless args[:profile_ids].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - - # Web property being linked. - class Entity - include Google::Apis::Core::Hashable - - # JSON template for a web property reference. - # Corresponds to the JSON property `webPropertyRef` - # @return [Google::Apis::AnalyticsV3::WebPropertyRef] - attr_accessor :web_property_ref - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @web_property_ref = args[:web_property_ref] unless args[:web_property_ref].nil? - end - end - end - - # An entity AdWords link collection provides a list of GA-AdWords links Each - # resource in this collection corresponds to a single link. - class EntityAdWordsLinks - include Google::Apis::Core::Hashable - - # A list of entity AdWords links. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of entries the response can contain, regardless of the - # actual number of entries returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Next link for this AdWords link collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Previous link for this AdWords link collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the entries, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - end - end - - # JSON template for an Analytics Entity-User Link. Returns permissions that a - # user has for an entity. - class EntityUserLink - include Google::Apis::Core::Hashable - - # Entity for this link. It can be an account, a web property, or a view (profile) - # . - # Corresponds to the JSON property `entity` - # @return [Google::Apis::AnalyticsV3::EntityUserLink::Entity] - attr_accessor :entity - - # Entity user link ID - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for entity user link. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Permissions the user has for this entity. - # Corresponds to the JSON property `permissions` - # @return [Google::Apis::AnalyticsV3::EntityUserLink::Permissions] - attr_accessor :permissions - - # Self link for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # JSON template for a user reference. - # Corresponds to the JSON property `userRef` - # @return [Google::Apis::AnalyticsV3::UserRef] - attr_accessor :user_ref - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entity = args[:entity] unless args[:entity].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @permissions = args[:permissions] unless args[:permissions].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @user_ref = args[:user_ref] unless args[:user_ref].nil? - end - - # Entity for this link. It can be an account, a web property, or a view (profile) - # . - class Entity - include Google::Apis::Core::Hashable - - # JSON template for a linked account. - # Corresponds to the JSON property `accountRef` - # @return [Google::Apis::AnalyticsV3::AccountRef] - attr_accessor :account_ref - - # JSON template for a linked view (profile). - # Corresponds to the JSON property `profileRef` - # @return [Google::Apis::AnalyticsV3::ProfileRef] - attr_accessor :profile_ref - - # JSON template for a web property reference. - # Corresponds to the JSON property `webPropertyRef` - # @return [Google::Apis::AnalyticsV3::WebPropertyRef] - attr_accessor :web_property_ref - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_ref = args[:account_ref] unless args[:account_ref].nil? - @profile_ref = args[:profile_ref] unless args[:profile_ref].nil? - @web_property_ref = args[:web_property_ref] unless args[:web_property_ref].nil? - end - end - - # Permissions the user has for this entity. - class Permissions - include Google::Apis::Core::Hashable - - # Effective permissions represent all the permissions that a user has for this - # entity. These include any implied permissions (e.g., EDIT implies VIEW) or - # inherited permissions from the parent entity. Effective permissions are read- - # only. - # Corresponds to the JSON property `effective` - # @return [Array] - attr_accessor :effective - - # Permissions that a user has been assigned at this very level. Does not include - # any implied or inherited permissions. Local permissions are modifiable. - # Corresponds to the JSON property `local` - # @return [Array] - attr_accessor :local - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @effective = args[:effective] unless args[:effective].nil? - @local = args[:local] unless args[:local].nil? - end - end - end - - # An entity user link collection provides a list of Analytics ACL links Each - # resource in this collection corresponds to a single link. - class EntityUserLinks - include Google::Apis::Core::Hashable - - # A list of entity user links. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of entries the response can contain, regardless of the - # actual number of entries returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Next link for this account collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Previous link for this account collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the entries, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - end - end - - # JSON template for Analytics experiment resource. - class Experiment - include Google::Apis::Core::Hashable - - # Account ID to which this experiment belongs. This field is read-only. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Time the experiment was created. This field is read-only. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Notes about this experiment. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # If true, the end user will be able to edit the experiment via the Google - # Analytics user interface. - # Corresponds to the JSON property `editableInGaUi` - # @return [Boolean] - attr_accessor :editable_in_ga_ui - alias_method :editable_in_ga_ui?, :editable_in_ga_ui - - # The ending time of the experiment (the time the status changed from RUNNING to - # ENDED). This field is present only if the experiment has ended. This field is - # read-only. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # Boolean specifying whether to distribute traffic evenly across all variations. - # If the value is False, content experiments follows the default behavior of - # adjusting traffic dynamically based on variation performance. Optional -- - # defaults to False. This field may not be changed for an experiment whose - # status is ENDED. - # Corresponds to the JSON property `equalWeighting` - # @return [Boolean] - attr_accessor :equal_weighting - alias_method :equal_weighting?, :equal_weighting - - # Experiment ID. Required for patch and update. Disallowed for create. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Internal ID for the web property to which this experiment belongs. This field - # is read-only. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # Resource type for an Analytics experiment. This field is read-only. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An integer number in [3, 90]. Specifies the minimum length of the experiment. - # Can be changed for a running experiment. This field may not be changed for an - # experiments whose status is ENDED. - # Corresponds to the JSON property `minimumExperimentLengthInDays` - # @return [Fixnum] - attr_accessor :minimum_experiment_length_in_days - - # Experiment name. This field may not be changed for an experiment whose status - # is ENDED. This field is required when creating an experiment. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The metric that the experiment is optimizing. Valid values: "ga:goal(n) - # Completions", "ga:adsenseAdsClicks", "ga:adsenseAdsViewed", "ga:adsenseRevenue" - # , "ga:bounces", "ga:pageviews", "ga:sessionDuration", "ga:transactions", "ga: - # transactionRevenue". This field is required if status is "RUNNING" and - # servingFramework is one of "REDIRECT" or "API". - # Corresponds to the JSON property `objectiveMetric` - # @return [String] - attr_accessor :objective_metric - - # Whether the objectiveMetric should be minimized or maximized. Possible values: - # "MAXIMUM", "MINIMUM". Optional--defaults to "MAXIMUM". Cannot be specified - # without objectiveMetric. Cannot be modified when status is "RUNNING" or "ENDED" - # . - # Corresponds to the JSON property `optimizationType` - # @return [String] - attr_accessor :optimization_type - - # Parent link for an experiment. Points to the view (profile) to which this - # experiment belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::Experiment::ParentLink] - attr_accessor :parent_link - - # View (Profile) ID to which this experiment belongs. This field is read-only. - # Corresponds to the JSON property `profileId` - # @return [String] - attr_accessor :profile_id - - # Why the experiment ended. Possible values: "STOPPED_BY_USER", "WINNER_FOUND", " - # EXPERIMENT_EXPIRED", "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". " - # ENDED_WITH_NO_WINNER" means that the experiment didn't expire but no winner - # was projected to be found. If the experiment status is changed via the API to - # ENDED this field is set to STOPPED_BY_USER. This field is read-only. - # Corresponds to the JSON property `reasonExperimentEnded` - # @return [String] - attr_accessor :reason_experiment_ended - - # Boolean specifying whether variations URLS are rewritten to match those of the - # original. This field may not be changed for an experiments whose status is - # ENDED. - # Corresponds to the JSON property `rewriteVariationUrlsAsOriginal` - # @return [Boolean] - attr_accessor :rewrite_variation_urls_as_original - alias_method :rewrite_variation_urls_as_original?, :rewrite_variation_urls_as_original - - # Link for this experiment. This field is read-only. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The framework used to serve the experiment variations and evaluate the results. - # One of: - # - REDIRECT: Google Analytics redirects traffic to different variation pages, - # reports the chosen variation and evaluates the results. - # - API: Google Analytics chooses and reports the variation to serve and - # evaluates the results; the caller is responsible for serving the selected - # variation. - # - EXTERNAL: The variations will be served externally and the chosen variation - # reported to Google Analytics. The caller is responsible for serving the - # selected variation and evaluating the results. - # Corresponds to the JSON property `servingFramework` - # @return [String] - attr_accessor :serving_framework - - # The snippet of code to include on the control page(s). This field is read-only. - # Corresponds to the JSON property `snippet` - # @return [String] - attr_accessor :snippet - - # The starting time of the experiment (the time the status changed from - # READY_TO_RUN to RUNNING). This field is present only if the experiment has - # started. This field is read-only. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - # Experiment status. Possible values: "DRAFT", "READY_TO_RUN", "RUNNING", "ENDED" - # . Experiments can be created in the "DRAFT", "READY_TO_RUN" or "RUNNING" state. - # This field is required when creating an experiment. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # A floating-point number between 0 and 1. Specifies the fraction of the traffic - # that participates in the experiment. Can be changed for a running experiment. - # This field may not be changed for an experiments whose status is ENDED. - # Corresponds to the JSON property `trafficCoverage` - # @return [Float] - attr_accessor :traffic_coverage - - # Time the experiment was last modified. This field is read-only. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Array of variations. The first variation in the array is the original. The - # number of variations may not change once an experiment is in the RUNNING state. - # At least two variations are required before status can be set to RUNNING. - # Corresponds to the JSON property `variations` - # @return [Array] - attr_accessor :variations - - # Web property ID to which this experiment belongs. The web property ID is of - # the form UA-XXXXX-YY. This field is read-only. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - # A floating-point number between 0 and 1. Specifies the necessary confidence - # level to choose a winner. This field may not be changed for an experiments - # whose status is ENDED. - # Corresponds to the JSON property `winnerConfidenceLevel` - # @return [Float] - attr_accessor :winner_confidence_level - - # Boolean specifying whether a winner has been found for this experiment. This - # field is read-only. - # Corresponds to the JSON property `winnerFound` - # @return [Boolean] - attr_accessor :winner_found - alias_method :winner_found?, :winner_found - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @created = args[:created] unless args[:created].nil? - @description = args[:description] unless args[:description].nil? - @editable_in_ga_ui = args[:editable_in_ga_ui] unless args[:editable_in_ga_ui].nil? - @end_time = args[:end_time] unless args[:end_time].nil? - @equal_weighting = args[:equal_weighting] unless args[:equal_weighting].nil? - @id = args[:id] unless args[:id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @minimum_experiment_length_in_days = args[:minimum_experiment_length_in_days] unless args[:minimum_experiment_length_in_days].nil? - @name = args[:name] unless args[:name].nil? - @objective_metric = args[:objective_metric] unless args[:objective_metric].nil? - @optimization_type = args[:optimization_type] unless args[:optimization_type].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @profile_id = args[:profile_id] unless args[:profile_id].nil? - @reason_experiment_ended = args[:reason_experiment_ended] unless args[:reason_experiment_ended].nil? - @rewrite_variation_urls_as_original = args[:rewrite_variation_urls_as_original] unless args[:rewrite_variation_urls_as_original].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @serving_framework = args[:serving_framework] unless args[:serving_framework].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - @status = args[:status] unless args[:status].nil? - @traffic_coverage = args[:traffic_coverage] unless args[:traffic_coverage].nil? - @updated = args[:updated] unless args[:updated].nil? - @variations = args[:variations] unless args[:variations].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - @winner_confidence_level = args[:winner_confidence_level] unless args[:winner_confidence_level].nil? - @winner_found = args[:winner_found] unless args[:winner_found].nil? - end - - # Parent link for an experiment. Points to the view (profile) to which this - # experiment belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the view (profile) to which this experiment belongs. This field is - # read-only. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Value is "analytics#profile". This field is read-only. - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class Variation - include Google::Apis::Core::Hashable - - # The name of the variation. This field is required when creating an experiment. - # This field may not be changed for an experiment whose status is ENDED. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Status of the variation. Possible values: "ACTIVE", "INACTIVE". INACTIVE - # variations are not served. This field may not be changed for an experiment - # whose status is ENDED. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The URL of the variation. This field may not be changed for an experiment - # whose status is RUNNING or ENDED. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # Weight that this variation should receive. Only present if the experiment is - # running. This field is read-only. - # Corresponds to the JSON property `weight` - # @return [Float] - attr_accessor :weight - - # True if the experiment has ended and this variation performed (statistically) - # significantly better than the original. This field is read-only. - # Corresponds to the JSON property `won` - # @return [Boolean] - attr_accessor :won - alias_method :won?, :won - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @status = args[:status] unless args[:status].nil? - @url = args[:url] unless args[:url].nil? - @weight = args[:weight] unless args[:weight].nil? - @won = args[:won] unless args[:won].nil? - end - end - end - - # An experiment collection lists Analytics experiments to which the user has - # access. Each view (profile) can have a set of experiments. Each resource in - # the Experiment collection corresponds to a single Analytics experiment. - class Experiments - include Google::Apis::Core::Hashable - - # A list of experiments. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this experiment collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this experiment collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of - # resources in the result. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for an Analytics account filter. - class Filter - include Google::Apis::Core::Hashable - - # Account ID to which this filter belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Details for the filter of the type ADVANCED. - # Corresponds to the JSON property `advancedDetails` - # @return [Google::Apis::AnalyticsV3::Filter::AdvancedDetails] - attr_accessor :advanced_details - - # Time this filter was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # JSON template for an Analytics filter expression. - # Corresponds to the JSON property `excludeDetails` - # @return [Google::Apis::AnalyticsV3::FilterExpression] - attr_accessor :exclude_details - - # Filter ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # JSON template for an Analytics filter expression. - # Corresponds to the JSON property `includeDetails` - # @return [Google::Apis::AnalyticsV3::FilterExpression] - attr_accessor :include_details - - # Resource type for Analytics filter. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Details for the filter of the type LOWER. - # Corresponds to the JSON property `lowercaseDetails` - # @return [Google::Apis::AnalyticsV3::Filter::LowercaseDetails] - attr_accessor :lowercase_details - - # Name of this filter. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent link for this filter. Points to the account to which this filter - # belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::Filter::ParentLink] - attr_accessor :parent_link - - # Details for the filter of the type SEARCH_AND_REPLACE. - # Corresponds to the JSON property `searchAndReplaceDetails` - # @return [Google::Apis::AnalyticsV3::Filter::SearchAndReplaceDetails] - attr_accessor :search_and_replace_details - - # Link for this filter. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE, - # UPPERCASE, SEARCH_AND_REPLACE and ADVANCED. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Time this filter was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Details for the filter of the type UPPER. - # Corresponds to the JSON property `uppercaseDetails` - # @return [Google::Apis::AnalyticsV3::Filter::UppercaseDetails] - attr_accessor :uppercase_details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advanced_details = args[:advanced_details] unless args[:advanced_details].nil? - @created = args[:created] unless args[:created].nil? - @exclude_details = args[:exclude_details] unless args[:exclude_details].nil? - @id = args[:id] unless args[:id].nil? - @include_details = args[:include_details] unless args[:include_details].nil? - @kind = args[:kind] unless args[:kind].nil? - @lowercase_details = args[:lowercase_details] unless args[:lowercase_details].nil? - @name = args[:name] unless args[:name].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @search_and_replace_details = args[:search_and_replace_details] unless args[:search_and_replace_details].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @type = args[:type] unless args[:type].nil? - @updated = args[:updated] unless args[:updated].nil? - @uppercase_details = args[:uppercase_details] unless args[:uppercase_details].nil? - end - - # Details for the filter of the type ADVANCED. - class AdvancedDetails - include Google::Apis::Core::Hashable - - # Indicates if the filter expressions are case sensitive. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - # Expression to extract from field A. - # Corresponds to the JSON property `extractA` - # @return [String] - attr_accessor :extract_a - - # Expression to extract from field B. - # Corresponds to the JSON property `extractB` - # @return [String] - attr_accessor :extract_b - - # Field A. - # Corresponds to the JSON property `fieldA` - # @return [String] - attr_accessor :field_a - - # The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. - # Corresponds to the JSON property `fieldAIndex` - # @return [Fixnum] - attr_accessor :field_a_index - - # Indicates if field A is required to match. - # Corresponds to the JSON property `fieldARequired` - # @return [Boolean] - attr_accessor :field_a_required - alias_method :field_a_required?, :field_a_required - - # Field B. - # Corresponds to the JSON property `fieldB` - # @return [String] - attr_accessor :field_b - - # The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. - # Corresponds to the JSON property `fieldBIndex` - # @return [Fixnum] - attr_accessor :field_b_index - - # Indicates if field B is required to match. - # Corresponds to the JSON property `fieldBRequired` - # @return [Boolean] - attr_accessor :field_b_required - alias_method :field_b_required?, :field_b_required - - # Expression used to construct the output value. - # Corresponds to the JSON property `outputConstructor` - # @return [String] - attr_accessor :output_constructor - - # Output field. - # Corresponds to the JSON property `outputToField` - # @return [String] - attr_accessor :output_to_field - - # The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. - # Corresponds to the JSON property `outputToFieldIndex` - # @return [Fixnum] - attr_accessor :output_to_field_index - - # Indicates if the existing value of the output field, if any, should be - # overridden by the output expression. - # Corresponds to the JSON property `overrideOutputField` - # @return [Boolean] - attr_accessor :override_output_field - alias_method :override_output_field?, :override_output_field - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @case_sensitive = args[:case_sensitive] unless args[:case_sensitive].nil? - @extract_a = args[:extract_a] unless args[:extract_a].nil? - @extract_b = args[:extract_b] unless args[:extract_b].nil? - @field_a = args[:field_a] unless args[:field_a].nil? - @field_a_index = args[:field_a_index] unless args[:field_a_index].nil? - @field_a_required = args[:field_a_required] unless args[:field_a_required].nil? - @field_b = args[:field_b] unless args[:field_b].nil? - @field_b_index = args[:field_b_index] unless args[:field_b_index].nil? - @field_b_required = args[:field_b_required] unless args[:field_b_required].nil? - @output_constructor = args[:output_constructor] unless args[:output_constructor].nil? - @output_to_field = args[:output_to_field] unless args[:output_to_field].nil? - @output_to_field_index = args[:output_to_field_index] unless args[:output_to_field_index].nil? - @override_output_field = args[:override_output_field] unless args[:override_output_field].nil? - end - end - - # Details for the filter of the type LOWER. - class LowercaseDetails - include Google::Apis::Core::Hashable - - # Field to use in the filter. - # Corresponds to the JSON property `field` - # @return [String] - attr_accessor :field - - # The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. - # Corresponds to the JSON property `fieldIndex` - # @return [Fixnum] - attr_accessor :field_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @field = args[:field] unless args[:field].nil? - @field_index = args[:field_index] unless args[:field_index].nil? - end - end - - # Parent link for this filter. Points to the account to which this filter - # belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the account to which this filter belongs. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Value is "analytics#account". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Details for the filter of the type SEARCH_AND_REPLACE. - class SearchAndReplaceDetails - include Google::Apis::Core::Hashable - - # Determines if the filter is case sensitive. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - # Field to use in the filter. - # Corresponds to the JSON property `field` - # @return [String] - attr_accessor :field - - # The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. - # Corresponds to the JSON property `fieldIndex` - # @return [Fixnum] - attr_accessor :field_index - - # Term to replace the search term with. - # Corresponds to the JSON property `replaceString` - # @return [String] - attr_accessor :replace_string - - # Term to search. - # Corresponds to the JSON property `searchString` - # @return [String] - attr_accessor :search_string - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @case_sensitive = args[:case_sensitive] unless args[:case_sensitive].nil? - @field = args[:field] unless args[:field].nil? - @field_index = args[:field_index] unless args[:field_index].nil? - @replace_string = args[:replace_string] unless args[:replace_string].nil? - @search_string = args[:search_string] unless args[:search_string].nil? - end - end - - # Details for the filter of the type UPPER. - class UppercaseDetails - include Google::Apis::Core::Hashable - - # Field to use in the filter. - # Corresponds to the JSON property `field` - # @return [String] - attr_accessor :field - - # The Index of the custom dimension. Required if field is a CUSTOM_DIMENSION. - # Corresponds to the JSON property `fieldIndex` - # @return [Fixnum] - attr_accessor :field_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @field = args[:field] unless args[:field].nil? - @field_index = args[:field_index] unless args[:field_index].nil? - end - end - end - - # JSON template for an Analytics filter expression. - class FilterExpression - include Google::Apis::Core::Hashable - - # Determines if the filter is case sensitive. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - # Filter expression value - # Corresponds to the JSON property `expressionValue` - # @return [String] - attr_accessor :expression_value - - # Field to filter. Possible values: - # - Content and Traffic - # - PAGE_REQUEST_URI, - # - PAGE_HOSTNAME, - # - PAGE_TITLE, - # - REFERRAL, - # - COST_DATA_URI (Campaign target URL), - # - HIT_TYPE, - # - INTERNAL_SEARCH_TERM, - # - INTERNAL_SEARCH_TYPE, - # - SOURCE_PROPERTY_TRACKING_ID, - # - Campaign or AdGroup - # - CAMPAIGN_SOURCE, - # - CAMPAIGN_MEDIUM, - # - CAMPAIGN_NAME, - # - CAMPAIGN_AD_GROUP, - # - CAMPAIGN_TERM, - # - CAMPAIGN_CONTENT, - # - CAMPAIGN_CODE, - # - CAMPAIGN_REFERRAL_PATH, - # - E-Commerce - # - TRANSACTION_COUNTRY, - # - TRANSACTION_REGION, - # - TRANSACTION_CITY, - # - TRANSACTION_AFFILIATION (Store or order location), - # - ITEM_NAME, - # - ITEM_CODE, - # - ITEM_VARIATION, - # - TRANSACTION_ID, - # - TRANSACTION_CURRENCY_CODE, - # - PRODUCT_ACTION_TYPE, - # - Audience/Users - # - BROWSER, - # - BROWSER_VERSION, - # - BROWSER_SIZE, - # - PLATFORM, - # - PLATFORM_VERSION, - # - LANGUAGE, - # - SCREEN_RESOLUTION, - # - SCREEN_COLORS, - # - JAVA_ENABLED (Boolean Field), - # - FLASH_VERSION, - # - GEO_SPEED (Connection speed), - # - VISITOR_TYPE, - # - GEO_ORGANIZATION (ISP organization), - # - GEO_DOMAIN, - # - GEO_IP_ADDRESS, - # - GEO_IP_VERSION, - # - Location - # - GEO_COUNTRY, - # - GEO_REGION, - # - GEO_CITY, - # - Event - # - EVENT_CATEGORY, - # - EVENT_ACTION, - # - EVENT_LABEL, - # - Other - # - CUSTOM_FIELD_1, - # - CUSTOM_FIELD_2, - # - USER_DEFINED_VALUE, - # - Application - # - APP_ID, - # - APP_INSTALLER_ID, - # - APP_NAME, - # - APP_VERSION, - # - SCREEN, - # - IS_APP (Boolean Field), - # - IS_FATAL_EXCEPTION (Boolean Field), - # - EXCEPTION_DESCRIPTION, - # - Mobile device - # - IS_MOBILE (Boolean Field, Deprecated. Use DEVICE_CATEGORY=mobile), - # - IS_TABLET (Boolean Field, Deprecated. Use DEVICE_CATEGORY=tablet), - # - DEVICE_CATEGORY, - # - MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field), - # - MOBILE_HAS_NFC_SUPPORT (Boolean Field), - # - MOBILE_HAS_CELLULAR_RADIO (Boolean Field), - # - MOBILE_HAS_WIFI_SUPPORT (Boolean Field), - # - MOBILE_BRAND_NAME, - # - MOBILE_MODEL_NAME, - # - MOBILE_MARKETING_NAME, - # - MOBILE_POINTING_METHOD, - # - Social - # - SOCIAL_NETWORK, - # - SOCIAL_ACTION, - # - SOCIAL_ACTION_TARGET, - # - Custom dimension - # - CUSTOM_DIMENSION (See accompanying field index), - # Corresponds to the JSON property `field` - # @return [String] - attr_accessor :field - - # The Index of the custom dimension. Set only if the field is a is - # CUSTOM_DIMENSION. - # Corresponds to the JSON property `fieldIndex` - # @return [Fixnum] - attr_accessor :field_index - - # Kind value for filter expression - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Match type for this filter. Possible values are BEGINS_WITH, EQUAL, ENDS_WITH, - # CONTAINS, MATCHES. Include and Exclude filters can use any match type. Match - # type is not applicable to Upper case and Lower case filters. Search and - # Replace expressions in the Search and Replace filter and all filter - # expressions in the Advanced filter default to MATCHES. User should not set - # match type for those filters. - # Corresponds to the JSON property `matchType` - # @return [String] - attr_accessor :match_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @case_sensitive = args[:case_sensitive] unless args[:case_sensitive].nil? - @expression_value = args[:expression_value] unless args[:expression_value].nil? - @field = args[:field] unless args[:field].nil? - @field_index = args[:field_index] unless args[:field_index].nil? - @kind = args[:kind] unless args[:kind].nil? - @match_type = args[:match_type] unless args[:match_type].nil? - end - end - - # JSON template for a profile filter link. - class FilterRef - include Google::Apis::Core::Hashable - - # Account ID to which this filter belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Link for this filter. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Filter ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Kind value for filter reference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this filter. - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @href = args[:href] unless args[:href].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # A filter collection lists filters created by users in an Analytics account. - # Each resource in the collection corresponds to a filter. - class Filters - include Google::Apis::Core::Hashable - - # A list of filters. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1,000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this filter collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this filter collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # Analytics data for a given view (profile). - class GaData - include Google::Apis::Core::Hashable - - # Column headers that list dimension names followed by the metric names. The - # order of dimensions and metrics is same as specified in the request. - # Corresponds to the JSON property `columnHeaders` - # @return [Array] - attr_accessor :column_headers - - # Determines if Analytics data contains samples. - # Corresponds to the JSON property `containsSampledData` - # @return [Boolean] - attr_accessor :contains_sampled_data - alias_method :contains_sampled_data?, :contains_sampled_data - - # - # Corresponds to the JSON property `dataTable` - # @return [Google::Apis::AnalyticsV3::GaData::DataTable] - attr_accessor :data_table - - # Unique ID for this data response. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The maximum number of rows the response can contain, regardless of the actual - # number of rows returned. Its value ranges from 1 to 10,000 with a value of - # 1000 by default, or otherwise specified by the max-results query parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this Analytics data query. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this Analytics data query. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # Information for the view (profile), for which the Analytics data was requested. - # Corresponds to the JSON property `profileInfo` - # @return [Google::Apis::AnalyticsV3::GaData::ProfileInfo] - attr_accessor :profile_info - - # Analytics data request query parameters. - # Corresponds to the JSON property `query` - # @return [Google::Apis::AnalyticsV3::GaData::Query] - attr_accessor :query - - # Analytics data rows, where each row contains a list of dimension values - # followed by the metric values. The order of dimensions and metrics is same as - # specified in the request. - # Corresponds to the JSON property `rows` - # @return [Array>] - attr_accessor :rows - - # The number of samples used to calculate the result. - # Corresponds to the JSON property `sampleSize` - # @return [String] - attr_accessor :sample_size - - # Total size of the sample space from which the samples were selected. - # Corresponds to the JSON property `sampleSpace` - # @return [String] - attr_accessor :sample_space - - # Link to this page. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The total number of rows for the query, regardless of the number of rows in - # the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Total values for the requested metrics over all the results, not just the - # results returned in this response. The order of the metric totals is same as - # the metric order specified in the request. - # Corresponds to the JSON property `totalsForAllResults` - # @return [Hash] - attr_accessor :totals_for_all_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_headers = args[:column_headers] unless args[:column_headers].nil? - @contains_sampled_data = args[:contains_sampled_data] unless args[:contains_sampled_data].nil? - @data_table = args[:data_table] unless args[:data_table].nil? - @id = args[:id] unless args[:id].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @profile_info = args[:profile_info] unless args[:profile_info].nil? - @query = args[:query] unless args[:query].nil? - @rows = args[:rows] unless args[:rows].nil? - @sample_size = args[:sample_size] unless args[:sample_size].nil? - @sample_space = args[:sample_space] unless args[:sample_space].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @totals_for_all_results = args[:totals_for_all_results] unless args[:totals_for_all_results].nil? - end - - # - class ColumnHeader - include Google::Apis::Core::Hashable - - # Column Type. Either DIMENSION or METRIC. - # Corresponds to the JSON property `columnType` - # @return [String] - attr_accessor :column_type - - # Data type. Dimension column headers have only STRING as the data type. Metric - # column headers have data types for metric values such as INTEGER, DOUBLE, - # CURRENCY etc. - # Corresponds to the JSON property `dataType` - # @return [String] - attr_accessor :data_type - - # Column 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) - @column_type = args[:column_type] unless args[:column_type].nil? - @data_type = args[:data_type] unless args[:data_type].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # - class DataTable - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `cols` - # @return [Array] - attr_accessor :cols - - # - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cols = args[:cols] unless args[:cols].nil? - @rows = args[:rows] unless args[:rows].nil? - end - - # - class Col - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - - # - # 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? - @label = args[:label] unless args[:label].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class Row - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `c` - # @return [Array] - attr_accessor :c - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @c = args[:c] unless args[:c].nil? - end - - # - class C - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `v` - # @return [String] - attr_accessor :v - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @v = args[:v] unless args[:v].nil? - end - end - end - end - - # Information for the view (profile), for which the Analytics data was requested. - class ProfileInfo - include Google::Apis::Core::Hashable - - # Account ID to which this view (profile) belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Internal ID for the web property to which this view (profile) belongs. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # View (Profile) ID. - # Corresponds to the JSON property `profileId` - # @return [String] - attr_accessor :profile_id - - # View (Profile) name. - # Corresponds to the JSON property `profileName` - # @return [String] - attr_accessor :profile_name - - # Table ID for view (profile). - # Corresponds to the JSON property `tableId` - # @return [String] - attr_accessor :table_id - - # Web Property ID to which this view (profile) belongs. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @profile_id = args[:profile_id] unless args[:profile_id].nil? - @profile_name = args[:profile_name] unless args[:profile_name].nil? - @table_id = args[:table_id] unless args[:table_id].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - end - - # Analytics data request query parameters. - class Query - include Google::Apis::Core::Hashable - - # List of analytics dimensions. - # Corresponds to the JSON property `dimensions` - # @return [String] - attr_accessor :dimensions - - # End date. - # Corresponds to the JSON property `end-date` - # @return [String] - attr_accessor :end_date - - # Comma-separated list of dimension or metric filters. - # Corresponds to the JSON property `filters` - # @return [String] - attr_accessor :filters - - # Unique table ID. - # Corresponds to the JSON property `ids` - # @return [String] - attr_accessor :ids - - # Maximum results per page. - # Corresponds to the JSON property `max-results` - # @return [Fixnum] - attr_accessor :max_results - - # List of analytics metrics. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # Desired sampling level - # Corresponds to the JSON property `samplingLevel` - # @return [String] - attr_accessor :sampling_level - - # Analytics advanced segment. - # Corresponds to the JSON property `segment` - # @return [String] - attr_accessor :segment - - # List of dimensions or metrics based on which Analytics data is sorted. - # Corresponds to the JSON property `sort` - # @return [Array] - attr_accessor :sort - - # Start date. - # Corresponds to the JSON property `start-date` - # @return [String] - attr_accessor :start_date - - # Start index. - # Corresponds to the JSON property `start-index` - # @return [Fixnum] - attr_accessor :start_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @filters = args[:filters] unless args[:filters].nil? - @ids = args[:ids] unless args[:ids].nil? - @max_results = args[:max_results] unless args[:max_results].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @sampling_level = args[:sampling_level] unless args[:sampling_level].nil? - @segment = args[:segment] unless args[:segment].nil? - @sort = args[:sort] unless args[:sort].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - end - end - end - - # JSON template for Analytics goal resource. - class Goal - include Google::Apis::Core::Hashable - - # Account ID to which this goal belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Determines whether this goal is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Time this goal was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Details for the goal of the type EVENT. - # Corresponds to the JSON property `eventDetails` - # @return [Google::Apis::AnalyticsV3::Goal::EventDetails] - attr_accessor :event_details - - # Goal ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Internal ID for the web property to which this goal belongs. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # Resource type for an Analytics goal. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Goal name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent link for a goal. Points to the view (profile) to which this goal - # belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::Goal::ParentLink] - attr_accessor :parent_link - - # View (Profile) ID to which this goal belongs. - # Corresponds to the JSON property `profileId` - # @return [String] - attr_accessor :profile_id - - # Link for this goal. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, - # VISIT_NUM_PAGES, AND EVENT. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Time this goal was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Details for the goal of the type URL_DESTINATION. - # Corresponds to the JSON property `urlDestinationDetails` - # @return [Google::Apis::AnalyticsV3::Goal::UrlDestinationDetails] - attr_accessor :url_destination_details - - # Goal value. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - # Details for the goal of the type VISIT_NUM_PAGES. - # Corresponds to the JSON property `visitNumPagesDetails` - # @return [Google::Apis::AnalyticsV3::Goal::VisitNumPagesDetails] - attr_accessor :visit_num_pages_details - - # Details for the goal of the type VISIT_TIME_ON_SITE. - # Corresponds to the JSON property `visitTimeOnSiteDetails` - # @return [Google::Apis::AnalyticsV3::Goal::VisitTimeOnSiteDetails] - attr_accessor :visit_time_on_site_details - - # Web property ID to which this goal belongs. The web property ID is of the form - # UA-XXXXX-YY. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @created = args[:created] unless args[:created].nil? - @event_details = args[:event_details] unless args[:event_details].nil? - @id = args[:id] unless args[:id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @profile_id = args[:profile_id] unless args[:profile_id].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @type = args[:type] unless args[:type].nil? - @updated = args[:updated] unless args[:updated].nil? - @url_destination_details = args[:url_destination_details] unless args[:url_destination_details].nil? - @value = args[:value] unless args[:value].nil? - @visit_num_pages_details = args[:visit_num_pages_details] unless args[:visit_num_pages_details].nil? - @visit_time_on_site_details = args[:visit_time_on_site_details] unless args[:visit_time_on_site_details].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - - # Details for the goal of the type EVENT. - class EventDetails - include Google::Apis::Core::Hashable - - # List of event conditions. - # Corresponds to the JSON property `eventConditions` - # @return [Array] - attr_accessor :event_conditions - - # Determines if the event value should be used as the value for this goal. - # Corresponds to the JSON property `useEventValue` - # @return [Boolean] - attr_accessor :use_event_value - alias_method :use_event_value?, :use_event_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @event_conditions = args[:event_conditions] unless args[:event_conditions].nil? - @use_event_value = args[:use_event_value] unless args[:use_event_value].nil? - end - - # - class EventCondition - include Google::Apis::Core::Hashable - - # Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL. - # Corresponds to the JSON property `comparisonType` - # @return [String] - attr_accessor :comparison_type - - # Value used for this comparison. - # Corresponds to the JSON property `comparisonValue` - # @return [String] - attr_accessor :comparison_value - - # Expression used for this match. - # Corresponds to the JSON property `expression` - # @return [String] - attr_accessor :expression - - # Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or - # EXACT. - # Corresponds to the JSON property `matchType` - # @return [String] - attr_accessor :match_type - - # Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or - # VALUE. - # 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) - @comparison_type = args[:comparison_type] unless args[:comparison_type].nil? - @comparison_value = args[:comparison_value] unless args[:comparison_value].nil? - @expression = args[:expression] unless args[:expression].nil? - @match_type = args[:match_type] unless args[:match_type].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # Parent link for a goal. Points to the view (profile) to which this goal - # belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the view (profile) to which this goal belongs. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Value is "analytics#profile". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Details for the goal of the type URL_DESTINATION. - class UrlDestinationDetails - include Google::Apis::Core::Hashable - - # Determines if the goal URL must exactly match the capitalization of visited - # URLs. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - # Determines if the first step in this goal is required. - # Corresponds to the JSON property `firstStepRequired` - # @return [Boolean] - attr_accessor :first_step_required - alias_method :first_step_required?, :first_step_required - - # Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX. - # Corresponds to the JSON property `matchType` - # @return [String] - attr_accessor :match_type - - # List of steps configured for this goal funnel. - # Corresponds to the JSON property `steps` - # @return [Array] - attr_accessor :steps - - # URL for this goal. - # 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) - @case_sensitive = args[:case_sensitive] unless args[:case_sensitive].nil? - @first_step_required = args[:first_step_required] unless args[:first_step_required].nil? - @match_type = args[:match_type] unless args[:match_type].nil? - @steps = args[:steps] unless args[:steps].nil? - @url = args[:url] unless args[:url].nil? - end - - # - class Step - include Google::Apis::Core::Hashable - - # Step name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Step number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - - # URL for this step. - # 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) - @name = args[:name] unless args[:name].nil? - @number = args[:number] unless args[:number].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - - # Details for the goal of the type VISIT_NUM_PAGES. - class VisitNumPagesDetails - include Google::Apis::Core::Hashable - - # Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL. - # Corresponds to the JSON property `comparisonType` - # @return [String] - attr_accessor :comparison_type - - # Value used for this comparison. - # Corresponds to the JSON property `comparisonValue` - # @return [String] - attr_accessor :comparison_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @comparison_type = args[:comparison_type] unless args[:comparison_type].nil? - @comparison_value = args[:comparison_value] unless args[:comparison_value].nil? - end - end - - # Details for the goal of the type VISIT_TIME_ON_SITE. - class VisitTimeOnSiteDetails - include Google::Apis::Core::Hashable - - # Type of comparison. Possible values are LESS_THAN or GREATER_THAN. - # Corresponds to the JSON property `comparisonType` - # @return [String] - attr_accessor :comparison_type - - # Value used for this comparison. - # Corresponds to the JSON property `comparisonValue` - # @return [String] - attr_accessor :comparison_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @comparison_type = args[:comparison_type] unless args[:comparison_type].nil? - @comparison_value = args[:comparison_value] unless args[:comparison_value].nil? - end - end - end - - # A goal collection lists Analytics goals to which the user has access. Each - # view (profile) can have a set of goals. Each resource in the Goal collection - # corresponds to a single Analytics goal. - class Goals - include Google::Apis::Core::Hashable - - # A list of goals. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this goal collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this goal collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of - # resources in the result. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # Multi-Channel Funnels data for a given view (profile). - class McfData - include Google::Apis::Core::Hashable - - # Column headers that list dimension names followed by the metric names. The - # order of dimensions and metrics is same as specified in the request. - # Corresponds to the JSON property `columnHeaders` - # @return [Array] - attr_accessor :column_headers - - # Determines if the Analytics data contains sampled data. - # Corresponds to the JSON property `containsSampledData` - # @return [Boolean] - attr_accessor :contains_sampled_data - alias_method :contains_sampled_data?, :contains_sampled_data - - # Unique ID for this data response. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The maximum number of rows the response can contain, regardless of the actual - # number of rows returned. Its value ranges from 1 to 10,000 with a value of - # 1000 by default, or otherwise specified by the max-results query parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this Analytics data query. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this Analytics data query. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # Information for the view (profile), for which the Analytics data was requested. - # Corresponds to the JSON property `profileInfo` - # @return [Google::Apis::AnalyticsV3::McfData::ProfileInfo] - attr_accessor :profile_info - - # Analytics data request query parameters. - # Corresponds to the JSON property `query` - # @return [Google::Apis::AnalyticsV3::McfData::Query] - attr_accessor :query - - # Analytics data rows, where each row contains a list of dimension values - # followed by the metric values. The order of dimensions and metrics is same as - # specified in the request. - # Corresponds to the JSON property `rows` - # @return [Array>] - attr_accessor :rows - - # The number of samples used to calculate the result. - # Corresponds to the JSON property `sampleSize` - # @return [String] - attr_accessor :sample_size - - # Total size of the sample space from which the samples were selected. - # Corresponds to the JSON property `sampleSpace` - # @return [String] - attr_accessor :sample_space - - # Link to this page. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The total number of rows for the query, regardless of the number of rows in - # the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Total values for the requested metrics over all the results, not just the - # results returned in this response. The order of the metric totals is same as - # the metric order specified in the request. - # Corresponds to the JSON property `totalsForAllResults` - # @return [Hash] - attr_accessor :totals_for_all_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_headers = args[:column_headers] unless args[:column_headers].nil? - @contains_sampled_data = args[:contains_sampled_data] unless args[:contains_sampled_data].nil? - @id = args[:id] unless args[:id].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @profile_info = args[:profile_info] unless args[:profile_info].nil? - @query = args[:query] unless args[:query].nil? - @rows = args[:rows] unless args[:rows].nil? - @sample_size = args[:sample_size] unless args[:sample_size].nil? - @sample_space = args[:sample_space] unless args[:sample_space].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @totals_for_all_results = args[:totals_for_all_results] unless args[:totals_for_all_results].nil? - end - - # - class ColumnHeader - include Google::Apis::Core::Hashable - - # Column Type. Either DIMENSION or METRIC. - # Corresponds to the JSON property `columnType` - # @return [String] - attr_accessor :column_type - - # Data type. Dimension and metric values data types such as INTEGER, DOUBLE, - # CURRENCY, MCF_SEQUENCE etc. - # Corresponds to the JSON property `dataType` - # @return [String] - attr_accessor :data_type - - # Column 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) - @column_type = args[:column_type] unless args[:column_type].nil? - @data_type = args[:data_type] unless args[:data_type].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Information for the view (profile), for which the Analytics data was requested. - class ProfileInfo - include Google::Apis::Core::Hashable - - # Account ID to which this view (profile) belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Internal ID for the web property to which this view (profile) belongs. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # View (Profile) ID. - # Corresponds to the JSON property `profileId` - # @return [String] - attr_accessor :profile_id - - # View (Profile) name. - # Corresponds to the JSON property `profileName` - # @return [String] - attr_accessor :profile_name - - # Table ID for view (profile). - # Corresponds to the JSON property `tableId` - # @return [String] - attr_accessor :table_id - - # Web Property ID to which this view (profile) belongs. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @profile_id = args[:profile_id] unless args[:profile_id].nil? - @profile_name = args[:profile_name] unless args[:profile_name].nil? - @table_id = args[:table_id] unless args[:table_id].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - end - - # Analytics data request query parameters. - class Query - include Google::Apis::Core::Hashable - - # List of analytics dimensions. - # Corresponds to the JSON property `dimensions` - # @return [String] - attr_accessor :dimensions - - # End date. - # Corresponds to the JSON property `end-date` - # @return [String] - attr_accessor :end_date - - # Comma-separated list of dimension or metric filters. - # Corresponds to the JSON property `filters` - # @return [String] - attr_accessor :filters - - # Unique table ID. - # Corresponds to the JSON property `ids` - # @return [String] - attr_accessor :ids - - # Maximum results per page. - # Corresponds to the JSON property `max-results` - # @return [Fixnum] - attr_accessor :max_results - - # List of analytics metrics. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # Desired sampling level - # Corresponds to the JSON property `samplingLevel` - # @return [String] - attr_accessor :sampling_level - - # Analytics advanced segment. - # Corresponds to the JSON property `segment` - # @return [String] - attr_accessor :segment - - # List of dimensions or metrics based on which Analytics data is sorted. - # Corresponds to the JSON property `sort` - # @return [Array] - attr_accessor :sort - - # Start date. - # Corresponds to the JSON property `start-date` - # @return [String] - attr_accessor :start_date - - # Start index. - # Corresponds to the JSON property `start-index` - # @return [Fixnum] - attr_accessor :start_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @filters = args[:filters] unless args[:filters].nil? - @ids = args[:ids] unless args[:ids].nil? - @max_results = args[:max_results] unless args[:max_results].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @sampling_level = args[:sampling_level] unless args[:sampling_level].nil? - @segment = args[:segment] unless args[:segment].nil? - @sort = args[:sort] unless args[:sort].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - end - end - - # A union object representing a dimension or metric value. Only one of " - # primitiveValue" or "conversionPathValue" attribute will be populated. - class Row - include Google::Apis::Core::Hashable - - # A conversion path dimension value, containing a list of interactions with - # their attributes. - # Corresponds to the JSON property `conversionPathValue` - # @return [Array] - attr_accessor :conversion_path_value - - # A primitive dimension value. A primitive metric value. - # Corresponds to the JSON property `primitiveValue` - # @return [String] - attr_accessor :primitive_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @conversion_path_value = args[:conversion_path_value] unless args[:conversion_path_value].nil? - @primitive_value = args[:primitive_value] unless args[:primitive_value].nil? - end - - # - class ConversionPathValue - include Google::Apis::Core::Hashable - - # Type of an interaction on conversion path. Such as CLICK, IMPRESSION etc. - # Corresponds to the JSON property `interactionType` - # @return [String] - attr_accessor :interaction_type - - # Node value of an interaction on conversion path. Such as source, medium etc. - # Corresponds to the JSON property `nodeValue` - # @return [String] - attr_accessor :node_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @interaction_type = args[:interaction_type] unless args[:interaction_type].nil? - @node_value = args[:node_value] unless args[:node_value].nil? - end - end - end - end - - # JSON template for an Analytics view (profile). - class Profile - include Google::Apis::Core::Hashable - - # Account ID to which this view (profile) belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Child link for this view (profile). Points to the list of goals for this view ( - # profile). - # Corresponds to the JSON property `childLink` - # @return [Google::Apis::AnalyticsV3::Profile::ChildLink] - attr_accessor :child_link - - # Time this view (profile) was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # The currency type associated with this view (profile). The supported values - # are: - # ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, INR, JPY, - # KRW, LTL, MXN, NOK, NZD, PHP, PLN, RUB, SEK, THB, TRY, TWD, USD, VND, ZAR - # Corresponds to the JSON property `currency` - # @return [String] - attr_accessor :currency - - # Default page for this view (profile). - # Corresponds to the JSON property `defaultPage` - # @return [String] - attr_accessor :default_page - - # Indicates whether ecommerce tracking is enabled for this view (profile). - # Corresponds to the JSON property `eCommerceTracking` - # @return [Boolean] - attr_accessor :e_commerce_tracking - alias_method :e_commerce_tracking?, :e_commerce_tracking - - # Indicates whether enhanced ecommerce tracking is enabled for this view ( - # profile). This property can only be enabled if ecommerce tracking is enabled. - # Corresponds to the JSON property `enhancedECommerceTracking` - # @return [Boolean] - attr_accessor :enhanced_e_commerce_tracking - alias_method :enhanced_e_commerce_tracking?, :enhanced_e_commerce_tracking - - # The query parameters that are excluded from this view (profile). - # Corresponds to the JSON property `excludeQueryParameters` - # @return [String] - attr_accessor :exclude_query_parameters - - # View (Profile) ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Internal ID for the web property to which this view (profile) belongs. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # Resource type for Analytics view (profile). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this view (profile). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent link for this view (profile). Points to the web property to which this - # view (profile) belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::Profile::ParentLink] - attr_accessor :parent_link - - # Permissions the user has for this view (profile). - # Corresponds to the JSON property `permissions` - # @return [Google::Apis::AnalyticsV3::Profile::Permissions] - attr_accessor :permissions - - # Link for this view (profile). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Site search category parameters for this view (profile). - # Corresponds to the JSON property `siteSearchCategoryParameters` - # @return [String] - attr_accessor :site_search_category_parameters - - # The site search query parameters for this view (profile). - # Corresponds to the JSON property `siteSearchQueryParameters` - # @return [String] - attr_accessor :site_search_query_parameters - - # Whether or not Analytics will strip search category parameters from the URLs - # in your reports. - # Corresponds to the JSON property `stripSiteSearchCategoryParameters` - # @return [Boolean] - attr_accessor :strip_site_search_category_parameters - alias_method :strip_site_search_category_parameters?, :strip_site_search_category_parameters - - # Whether or not Analytics will strip search query parameters from the URLs in - # your reports. - # Corresponds to the JSON property `stripSiteSearchQueryParameters` - # @return [Boolean] - attr_accessor :strip_site_search_query_parameters - alias_method :strip_site_search_query_parameters?, :strip_site_search_query_parameters - - # Time zone for which this view (profile) has been configured. Time zones are - # identified by strings from the TZ database. - # Corresponds to the JSON property `timezone` - # @return [String] - attr_accessor :timezone - - # View (Profile) type. Supported types: WEB or APP. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Time this view (profile) was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - # Website URL for this view (profile). - # 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? - @child_link = args[:child_link] unless args[:child_link].nil? - @created = args[:created] unless args[:created].nil? - @currency = args[:currency] unless args[:currency].nil? - @default_page = args[:default_page] unless args[:default_page].nil? - @e_commerce_tracking = args[:e_commerce_tracking] unless args[:e_commerce_tracking].nil? - @enhanced_e_commerce_tracking = args[:enhanced_e_commerce_tracking] unless args[:enhanced_e_commerce_tracking].nil? - @exclude_query_parameters = args[:exclude_query_parameters] unless args[:exclude_query_parameters].nil? - @id = args[:id] unless args[:id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @permissions = args[:permissions] unless args[:permissions].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @site_search_category_parameters = args[:site_search_category_parameters] unless args[:site_search_category_parameters].nil? - @site_search_query_parameters = args[:site_search_query_parameters] unless args[:site_search_query_parameters].nil? - @strip_site_search_category_parameters = args[:strip_site_search_category_parameters] unless args[:strip_site_search_category_parameters].nil? - @strip_site_search_query_parameters = args[:strip_site_search_query_parameters] unless args[:strip_site_search_query_parameters].nil? - @timezone = args[:timezone] unless args[:timezone].nil? - @type = args[:type] unless args[:type].nil? - @updated = args[:updated] unless args[:updated].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - @website_url = args[:website_url] unless args[:website_url].nil? - end - - # Child link for this view (profile). Points to the list of goals for this view ( - # profile). - class ChildLink - include Google::Apis::Core::Hashable - - # Link to the list of goals for this view (profile). - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Value is "analytics#goals". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Parent link for this view (profile). Points to the web property to which this - # view (profile) belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the web property to which this view (profile) belongs. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Value is "analytics#webproperty". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Permissions the user has for this view (profile). - class Permissions - include Google::Apis::Core::Hashable - - # All the permissions that the user has for this view (profile). These include - # any implied permissions (e.g., EDIT implies VIEW) or inherited permissions - # from the parent web property. - # Corresponds to the JSON property `effective` - # @return [Array] - attr_accessor :effective - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @effective = args[:effective] unless args[:effective].nil? - end - end - end - - # JSON template for an Analytics profile filter link. - class ProfileFilterLink - include Google::Apis::Core::Hashable - - # JSON template for a profile filter link. - # Corresponds to the JSON property `filterRef` - # @return [Google::Apis::AnalyticsV3::FilterRef] - attr_accessor :filter_ref - - # Profile filter link ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for Analytics filter. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # JSON template for a linked view (profile). - # Corresponds to the JSON property `profileRef` - # @return [Google::Apis::AnalyticsV3::ProfileRef] - attr_accessor :profile_ref - - # The rank of this profile filter link relative to the other filters linked to - # the same profile. - # For readonly (i.e., list and get) operations, the rank always starts at 1. - # For write (i.e., create, update, or delete) operations, you may specify a - # value between 0 and 255 inclusively, [0, 255]. In order to insert a link at - # the end of the list, either don't specify a rank or set a rank to a number - # greater than the largest rank in the list. In order to insert a link to the - # beginning of the list specify a rank that is less than or equal to 1. The new - # link will move all existing filters with the same or lower rank down the list. - # After the link is inserted/updated/deleted all profile filter links will be - # renumbered starting at 1. - # Corresponds to the JSON property `rank` - # @return [Fixnum] - attr_accessor :rank - - # Link for this profile filter link. - # 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) - @filter_ref = args[:filter_ref] unless args[:filter_ref].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @profile_ref = args[:profile_ref] unless args[:profile_ref].nil? - @rank = args[:rank] unless args[:rank].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A profile filter link collection lists profile filter links between profiles - # and filters. Each resource in the collection corresponds to a profile filter - # link. - class ProfileFilterLinks - include Google::Apis::Core::Hashable - - # A list of profile filter links. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1,000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this profile filter link collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this profile filter link collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for a linked view (profile). - class ProfileRef - include Google::Apis::Core::Hashable - - # Account ID to which this view (profile) belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Link for this view (profile). - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # View (Profile) ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Internal ID for the web property to which this view (profile) belongs. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # Analytics view (profile) reference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this view (profile). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @href = args[:href] unless args[:href].nil? - @id = args[:id] unless args[:id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - end - - # JSON template for an Analytics ProfileSummary. ProfileSummary returns basic - # information (i.e., summary) for a profile. - class ProfileSummary - include Google::Apis::Core::Hashable - - # View (profile) ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for Analytics ProfileSummary. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # View (profile) name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # View (Profile) type. Supported types: WEB or APP. - # 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? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A view (profile) collection lists Analytics views (profiles) to which the user - # has access. Each resource in the collection corresponds to a single Analytics - # view (profile). - class Profiles - include Google::Apis::Core::Hashable - - # A list of views (profiles). - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this view (profile) collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this view (profile) collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # Real time data for a given view (profile). - class RealtimeData - include Google::Apis::Core::Hashable - - # Column headers that list dimension names followed by the metric names. The - # order of dimensions and metrics is same as specified in the request. - # Corresponds to the JSON property `columnHeaders` - # @return [Array] - attr_accessor :column_headers - - # Unique ID for this data response. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Information for the view (profile), for which the real time data was requested. - # Corresponds to the JSON property `profileInfo` - # @return [Google::Apis::AnalyticsV3::RealtimeData::ProfileInfo] - attr_accessor :profile_info - - # Real time data request query parameters. - # Corresponds to the JSON property `query` - # @return [Google::Apis::AnalyticsV3::RealtimeData::Query] - attr_accessor :query - - # Real time data rows, where each row contains a list of dimension values - # followed by the metric values. The order of dimensions and metrics is same as - # specified in the request. - # Corresponds to the JSON property `rows` - # @return [Array>] - attr_accessor :rows - - # Link to this page. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The total number of rows for the query, regardless of the number of rows in - # the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Total values for the requested metrics over all the results, not just the - # results returned in this response. The order of the metric totals is same as - # the metric order specified in the request. - # Corresponds to the JSON property `totalsForAllResults` - # @return [Hash] - attr_accessor :totals_for_all_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_headers = args[:column_headers] unless args[:column_headers].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @profile_info = args[:profile_info] unless args[:profile_info].nil? - @query = args[:query] unless args[:query].nil? - @rows = args[:rows] unless args[:rows].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @totals_for_all_results = args[:totals_for_all_results] unless args[:totals_for_all_results].nil? - end - - # - class ColumnHeader - include Google::Apis::Core::Hashable - - # Column Type. Either DIMENSION or METRIC. - # Corresponds to the JSON property `columnType` - # @return [String] - attr_accessor :column_type - - # Data type. Dimension column headers have only STRING as the data type. Metric - # column headers have data types for metric values such as INTEGER, DOUBLE, - # CURRENCY etc. - # Corresponds to the JSON property `dataType` - # @return [String] - attr_accessor :data_type - - # Column 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) - @column_type = args[:column_type] unless args[:column_type].nil? - @data_type = args[:data_type] unless args[:data_type].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Information for the view (profile), for which the real time data was requested. - class ProfileInfo - include Google::Apis::Core::Hashable - - # Account ID to which this view (profile) belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Internal ID for the web property to which this view (profile) belongs. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # View (Profile) ID. - # Corresponds to the JSON property `profileId` - # @return [String] - attr_accessor :profile_id - - # View (Profile) name. - # Corresponds to the JSON property `profileName` - # @return [String] - attr_accessor :profile_name - - # Table ID for view (profile). - # Corresponds to the JSON property `tableId` - # @return [String] - attr_accessor :table_id - - # Web Property ID to which this view (profile) belongs. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @profile_id = args[:profile_id] unless args[:profile_id].nil? - @profile_name = args[:profile_name] unless args[:profile_name].nil? - @table_id = args[:table_id] unless args[:table_id].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - end - - # Real time data request query parameters. - class Query - include Google::Apis::Core::Hashable - - # List of real time dimensions. - # Corresponds to the JSON property `dimensions` - # @return [String] - attr_accessor :dimensions - - # Comma-separated list of dimension or metric filters. - # Corresponds to the JSON property `filters` - # @return [String] - attr_accessor :filters - - # Unique table ID. - # Corresponds to the JSON property `ids` - # @return [String] - attr_accessor :ids - - # Maximum results per page. - # Corresponds to the JSON property `max-results` - # @return [Fixnum] - attr_accessor :max_results - - # List of real time metrics. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # List of dimensions or metrics based on which real time data is sorted. - # Corresponds to the JSON property `sort` - # @return [Array] - attr_accessor :sort - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @filters = args[:filters] unless args[:filters].nil? - @ids = args[:ids] unless args[:ids].nil? - @max_results = args[:max_results] unless args[:max_results].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @sort = args[:sort] unless args[:sort].nil? - end - end - end - - # JSON template for an Analytics segment. - class Segment - include Google::Apis::Core::Hashable - - # Time the segment was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Segment definition. - # Corresponds to the JSON property `definition` - # @return [String] - attr_accessor :definition - - # Segment ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for Analytics segment. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Segment name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Segment ID. Can be used with the 'segment' parameter in Core Reporting API. - # Corresponds to the JSON property `segmentId` - # @return [String] - attr_accessor :segment_id - - # Link for this segment. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Type for a segment. Possible values are "BUILT_IN" or "CUSTOM". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Time the segment was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @created = args[:created] unless args[:created].nil? - @definition = args[:definition] unless args[:definition].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @segment_id = args[:segment_id] unless args[:segment_id].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @type = args[:type] unless args[:type].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # An segment collection lists Analytics segments that the user has access to. - # Each resource in the collection corresponds to a single Analytics segment. - class Segments - include Google::Apis::Core::Hashable - - # A list of segments. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type for segments. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this segment collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this segment collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for Analytics unsampled report resource. - class UnsampledReport - include Google::Apis::Core::Hashable - - # Account ID to which this unsampled report belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Download details for a file stored in Google Cloud Storage. - # Corresponds to the JSON property `cloudStorageDownloadDetails` - # @return [Google::Apis::AnalyticsV3::UnsampledReport::CloudStorageDownloadDetails] - attr_accessor :cloud_storage_download_details - - # Time this unsampled report was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # The dimensions for the unsampled report. - # Corresponds to the JSON property `dimensions` - # @return [String] - attr_accessor :dimensions - - # The type of download you need to use for the report data file. - # Corresponds to the JSON property `downloadType` - # @return [String] - attr_accessor :download_type - - # Download details for a file stored in Google Drive. - # Corresponds to the JSON property `driveDownloadDetails` - # @return [Google::Apis::AnalyticsV3::UnsampledReport::DriveDownloadDetails] - attr_accessor :drive_download_details - - # The end date for the unsampled report. - # Corresponds to the JSON property `end-date` - # @return [String] - attr_accessor :end_date - - # The filters for the unsampled report. - # Corresponds to the JSON property `filters` - # @return [String] - attr_accessor :filters - - # Unsampled report ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for an Analytics unsampled report. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The metrics for the unsampled report. - # Corresponds to the JSON property `metrics` - # @return [String] - attr_accessor :metrics - - # View (Profile) ID to which this unsampled report belongs. - # Corresponds to the JSON property `profileId` - # @return [String] - attr_accessor :profile_id - - # The segment for the unsampled report. - # Corresponds to the JSON property `segment` - # @return [String] - attr_accessor :segment - - # Link for this unsampled report. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The start date for the unsampled report. - # Corresponds to the JSON property `start-date` - # @return [String] - attr_accessor :start_date - - # Status of this unsampled report. Possible values are PENDING, COMPLETED, or - # FAILED. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Title of the unsampled report. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Time this unsampled report was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Web property ID to which this unsampled report belongs. The web property ID is - # of the form UA-XXXXX-YY. - # Corresponds to the JSON property `webPropertyId` - # @return [String] - attr_accessor :web_property_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @cloud_storage_download_details = args[:cloud_storage_download_details] unless args[:cloud_storage_download_details].nil? - @created = args[:created] unless args[:created].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @download_type = args[:download_type] unless args[:download_type].nil? - @drive_download_details = args[:drive_download_details] unless args[:drive_download_details].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @filters = args[:filters] unless args[:filters].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @profile_id = args[:profile_id] unless args[:profile_id].nil? - @segment = args[:segment] unless args[:segment].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @status = args[:status] unless args[:status].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - @web_property_id = args[:web_property_id] unless args[:web_property_id].nil? - end - - # Download details for a file stored in Google Cloud Storage. - class CloudStorageDownloadDetails - include Google::Apis::Core::Hashable - - # Id of the bucket the file object is stored in. - # Corresponds to the JSON property `bucketId` - # @return [String] - attr_accessor :bucket_id - - # Id of the file object containing the report data. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :obj_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket_id = args[:bucket_id] unless args[:bucket_id].nil? - @obj_id = args[:obj_id] unless args[:obj_id].nil? - end - end - - # Download details for a file stored in Google Drive. - class DriveDownloadDetails - include Google::Apis::Core::Hashable - - # Id of the document/file containing the report data. - # Corresponds to the JSON property `documentId` - # @return [String] - attr_accessor :document_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @document_id = args[:document_id] unless args[:document_id].nil? - end - end - end - - # An unsampled report collection lists Analytics unsampled reports to which the - # user has access. Each view (profile) can have a set of unsampled reports. Each - # resource in the unsampled report collection corresponds to a single Analytics - # unsampled report. - class UnsampledReports - include Google::Apis::Core::Hashable - - # A list of unsampled reports. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this unsampled report collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this unsampled report collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of - # resources in the result. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # Metadata returned for an upload operation. - class Upload - include Google::Apis::Core::Hashable - - # Account Id to which this upload belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Custom data source Id to which this data import belongs. - # Corresponds to the JSON property `customDataSourceId` - # @return [String] - attr_accessor :custom_data_source_id - - # Data import errors collection. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # A unique ID for this upload. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for Analytics upload. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, DELETED. - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @custom_data_source_id = args[:custom_data_source_id] unless args[:custom_data_source_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # Upload collection lists Analytics uploads to which the user has access. Each - # custom data source can have a set of uploads. Each resource in the upload - # collection corresponds to a single Analytics data upload. - class Uploads - include Google::Apis::Core::Hashable - - # A list of uploads. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this upload collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this upload collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of - # resources in the result. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - end - end - - # JSON template for a user reference. - class UserRef - include Google::Apis::Core::Hashable - - # Email ID of this user. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # User ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # 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) - @email = args[:email] unless args[:email].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # JSON template for a web property reference. - class WebPropertyRef - include Google::Apis::Core::Hashable - - # Account ID to which this web property belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Link for this web property. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Web property ID of the form UA-XXXXX-YY. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Internal ID for this web property. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # Analytics web property reference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this web property. - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @href = args[:href] unless args[:href].nil? - @id = args[:id] unless args[:id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # JSON template for an Analytics WebPropertySummary. WebPropertySummary returns - # basic information (i.e., summary) for a web property. - class WebPropertySummary - include Google::Apis::Core::Hashable - - # Web property ID of the form UA-XXXXX-YY. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Internal ID for this web property. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # Resource type for Analytics WebPropertySummary. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Level for this web property. Possible values are STANDARD or PREMIUM. - # Corresponds to the JSON property `level` - # @return [String] - attr_accessor :level - - # Web property name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # List of profiles under this web property. - # Corresponds to the JSON property `profiles` - # @return [Array] - attr_accessor :profiles - - # Website url for this web property. - # 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) - @id = args[:id] unless args[:id].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @level = args[:level] unless args[:level].nil? - @name = args[:name] unless args[:name].nil? - @profiles = args[:profiles] unless args[:profiles].nil? - @website_url = args[:website_url] unless args[:website_url].nil? - end - end - - # A web property collection lists Analytics web properties to which the user has - # access. Each resource in the collection corresponds to a single Analytics web - # property. - class Webproperties - include Google::Apis::Core::Hashable - - # A list of web properties. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The maximum number of resources the response can contain, regardless of the - # actual number of resources returned. Its value ranges from 1 to 1000 with a - # value of 1000 by default, or otherwise specified by the max-results query - # parameter. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # Collection type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to next page for this web property collection. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # Link to previous page for this web property collection. - # Corresponds to the JSON property `previousLink` - # @return [String] - attr_accessor :previous_link - - # The starting index of the resources, which is 1 by default or otherwise - # specified by the start-index query parameter. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The total number of results for the query, regardless of the number of results - # in the response. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - # Email ID of the authenticated user - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @previous_link = args[:previous_link] unless args[:previous_link].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - @username = args[:username] unless args[:username].nil? - end - end - - # JSON template for an Analytics web property. - class Webproperty - include Google::Apis::Core::Hashable - - # Account ID to which this web property belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Child link for this web property. Points to the list of views (profiles) for - # this web property. - # Corresponds to the JSON property `childLink` - # @return [Google::Apis::AnalyticsV3::Webproperty::ChildLink] - attr_accessor :child_link - - # Time this web property was created. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Default view (profile) ID. - # Corresponds to the JSON property `defaultProfileId` - # @return [String] - attr_accessor :default_profile_id - - # Web property ID of the form UA-XXXXX-YY. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The industry vertical/category selected for this web property. - # Corresponds to the JSON property `industryVertical` - # @return [String] - attr_accessor :industry_vertical - - # Internal ID for this web property. - # Corresponds to the JSON property `internalWebPropertyId` - # @return [String] - attr_accessor :internal_web_property_id - - # Resource type for Analytics WebProperty. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Level for this web property. Possible values are STANDARD or PREMIUM. - # Corresponds to the JSON property `level` - # @return [String] - attr_accessor :level - - # Name of this web property. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent link for this web property. Points to the account to which this web - # property belongs. - # Corresponds to the JSON property `parentLink` - # @return [Google::Apis::AnalyticsV3::Webproperty::ParentLink] - attr_accessor :parent_link - - # Permissions the user has for this web property. - # Corresponds to the JSON property `permissions` - # @return [Google::Apis::AnalyticsV3::Webproperty::Permissions] - attr_accessor :permissions - - # View (Profile) count for this web property. - # Corresponds to the JSON property `profileCount` - # @return [Fixnum] - attr_accessor :profile_count - - # Link for this web property. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Time this web property was last modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Website url for this web property. - # 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? - @child_link = args[:child_link] unless args[:child_link].nil? - @created = args[:created] unless args[:created].nil? - @default_profile_id = args[:default_profile_id] unless args[:default_profile_id].nil? - @id = args[:id] unless args[:id].nil? - @industry_vertical = args[:industry_vertical] unless args[:industry_vertical].nil? - @internal_web_property_id = args[:internal_web_property_id] unless args[:internal_web_property_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @level = args[:level] unless args[:level].nil? - @name = args[:name] unless args[:name].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @permissions = args[:permissions] unless args[:permissions].nil? - @profile_count = args[:profile_count] unless args[:profile_count].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @website_url = args[:website_url] unless args[:website_url].nil? - end - - # Child link for this web property. Points to the list of views (profiles) for - # this web property. - class ChildLink - include Google::Apis::Core::Hashable - - # Link to the list of views (profiles) for this web property. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Type of the parent link. Its value is "analytics#profiles". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Parent link for this web property. Points to the account to which this web - # property belongs. - class ParentLink - include Google::Apis::Core::Hashable - - # Link to the account for this web property. - # Corresponds to the JSON property `href` - # @return [String] - attr_accessor :href - - # Type of the parent link. Its value is "analytics#account". - # 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) - @href = args[:href] unless args[:href].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Permissions the user has for this web property. - class Permissions - include Google::Apis::Core::Hashable - - # All the permissions that the user has for this web property. These include any - # implied permissions (e.g., EDIT implies VIEW) or inherited permissions from - # the parent account. - # Corresponds to the JSON property `effective` - # @return [Array] - attr_accessor :effective - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @effective = args[:effective] unless args[:effective].nil? - end - end - end - end - end -end diff --git a/generated/google/apis/analytics_v3/representations.rb b/generated/google/apis/analytics_v3/representations.rb deleted file mode 100644 index a47850f26..000000000 --- a/generated/google/apis/analytics_v3/representations.rb +++ /dev/null @@ -1,1661 +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 AnalyticsV3 - - class Account - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class AccountRef - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountSummaries - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountTicket - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Accounts - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AdWordsAccount - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeleteUploadDataRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Column - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Columns - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CustomDataSource - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CustomDataSources - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CustomDimension - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CustomDimensions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CustomMetric - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CustomMetrics - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EntityAdWordsLink - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Entity - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class EntityAdWordsLinks - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EntityUserLink - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Entity - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class EntityUserLinks - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Experiment - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Variation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Experiments - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Filter - class Representation < Google::Apis::Core::JsonRepresentation; end - - class AdvancedDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LowercaseDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchAndReplaceDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UppercaseDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class FilterExpression - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FilterRef - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Filters - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GaData - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DataTable - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Col - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Row - class Representation < Google::Apis::Core::JsonRepresentation; end - - class C - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class ProfileInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Query - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Goal - class Representation < Google::Apis::Core::JsonRepresentation; end - - class EventDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - - class EventCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlDestinationDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Step - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class VisitNumPagesDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VisitTimeOnSiteDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Goals - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class McfData - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProfileInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Query - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Row - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ConversionPathValue - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Profile - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ProfileFilterLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProfileFilterLinks - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProfileRef - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProfileSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Profiles - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RealtimeData - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProfileInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Query - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Segment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Segments - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UnsampledReport - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CloudStorageDownloadDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DriveDownloadDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class UnsampledReports - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Upload - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Uploads - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserRef - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WebPropertyRef - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WebPropertySummary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Webproperties - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Webproperty - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - # @private - class Account - class Representation < Google::Apis::Core::JsonRepresentation - property :child_link, as: 'childLink', class: Google::Apis::AnalyticsV3::Account::ChildLink, decorator: Google::Apis::AnalyticsV3::Account::ChildLink::Representation - - property :created, as: 'created', type: DateTime - - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :permissions, as: 'permissions', class: Google::Apis::AnalyticsV3::Account::Permissions, decorator: Google::Apis::AnalyticsV3::Account::Permissions::Representation - - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - end - - # @private - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation - collection :effective, as: 'effective' - end - end - end - - # @private - class AccountRef - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class AccountSummaries - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::AccountSummary, decorator: Google::Apis::AnalyticsV3::AccountSummary::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class AccountSummary - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - collection :web_properties, as: 'webProperties', class: Google::Apis::AnalyticsV3::WebPropertySummary, decorator: Google::Apis::AnalyticsV3::WebPropertySummary::Representation - - end - end - - # @private - class AccountTicket - class Representation < Google::Apis::Core::JsonRepresentation - property :account, as: 'account', class: Google::Apis::AnalyticsV3::Account, decorator: Google::Apis::AnalyticsV3::Account::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :profile, as: 'profile', class: Google::Apis::AnalyticsV3::Profile, decorator: Google::Apis::AnalyticsV3::Profile::Representation - - property :redirect_uri, as: 'redirectUri' - property :webproperty, as: 'webproperty', class: Google::Apis::AnalyticsV3::Webproperty, decorator: Google::Apis::AnalyticsV3::Webproperty::Representation - - end - end - - # @private - class Accounts - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Account, decorator: Google::Apis::AnalyticsV3::Account::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class AdWordsAccount - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_tagging_enabled, as: 'autoTaggingEnabled' - property :customer_id, as: 'customerId' - property :kind, as: 'kind' - end - end - - # @private - class DeleteUploadDataRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :custom_data_import_uids, as: 'customDataImportUids' - end - end - - # @private - class Column - class Representation < Google::Apis::Core::JsonRepresentation - hash :attributes, as: 'attributes' - property :id, as: 'id' - property :kind, as: 'kind' - end - end - - # @private - class Columns - class Representation < Google::Apis::Core::JsonRepresentation - collection :attribute_names, as: 'attributeNames' - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Column, decorator: Google::Apis::AnalyticsV3::Column::Representation - - property :kind, as: 'kind' - property :total_results, as: 'totalResults' - end - end - - # @private - class CustomDataSource - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :child_link, as: 'childLink', class: Google::Apis::AnalyticsV3::CustomDataSource::ChildLink, decorator: Google::Apis::AnalyticsV3::CustomDataSource::ChildLink::Representation - - property :created, as: 'created', type: DateTime - - property :description, as: 'description' - property :id, as: 'id' - property :import_behavior, as: 'importBehavior' - property :kind, as: 'kind' - property :name, as: 'name' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::CustomDataSource::ParentLink, decorator: Google::Apis::AnalyticsV3::CustomDataSource::ParentLink::Representation - - collection :profiles_linked, as: 'profilesLinked' - property :self_link, as: 'selfLink' - property :type, as: 'type' - property :updated, as: 'updated', type: DateTime - - property :upload_type, as: 'uploadType' - property :web_property_id, as: 'webPropertyId' - end - - # @private - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - end - - # @private - class CustomDataSources - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::CustomDataSource, decorator: Google::Apis::AnalyticsV3::CustomDataSource::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class CustomDimension - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :created, as: 'created', type: DateTime - - property :id, as: 'id' - property :index, as: 'index' - property :kind, as: 'kind' - property :name, as: 'name' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::CustomDimension::ParentLink, decorator: Google::Apis::AnalyticsV3::CustomDimension::ParentLink::Representation - - property :scope, as: 'scope' - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :web_property_id, as: 'webPropertyId' - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - end - - # @private - class CustomDimensions - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::CustomDimension, decorator: Google::Apis::AnalyticsV3::CustomDimension::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class CustomMetric - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :created, as: 'created', type: DateTime - - property :id, as: 'id' - property :index, as: 'index' - property :kind, as: 'kind' - property :max_value, as: 'max_value' - property :min_value, as: 'min_value' - property :name, as: 'name' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::CustomMetric::ParentLink, decorator: Google::Apis::AnalyticsV3::CustomMetric::ParentLink::Representation - - property :scope, as: 'scope' - property :self_link, as: 'selfLink' - property :type, as: 'type' - property :updated, as: 'updated', type: DateTime - - property :web_property_id, as: 'webPropertyId' - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - end - - # @private - class CustomMetrics - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::CustomMetric, decorator: Google::Apis::AnalyticsV3::CustomMetric::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class EntityAdWordsLink - class Representation < Google::Apis::Core::JsonRepresentation - collection :ad_words_accounts, as: 'adWordsAccounts', class: Google::Apis::AnalyticsV3::AdWordsAccount, decorator: Google::Apis::AnalyticsV3::AdWordsAccount::Representation - - property :entity, as: 'entity', class: Google::Apis::AnalyticsV3::EntityAdWordsLink::Entity, decorator: Google::Apis::AnalyticsV3::EntityAdWordsLink::Entity::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - collection :profile_ids, as: 'profileIds' - property :self_link, as: 'selfLink' - end - - # @private - class Entity - class Representation < Google::Apis::Core::JsonRepresentation - property :web_property_ref, as: 'webPropertyRef', class: Google::Apis::AnalyticsV3::WebPropertyRef, decorator: Google::Apis::AnalyticsV3::WebPropertyRef::Representation - - end - end - end - - # @private - class EntityAdWordsLinks - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::EntityAdWordsLink, decorator: Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - end - end - - # @private - class EntityUserLink - class Representation < Google::Apis::Core::JsonRepresentation - property :entity, as: 'entity', class: Google::Apis::AnalyticsV3::EntityUserLink::Entity, decorator: Google::Apis::AnalyticsV3::EntityUserLink::Entity::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :permissions, as: 'permissions', class: Google::Apis::AnalyticsV3::EntityUserLink::Permissions, decorator: Google::Apis::AnalyticsV3::EntityUserLink::Permissions::Representation - - property :self_link, as: 'selfLink' - property :user_ref, as: 'userRef', class: Google::Apis::AnalyticsV3::UserRef, decorator: Google::Apis::AnalyticsV3::UserRef::Representation - - end - - # @private - class Entity - class Representation < Google::Apis::Core::JsonRepresentation - property :account_ref, as: 'accountRef', class: Google::Apis::AnalyticsV3::AccountRef, decorator: Google::Apis::AnalyticsV3::AccountRef::Representation - - property :profile_ref, as: 'profileRef', class: Google::Apis::AnalyticsV3::ProfileRef, decorator: Google::Apis::AnalyticsV3::ProfileRef::Representation - - property :web_property_ref, as: 'webPropertyRef', class: Google::Apis::AnalyticsV3::WebPropertyRef, decorator: Google::Apis::AnalyticsV3::WebPropertyRef::Representation - - end - end - - # @private - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation - collection :effective, as: 'effective' - collection :local, as: 'local' - end - end - end - - # @private - class EntityUserLinks - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::EntityUserLink, decorator: Google::Apis::AnalyticsV3::EntityUserLink::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - end - end - - # @private - class Experiment - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :created, as: 'created', type: DateTime - - property :description, as: 'description' - property :editable_in_ga_ui, as: 'editableInGaUi' - property :end_time, as: 'endTime', type: DateTime - - property :equal_weighting, as: 'equalWeighting' - property :id, as: 'id' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :kind, as: 'kind' - property :minimum_experiment_length_in_days, as: 'minimumExperimentLengthInDays' - property :name, as: 'name' - property :objective_metric, as: 'objectiveMetric' - property :optimization_type, as: 'optimizationType' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::Experiment::ParentLink, decorator: Google::Apis::AnalyticsV3::Experiment::ParentLink::Representation - - property :profile_id, as: 'profileId' - property :reason_experiment_ended, as: 'reasonExperimentEnded' - property :rewrite_variation_urls_as_original, as: 'rewriteVariationUrlsAsOriginal' - property :self_link, as: 'selfLink' - property :serving_framework, as: 'servingFramework' - property :snippet, as: 'snippet' - property :start_time, as: 'startTime', type: DateTime - - property :status, as: 'status' - property :traffic_coverage, as: 'trafficCoverage' - property :updated, as: 'updated', type: DateTime - - collection :variations, as: 'variations', class: Google::Apis::AnalyticsV3::Experiment::Variation, decorator: Google::Apis::AnalyticsV3::Experiment::Variation::Representation - - property :web_property_id, as: 'webPropertyId' - property :winner_confidence_level, as: 'winnerConfidenceLevel' - property :winner_found, as: 'winnerFound' - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class Variation - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :status, as: 'status' - property :url, as: 'url' - property :weight, as: 'weight' - property :won, as: 'won' - end - end - end - - # @private - class Experiments - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Experiment, decorator: Google::Apis::AnalyticsV3::Experiment::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class Filter - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advanced_details, as: 'advancedDetails', class: Google::Apis::AnalyticsV3::Filter::AdvancedDetails, decorator: Google::Apis::AnalyticsV3::Filter::AdvancedDetails::Representation - - property :created, as: 'created', type: DateTime - - property :exclude_details, as: 'excludeDetails', class: Google::Apis::AnalyticsV3::FilterExpression, decorator: Google::Apis::AnalyticsV3::FilterExpression::Representation - - property :id, as: 'id' - property :include_details, as: 'includeDetails', class: Google::Apis::AnalyticsV3::FilterExpression, decorator: Google::Apis::AnalyticsV3::FilterExpression::Representation - - property :kind, as: 'kind' - property :lowercase_details, as: 'lowercaseDetails', class: Google::Apis::AnalyticsV3::Filter::LowercaseDetails, decorator: Google::Apis::AnalyticsV3::Filter::LowercaseDetails::Representation - - property :name, as: 'name' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::Filter::ParentLink, decorator: Google::Apis::AnalyticsV3::Filter::ParentLink::Representation - - property :search_and_replace_details, as: 'searchAndReplaceDetails', class: Google::Apis::AnalyticsV3::Filter::SearchAndReplaceDetails, decorator: Google::Apis::AnalyticsV3::Filter::SearchAndReplaceDetails::Representation - - property :self_link, as: 'selfLink' - property :type, as: 'type' - property :updated, as: 'updated', type: DateTime - - property :uppercase_details, as: 'uppercaseDetails', class: Google::Apis::AnalyticsV3::Filter::UppercaseDetails, decorator: Google::Apis::AnalyticsV3::Filter::UppercaseDetails::Representation - - end - - # @private - class AdvancedDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :case_sensitive, as: 'caseSensitive' - property :extract_a, as: 'extractA' - property :extract_b, as: 'extractB' - property :field_a, as: 'fieldA' - property :field_a_index, as: 'fieldAIndex' - property :field_a_required, as: 'fieldARequired' - property :field_b, as: 'fieldB' - property :field_b_index, as: 'fieldBIndex' - property :field_b_required, as: 'fieldBRequired' - property :output_constructor, as: 'outputConstructor' - property :output_to_field, as: 'outputToField' - property :output_to_field_index, as: 'outputToFieldIndex' - property :override_output_field, as: 'overrideOutputField' - end - end - - # @private - class LowercaseDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :field, as: 'field' - property :field_index, as: 'fieldIndex' - end - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class SearchAndReplaceDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :case_sensitive, as: 'caseSensitive' - property :field, as: 'field' - property :field_index, as: 'fieldIndex' - property :replace_string, as: 'replaceString' - property :search_string, as: 'searchString' - end - end - - # @private - class UppercaseDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :field, as: 'field' - property :field_index, as: 'fieldIndex' - end - end - end - - # @private - class FilterExpression - class Representation < Google::Apis::Core::JsonRepresentation - property :case_sensitive, as: 'caseSensitive' - property :expression_value, as: 'expressionValue' - property :field, as: 'field' - property :field_index, as: 'fieldIndex' - property :kind, as: 'kind' - property :match_type, as: 'matchType' - end - end - - # @private - class FilterRef - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :href, as: 'href' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class Filters - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Filter, decorator: Google::Apis::AnalyticsV3::Filter::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class GaData - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_headers, as: 'columnHeaders', class: Google::Apis::AnalyticsV3::GaData::ColumnHeader, decorator: Google::Apis::AnalyticsV3::GaData::ColumnHeader::Representation - - property :contains_sampled_data, as: 'containsSampledData' - property :data_table, as: 'dataTable', class: Google::Apis::AnalyticsV3::GaData::DataTable, decorator: Google::Apis::AnalyticsV3::GaData::DataTable::Representation - - property :id, as: 'id' - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :profile_info, as: 'profileInfo', class: Google::Apis::AnalyticsV3::GaData::ProfileInfo, decorator: Google::Apis::AnalyticsV3::GaData::ProfileInfo::Representation - - property :query, as: 'query', class: Google::Apis::AnalyticsV3::GaData::Query, decorator: Google::Apis::AnalyticsV3::GaData::Query::Representation - - collection :rows, as: 'rows', :class => Array do - include Representable::JSON::Collection - items - end - - property :sample_size, as: 'sampleSize' - property :sample_space, as: 'sampleSpace' - property :self_link, as: 'selfLink' - property :total_results, as: 'totalResults' - hash :totals_for_all_results, as: 'totalsForAllResults' - end - - # @private - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation - property :column_type, as: 'columnType' - property :data_type, as: 'dataType' - property :name, as: 'name' - end - end - - # @private - class DataTable - class Representation < Google::Apis::Core::JsonRepresentation - collection :cols, as: 'cols', class: Google::Apis::AnalyticsV3::GaData::DataTable::Col, decorator: Google::Apis::AnalyticsV3::GaData::DataTable::Col::Representation - - collection :rows, as: 'rows', class: Google::Apis::AnalyticsV3::GaData::DataTable::Row, decorator: Google::Apis::AnalyticsV3::GaData::DataTable::Row::Representation - - end - - # @private - class Col - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :label, as: 'label' - property :type, as: 'type' - end - end - - # @private - class Row - class Representation < Google::Apis::Core::JsonRepresentation - collection :c, as: 'c', class: Google::Apis::AnalyticsV3::GaData::DataTable::Row::C, decorator: Google::Apis::AnalyticsV3::GaData::DataTable::Row::C::Representation - - end - - # @private - class C - class Representation < Google::Apis::Core::JsonRepresentation - property :v, as: 'v' - end - end - end - end - - # @private - class ProfileInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :profile_id, as: 'profileId' - property :profile_name, as: 'profileName' - property :table_id, as: 'tableId' - property :web_property_id, as: 'webPropertyId' - end - end - - # @private - class Query - class Representation < Google::Apis::Core::JsonRepresentation - property :dimensions, as: 'dimensions' - property :end_date, as: 'end-date' - property :filters, as: 'filters' - property :ids, as: 'ids' - property :max_results, as: 'max-results' - collection :metrics, as: 'metrics' - property :sampling_level, as: 'samplingLevel' - property :segment, as: 'segment' - collection :sort, as: 'sort' - property :start_date, as: 'start-date' - property :start_index, as: 'start-index' - end - end - end - - # @private - class Goal - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :created, as: 'created', type: DateTime - - property :event_details, as: 'eventDetails', class: Google::Apis::AnalyticsV3::Goal::EventDetails, decorator: Google::Apis::AnalyticsV3::Goal::EventDetails::Representation - - property :id, as: 'id' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :kind, as: 'kind' - property :name, as: 'name' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::Goal::ParentLink, decorator: Google::Apis::AnalyticsV3::Goal::ParentLink::Representation - - property :profile_id, as: 'profileId' - property :self_link, as: 'selfLink' - property :type, as: 'type' - property :updated, as: 'updated', type: DateTime - - property :url_destination_details, as: 'urlDestinationDetails', class: Google::Apis::AnalyticsV3::Goal::UrlDestinationDetails, decorator: Google::Apis::AnalyticsV3::Goal::UrlDestinationDetails::Representation - - property :value, as: 'value' - property :visit_num_pages_details, as: 'visitNumPagesDetails', class: Google::Apis::AnalyticsV3::Goal::VisitNumPagesDetails, decorator: Google::Apis::AnalyticsV3::Goal::VisitNumPagesDetails::Representation - - property :visit_time_on_site_details, as: 'visitTimeOnSiteDetails', class: Google::Apis::AnalyticsV3::Goal::VisitTimeOnSiteDetails, decorator: Google::Apis::AnalyticsV3::Goal::VisitTimeOnSiteDetails::Representation - - property :web_property_id, as: 'webPropertyId' - end - - # @private - class EventDetails - class Representation < Google::Apis::Core::JsonRepresentation - collection :event_conditions, as: 'eventConditions', class: Google::Apis::AnalyticsV3::Goal::EventDetails::EventCondition, decorator: Google::Apis::AnalyticsV3::Goal::EventDetails::EventCondition::Representation - - property :use_event_value, as: 'useEventValue' - end - - # @private - class EventCondition - class Representation < Google::Apis::Core::JsonRepresentation - property :comparison_type, as: 'comparisonType' - property :comparison_value, as: 'comparisonValue' - property :expression, as: 'expression' - property :match_type, as: 'matchType' - property :type, as: 'type' - end - end - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class UrlDestinationDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :case_sensitive, as: 'caseSensitive' - property :first_step_required, as: 'firstStepRequired' - property :match_type, as: 'matchType' - collection :steps, as: 'steps', class: Google::Apis::AnalyticsV3::Goal::UrlDestinationDetails::Step, decorator: Google::Apis::AnalyticsV3::Goal::UrlDestinationDetails::Step::Representation - - property :url, as: 'url' - end - - # @private - class Step - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :number, as: 'number' - property :url, as: 'url' - end - end - end - - # @private - class VisitNumPagesDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :comparison_type, as: 'comparisonType' - property :comparison_value, as: 'comparisonValue' - end - end - - # @private - class VisitTimeOnSiteDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :comparison_type, as: 'comparisonType' - property :comparison_value, as: 'comparisonValue' - end - end - end - - # @private - class Goals - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Goal, decorator: Google::Apis::AnalyticsV3::Goal::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class McfData - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_headers, as: 'columnHeaders', class: Google::Apis::AnalyticsV3::McfData::ColumnHeader, decorator: Google::Apis::AnalyticsV3::McfData::ColumnHeader::Representation - - property :contains_sampled_data, as: 'containsSampledData' - property :id, as: 'id' - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :profile_info, as: 'profileInfo', class: Google::Apis::AnalyticsV3::McfData::ProfileInfo, decorator: Google::Apis::AnalyticsV3::McfData::ProfileInfo::Representation - - property :query, as: 'query', class: Google::Apis::AnalyticsV3::McfData::Query, decorator: Google::Apis::AnalyticsV3::McfData::Query::Representation - - collection :rows, as: 'rows', :class => Array do - include Representable::JSON::Collection - items class: Google::Apis::AnalyticsV3::McfData::Row, decorator: Google::Apis::AnalyticsV3::McfData::Row::Representation - - end - - property :sample_size, as: 'sampleSize' - property :sample_space, as: 'sampleSpace' - property :self_link, as: 'selfLink' - property :total_results, as: 'totalResults' - hash :totals_for_all_results, as: 'totalsForAllResults' - end - - # @private - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation - property :column_type, as: 'columnType' - property :data_type, as: 'dataType' - property :name, as: 'name' - end - end - - # @private - class ProfileInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :profile_id, as: 'profileId' - property :profile_name, as: 'profileName' - property :table_id, as: 'tableId' - property :web_property_id, as: 'webPropertyId' - end - end - - # @private - class Query - class Representation < Google::Apis::Core::JsonRepresentation - property :dimensions, as: 'dimensions' - property :end_date, as: 'end-date' - property :filters, as: 'filters' - property :ids, as: 'ids' - property :max_results, as: 'max-results' - collection :metrics, as: 'metrics' - property :sampling_level, as: 'samplingLevel' - property :segment, as: 'segment' - collection :sort, as: 'sort' - property :start_date, as: 'start-date' - property :start_index, as: 'start-index' - end - end - - # @private - class Row - class Representation < Google::Apis::Core::JsonRepresentation - collection :conversion_path_value, as: 'conversionPathValue', class: Google::Apis::AnalyticsV3::McfData::Row::ConversionPathValue, decorator: Google::Apis::AnalyticsV3::McfData::Row::ConversionPathValue::Representation - - property :primitive_value, as: 'primitiveValue' - end - - # @private - class ConversionPathValue - class Representation < Google::Apis::Core::JsonRepresentation - property :interaction_type, as: 'interactionType' - property :node_value, as: 'nodeValue' - end - end - end - end - - # @private - class Profile - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :child_link, as: 'childLink', class: Google::Apis::AnalyticsV3::Profile::ChildLink, decorator: Google::Apis::AnalyticsV3::Profile::ChildLink::Representation - - property :created, as: 'created', type: DateTime - - property :currency, as: 'currency' - property :default_page, as: 'defaultPage' - property :e_commerce_tracking, as: 'eCommerceTracking' - property :enhanced_e_commerce_tracking, as: 'enhancedECommerceTracking' - property :exclude_query_parameters, as: 'excludeQueryParameters' - property :id, as: 'id' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :kind, as: 'kind' - property :name, as: 'name' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::Profile::ParentLink, decorator: Google::Apis::AnalyticsV3::Profile::ParentLink::Representation - - property :permissions, as: 'permissions', class: Google::Apis::AnalyticsV3::Profile::Permissions, decorator: Google::Apis::AnalyticsV3::Profile::Permissions::Representation - - property :self_link, as: 'selfLink' - property :site_search_category_parameters, as: 'siteSearchCategoryParameters' - property :site_search_query_parameters, as: 'siteSearchQueryParameters' - property :strip_site_search_category_parameters, as: 'stripSiteSearchCategoryParameters' - property :strip_site_search_query_parameters, as: 'stripSiteSearchQueryParameters' - property :timezone, as: 'timezone' - property :type, as: 'type' - property :updated, as: 'updated', type: DateTime - - property :web_property_id, as: 'webPropertyId' - property :website_url, as: 'websiteUrl' - end - - # @private - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation - collection :effective, as: 'effective' - end - end - end - - # @private - class ProfileFilterLink - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_ref, as: 'filterRef', class: Google::Apis::AnalyticsV3::FilterRef, decorator: Google::Apis::AnalyticsV3::FilterRef::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :profile_ref, as: 'profileRef', class: Google::Apis::AnalyticsV3::ProfileRef, decorator: Google::Apis::AnalyticsV3::ProfileRef::Representation - - property :rank, as: 'rank' - property :self_link, as: 'selfLink' - end - end - - # @private - class ProfileFilterLinks - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::ProfileFilterLink, decorator: Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class ProfileRef - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :href, as: 'href' - property :id, as: 'id' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :kind, as: 'kind' - property :name, as: 'name' - property :web_property_id, as: 'webPropertyId' - end - end - - # @private - class ProfileSummary - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :type, as: 'type' - end - end - - # @private - class Profiles - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Profile, decorator: Google::Apis::AnalyticsV3::Profile::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class RealtimeData - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_headers, as: 'columnHeaders', class: Google::Apis::AnalyticsV3::RealtimeData::ColumnHeader, decorator: Google::Apis::AnalyticsV3::RealtimeData::ColumnHeader::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :profile_info, as: 'profileInfo', class: Google::Apis::AnalyticsV3::RealtimeData::ProfileInfo, decorator: Google::Apis::AnalyticsV3::RealtimeData::ProfileInfo::Representation - - property :query, as: 'query', class: Google::Apis::AnalyticsV3::RealtimeData::Query, decorator: Google::Apis::AnalyticsV3::RealtimeData::Query::Representation - - collection :rows, as: 'rows', :class => Array do - include Representable::JSON::Collection - items - end - - property :self_link, as: 'selfLink' - property :total_results, as: 'totalResults' - hash :totals_for_all_results, as: 'totalsForAllResults' - end - - # @private - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation - property :column_type, as: 'columnType' - property :data_type, as: 'dataType' - property :name, as: 'name' - end - end - - # @private - class ProfileInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :profile_id, as: 'profileId' - property :profile_name, as: 'profileName' - property :table_id, as: 'tableId' - property :web_property_id, as: 'webPropertyId' - end - end - - # @private - class Query - class Representation < Google::Apis::Core::JsonRepresentation - property :dimensions, as: 'dimensions' - property :filters, as: 'filters' - property :ids, as: 'ids' - property :max_results, as: 'max-results' - collection :metrics, as: 'metrics' - collection :sort, as: 'sort' - end - end - end - - # @private - class Segment - class Representation < Google::Apis::Core::JsonRepresentation - property :created, as: 'created', type: DateTime - - property :definition, as: 'definition' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :segment_id, as: 'segmentId' - property :self_link, as: 'selfLink' - property :type, as: 'type' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class Segments - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Segment, decorator: Google::Apis::AnalyticsV3::Segment::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class UnsampledReport - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :cloud_storage_download_details, as: 'cloudStorageDownloadDetails', class: Google::Apis::AnalyticsV3::UnsampledReport::CloudStorageDownloadDetails, decorator: Google::Apis::AnalyticsV3::UnsampledReport::CloudStorageDownloadDetails::Representation - - property :created, as: 'created', type: DateTime - - property :dimensions, as: 'dimensions' - property :download_type, as: 'downloadType' - property :drive_download_details, as: 'driveDownloadDetails', class: Google::Apis::AnalyticsV3::UnsampledReport::DriveDownloadDetails, decorator: Google::Apis::AnalyticsV3::UnsampledReport::DriveDownloadDetails::Representation - - property :end_date, as: 'end-date' - property :filters, as: 'filters' - property :id, as: 'id' - property :kind, as: 'kind' - property :metrics, as: 'metrics' - property :profile_id, as: 'profileId' - property :segment, as: 'segment' - property :self_link, as: 'selfLink' - property :start_date, as: 'start-date' - property :status, as: 'status' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - property :web_property_id, as: 'webPropertyId' - end - - # @private - class CloudStorageDownloadDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket_id, as: 'bucketId' - property :obj_id, as: 'objectId' - end - end - - # @private - class DriveDownloadDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :document_id, as: 'documentId' - end - end - end - - # @private - class UnsampledReports - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::UnsampledReport, decorator: Google::Apis::AnalyticsV3::UnsampledReport::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class Upload - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :custom_data_source_id, as: 'customDataSourceId' - collection :errors, as: 'errors' - property :id, as: 'id' - property :kind, as: 'kind' - property :status, as: 'status' - end - end - - # @private - class Uploads - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Upload, decorator: Google::Apis::AnalyticsV3::Upload::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - end - end - - # @private - class UserRef - class Representation < Google::Apis::Core::JsonRepresentation - property :email, as: 'email' - property :id, as: 'id' - property :kind, as: 'kind' - end - end - - # @private - class WebPropertyRef - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :href, as: 'href' - property :id, as: 'id' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class WebPropertySummary - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :kind, as: 'kind' - property :level, as: 'level' - property :name, as: 'name' - collection :profiles, as: 'profiles', class: Google::Apis::AnalyticsV3::ProfileSummary, decorator: Google::Apis::AnalyticsV3::ProfileSummary::Representation - - property :website_url, as: 'websiteUrl' - end - end - - # @private - class Webproperties - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::AnalyticsV3::Webproperty, decorator: Google::Apis::AnalyticsV3::Webproperty::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :previous_link, as: 'previousLink' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - property :username, as: 'username' - end - end - - # @private - class Webproperty - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :child_link, as: 'childLink', class: Google::Apis::AnalyticsV3::Webproperty::ChildLink, decorator: Google::Apis::AnalyticsV3::Webproperty::ChildLink::Representation - - property :created, as: 'created', type: DateTime - - property :default_profile_id, as: 'defaultProfileId' - property :id, as: 'id' - property :industry_vertical, as: 'industryVertical' - property :internal_web_property_id, as: 'internalWebPropertyId' - property :kind, as: 'kind' - property :level, as: 'level' - property :name, as: 'name' - property :parent_link, as: 'parentLink', class: Google::Apis::AnalyticsV3::Webproperty::ParentLink, decorator: Google::Apis::AnalyticsV3::Webproperty::ParentLink::Representation - - property :permissions, as: 'permissions', class: Google::Apis::AnalyticsV3::Webproperty::Permissions, decorator: Google::Apis::AnalyticsV3::Webproperty::Permissions::Representation - - property :profile_count, as: 'profileCount' - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :website_url, as: 'websiteUrl' - end - - # @private - class ChildLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class ParentLink - class Representation < Google::Apis::Core::JsonRepresentation - property :href, as: 'href' - property :type, as: 'type' - end - end - - # @private - class Permissions - class Representation < Google::Apis::Core::JsonRepresentation - collection :effective, as: 'effective' - end - end - end - end - end -end diff --git a/generated/google/apis/analytics_v3/service.rb b/generated/google/apis/analytics_v3/service.rb deleted file mode 100644 index 281990ff8..000000000 --- a/generated/google/apis/analytics_v3/service.rb +++ /dev/null @@ -1,3600 +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 AnalyticsV3 - # Google Analytics API - # - # View and manage your Google Analytics data - # - # @example - # require 'google/apis/analytics_v3' - # - # Analytics = Google::Apis::AnalyticsV3 # Alias the module - # service = Analytics::AnalyticsService.new - # - # @see https://developers.google.com/analytics/ - class AnalyticsService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - attr_accessor :quota_user - - # @return [String] - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'analytics/v3/') - end - - # Returns Analytics data for a view (profile). - # @param [String] dimensions - # A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'. - # @param [String] end_date - # End date for fetching Analytics data. Request can should specify an end date - # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or - # 7daysAgo). The default value is yesterday. - # @param [String] filters - # A comma-separated list of dimension or metric filters to be applied to - # Analytics data. - # @param [String] ids - # Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, - # where XXXX is the Analytics view (profile) ID. - # @param [Fixnum] max_results - # The maximum number of entries to include in this feed. - # @param [String] metrics - # A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. - # At least one metric must be specified. - # @param [String] output - # The selected format for the response. Default format is JSON. - # @param [String] sampling_level - # The desired sampling level. - # @param [String] segment - # An Analytics segment to be applied to data. - # @param [String] sort - # A comma-separated list of dimensions or metrics that determine the sort order - # for Analytics data. - # @param [String] start_date - # Start date for fetching Analytics data. Requests can specify a start date - # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or - # 7daysAgo). The default value is 7daysAgo. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::GaData] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::GaData] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ga_data(dimensions: nil, end_date: nil, filters: nil, ids: nil, max_results: nil, metrics: nil, output: nil, sampling_level: nil, segment: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'data/ga' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::GaData::Representation - command.response_class = Google::Apis::AnalyticsV3::GaData - command.query['dimensions'] = dimensions unless dimensions.nil? - command.query['end-date'] = end_date unless end_date.nil? - command.query['filters'] = filters unless filters.nil? - command.query['ids'] = ids unless ids.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['metrics'] = metrics unless metrics.nil? - command.query['output'] = output unless output.nil? - command.query['samplingLevel'] = sampling_level unless sampling_level.nil? - command.query['segment'] = segment unless segment.nil? - command.query['sort'] = sort unless sort.nil? - command.query['start-date'] = start_date unless start_date.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns Analytics Multi-Channel Funnels data for a view (profile). - # @param [String] dimensions - # A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source, - # mcf:medium'. - # @param [String] end_date - # End date for fetching Analytics data. Requests can specify a start date - # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or - # 7daysAgo). The default value is 7daysAgo. - # @param [String] filters - # A comma-separated list of dimension or metric filters to be applied to the - # Analytics data. - # @param [String] ids - # Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, - # where XXXX is the Analytics view (profile) ID. - # @param [Fixnum] max_results - # The maximum number of entries to include in this feed. - # @param [String] metrics - # A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf: - # totalConversions,mcf:totalConversionValue'. At least one metric must be - # specified. - # @param [String] sampling_level - # The desired sampling level. - # @param [String] sort - # A comma-separated list of dimensions or metrics that determine the sort order - # for the Analytics data. - # @param [String] start_date - # Start date for fetching Analytics data. Requests can specify a start date - # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or - # 7daysAgo). The default value is 7daysAgo. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::McfData] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::McfData] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mcf_data(dimensions: nil, end_date: nil, filters: nil, ids: nil, max_results: nil, metrics: nil, sampling_level: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'data/mcf' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::McfData::Representation - command.response_class = Google::Apis::AnalyticsV3::McfData - command.query['dimensions'] = dimensions unless dimensions.nil? - command.query['end-date'] = end_date unless end_date.nil? - command.query['filters'] = filters unless filters.nil? - command.query['ids'] = ids unless ids.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['metrics'] = metrics unless metrics.nil? - command.query['samplingLevel'] = sampling_level unless sampling_level.nil? - command.query['sort'] = sort unless sort.nil? - command.query['start-date'] = start_date unless start_date.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns real time data for a view (profile). - # @param [String] dimensions - # A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'. - # @param [String] filters - # A comma-separated list of dimension or metric filters to be applied to real - # time data. - # @param [String] ids - # Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, - # where XXXX is the Analytics view (profile) ID. - # @param [Fixnum] max_results - # The maximum number of entries to include in this feed. - # @param [String] metrics - # A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least - # one metric must be specified. - # @param [String] sort - # A comma-separated list of dimensions or metrics that determine the sort order - # for real time data. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AnalyticsV3::RealtimeData] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::RealtimeData] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_realtime_data(dimensions: nil, filters: nil, ids: nil, max_results: nil, metrics: nil, sort: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'data/realtime' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::RealtimeData::Representation - command.response_class = Google::Apis::AnalyticsV3::RealtimeData - command.query['dimensions'] = dimensions unless dimensions.nil? - command.query['filters'] = filters unless filters.nil? - command.query['ids'] = ids unless ids.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['metrics'] = metrics unless metrics.nil? - command.query['sort'] = sort unless sort.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 account summaries (lightweight tree comprised of accounts/properties/ - # profiles) to which the user has access. - # @param [Fixnum] max_results - # The maximum number of account summaries to include in this response, where the - # largest acceptable value is 1000. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::AccountSummaries] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::AccountSummaries] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_summaries(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accountSummaries' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::AccountSummaries::Representation - command.response_class = Google::Apis::AnalyticsV3::AccountSummaries - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes a user from the given account. - # @param [String] account_id - # Account ID to delete the user link for. - # @param [String] link_id - # Link ID to delete the user link 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 [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_account_user_link(account_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/entityUserLinks/{linkId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['linkId'] = link_id unless link_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 - - # Adds a new user to the given account. - # @param [String] account_id - # Account ID to create the user link for. - # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_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::AnalyticsV3::EntityUserLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_account_user_link(account_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/entityUserLinks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.request_object = entity_user_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLink - 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 - - # Lists account-user links for a given account. - # @param [String] account_id - # Account ID to retrieve the user links for. - # @param [Fixnum] max_results - # The maximum number of account-user links to include in this response. - # @param [Fixnum] start_index - # An index of the first account-user link to retrieve. Use this parameter as a - # pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLinks] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLinks] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_links(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/entityUserLinks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLinks::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLinks - command.params['accountId'] = account_id unless account_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates permissions for an existing user on the given account. - # @param [String] account_id - # Account ID to update the account-user link for. - # @param [String] link_id - # Link ID to update the account-user link for. - # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_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::AnalyticsV3::EntityUserLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_link(account_id, link_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/entityUserLinks/{linkId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.request_object = entity_user_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['linkId'] = link_id unless link_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 accounts to which the user has access. - # @param [Fixnum] max_results - # The maximum number of accounts to include in this response. - # @param [Fixnum] start_index - # An index of the first account to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Accounts] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::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, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Accounts::Representation - command.response_class = Google::Apis::AnalyticsV3::Accounts - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List custom data sources to which the user has access. - # @param [String] account_id - # Account Id for the custom data sources to retrieve. - # @param [String] web_property_id - # Web property Id for the custom data sources to retrieve. - # @param [Fixnum] max_results - # The maximum number of custom data sources to include in this response. - # @param [Fixnum] start_index - # A 1-based index of the first custom data source to retrieve. Use this - # parameter as a pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::CustomDataSources] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomDataSources] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_data_sources(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::CustomDataSources::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomDataSources - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a custom dimension to which the user has access. - # @param [String] account_id - # Account ID for the custom dimension to retrieve. - # @param [String] web_property_id - # Web property ID for the custom dimension to retrieve. - # @param [String] custom_dimension_id - # The ID of the custom dimension 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::AnalyticsV3::CustomDimension] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomDimension] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_dimension(account_id, web_property_id, custom_dimension_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomDimension - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customDimensionId'] = custom_dimension_id unless custom_dimension_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 - - # Create a new custom dimension. - # @param [String] account_id - # Account ID for the custom dimension to create. - # @param [String] web_property_id - # Web property ID for the custom dimension to create. - # @param [Google::Apis::AnalyticsV3::CustomDimension] custom_dimension_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::AnalyticsV3::CustomDimension] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomDimension] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_dimension(account_id, web_property_id, custom_dimension_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation - command.request_object = custom_dimension_object - command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomDimension - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 custom dimensions to which the user has access. - # @param [String] account_id - # Account ID for the custom dimensions to retrieve. - # @param [String] web_property_id - # Web property ID for the custom dimensions to retrieve. - # @param [Fixnum] max_results - # The maximum number of custom dimensions to include in this response. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::CustomDimensions] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomDimensions] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dimensions(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::CustomDimensions::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomDimensions - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing custom dimension. This method supports patch semantics. - # @param [String] account_id - # Account ID for the custom dimension to update. - # @param [String] web_property_id - # Web property ID for the custom dimension to update. - # @param [String] custom_dimension_id - # Custom dimension ID for the custom dimension to update. - # @param [Google::Apis::AnalyticsV3::CustomDimension] custom_dimension_object - # @param [Boolean] ignore_custom_data_source_links - # Force the update and ignore any warnings related to the custom dimension being - # linked to a custom data source / data set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AnalyticsV3::CustomDimension] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomDimension] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_dimension(account_id, web_property_id, custom_dimension_id, custom_dimension_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation - command.request_object = custom_dimension_object - command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomDimension - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customDimensionId'] = custom_dimension_id unless custom_dimension_id.nil? - command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.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 custom dimension. - # @param [String] account_id - # Account ID for the custom dimension to update. - # @param [String] web_property_id - # Web property ID for the custom dimension to update. - # @param [String] custom_dimension_id - # Custom dimension ID for the custom dimension to update. - # @param [Google::Apis::AnalyticsV3::CustomDimension] custom_dimension_object - # @param [Boolean] ignore_custom_data_source_links - # Force the update and ignore any warnings related to the custom dimension being - # linked to a custom data source / data set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AnalyticsV3::CustomDimension] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomDimension] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_dimension(account_id, web_property_id, custom_dimension_id, custom_dimension_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation - command.request_object = custom_dimension_object - command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomDimension - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customDimensionId'] = custom_dimension_id unless custom_dimension_id.nil? - command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a custom metric to which the user has access. - # @param [String] account_id - # Account ID for the custom metric to retrieve. - # @param [String] web_property_id - # Web property ID for the custom metric to retrieve. - # @param [String] custom_metric_id - # The ID of the custom metric 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::AnalyticsV3::CustomMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_metric(account_id, web_property_id, custom_metric_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomMetric - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customMetricId'] = custom_metric_id unless custom_metric_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 - - # Create a new custom metric. - # @param [String] account_id - # Account ID for the custom metric to create. - # @param [String] web_property_id - # Web property ID for the custom dimension to create. - # @param [Google::Apis::AnalyticsV3::CustomMetric] custom_metric_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::AnalyticsV3::CustomMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_metric(account_id, web_property_id, custom_metric_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation - command.request_object = custom_metric_object - command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomMetric - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 custom metrics to which the user has access. - # @param [String] account_id - # Account ID for the custom metrics to retrieve. - # @param [String] web_property_id - # Web property ID for the custom metrics to retrieve. - # @param [Fixnum] max_results - # The maximum number of custom metrics to include in this response. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::CustomMetrics] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomMetrics] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metrics(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::CustomMetrics::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomMetrics - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing custom metric. This method supports patch semantics. - # @param [String] account_id - # Account ID for the custom metric to update. - # @param [String] web_property_id - # Web property ID for the custom metric to update. - # @param [String] custom_metric_id - # Custom metric ID for the custom metric to update. - # @param [Google::Apis::AnalyticsV3::CustomMetric] custom_metric_object - # @param [Boolean] ignore_custom_data_source_links - # Force the update and ignore any warnings related to the custom metric being - # linked to a custom data source / data set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AnalyticsV3::CustomMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_metric(account_id, web_property_id, custom_metric_id, custom_metric_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation - command.request_object = custom_metric_object - command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomMetric - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customMetricId'] = custom_metric_id unless custom_metric_id.nil? - command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.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 custom metric. - # @param [String] account_id - # Account ID for the custom metric to update. - # @param [String] web_property_id - # Web property ID for the custom metric to update. - # @param [String] custom_metric_id - # Custom metric ID for the custom metric to update. - # @param [Google::Apis::AnalyticsV3::CustomMetric] custom_metric_object - # @param [Boolean] ignore_custom_data_source_links - # Force the update and ignore any warnings related to the custom metric being - # linked to a custom data source / data set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AnalyticsV3::CustomMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::CustomMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_custom_metric(account_id, web_property_id, custom_metric_id, custom_metric_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation - command.request_object = custom_metric_object - command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation - command.response_class = Google::Apis::AnalyticsV3::CustomMetric - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customMetricId'] = custom_metric_id unless custom_metric_id.nil? - command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.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 experiment. - # @param [String] account_id - # Account ID to which the experiment belongs - # @param [String] web_property_id - # Web property ID to which the experiment belongs - # @param [String] profile_id - # View (Profile) ID to which the experiment belongs - # @param [String] experiment_id - # ID of the experiment 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_experiment(account_id, web_property_id, profile_id, experiment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['experimentId'] = experiment_id unless experiment_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 an experiment to which the user has access. - # @param [String] account_id - # Account ID to retrieve the experiment for. - # @param [String] web_property_id - # Web property ID to retrieve the experiment for. - # @param [String] profile_id - # View (Profile) ID to retrieve the experiment for. - # @param [String] experiment_id - # Experiment ID to retrieve the experiment 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::AnalyticsV3::Experiment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Experiment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_experiment(account_id, web_property_id, profile_id, experiment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation - command.response_class = Google::Apis::AnalyticsV3::Experiment - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['experimentId'] = experiment_id unless experiment_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 - - # Create a new experiment. - # @param [String] account_id - # Account ID to create the experiment for. - # @param [String] web_property_id - # Web property ID to create the experiment for. - # @param [String] profile_id - # View (Profile) ID to create the experiment for. - # @param [Google::Apis::AnalyticsV3::Experiment] experiment_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::AnalyticsV3::Experiment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Experiment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_experiment(account_id, web_property_id, profile_id, experiment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Experiment::Representation - command.request_object = experiment_object - command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation - command.response_class = Google::Apis::AnalyticsV3::Experiment - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 experiments to which the user has access. - # @param [String] account_id - # Account ID to retrieve experiments for. - # @param [String] web_property_id - # Web property ID to retrieve experiments for. - # @param [String] profile_id - # View (Profile) ID to retrieve experiments for. - # @param [Fixnum] max_results - # The maximum number of experiments to include in this response. - # @param [Fixnum] start_index - # An index of the first experiment to retrieve. Use this parameter as a - # pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Experiments] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Experiments] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_experiments(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Experiments::Representation - command.response_class = Google::Apis::AnalyticsV3::Experiments - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update an existing experiment. This method supports patch semantics. - # @param [String] account_id - # Account ID of the experiment to update. - # @param [String] web_property_id - # Web property ID of the experiment to update. - # @param [String] profile_id - # View (Profile) ID of the experiment to update. - # @param [String] experiment_id - # Experiment ID of the experiment to update. - # @param [Google::Apis::AnalyticsV3::Experiment] experiment_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::AnalyticsV3::Experiment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Experiment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_experiment(account_id, web_property_id, profile_id, experiment_id, experiment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Experiment::Representation - command.request_object = experiment_object - command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation - command.response_class = Google::Apis::AnalyticsV3::Experiment - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['experimentId'] = experiment_id unless experiment_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 - - # Update an existing experiment. - # @param [String] account_id - # Account ID of the experiment to update. - # @param [String] web_property_id - # Web property ID of the experiment to update. - # @param [String] profile_id - # View (Profile) ID of the experiment to update. - # @param [String] experiment_id - # Experiment ID of the experiment to update. - # @param [Google::Apis::AnalyticsV3::Experiment] experiment_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::AnalyticsV3::Experiment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Experiment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_experiment(account_id, web_property_id, profile_id, experiment_id, experiment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Experiment::Representation - command.request_object = experiment_object - command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation - command.response_class = Google::Apis::AnalyticsV3::Experiment - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['experimentId'] = experiment_id unless experiment_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 - - # Delete a filter. - # @param [String] account_id - # Account ID to delete the filter for. - # @param [String] filter_id - # ID of the filter to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AnalyticsV3::Filter] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Filter] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_filter(account_id, filter_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/filters/{filterId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.response_class = Google::Apis::AnalyticsV3::Filter - command.params['accountId'] = account_id unless account_id.nil? - command.params['filterId'] = filter_id unless filter_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a filters to which the user has access. - # @param [String] account_id - # Account ID to retrieve filters for. - # @param [String] filter_id - # Filter ID to retrieve filters 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::AnalyticsV3::Filter] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Filter] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_filter(account_id, filter_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/filters/{filterId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.response_class = Google::Apis::AnalyticsV3::Filter - command.params['accountId'] = account_id unless account_id.nil? - command.params['filterId'] = filter_id unless filter_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 - - # Create a new filter. - # @param [String] account_id - # Account ID to create filter for. - # @param [Google::Apis::AnalyticsV3::Filter] filter_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::AnalyticsV3::Filter] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Filter] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_filter(account_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/filters' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.request_object = filter_object - command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.response_class = Google::Apis::AnalyticsV3::Filter - 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 - - # Lists all filters for an account - # @param [String] account_id - # Account ID to retrieve filters for. - # @param [Fixnum] max_results - # The maximum number of filters to include in this response. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Filters] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Filters] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_filters(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/filters' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Filters::Representation - command.response_class = Google::Apis::AnalyticsV3::Filters - command.params['accountId'] = account_id unless account_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing filter. This method supports patch semantics. - # @param [String] account_id - # Account ID to which the filter belongs. - # @param [String] filter_id - # ID of the filter to be updated. - # @param [Google::Apis::AnalyticsV3::Filter] filter_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::AnalyticsV3::Filter] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Filter] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_filter(account_id, filter_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/filters/{filterId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.request_object = filter_object - command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.response_class = Google::Apis::AnalyticsV3::Filter - command.params['accountId'] = account_id unless account_id.nil? - command.params['filterId'] = filter_id unless filter_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 filter. - # @param [String] account_id - # Account ID to which the filter belongs. - # @param [String] filter_id - # ID of the filter to be updated. - # @param [Google::Apis::AnalyticsV3::Filter] filter_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::AnalyticsV3::Filter] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Filter] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_filter(account_id, filter_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/filters/{filterId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.request_object = filter_object - command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation - command.response_class = Google::Apis::AnalyticsV3::Filter - command.params['accountId'] = account_id unless account_id.nil? - command.params['filterId'] = filter_id unless filter_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 goal to which the user has access. - # @param [String] account_id - # Account ID to retrieve the goal for. - # @param [String] web_property_id - # Web property ID to retrieve the goal for. - # @param [String] profile_id - # View (Profile) ID to retrieve the goal for. - # @param [String] goal_id - # Goal ID to retrieve the goal 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::AnalyticsV3::Goal] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Goal] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_goal(account_id, web_property_id, profile_id, goal_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation - command.response_class = Google::Apis::AnalyticsV3::Goal - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['goalId'] = goal_id unless goal_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 - - # Create a new goal. - # @param [String] account_id - # Account ID to create the goal for. - # @param [String] web_property_id - # Web property ID to create the goal for. - # @param [String] profile_id - # View (Profile) ID to create the goal for. - # @param [Google::Apis::AnalyticsV3::Goal] goal_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::AnalyticsV3::Goal] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Goal] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_goal(account_id, web_property_id, profile_id, goal_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Goal::Representation - command.request_object = goal_object - command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation - command.response_class = Google::Apis::AnalyticsV3::Goal - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists goals to which the user has access. - # @param [String] account_id - # Account ID to retrieve goals for. Can either be a specific account ID or '~all' - # , which refers to all the accounts that user has access to. - # @param [String] web_property_id - # Web property ID to retrieve goals for. Can either be a specific web property - # ID or '~all', which refers to all the web properties that user has access to. - # @param [String] profile_id - # View (Profile) ID to retrieve goals for. Can either be a specific view ( - # profile) ID or '~all', which refers to all the views (profiles) that user has - # access to. - # @param [Fixnum] max_results - # The maximum number of goals to include in this response. - # @param [Fixnum] start_index - # An index of the first goal to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Goals] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Goals] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_goals(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Goals::Representation - command.response_class = Google::Apis::AnalyticsV3::Goals - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing view (profile). This method supports patch semantics. - # @param [String] account_id - # Account ID to update the goal. - # @param [String] web_property_id - # Web property ID to update the goal. - # @param [String] profile_id - # View (Profile) ID to update the goal. - # @param [String] goal_id - # Index of the goal to be updated. - # @param [Google::Apis::AnalyticsV3::Goal] goal_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::AnalyticsV3::Goal] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Goal] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_goal(account_id, web_property_id, profile_id, goal_id, goal_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Goal::Representation - command.request_object = goal_object - command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation - command.response_class = Google::Apis::AnalyticsV3::Goal - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['goalId'] = goal_id unless goal_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 view (profile). - # @param [String] account_id - # Account ID to update the goal. - # @param [String] web_property_id - # Web property ID to update the goal. - # @param [String] profile_id - # View (Profile) ID to update the goal. - # @param [String] goal_id - # Index of the goal to be updated. - # @param [Google::Apis::AnalyticsV3::Goal] goal_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::AnalyticsV3::Goal] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Goal] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_goal(account_id, web_property_id, profile_id, goal_id, goal_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Goal::Representation - command.request_object = goal_object - command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation - command.response_class = Google::Apis::AnalyticsV3::Goal - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['goalId'] = goal_id unless goal_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 - - # Delete a profile filter link. - # @param [String] account_id - # Account ID to which the profile filter link belongs. - # @param [String] web_property_id - # Web property Id to which the profile filter link belongs. - # @param [String] profile_id - # Profile ID to which the filter link belongs. - # @param [String] link_id - # ID of the profile filter link 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_profile_filter_link(account_id, web_property_id, profile_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['linkId'] = link_id unless link_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a single profile filter link. - # @param [String] account_id - # Account ID to retrieve profile filter link for. - # @param [String] web_property_id - # Web property Id to retrieve profile filter link for. - # @param [String] profile_id - # Profile ID to retrieve filter link for. - # @param [String] link_id - # ID of the profile filter link. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AnalyticsV3::ProfileFilterLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::ProfileFilterLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_filter_link(account_id, web_property_id, profile_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['linkId'] = link_id unless link_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 - - # Create a new profile filter link. - # @param [String] account_id - # Account ID to create profile filter link for. - # @param [String] web_property_id - # Web property Id to create profile filter link for. - # @param [String] profile_id - # Profile ID to create filter link for. - # @param [Google::Apis::AnalyticsV3::ProfileFilterLink] profile_filter_link_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::AnalyticsV3::ProfileFilterLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::ProfileFilterLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_filter_link(account_id, web_property_id, profile_id, profile_filter_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - command.request_object = profile_filter_link_object - command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 profile filter links for a profile. - # @param [String] account_id - # Account ID to retrieve profile filter links for. - # @param [String] web_property_id - # Web property Id for profile filter links for. Can either be a specific web - # property ID or '~all', which refers to all the web properties that user has - # access to. - # @param [String] profile_id - # Profile ID to retrieve filter links for. Can either be a specific profile ID - # or '~all', which refers to all the profiles that user has access to. - # @param [Fixnum] max_results - # The maximum number of profile filter links to include in this response. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::ProfileFilterLinks] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::ProfileFilterLinks] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_filter_links(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLinks::Representation - command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLinks - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update an existing profile filter link. This method supports patch semantics. - # @param [String] account_id - # Account ID to which profile filter link belongs. - # @param [String] web_property_id - # Web property Id to which profile filter link belongs - # @param [String] profile_id - # Profile ID to which filter link belongs - # @param [String] link_id - # ID of the profile filter link to be updated. - # @param [Google::Apis::AnalyticsV3::ProfileFilterLink] profile_filter_link_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::AnalyticsV3::ProfileFilterLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::ProfileFilterLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_filter_link(account_id, web_property_id, profile_id, link_id, profile_filter_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - command.request_object = profile_filter_link_object - command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['linkId'] = link_id unless link_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 - - # Update an existing profile filter link. - # @param [String] account_id - # Account ID to which profile filter link belongs. - # @param [String] web_property_id - # Web property Id to which profile filter link belongs - # @param [String] profile_id - # Profile ID to which filter link belongs - # @param [String] link_id - # ID of the profile filter link to be updated. - # @param [Google::Apis::AnalyticsV3::ProfileFilterLink] profile_filter_link_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::AnalyticsV3::ProfileFilterLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::ProfileFilterLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_filter_link(account_id, web_property_id, profile_id, link_id, profile_filter_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - command.request_object = profile_filter_link_object - command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation - command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['linkId'] = link_id unless link_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 - - # Removes a user from the given view (profile). - # @param [String] account_id - # Account ID to delete the user link for. - # @param [String] web_property_id - # Web Property ID to delete the user link for. - # @param [String] profile_id - # View (Profile) ID to delete the user link for. - # @param [String] link_id - # Link ID to delete the user link 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 [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_profile_user_link(account_id, web_property_id, profile_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['linkId'] = link_id unless link_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 - - # Adds a new user to the given view (profile). - # @param [String] account_id - # Account ID to create the user link for. - # @param [String] web_property_id - # Web Property ID to create the user link for. - # @param [String] profile_id - # View (Profile) ID to create the user link for. - # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_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::AnalyticsV3::EntityUserLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_user_link(account_id, web_property_id, profile_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.request_object = entity_user_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 profile-user links for a given view (profile). - # @param [String] account_id - # Account ID which the given view (profile) belongs to. - # @param [String] web_property_id - # Web Property ID which the given view (profile) belongs to. Can either be a - # specific web property ID or '~all', which refers to all the web properties - # that user has access to. - # @param [String] profile_id - # View (Profile) ID to retrieve the profile-user links for. Can either be a - # specific profile ID or '~all', which refers to all the profiles that user has - # access to. - # @param [Fixnum] max_results - # The maximum number of profile-user links to include in this response. - # @param [Fixnum] start_index - # An index of the first profile-user link to retrieve. Use this parameter as a - # pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLinks] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLinks] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_user_links(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLinks::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLinks - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates permissions for an existing user on the given view (profile). - # @param [String] account_id - # Account ID to update the user link for. - # @param [String] web_property_id - # Web Property ID to update the user link for. - # @param [String] profile_id - # View (Profile ID) to update the user link for. - # @param [String] link_id - # Link ID to update the user link for. - # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_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::AnalyticsV3::EntityUserLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile_user_link(account_id, web_property_id, profile_id, link_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.request_object = entity_user_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['linkId'] = link_id unless link_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 a view (profile). - # @param [String] account_id - # Account ID to delete the view (profile) for. - # @param [String] web_property_id - # Web property ID to delete the view (profile) for. - # @param [String] profile_id - # ID of the view (profile) to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_profile(account_id, web_property_id, profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 view (profile) to which the user has access. - # @param [String] account_id - # Account ID to retrieve the goal for. - # @param [String] web_property_id - # Web property ID to retrieve the goal for. - # @param [String] profile_id - # View (Profile) ID to retrieve the goal 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::AnalyticsV3::Profile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Profile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile(account_id, web_property_id, profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation - command.response_class = Google::Apis::AnalyticsV3::Profile - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 - - # Create a new view (profile). - # @param [String] account_id - # Account ID to create the view (profile) for. - # @param [String] web_property_id - # Web property ID to create the view (profile) for. - # @param [Google::Apis::AnalyticsV3::Profile] profile_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::AnalyticsV3::Profile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Profile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile(account_id, web_property_id, profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Profile::Representation - command.request_object = profile_object - command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation - command.response_class = Google::Apis::AnalyticsV3::Profile - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 views (profiles) to which the user has access. - # @param [String] account_id - # Account ID for the view (profiles) to retrieve. Can either be a specific - # account ID or '~all', which refers to all the accounts to which the user has - # access. - # @param [String] web_property_id - # Web property ID for the views (profiles) to retrieve. Can either be a specific - # web property ID or '~all', which refers to all the web properties to which the - # user has access. - # @param [Fixnum] max_results - # The maximum number of views (profiles) to include in this response. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Profiles] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Profiles] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profiles(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Profiles::Representation - command.response_class = Google::Apis::AnalyticsV3::Profiles - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing view (profile). This method supports patch semantics. - # @param [String] account_id - # Account ID to which the view (profile) belongs - # @param [String] web_property_id - # Web property ID to which the view (profile) belongs - # @param [String] profile_id - # ID of the view (profile) to be updated. - # @param [Google::Apis::AnalyticsV3::Profile] profile_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::AnalyticsV3::Profile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Profile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile(account_id, web_property_id, profile_id, profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Profile::Representation - command.request_object = profile_object - command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation - command.response_class = Google::Apis::AnalyticsV3::Profile - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 view (profile). - # @param [String] account_id - # Account ID to which the view (profile) belongs - # @param [String] web_property_id - # Web property ID to which the view (profile) belongs - # @param [String] profile_id - # ID of the view (profile) to be updated. - # @param [Google::Apis::AnalyticsV3::Profile] profile_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::AnalyticsV3::Profile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Profile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile(account_id, web_property_id, profile_id, profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Profile::Representation - command.request_object = profile_object - command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation - command.response_class = Google::Apis::AnalyticsV3::Profile - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 segments to which the user has access. - # @param [Fixnum] max_results - # The maximum number of segments to include in this response. - # @param [Fixnum] start_index - # An index of the first segment to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Segments] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Segments] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_segments(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/segments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Segments::Representation - command.response_class = Google::Apis::AnalyticsV3::Segments - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a single unsampled report. - # @param [String] account_id - # Account ID to retrieve unsampled report for. - # @param [String] web_property_id - # Web property ID to retrieve unsampled reports for. - # @param [String] profile_id - # View (Profile) ID to retrieve unsampled report for. - # @param [String] unsampled_report_id - # ID of the unsampled report 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::AnalyticsV3::UnsampledReport] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::UnsampledReport] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_unsampled_report(account_id, web_property_id, profile_id, unsampled_report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::UnsampledReport::Representation - command.response_class = Google::Apis::AnalyticsV3::UnsampledReport - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['unsampledReportId'] = unsampled_report_id unless unsampled_report_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 - - # Create a new unsampled report. - # @param [String] account_id - # Account ID to create the unsampled report for. - # @param [String] web_property_id - # Web property ID to create the unsampled report for. - # @param [String] profile_id - # View (Profile) ID to create the unsampled report for. - # @param [Google::Apis::AnalyticsV3::UnsampledReport] unsampled_report_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::AnalyticsV3::UnsampledReport] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::UnsampledReport] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_unsampled_report(account_id, web_property_id, profile_id, unsampled_report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::UnsampledReport::Representation - command.request_object = unsampled_report_object - command.response_representation = Google::Apis::AnalyticsV3::UnsampledReport::Representation - command.response_class = Google::Apis::AnalyticsV3::UnsampledReport - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 unsampled reports to which the user has access. - # @param [String] account_id - # Account ID to retrieve unsampled reports for. Must be a specific account ID, ~ - # all is not supported. - # @param [String] web_property_id - # Web property ID to retrieve unsampled reports for. Must be a specific web - # property ID, ~all is not supported. - # @param [String] profile_id - # View (Profile) ID to retrieve unsampled reports for. Must be a specific view ( - # profile) ID, ~all is not supported. - # @param [Fixnum] max_results - # The maximum number of unsampled reports to include in this response. - # @param [Fixnum] start_index - # An index of the first unsampled report to retrieve. Use this parameter as a - # pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::UnsampledReports] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::UnsampledReports] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_unsampled_reports(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::UnsampledReports::Representation - command.response_class = Google::Apis::AnalyticsV3::UnsampledReports - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete data associated with a previous upload. - # @param [String] account_id - # Account Id for the uploads to be deleted. - # @param [String] web_property_id - # Web property Id for the uploads to be deleted. - # @param [String] custom_data_source_id - # Custom data source Id for the uploads to be deleted. - # @param [Google::Apis::AnalyticsV3::DeleteUploadDataRequest] delete_upload_data_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 [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_upload_data(account_id, web_property_id, custom_data_source_id, delete_upload_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::DeleteUploadDataRequest::Representation - command.request_object = delete_upload_data_request_object - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_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 uploads to which the user has access. - # @param [String] account_id - # Account Id for the upload to retrieve. - # @param [String] web_property_id - # Web property Id for the upload to retrieve. - # @param [String] custom_data_source_id - # Custom data source Id for upload to retrieve. - # @param [String] upload_id - # Upload Id 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::AnalyticsV3::Upload] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Upload] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_upload(account_id, web_property_id, custom_data_source_id, upload_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Upload::Representation - command.response_class = Google::Apis::AnalyticsV3::Upload - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_id.nil? - command.params['uploadId'] = upload_id unless upload_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 uploads to which the user has access. - # @param [String] account_id - # Account Id for the uploads to retrieve. - # @param [String] web_property_id - # Web property Id for the uploads to retrieve. - # @param [String] custom_data_source_id - # Custom data source Id for uploads to retrieve. - # @param [Fixnum] max_results - # The maximum number of uploads to include in this response. - # @param [Fixnum] start_index - # A 1-based index of the first upload to retrieve. Use this parameter as a - # pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Uploads] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Uploads] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_uploads(account_id, web_property_id, custom_data_source_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Uploads::Representation - command.response_class = Google::Apis::AnalyticsV3::Uploads - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Upload data for a custom data source. - # @param [String] account_id - # Account Id associated with the upload. - # @param [String] web_property_id - # Web property UA-string associated with the upload. - # @param [String] custom_data_source_id - # Custom data source Id to which the data being uploaded belongs. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Upload] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Upload] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_data(account_id, web_property_id, custom_data_source_id, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::AnalyticsV3::Upload::Representation - command.response_class = Google::Apis::AnalyticsV3::Upload - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_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 a web property-AdWords link. - # @param [String] account_id - # ID of the account which the given web property belongs to. - # @param [String] web_property_id - # Web property ID to delete the AdWords link for. - # @param [String] web_property_ad_words_link_id - # Web property AdWords link 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 [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_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a web property-AdWords link to which the user has access. - # @param [String] account_id - # ID of the account which the given web property belongs to. - # @param [String] web_property_id - # Web property ID to retrieve the AdWords link for. - # @param [String] web_property_ad_words_link_id - # Web property-AdWords link 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::AnalyticsV3::EntityAdWordsLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_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 webProperty-AdWords link. - # @param [String] account_id - # ID of the Google Analytics account to create the link for. - # @param [String] web_property_id - # Web property ID to create the link for. - # @param [Google::Apis::AnalyticsV3::EntityAdWordsLink] entity_ad_words_link_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::AnalyticsV3::EntityAdWordsLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_ad_words_link(account_id, web_property_id, entity_ad_words_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - command.request_object = entity_ad_words_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 webProperty-AdWords links for a given web property. - # @param [String] account_id - # ID of the account which the given web property belongs to. - # @param [String] web_property_id - # Web property ID to retrieve the AdWords links for. - # @param [Fixnum] max_results - # The maximum number of webProperty-AdWords links to include in this response. - # @param [Fixnum] start_index - # An index of the first webProperty-AdWords link to retrieve. Use this parameter - # as a pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::EntityAdWordsLinks] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityAdWordsLinks] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_ad_words_links(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLinks::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLinks - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing webProperty-AdWords link. This method supports patch - # semantics. - # @param [String] account_id - # ID of the account which the given web property belongs to. - # @param [String] web_property_id - # Web property ID to retrieve the AdWords link for. - # @param [String] web_property_ad_words_link_id - # Web property-AdWords link ID. - # @param [Google::Apis::AnalyticsV3::EntityAdWordsLink] entity_ad_words_link_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::AnalyticsV3::EntityAdWordsLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, entity_ad_words_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - command.request_object = entity_ad_words_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_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 webProperty-AdWords link. - # @param [String] account_id - # ID of the account which the given web property belongs to. - # @param [String] web_property_id - # Web property ID to retrieve the AdWords link for. - # @param [String] web_property_ad_words_link_id - # Web property-AdWords link ID. - # @param [Google::Apis::AnalyticsV3::EntityAdWordsLink] entity_ad_words_link_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::AnalyticsV3::EntityAdWordsLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, entity_ad_words_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - command.request_object = entity_ad_words_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_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 web property to which the user has access. - # @param [String] account_id - # Account ID to retrieve the web property for. - # @param [String] web_property_id - # ID to retrieve the web property 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::AnalyticsV3::Webproperty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Webproperty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property(account_id, web_property_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation - command.response_class = Google::Apis::AnalyticsV3::Webproperty - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 - - # Create a new property if the account has fewer than 20 properties. Web - # properties are visible in the Google Analytics interface only if they have at - # least one profile. - # @param [String] account_id - # Account ID to create the web property for. - # @param [Google::Apis::AnalyticsV3::Webproperty] webproperty_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::AnalyticsV3::Webproperty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Webproperty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property(account_id, webproperty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Webproperty::Representation - command.request_object = webproperty_object - command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation - command.response_class = Google::Apis::AnalyticsV3::Webproperty - 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 - - # Lists web properties to which the user has access. - # @param [String] account_id - # Account ID to retrieve web properties for. Can either be a specific account ID - # or '~all', which refers to all the accounts that user has access to. - # @param [Fixnum] max_results - # The maximum number of web properties to include in this response. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::Webproperties] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Webproperties] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_properties(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Webproperties::Representation - command.response_class = Google::Apis::AnalyticsV3::Webproperties - command.params['accountId'] = account_id unless account_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing web property. This method supports patch semantics. - # @param [String] account_id - # Account ID to which the web property belongs - # @param [String] web_property_id - # Web property ID - # @param [Google::Apis::AnalyticsV3::Webproperty] webproperty_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::AnalyticsV3::Webproperty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Webproperty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property(account_id, web_property_id, webproperty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Webproperty::Representation - command.request_object = webproperty_object - command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation - command.response_class = Google::Apis::AnalyticsV3::Webproperty - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 web property. - # @param [String] account_id - # Account ID to which the web property belongs - # @param [String] web_property_id - # Web property ID - # @param [Google::Apis::AnalyticsV3::Webproperty] webproperty_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::AnalyticsV3::Webproperty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Webproperty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property(account_id, web_property_id, webproperty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::Webproperty::Representation - command.request_object = webproperty_object - command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation - command.response_class = Google::Apis::AnalyticsV3::Webproperty - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 - - # Removes a user from the given web property. - # @param [String] account_id - # Account ID to delete the user link for. - # @param [String] web_property_id - # Web Property ID to delete the user link for. - # @param [String] link_id - # Link ID to delete the user link 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 [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_web_property_user_link(account_id, web_property_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['linkId'] = link_id unless link_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 - - # Adds a new user to the given web property. - # @param [String] account_id - # Account ID to create the user link for. - # @param [String] web_property_id - # Web Property ID to create the user link for. - # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_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::AnalyticsV3::EntityUserLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_user_link(account_id, web_property_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.request_object = entity_user_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_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 webProperty-user links for a given web property. - # @param [String] account_id - # Account ID which the given web property belongs to. - # @param [String] web_property_id - # Web Property ID for the webProperty-user links to retrieve. Can either be a - # specific web property ID or '~all', which refers to all the web properties - # that user has access to. - # @param [Fixnum] max_results - # The maximum number of webProperty-user Links to include in this response. - # @param [Fixnum] start_index - # An index of the first webProperty-user link to retrieve. Use this parameter as - # a pagination mechanism along with the max-results parameter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLinks] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLinks] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_user_links(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLinks::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLinks - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates permissions for an existing user on the given web property. - # @param [String] account_id - # Account ID to update the account-user link for. - # @param [String] web_property_id - # Web property ID to update the account-user link for. - # @param [String] link_id - # Link ID to update the account-user link for. - # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_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::AnalyticsV3::EntityUserLink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::EntityUserLink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_property_user_link(account_id, web_property_id, link_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.request_object = entity_user_link_object - command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation - command.response_class = Google::Apis::AnalyticsV3::EntityUserLink - command.params['accountId'] = account_id unless account_id.nil? - command.params['webPropertyId'] = web_property_id unless web_property_id.nil? - command.params['linkId'] = link_id unless link_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 columns for a report type - # @param [String] report_type - # Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core - # Reporting API - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::AnalyticsV3::Columns] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::Columns] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metadata_columns(report_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'metadata/{reportType}/columns' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AnalyticsV3::Columns::Representation - command.response_class = Google::Apis::AnalyticsV3::Columns - command.params['reportType'] = report_type unless report_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates an account ticket. - # @param [Google::Apis::AnalyticsV3::AccountTicket] account_ticket_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::AnalyticsV3::AccountTicket] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AnalyticsV3::AccountTicket] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_account_ticket(account_ticket_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'provisioning/createAccountTicket' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AnalyticsV3::AccountTicket::Representation - command.request_object = account_ticket_object - command.response_representation = Google::Apis::AnalyticsV3::AccountTicket::Representation - command.response_class = Google::Apis::AnalyticsV3::AccountTicket - 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 diff --git a/generated/google/apis/androidenterprise_v1.rb b/generated/google/apis/androidenterprise_v1.rb deleted file mode 100644 index 14c55dea4..000000000 --- a/generated/google/apis/androidenterprise_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/androidenterprise_v1/classes.rb b/generated/google/apis/androidenterprise_v1/classes.rb deleted file mode 100644 index 22b71ffe4..000000000 --- a/generated/google/apis/androidenterprise_v1/classes.rb +++ /dev/null @@ -1,1162 +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 - - # Represents the list of app restrictions available to be pre-configured for the - # product. - class AppRestrictionsSchema - include Google::Apis::Core::Hashable - - # The set of restrictions that make up this schema. - # Corresponds to the JSON property `restrictions` - # @return [Array] - attr_accessor :restrictions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @restrictions = args[:restrictions] unless args[:restrictions].nil? - end - end - - # A restriction in the App Restriction Schema represents a piece of - # configuration that may be pre-applied. - class AppRestrictionsSchemaRestriction - include Google::Apis::Core::Hashable - - # A typed value for the restriction. - # Corresponds to the JSON property `defaultValue` - # @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchemaRestrictionRestrictionValue] - attr_accessor :default_value - - # A longer description of the restriction, giving more detail of what it affects. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # For choice or multiselect restrictions, the list of possible entries' human- - # readable names. - # Corresponds to the JSON property `entry` - # @return [Array] - attr_accessor :entry - - # For choice or multiselect restrictions, the list of possible entries' machine- - # readable values. - # Corresponds to the JSON property `entryValue` - # @return [Array] - attr_accessor :entry_value - - # The unique key that the product uses to identify the restriction, e.g. "com. - # google.android.gm.fieldname". - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The type of the restriction. - # Corresponds to the JSON property `restrictionType` - # @return [String] - attr_accessor :restriction_type - - # The name of the restriction. - # 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) - @default_value = args[:default_value] unless args[:default_value].nil? - @description = args[:description] unless args[:description].nil? - @entry = args[:entry] unless args[:entry].nil? - @entry_value = args[:entry_value] unless args[:entry_value].nil? - @key = args[:key] unless args[:key].nil? - @restriction_type = args[:restriction_type] unless args[:restriction_type].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # A typed value for the restriction. - class AppRestrictionsSchemaRestrictionRestrictionValue - include Google::Apis::Core::Hashable - - # The type of the value being provided. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The boolean value - this will only be present if type is bool. - # Corresponds to the JSON property `valueBool` - # @return [Boolean] - attr_accessor :value_bool - alias_method :value_bool?, :value_bool - - # The integer value - this will only be present if type is integer. - # Corresponds to the JSON property `valueInteger` - # @return [Fixnum] - attr_accessor :value_integer - - # The list of string values - this will only be present if type is multiselect. - # Corresponds to the JSON property `valueMultiselect` - # @return [Array] - attr_accessor :value_multiselect - - # The string value - this will be present for types string, choice and hidden. - # Corresponds to the JSON property `valueString` - # @return [String] - attr_accessor :value_string - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - @value_bool = args[:value_bool] unless args[:value_bool].nil? - @value_integer = args[:value_integer] unless args[:value_integer].nil? - @value_multiselect = args[:value_multiselect] unless args[:value_multiselect].nil? - @value_string = args[:value_string] unless args[:value_string].nil? - end - end - - # App version represents a single APK version. - class AppVersion - include Google::Apis::Core::Hashable - - # Unique increasing identifier for the apk version. - # Corresponds to the JSON property `versionCode` - # @return [Fixnum] - attr_accessor :version_code - - # The string used in the Play Store by the app developer to identify a version - # of an app. The string is not necessarily unique or localized (e.g. "1.4"). - # Corresponds to the JSON property `versionString` - # @return [String] - attr_accessor :version_string - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version_code = args[:version_code] unless args[:version_code].nil? - @version_string = args[:version_string] unless args[:version_string].nil? - end - end - - # Information on an approval URL. - class ApprovalUrlInfo - include Google::Apis::Core::Hashable - - # A URL that displays a product's permissions and that can also be used to - # approve the product with the Products.approve call. - # Corresponds to the JSON property `approvalUrl` - # @return [String] - attr_accessor :approval_url - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#approvalUrlInfo". - # 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) - @approval_url = args[:approval_url] unless args[:approval_url].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A collection resource defines a named set of apps that is visible to a set of - # users in the Google Play Store app running on those users' managed devices. - # Those users can then install any of those apps if they wish (which will - # trigger creation of install and entitlement resources). A user cannot install - # an app on a managed device unless the app is listed in at least one collection - # that is visible to that user. - # Note that the API can be used to directly install an app regardless of whether - # it is in any collection - so an enterprise has a choice of either directly - # pushing apps to users, or allowing users to install apps if they want. Which - # is appropriate will depend on the enterprise's policies and the purpose of the - # apps concerned. - class Collection - include Google::Apis::Core::Hashable - - # Arbitrary unique ID, allocated by the API on creation. - # Corresponds to the JSON property `collectionId` - # @return [String] - attr_accessor :collection_id - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#collection". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A user-friendly name for the collection (should be unique), e.g. "Accounting - # apps". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The IDs of the products in the collection, in the order in which they should - # be displayed. - # Corresponds to the JSON property `productId` - # @return [Array] - attr_accessor :product_id - - # Whether this collection is visible to all users, or only to the users that - # have been granted access through the collection_viewers api. Even if a - # collection is visible to allUsers, it is possible to add and remove viewers, - # but this will have no effect until the collection's visibility changes to - # viewersOnly. - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @collection_id = args[:collection_id] unless args[:collection_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # The user resources for the collection. - class ListCollectionViewersResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#collectionViewersListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A user of an enterprise. - # Corresponds to the JSON property `user` - # @return [Array] - attr_accessor :user - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @user = args[:user] unless args[:user].nil? - end - end - - # The collection resources for the enterprise. - class ListCollectionsResponse - include Google::Apis::Core::Hashable - - # An ordered collection of products which can be made visible on the Google Play - # Store app to a selected group of users. - # Corresponds to the JSON property `collection` - # @return [Array] - attr_accessor :collection - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#collectionsListResponse". - # 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) - @collection = args[:collection] unless args[:collection].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A device resource represents a mobile device managed by the MDM and belonging - # to a specific enterprise user. - # This collection cannot be modified via the API; it is automatically populated - # as devices are set up to be managed. - class Device - include Google::Apis::Core::Hashable - - # The Google Play Services Android ID for the device encoded as a lowercase hex - # string, e.g. "123456789abcdef0". - # Corresponds to the JSON property `androidId` - # @return [String] - attr_accessor :android_id - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#device". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The mechanism by which this device is managed by the MDM. "managedDevice" - # means that the MDM's app is a device owner. "managedProfile" means that the - # MDM's app is the profile owner (and there is a separate personal profile which - # is not managed). "containerApp" means that the MDM's app is managing the - # Android for Work container app on the device. - # Corresponds to the JSON property `managementType` - # @return [String] - attr_accessor :management_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @android_id = args[:android_id] unless args[:android_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @management_type = args[:management_type] unless args[:management_type].nil? - end - end - - # The state of a user's device, as accessed by the getState and setState methods - # on device resources. - class DeviceState - include Google::Apis::Core::Hashable - - # The state of the Google account on the device. "enabled" indicates that the - # Google account on the device can be used to access Google services (including - # Google Play), while "disabled" means that it cannot. A new device is initially - # in the "disabled" state. - # Corresponds to the JSON property `accountState` - # @return [String] - attr_accessor :account_state - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#deviceState". - # 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) - @account_state = args[:account_state] unless args[:account_state].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The device resources for the user. - class ListDevicesResponse - include Google::Apis::Core::Hashable - - # A managed device. - # Corresponds to the JSON property `device` - # @return [Array] - attr_accessor :device - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#devicesListResponse". - # 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) - @device = args[:device] unless args[:device].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # An enterprise resource represents a binding between an organisation and their - # MDM. - # To create an enterprise, an admin of the enterprise must first go through a - # Play for Work sign-up flow. At the end of this the admin will be presented - # with a token (a short opaque alphanumeric string). They must then present this - # to the MDM, who then supplies it to the enroll method. Until this is done the - # MDM will not have any access to the enterprise. - # After calling enroll the MDM should call setAccount to specify the service - # account that will be allowed to act on behalf of the enterprise, which will be - # required for access to the enterprise's data through this API. Only one call - # of setAccount is allowed for a given enterprise; the only way to change the - # account later is to unenroll the enterprise and enroll it again (obtaining a - # new token). - # The MDM can unenroll an enterprise in order to sever the binding between them. - # Re-enrolling an enterprise is possible, but requires a new token to be - # retrieved. Enterprises.unenroll requires the MDM's credentials (as enroll does) - # , not the enterprise's. Enterprises.unenroll can only be used for enterprises - # that were previously enrolled with the enroll call. Any enterprises that were - # enrolled using the (deprecated) Enterprises.insert call must be unenrolled - # with Enterprises.delete and can then be re-enrolled using the Enterprises. - # enroll call. - # The ID for an enterprise is an opaque string. It is returned by insert and - # enroll and can also be retrieved if the enterprise's primary domain is known - # using the list method. - class Enterprise - include Google::Apis::Core::Hashable - - # The unique ID for the enterprise. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#enterprise". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the enterprise, e.g. "Example Inc". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The enterprise's primary domain, e.g. "example.com". - # Corresponds to the JSON property `primaryDomain` - # @return [String] - attr_accessor :primary_domain - - 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? - @primary_domain = args[:primary_domain] unless args[:primary_domain].nil? - end - end - - # A service account that can be used to authenticate as the enterprise to API - # calls that require such authentication. - class EnterpriseAccount - include Google::Apis::Core::Hashable - - # The email address of the service account. - # Corresponds to the JSON property `accountEmail` - # @return [String] - attr_accessor :account_email - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#enterpriseAccount". - # 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) - @account_email = args[:account_email] unless args[:account_email].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The matching enterprise resources. - class ListEnterprisesResponse - include Google::Apis::Core::Hashable - - # An enterprise. - # Corresponds to the JSON property `enterprise` - # @return [Array] - attr_accessor :enterprise - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#enterprisesListResponse". - # 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) - @enterprise = args[:enterprise] unless args[:enterprise].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The existence of an entitlement resource means that a user has the right to - # use a particular app on any of their devices. This might be because the app is - # free or because they have been allocated a license to the app from a group - # license purchased by the enterprise. - # It should always be true that a user has an app installed on one of their - # devices only if they have an entitlement to it. So if an entitlement is - # deleted, the app will be uninstalled from all devices. Similarly if the user - # installs an app (and is permitted to do so), or the MDM triggers an install of - # the app, an entitlement to that app is automatically created. If this is - # impossible - e.g. the enterprise has not purchased sufficient licenses - then - # installation fails. - # Note that entitlements are always user specific, not device specific; a user - # may have an entitlement even though they have not installed the app anywhere. - # Once they have an entitlement they can install the app on multiple devices. - # The API can be used to create an entitlement. If the app is a free app, a - # group license for that app is created. If it's a paid app, creating the - # entitlement consumes one license; it remains consumed until the entitlement is - # removed. Optionally an installation of the app on all the user's managed - # devices can be triggered at the time the entitlement is created. An - # entitlement cannot be created for an app if the app requires permissions that - # the enterprise has not yet accepted. - # Entitlements for paid apps that are due to purchases by the user on a non- - # managed profile will have "userPurchase" as entitlement reason; those - # entitlements cannot be removed via the API. - class Entitlement - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#entitlement". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The ID of the product that the entitlement is for, e.g. "app:com.google. - # android.gm". - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # The reason for the entitlement, e.g. "free" for free apps. This is temporary, - # it will be replaced by the acquisition kind field of group licenses. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - - # The entitlement resources for the user. - class ListEntitlementsResponse - include Google::Apis::Core::Hashable - - # An entitlement of a user to a product (e.g. an app). For example, a free app - # that they have installed, or a paid app that they have been allocated a - # license to. - # Corresponds to the JSON property `entitlement` - # @return [Array] - attr_accessor :entitlement - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#entitlementsListResponse". - # 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) - @entitlement = args[:entitlement] unless args[:entitlement].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A group license object indicates a product that an enterprise admin has - # approved for use in the enterprise. The product may be free or paid. For free - # products, a group license object is created in these cases: if the enterprise - # admin approves a product in Google Play, if the product is added to a - # collection, or if an entitlement for the product is created for a user via the - # API. For paid products, a group license object is only created as part of the - # first bulk purchase of that product in Google Play done by the enterprise - # admin. - # The API can be used to query group licenses; the available information - # includes the total number of licenses purchased (for paid products) and the - # total number of licenses that have been provisioned, i.e. the total number of - # user entitlements in existence for the product. - # Group license objects are never deleted; if e.g. a free app is added to a - # collection and then removed, the group license will remain, allowing to keep - # track of any remaining entitlements. An enterprise admin may indicate they are - # no longer interested in the group license by marking it as unapproved in - # Google Play. - class GroupLicense - include Google::Apis::Core::Hashable - - # How this group license was acquired. "bulkPurchase" means that this group - # license object was created because the enterprise purchased licenses for this - # product; this is "free" otherwise (for free products). - # Corresponds to the JSON property `acquisitionKind` - # @return [String] - attr_accessor :acquisition_kind - - # Whether the product to which this group license relates is currently approved - # by the enterprise, as either "approved" or "unapproved". Products are approved - # when a group license is first created, but this approval may be revoked by an - # enterprise admin via Google Play. Unapproved products will not be visible to - # end users in collections and new entitlements to them should not normally be - # created. - # Corresponds to the JSON property `approval` - # @return [String] - attr_accessor :approval - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#groupLicense". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The total number of provisioned licenses for this product. Returned by read - # operations, but ignored in write operations. - # Corresponds to the JSON property `numProvisioned` - # @return [Fixnum] - attr_accessor :num_provisioned - - # The number of purchased licenses (possibly in multiple purchases). If this - # field is omitted then there is no limit on the number of licenses that can be - # provisioned (e.g. if the acquisition kind is "free"). - # Corresponds to the JSON property `numPurchased` - # @return [Fixnum] - attr_accessor :num_purchased - - # The ID of the product that the license is for, e.g. "app:com.google.android.gm" - # . - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acquisition_kind = args[:acquisition_kind] unless args[:acquisition_kind].nil? - @approval = args[:approval] unless args[:approval].nil? - @kind = args[:kind] unless args[:kind].nil? - @num_provisioned = args[:num_provisioned] unless args[:num_provisioned].nil? - @num_purchased = args[:num_purchased] unless args[:num_purchased].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - end - end - - # The user resources for the group license. - class ListGroupLicenseUsersResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#groupLicenseUsersListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A user of an enterprise. - # Corresponds to the JSON property `user` - # @return [Array] - attr_accessor :user - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @user = args[:user] unless args[:user].nil? - end - end - - # The grouplicense resources for the enterprise. - class ListGroupLicensesResponse - include Google::Apis::Core::Hashable - - # A group license for a product approved for use in the enterprise. - # Corresponds to the JSON property `groupLicense` - # @return [Array] - attr_accessor :group_license - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#groupLicensesListResponse". - # 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) - @group_license = args[:group_license] unless args[:group_license].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # The existence of an install resource indicates that an app is installed on a - # particular device (or that an install is pending). - # The API can be used to create an install resource using the update method. - # This triggers the actual install of the app on the device. If the user does - # not already have an entitlement for the app then an attempt is made to create - # one. If this fails (e.g. because the app is not free and there is no available - # license) then the creation of the install fails. - # The API can also be used to update an installed app. If the update method is - # used on an existing install then the app will be updated to the latest - # available version. - # Note that it is not possible to force the installation of a specific version - # of an app; the version code is read-only. - # If a user installs an app themselves (as permitted by the enterprise), then - # again an install resource and possibly an entitlement resource are - # automatically created. - # The API can also be used to delete an install resource, which triggers the - # removal of the app from the device. Note that deleting an install does not - # automatically remove the corresponding entitlement, even if there are no - # remaining installs. The install resource will also be deleted if the user - # uninstalls the app themselves. - class Install - include Google::Apis::Core::Hashable - - # Install state. The state "installPending" means that an install request has - # recently been made and download to the device is in progress. The state " - # installed" means that the app has been installed. This field is read-only. - # Corresponds to the JSON property `installState` - # @return [String] - attr_accessor :install_state - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#install". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The ID of the product that the install is for, e.g. "app:com.google.android.gm" - # . - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # The version of the installed product. Guaranteed to be set only if the install - # state is "installed". - # Corresponds to the JSON property `versionCode` - # @return [Fixnum] - attr_accessor :version_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @install_state = args[:install_state] unless args[:install_state].nil? - @kind = args[:kind] unless args[:kind].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @version_code = args[:version_code] unless args[:version_code].nil? - end - end - - # The install resources for the device. - class ListInstallsResponse - include Google::Apis::Core::Hashable - - # An installation of an app for a user on a specific device. The existence of an - # install implies that the user must have an entitlement to the app. - # Corresponds to the JSON property `install` - # @return [Array] - attr_accessor :install - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#installsListResponse". - # 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) - @install = args[:install] unless args[:install].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A permission represents some extra capability, to be granted to an Android app, - # which requires explicit consent. An enterprise admin must consent to these - # permissions on behalf of their users before an entitlement for the app can be - # created. - # The permissions collection is read-only. The information provided for each - # permission (localized name and description) is intended to be used in the MDM - # user interface when obtaining consent from the enterprise. - class Permission - include Google::Apis::Core::Hashable - - # A longer description of the permissions giving more details of what it affects. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#permission". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the permission. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # An opaque string uniquely identifying the permission. - # Corresponds to the JSON property `permissionId` - # @return [String] - attr_accessor :permission_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @permission_id = args[:permission_id] unless args[:permission_id].nil? - end - end - - # A product represents an app in the Google Play Store that is available to at - # least some users in the enterprise. (Some apps are restricted to a single - # enterprise, and no information about them is made available outside that - # enterprise.) - # The information provided for each product (localized name, icon, link to the - # full Google Play details page) is intended to allow a basic representation of - # the product within an MDM user interface. - class Product - include Google::Apis::Core::Hashable - - # List of app versions available for this product. The returned list contains - # only public versions. E.g. alpha, beta or canary versions will not be included. - # Corresponds to the JSON property `appVersion` - # @return [Array] - attr_accessor :app_version - - # The name of the author of the product (e.g. the app developer). - # Corresponds to the JSON property `authorName` - # @return [String] - attr_accessor :author_name - - # A link to the (consumer) Google Play details page for the product. - # Corresponds to the JSON property `detailsUrl` - # @return [String] - attr_accessor :details_url - - # How and to whom the package is made available. - # Corresponds to the JSON property `distributionChannel` - # @return [String] - attr_accessor :distribution_channel - - # A link to an image that can be used as an icon for the product. - # Corresponds to the JSON property `iconUrl` - # @return [String] - attr_accessor :icon_url - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#product". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A string of the form "app: - # " - e.g. "app:com.google.android.gm" represents the GMail app. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # Whether this app can only be installed on devices using the Android for Work - # container app. - # Corresponds to the JSON property `requiresContainerApp` - # @return [Boolean] - attr_accessor :requires_container_app - alias_method :requires_container_app?, :requires_container_app - - # The name of the product. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A link to the Google Play for Work details page for the product, for use by an - # Enterprise administrator. - # Corresponds to the JSON property `workDetailsUrl` - # @return [String] - attr_accessor :work_details_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @app_version = args[:app_version] unless args[:app_version].nil? - @author_name = args[:author_name] unless args[:author_name].nil? - @details_url = args[:details_url] unless args[:details_url].nil? - @distribution_channel = args[:distribution_channel] unless args[:distribution_channel].nil? - @icon_url = args[:icon_url] unless args[:icon_url].nil? - @kind = args[:kind] unless args[:kind].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @requires_container_app = args[:requires_container_app] unless args[:requires_container_app].nil? - @title = args[:title] unless args[:title].nil? - @work_details_url = args[:work_details_url] unless args[:work_details_url].nil? - end - end - - # A product permissions resource represents the set of permissions required by a - # specific app and whether or not they have been accepted by an enterprise admin. - # The API can be used to read the set of permissions, and also to update the set - # to indicate that permissions have been accepted. - class ProductPermission - include Google::Apis::Core::Hashable - - # An opaque string uniquely identifying the permission. - # Corresponds to the JSON property `permissionId` - # @return [String] - attr_accessor :permission_id - - # Whether the permission has been accepted or not. - # 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) - @permission_id = args[:permission_id] unless args[:permission_id].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # Information about the permissions required by a specific app and whether they - # have been accepted by the enterprise. - class ProductPermissions - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#productPermissions". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The permissions required by the app. - # Corresponds to the JSON property `permission` - # @return [Array] - attr_accessor :permission - - # The ID of the app that the permissions relate to, e.g. "app:com.google.android. - # gm". - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @permission = args[:permission] unless args[:permission].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - end - end - - # - class ApproveProductRequest - include Google::Apis::Core::Hashable - - # Information on an approval URL. - # Corresponds to the JSON property `approvalUrlInfo` - # @return [Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo] - attr_accessor :approval_url_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @approval_url_info = args[:approval_url_info] unless args[:approval_url_info].nil? - end - end - - # - class GenerateProductApprovalUrlResponse - include Google::Apis::Core::Hashable - - # A iframe-able URL that displays a product's permissions (if any). This URL can - # be used to approve the product only once and for a limited time (1 hour), - # using the Products.approve call. If the product is not currently approved and - # has no permissions, this URL will point to an empty page. If the product is - # currently approved and all of its permissions (if any) are also approved, this - # field will not be populated. - # 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 - - # A user resource represents an individual user within the enterprise's domain. - # Note that each user is associated with a Google account based on the user's - # corporate email address (which must be in one of the enterprise's domains). As - # part of installing an MDM app to manage a device the Google account must be - # provisioned to the device, and so the user resource must be created before - # that. This can be done using the Google Admin SDK Directory API. - # The ID for a user is an opaque string. It can be retrieved using the list - # method queried by the user's primary email address. - class User - include Google::Apis::Core::Hashable - - # The unique ID for the user. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#user". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The user's primary email, e.g. "jsmith@example.com". - # Corresponds to the JSON property `primaryEmail` - # @return [String] - attr_accessor :primary_email - - 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? - @primary_email = args[:primary_email] unless args[:primary_email].nil? - end - end - - # A UserToken is used by a user when setting up a managed device or profile with - # their work account on a device. When the user enters their email address and - # token (activation code) the appropriate MDM app can be automatically - # downloaded. - class UserToken - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#userToken". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token (activation code) to be entered by the user. This consists of a - # sequence of decimal digits. Note that the leading digit may be 0. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - # The unique ID for the user. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @token = args[:token] unless args[:token].nil? - @user_id = args[:user_id] unless args[:user_id].nil? - end - end - - # The matching user resources. - class ListUsersResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidenterprise#usersListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A user of an enterprise. - # Corresponds to the JSON property `user` - # @return [Array] - attr_accessor :user - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @user = args[:user] unless args[:user].nil? - end - end - end - end -end diff --git a/generated/google/apis/androidenterprise_v1/representations.rb b/generated/google/apis/androidenterprise_v1/representations.rb deleted file mode 100644 index 634aec3cf..000000000 --- a/generated/google/apis/androidenterprise_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/androidenterprise_v1/service.rb b/generated/google/apis/androidenterprise_v1/service.rb deleted file mode 100644 index b647b9155..000000000 --- a/generated/google/apis/androidenterprise_v1/service.rb +++ /dev/null @@ -1,1979 +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 AndroidenterpriseV1 - # Google Play EMM API - # - # Allows MDMs/EMMs and enterprises to manage the deployment of apps to Android - # for Work users. - # - # @example - # require 'google/apis/androidenterprise_v1' - # - # Androidenterprise = Google::Apis::AndroidenterpriseV1 # Alias the module - # service = Androidenterprise::AndroidEnterpriseService.new - # - class AndroidEnterpriseService < 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/', 'androidenterprise/v1/') - end - - # Deletes a collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_collection(enterprise_id, collection_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}' - command = make_simple_command(:delete, path, options) - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_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 details of a collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Collection] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Collection] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_collection(enterprise_id, collection_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Collection - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_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 new collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [Google::Apis::AndroidenterpriseV1::Collection] collection_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::AndroidenterpriseV1::Collection] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Collection] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_collection(enterprise_id, collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation - command.request_object = collection_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Collection - command.params['enterpriseId'] = enterprise_id unless enterprise_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 IDs of all the collections for an enterprise. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ListCollectionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListCollectionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_collections(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListCollectionsResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListCollectionsResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a collection. This method supports patch semantics. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [Google::Apis::AndroidenterpriseV1::Collection] collection_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::AndroidenterpriseV1::Collection] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Collection] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_collection(enterprise_id, collection_id, collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation - command.request_object = collection_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Collection - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [Google::Apis::AndroidenterpriseV1::Collection] collection_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::AndroidenterpriseV1::Collection] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Collection] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_collection(enterprise_id, collection_id, collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation - command.request_object = collection_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Collection::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Collection - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_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 - - # Removes the user from the list of those specifically allowed to see the - # collection. If the collection's visibility is set to viewersOnly then only - # such users will see the collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [String] user_id - # The ID of the 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 [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_collection_viewer(enterprise_id, collection_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}' - command = make_simple_command(:delete, path, options) - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the ID of the user if they have been specifically allowed to see the - # collection. If the collection's visibility is set to viewersOnly then only - # these users will see the collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [String] user_id - # The ID of the 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::AndroidenterpriseV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_collection_viewer(enterprise_id, collection_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::User - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the IDs of the users who have been specifically allowed to see the - # collection. If the collection's visibility is set to viewersOnly then only - # these users will see the collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ListCollectionViewersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListCollectionViewersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_collection_viewers(enterprise_id, collection_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}/users' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListCollectionViewersResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListCollectionViewersResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_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 - - # Adds the user to the list of those specifically allowed to see the collection. - # If the collection's visibility is set to viewersOnly then only such users will - # see the collection. This method supports patch semantics. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [String] user_id - # The ID of the user. - # @param [Google::Apis::AndroidenterpriseV1::User] user_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_collection_viewer(enterprise_id, collection_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::User - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Adds the user to the list of those specifically allowed to see the collection. - # If the collection's visibility is set to viewersOnly then only such users will - # see the collection. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] collection_id - # The ID of the collection. - # @param [String] user_id - # The ID of the user. - # @param [Google::Apis::AndroidenterpriseV1::User] user_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_collection_viewer(enterprise_id, collection_id, user_id, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/collections/{collectionId}/users/{userId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::User - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['collectionId'] = collection_id unless collection_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the details of a device. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The ID of the device. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Device] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Device] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_device(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::Device::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Device - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_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 whether a device is enabled or disabled for access by the user to - # Google services. The device state takes effect only if enforcing EMM policies - # on Android devices is enabled in the Google Admin Console. Otherwise, the - # device state is ignored and all devices are allowed access to Google services. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The ID of the device. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::DeviceState] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::DeviceState] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_device(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_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 IDs of all of a user's devices. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the 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::AndroidenterpriseV1::ListDevicesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListDevicesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_devices(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListDevicesResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListDevicesResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets whether a device is enabled or disabled for access by the user to Google - # services. The device state takes effect only if enforcing EMM policies on - # Android devices is enabled in the Google Admin Console. Otherwise, the device - # state is ignored and all devices are allowed access to Google services. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The ID of the device. - # @param [Google::Apis::AndroidenterpriseV1::DeviceState] device_state_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::AndroidenterpriseV1::DeviceState] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::DeviceState] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_state_device(enterprise_id, user_id, device_id, device_state_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation - command.request_object = device_state_object - command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_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 binding between the MDM and enterprise. This is now deprecated; - # use this to unenroll customers that were previously enrolled with the 'insert' - # call, then enroll them again with the 'enroll' call. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_enterprise(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}' - command = make_simple_command(:delete, path, options) - command.params['enterpriseId'] = enterprise_id unless enterprise_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 - - # Enrolls an enterprise with the calling MDM. - # @param [Google::Apis::AndroidenterpriseV1::Enterprise] enterprise_object - # @param [String] token - # The token provided by the enterprise to register the MDM. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Enterprise] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Enterprise] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def enroll_enterprise(enterprise_object = nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/enroll' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation - command.request_object = enterprise_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise - command.query['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the name and domain of an enterprise. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Enterprise] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Enterprise] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_enterprise(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise - command.params['enterpriseId'] = enterprise_id unless enterprise_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 - - # Establishes the binding between the MDM and an enterprise. This is now - # deprecated; use enroll instead. - # @param [Google::Apis::AndroidenterpriseV1::Enterprise] enterprise_object - # @param [String] token - # The token provided by the enterprise to register the MDM. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Enterprise] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Enterprise] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_enterprise(enterprise_object = nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation - command.request_object = enterprise_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise - command.query['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Looks up an enterprise by domain name. - # @param [String] domain - # The exact primary domain name of the enterprise to look up. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ListEnterprisesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_enterprises(domain: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse - command.query['domain'] = domain unless domain.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 - - # Set the account that will be used to authenticate to the API as the enterprise. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] enterprise_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::AndroidenterpriseV1::EnterpriseAccount] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_account_enterprise(enterprise_id, enterprise_account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/account' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation - command.request_object = enterprise_account_object - command.response_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::EnterpriseAccount - command.params['enterpriseId'] = enterprise_id unless enterprise_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 - - # Unenrolls an enterprise from the calling MDM. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 unenroll_enterprise(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/unenroll' - command = make_simple_command(:post, path, options) - command.params['enterpriseId'] = enterprise_id unless enterprise_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 - - # Removes an entitlement to an app for a user and uninstalls it. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] entitlement_id - # The ID of the entitlement, e.g. "app:com.google.android.gm". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}' - command = make_simple_command(:delete, path, options) - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['entitlementId'] = entitlement_id unless entitlement_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 details of an entitlement. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] entitlement_id - # The ID of the entitlement, e.g. "app:com.google.android.gm". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Entitlement] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Entitlement] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['entitlementId'] = entitlement_id unless entitlement_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 of all entitlements for the specified user. Only the ID is set. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the 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::AndroidenterpriseV1::ListEntitlementsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_entitlements(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/entitlements' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Adds or updates an entitlement to an app for a user. This method supports - # patch semantics. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] entitlement_id - # The ID of the entitlement, e.g. "app:com.google.android.gm". - # @param [Google::Apis::AndroidenterpriseV1::Entitlement] entitlement_object - # @param [Boolean] install - # Set to true to also install the product on all the user's devices where - # possible. Failure to install on one or more devices will not prevent this - # operation from returning successfully, as long as the entitlement was - # successfully assigned to the 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::AndroidenterpriseV1::Entitlement] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Entitlement] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_entitlement(enterprise_id, user_id, entitlement_id, entitlement_object = nil, install: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation - command.request_object = entitlement_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['entitlementId'] = entitlement_id unless entitlement_id.nil? - command.query['install'] = install unless install.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 or updates an entitlement to an app for a user. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] entitlement_id - # The ID of the entitlement, e.g. "app:com.google.android.gm". - # @param [Google::Apis::AndroidenterpriseV1::Entitlement] entitlement_object - # @param [Boolean] install - # Set to true to also install the product on all the user's devices where - # possible. Failure to install on one or more devices will not prevent this - # operation from returning successfully, as long as the entitlement was - # successfully assigned to the 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::AndroidenterpriseV1::Entitlement] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Entitlement] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_entitlement(enterprise_id, user_id, entitlement_id, entitlement_object = nil, install: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation - command.request_object = entitlement_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['entitlementId'] = entitlement_id unless entitlement_id.nil? - command.query['install'] = install unless install.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 details of an enterprise's group license for a product. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] group_license_id - # The ID of the product the group license is for, e.g. "app:com.google.android. - # gm". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::GroupLicense] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::GroupLicense] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_group_license(enterprise_id, group_license_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::GroupLicense::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::GroupLicense - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['groupLicenseId'] = group_license_id unless group_license_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 IDs of all products for which the enterprise has a group license. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ListGroupLicensesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group_licenses(enterprise_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/groupLicenses' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_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 IDs of the users who have been granted entitlements under the - # license. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] group_license_id - # The ID of the product the group license is for, e.g. "app:com.google.android. - # gm". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ListGroupLicenseUsersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group_license_users(enterprise_id, group_license_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}/users' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['groupLicenseId'] = group_license_id unless group_license_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 - - # Requests to remove an app from a device. A call to get or list will still show - # the app as installed on the device until it is actually removed. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The Android ID of the device. - # @param [String] install_id - # The ID of the product represented by the install, e.g. "app:com.google.android. - # gm". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}' - command = make_simple_command(:delete, path, options) - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_id.nil? - command.params['installId'] = install_id unless install_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 details of an installation of an app on a device. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The Android ID of the device. - # @param [String] install_id - # The ID of the product represented by the install, e.g. "app:com.google.android. - # gm". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Install] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Install] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Install - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_id.nil? - command.params['installId'] = install_id unless install_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 details of all apps installed on the specified device. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The Android ID of the device. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ListInstallsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListInstallsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_installs(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListInstallsResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListInstallsResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_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 - - # Requests to install the latest version of an app to a device. If the app is - # already installed then it is updated to the latest version if necessary. This - # method supports patch semantics. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The Android ID of the device. - # @param [String] install_id - # The ID of the product represented by the install, e.g. "app:com.google.android. - # gm". - # @param [Google::Apis::AndroidenterpriseV1::Install] install_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::AndroidenterpriseV1::Install] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Install] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_install(enterprise_id, user_id, device_id, install_id, install_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Install::Representation - command.request_object = install_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Install - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_id.nil? - command.params['installId'] = install_id unless install_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 - - # Requests to install the latest version of an app to a device. If the app is - # already installed then it is updated to the latest version if necessary. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the user. - # @param [String] device_id - # The Android ID of the device. - # @param [String] install_id - # The ID of the product represented by the install, e.g. "app:com.google.android. - # gm". - # @param [Google::Apis::AndroidenterpriseV1::Install] install_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::AndroidenterpriseV1::Install] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Install] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_install(enterprise_id, user_id, device_id, install_id, install_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::Install::Representation - command.request_object = install_object - command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Install - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.params['deviceId'] = device_id unless device_id.nil? - command.params['installId'] = install_id unless install_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 details of an Android app permission for display to an enterprise - # admin. - # @param [String] permission_id - # The ID of the permission. - # @param [String] language - # The BCP47 tag for the user's preferred language (e.g. "en-US", "de") - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Permission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Permission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(permission_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'permissions/{permissionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::Permission::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Permission - command.params['permissionId'] = permission_id unless permission_id.nil? - command.query['language'] = language unless language.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 - - # Approves the specified product (and the relevant app permissions, if any). - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] product_id - # The ID of the product. - # @param [Google::Apis::AndroidenterpriseV1::ApproveProductRequest] approve_product_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 [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 approve_product(enterprise_id, product_id, approve_product_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/products/{productId}/approve' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::ApproveProductRequest::Representation - command.request_object = approve_product_request_object - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['productId'] = product_id unless product_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 - - # Generates a URL that can be used to display an iframe to view the product's - # permissions (if any) and approve the product. This URL can be used to approve - # the product for a limited time (currently 1 hour) using the Products.approve - # call. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] product_id - # The ID of the product. - # @param [String] language_code - # The language code that will be used for permission names and descriptions in - # the returned iframe. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::GenerateProductApprovalUrlResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product_approval_url(enterprise_id, product_id, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['productId'] = product_id unless product_id.nil? - command.query['languageCode'] = language_code unless language_code.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 details of a product for display to an enterprise admin. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] product_id - # The ID of the product, e.g. "app:com.google.android.gm". - # @param [String] language - # The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::Product] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::Product] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/products/{productId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::Product::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::Product - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['productId'] = product_id unless product_id.nil? - command.query['language'] = language unless language.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 schema defining app restrictions configurable for this product. - # All products have a schema, but this may be empty if no app restrictions are - # defined. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] product_id - # The ID of the product. - # @param [String] language - # The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::AppRestrictionsSchema] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product_app_restrictions_schema(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['productId'] = product_id unless product_id.nil? - command.query['language'] = language unless language.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 Android app permissions required by this app. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] product_id - # The ID of the product. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ProductPermissions] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product_permissions(enterprise_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/products/{productId}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['productId'] = product_id unless product_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 set of Android app permissions for this app that have been - # accepted by the enterprise. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] product_id - # The ID of the product. - # @param [Google::Apis::AndroidenterpriseV1::ProductPermissions] product_permissions_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::AndroidenterpriseV1::ProductPermissions] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product_permissions(enterprise_id, product_id, product_permissions_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/products/{productId}/permissions' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation - command.request_object = product_permissions_object - command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['productId'] = product_id unless product_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 - - # Generates a token (activation code) to allow this user to configure their work - # account in the Android Setup Wizard. Revokes any previously generated token. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the 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::AndroidenterpriseV1::UserToken] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::UserToken] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_token(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/token' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::UserToken::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::UserToken - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a user's details. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the 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::AndroidenterpriseV1::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_user(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::User - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Looks up a user by email address. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] email - # The exact primary email address of the user to look up. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidenterpriseV1::ListUsersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidenterpriseV1::ListUsersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_users(enterprise_id, email: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidenterpriseV1::ListUsersResponse::Representation - command.response_class = Google::Apis::AndroidenterpriseV1::ListUsersResponse - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.query['email'] = email unless email.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 - - # Revokes a previously generated token (activation code) for the user. - # @param [String] enterprise_id - # The ID of the enterprise. - # @param [String] user_id - # The ID of the 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 [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 revoke_user_token(enterprise_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'enterprises/{enterpriseId}/users/{userId}/token' - command = make_simple_command(:delete, path, options) - command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['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 diff --git a/generated/google/apis/androidpublisher_v2.rb b/generated/google/apis/androidpublisher_v2.rb deleted file mode 100644 index 967b49c21..000000000 --- a/generated/google/apis/androidpublisher_v2.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/androidpublisher_v2/classes.rb b/generated/google/apis/androidpublisher_v2/classes.rb deleted file mode 100644 index 6b7e98512..000000000 --- a/generated/google/apis/androidpublisher_v2/classes.rb +++ /dev/null @@ -1,1374 +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 - include Google::Apis::Core::Hashable - - # Represents the binary payload of an APK. - # Corresponds to the JSON property `binary` - # @return [Google::Apis::AndroidpublisherV2::ApkBinary] - attr_accessor :binary - - # The version code of the APK, as specified in the APK's manifest file. - # Corresponds to the JSON property `versionCode` - # @return [Fixnum] - attr_accessor :version_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @binary = args[:binary] unless args[:binary].nil? - @version_code = args[:version_code] unless args[:version_code].nil? - end - end - - # Represents the binary payload of an APK. - class ApkBinary - include Google::Apis::Core::Hashable - - # A sha1 hash of the APK payload, encoded as a hex string and matching the - # output of the sha1sum command. - # Corresponds to the JSON property `sha1` - # @return [String] - attr_accessor :sha1 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sha1 = args[:sha1] unless args[:sha1].nil? - end - end - - # - class ApkListing - include Google::Apis::Core::Hashable - - # The language code, in BCP 47 format (eg "en-US"). - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # Describe what's new in your APK. - # Corresponds to the JSON property `recentChanges` - # @return [String] - attr_accessor :recent_changes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @language = args[:language] unless args[:language].nil? - @recent_changes = args[:recent_changes] unless args[:recent_changes].nil? - end - end - - # - class ListApkListingsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidpublisher#apkListingsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `listings` - # @return [Array] - attr_accessor :listings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @listings = args[:listings] unless args[:listings].nil? - end - end - - # - class ApksAddExternallyHostedRequest - include Google::Apis::Core::Hashable - - # Defines an APK available for this application that is hosted externally and - # not uploaded to Google Play. This function is only available to enterprises - # who are using Google Play for Work, and whos application is restricted to the - # enterprise private channel - # Corresponds to the JSON property `externallyHostedApk` - # @return [Google::Apis::AndroidpublisherV2::ExternallyHostedApk] - attr_accessor :externally_hosted_apk - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @externally_hosted_apk = args[:externally_hosted_apk] unless args[:externally_hosted_apk].nil? - end - end - - # - class ApksAddExternallyHostedResponse - include Google::Apis::Core::Hashable - - # Defines an APK available for this application that is hosted externally and - # not uploaded to Google Play. This function is only available to enterprises - # who are using Google Play for Work, and whos application is restricted to the - # enterprise private channel - # Corresponds to the JSON property `externallyHostedApk` - # @return [Google::Apis::AndroidpublisherV2::ExternallyHostedApk] - attr_accessor :externally_hosted_apk - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @externally_hosted_apk = args[:externally_hosted_apk] unless args[:externally_hosted_apk].nil? - end - end - - # - class ListApksResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `apks` - # @return [Array] - attr_accessor :apks - - # Identifies what kind of resource this is. Value: the fixed string " - # androidpublisher#apksListResponse". - # 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) - @apks = args[:apks] unless args[:apks].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class AppDetails - include Google::Apis::Core::Hashable - - # The user-visible support email for this app. - # Corresponds to the JSON property `contactEmail` - # @return [String] - attr_accessor :contact_email - - # The user-visible support telephone number for this app. - # Corresponds to the JSON property `contactPhone` - # @return [String] - attr_accessor :contact_phone - - # The user-visible website for this app. - # Corresponds to the JSON property `contactWebsite` - # @return [String] - attr_accessor :contact_website - - # Default language code, in BCP 47 format (eg "en-US"). - # Corresponds to the JSON property `defaultLanguage` - # @return [String] - attr_accessor :default_language - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contact_email = args[:contact_email] unless args[:contact_email].nil? - @contact_phone = args[:contact_phone] unless args[:contact_phone].nil? - @contact_website = args[:contact_website] unless args[:contact_website].nil? - @default_language = args[:default_language] unless args[:default_language].nil? - end - end - - # Represents an edit of an app. An edit allows clients to make multiple changes - # before committing them in one operation. - class AppEdit - include Google::Apis::Core::Hashable - - # The time at which the edit will expire and will be no longer valid for use in - # any subsequent API calls (encoded as seconds since the Epoch). - # Corresponds to the JSON property `expiryTimeSeconds` - # @return [String] - attr_accessor :expiry_time_seconds - - # The ID of the edit that can be used in subsequent API calls. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expiry_time_seconds = args[:expiry_time_seconds] unless args[:expiry_time_seconds].nil? - @id = args[:id] unless args[:id].nil? - end - end - - # An Entitlement resource indicates a user's current entitlement to an inapp - # item or subscription. - class Entitlement - include Google::Apis::Core::Hashable - - # This kind represents an entitlement object in the androidpublisher service. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The SKU of the product. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # The type of the inapp product. Possible values are: - # - In-app item: "inapp" - # - Subscription: "subs" - # Corresponds to the JSON property `productType` - # @return [String] - attr_accessor :product_type - - # The token which can be verified using the subscriptions or products API. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @product_type = args[:product_type] unless args[:product_type].nil? - @token = args[:token] unless args[:token].nil? - end - end - - # - class ListEntitlementsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::AndroidpublisherV2::PageInfo] - attr_accessor :page_info - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - # - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::AndroidpublisherV2::TokenPagination] - attr_accessor :token_pagination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_info = args[:page_info] unless args[:page_info].nil? - @resources = args[:resources] unless args[:resources].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - end - end - - # - class ExpansionFile - include Google::Apis::Core::Hashable - - # If set this field indicates that this APK has an Expansion File uploaded to it: - # this APK does not reference another APK's Expansion File. The field's value - # is the size of the uploaded Expansion File in bytes. - # Corresponds to the JSON property `fileSize` - # @return [String] - attr_accessor :file_size - - # If set this APK's Expansion File references another APK's Expansion File. The - # file_size field will not be set. - # Corresponds to the JSON property `referencesVersion` - # @return [Fixnum] - attr_accessor :references_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file_size = args[:file_size] unless args[:file_size].nil? - @references_version = args[:references_version] unless args[:references_version].nil? - end - end - - # - class UploadExpansionFilesResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `expansionFile` - # @return [Google::Apis::AndroidpublisherV2::ExpansionFile] - attr_accessor :expansion_file - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expansion_file = args[:expansion_file] unless args[:expansion_file].nil? - end - end - - # Defines an APK available for this application that is hosted externally and - # not uploaded to Google Play. This function is only available to enterprises - # who are using Google Play for Work, and whos application is restricted to the - # enterprise private channel - class ExternallyHostedApk - include Google::Apis::Core::Hashable - - # The application label. - # Corresponds to the JSON property `applicationLabel` - # @return [String] - attr_accessor :application_label - - # A certificate (or array of certificates if a certificate-chain is used) used - # to signed this APK, represented as a base64 encoded byte array. - # Corresponds to the JSON property `certificateBase64s` - # @return [Array] - attr_accessor :certificate_base64s - - # The URL at which the APK is hosted. This must be an https URL. - # Corresponds to the JSON property `externallyHostedUrl` - # @return [String] - attr_accessor :externally_hosted_url - - # The SHA1 checksum of this APK, represented as a base64 encoded byte array. - # Corresponds to the JSON property `fileSha1Base64` - # @return [String] - attr_accessor :file_sha1_base64 - - # The SHA256 checksum of this APK, represented as a base64 encoded byte array. - # Corresponds to the JSON property `fileSha256Base64` - # @return [String] - attr_accessor :file_sha256_base64 - - # The file size in bytes of this APK. - # Corresponds to the JSON property `fileSize` - # @return [String] - attr_accessor :file_size - - # The icon image from the APK, as a base64 encoded byte array. - # Corresponds to the JSON property `iconBase64` - # @return [String] - attr_accessor :icon_base64 - - # The maximum SDK supported by this APK (optional). - # Corresponds to the JSON property `maximumSdk` - # @return [Fixnum] - attr_accessor :maximum_sdk - - # The minimum SDK targeted by this APK. - # Corresponds to the JSON property `minimumSdk` - # @return [Fixnum] - attr_accessor :minimum_sdk - - # The native code environments supported by this APK (optional). - # Corresponds to the JSON property `nativeCodes` - # @return [Array] - attr_accessor :native_codes - - # The package name. - # Corresponds to the JSON property `packageName` - # @return [String] - attr_accessor :package_name - - # The features required by this APK (optional). - # Corresponds to the JSON property `usesFeatures` - # @return [Array] - attr_accessor :uses_features - - # The permissions requested by this APK. - # Corresponds to the JSON property `usesPermissions` - # @return [Array] - attr_accessor :uses_permissions - - # The version code of this APK. - # Corresponds to the JSON property `versionCode` - # @return [Fixnum] - attr_accessor :version_code - - # The version name of this APK. - # Corresponds to the JSON property `versionName` - # @return [String] - attr_accessor :version_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @application_label = args[:application_label] unless args[:application_label].nil? - @certificate_base64s = args[:certificate_base64s] unless args[:certificate_base64s].nil? - @externally_hosted_url = args[:externally_hosted_url] unless args[:externally_hosted_url].nil? - @file_sha1_base64 = args[:file_sha1_base64] unless args[:file_sha1_base64].nil? - @file_sha256_base64 = args[:file_sha256_base64] unless args[:file_sha256_base64].nil? - @file_size = args[:file_size] unless args[:file_size].nil? - @icon_base64 = args[:icon_base64] unless args[:icon_base64].nil? - @maximum_sdk = args[:maximum_sdk] unless args[:maximum_sdk].nil? - @minimum_sdk = args[:minimum_sdk] unless args[:minimum_sdk].nil? - @native_codes = args[:native_codes] unless args[:native_codes].nil? - @package_name = args[:package_name] unless args[:package_name].nil? - @uses_features = args[:uses_features] unless args[:uses_features].nil? - @uses_permissions = args[:uses_permissions] unless args[:uses_permissions].nil? - @version_code = args[:version_code] unless args[:version_code].nil? - @version_name = args[:version_name] unless args[:version_name].nil? - end - end - - # A permission used by this APK. - class ExternallyHostedApkUsesPermission - include Google::Apis::Core::Hashable - - # Optionally, the maximum SDK version for which the permission is required. - # Corresponds to the JSON property `maxSdkVersion` - # @return [Fixnum] - attr_accessor :max_sdk_version - - # The name of the permission requested. - # 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) - @max_sdk_version = args[:max_sdk_version] unless args[:max_sdk_version].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # - class Image - include Google::Apis::Core::Hashable - - # A unique id representing this image. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A sha1 hash of the image that was uploaded. - # Corresponds to the JSON property `sha1` - # @return [String] - attr_accessor :sha1 - - # A URL that will serve a preview of the image. - # 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) - @id = args[:id] unless args[:id].nil? - @sha1 = args[:sha1] unless args[:sha1].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # - class ImagesDeleteAllResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `deleted` - # @return [Array] - attr_accessor :deleted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deleted = args[:deleted] unless args[:deleted].nil? - end - end - - # - class ListImagesResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @images = args[:images] unless args[:images].nil? - end - end - - # - class UploadImagesResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `image` - # @return [Google::Apis::AndroidpublisherV2::Image] - attr_accessor :image - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @image = args[:image] unless args[:image].nil? - end - end - - # - class InAppProduct - include Google::Apis::Core::Hashable - - # The default language of the localized data, as defined by BCP 47. e.g. "en-US", - # "en-GB". - # Corresponds to the JSON property `defaultLanguage` - # @return [String] - attr_accessor :default_language - - # Default price cannot be zero. In-app products can never be free. Default price - # is always in the developer's Checkout merchant currency. - # Corresponds to the JSON property `defaultPrice` - # @return [Google::Apis::AndroidpublisherV2::Price] - attr_accessor :default_price - - # List of localized title and description data. - # Corresponds to the JSON property `listings` - # @return [Hash] - attr_accessor :listings - - # The package name of the parent app. - # Corresponds to the JSON property `packageName` - # @return [String] - attr_accessor :package_name - - # Prices per buyer region. None of these prices should be zero. In-app products - # can never be free. - # Corresponds to the JSON property `prices` - # @return [Hash] - attr_accessor :prices - - # Purchase type enum value. Unmodifiable after creation. - # Corresponds to the JSON property `purchaseType` - # @return [String] - attr_accessor :purchase_type - - # Definition of a season for a seasonal subscription. Can be defined only for - # yearly subscriptions. - # Corresponds to the JSON property `season` - # @return [Google::Apis::AndroidpublisherV2::Season] - attr_accessor :season - - # The stock-keeping-unit (SKU) of the product, unique within an app. - # Corresponds to the JSON property `sku` - # @return [String] - attr_accessor :sku - - # - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The period of the subscription (if any), i.e. period at which payments must - # happen. Defined as ISO 8601 duration, i.e. "P1M" for 1 month period. - # Corresponds to the JSON property `subscriptionPeriod` - # @return [String] - attr_accessor :subscription_period - - # Trial period, specified in ISO 8601 format. Acceptable values are anything - # between "P7D" (seven days) and "P999D" (999 days). Seasonal subscriptions - # cannot have a trial period. - # Corresponds to the JSON property `trialPeriod` - # @return [String] - attr_accessor :trial_period - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default_language = args[:default_language] unless args[:default_language].nil? - @default_price = args[:default_price] unless args[:default_price].nil? - @listings = args[:listings] unless args[:listings].nil? - @package_name = args[:package_name] unless args[:package_name].nil? - @prices = args[:prices] unless args[:prices].nil? - @purchase_type = args[:purchase_type] unless args[:purchase_type].nil? - @season = args[:season] unless args[:season].nil? - @sku = args[:sku] unless args[:sku].nil? - @status = args[:status] unless args[:status].nil? - @subscription_period = args[:subscription_period] unless args[:subscription_period].nil? - @trial_period = args[:trial_period] unless args[:trial_period].nil? - end - end - - # - class InAppProductListing - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # 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) - @description = args[:description] unless args[:description].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # - class InAppProductsBatchRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `entrys` - # @return [Array] - attr_accessor :entrys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entrys = args[:entrys] unless args[:entrys].nil? - end - end - - # - class InAppProductsBatchRequestEntry - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # - # Corresponds to the JSON property `inappproductsinsertrequest` - # @return [Google::Apis::AndroidpublisherV2::InsertInAppProductsRequest] - attr_accessor :inappproductsinsertrequest - - # - # Corresponds to the JSON property `inappproductsupdaterequest` - # @return [Google::Apis::AndroidpublisherV2::UpdateInAppProductsRequest] - attr_accessor :inappproductsupdaterequest - - # - # Corresponds to the JSON property `methodName` - # @return [String] - attr_accessor :method_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @inappproductsinsertrequest = args[:inappproductsinsertrequest] unless args[:inappproductsinsertrequest].nil? - @inappproductsupdaterequest = args[:inappproductsupdaterequest] unless args[:inappproductsupdaterequest].nil? - @method_name = args[:method_name] unless args[:method_name].nil? - end - end - - # - class InAppProductsBatchResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `entrys` - # @return [Array] - attr_accessor :entrys - - # Identifies what kind of resource this is. Value: the fixed string " - # androidpublisher#inappproductsBatchResponse". - # 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) - @entrys = args[:entrys] unless args[:entrys].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class InAppProductsBatchResponseEntry - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # - # Corresponds to the JSON property `inappproductsinsertresponse` - # @return [Google::Apis::AndroidpublisherV2::InsertInAppProductsResponse] - attr_accessor :inappproductsinsertresponse - - # - # Corresponds to the JSON property `inappproductsupdateresponse` - # @return [Google::Apis::AndroidpublisherV2::UpdateInAppProductsResponse] - attr_accessor :inappproductsupdateresponse - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @inappproductsinsertresponse = args[:inappproductsinsertresponse] unless args[:inappproductsinsertresponse].nil? - @inappproductsupdateresponse = args[:inappproductsupdateresponse] unless args[:inappproductsupdateresponse].nil? - end - end - - # - class InsertInAppProductsRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `inappproduct` - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - attr_accessor :inappproduct - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inappproduct = args[:inappproduct] unless args[:inappproduct].nil? - end - end - - # - class InsertInAppProductsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `inappproduct` - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - attr_accessor :inappproduct - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inappproduct = args[:inappproduct] unless args[:inappproduct].nil? - end - end - - # - class ListInAppProductsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `inappproduct` - # @return [Array] - attr_accessor :inappproduct - - # Identifies what kind of resource this is. Value: the fixed string " - # androidpublisher#inappproductsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::AndroidpublisherV2::PageInfo] - attr_accessor :page_info - - # - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::AndroidpublisherV2::TokenPagination] - attr_accessor :token_pagination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inappproduct = args[:inappproduct] unless args[:inappproduct].nil? - @kind = args[:kind] unless args[:kind].nil? - @page_info = args[:page_info] unless args[:page_info].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - end - end - - # - class UpdateInAppProductsRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `inappproduct` - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - attr_accessor :inappproduct - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inappproduct = args[:inappproduct] unless args[:inappproduct].nil? - end - end - - # - class UpdateInAppProductsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `inappproduct` - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - attr_accessor :inappproduct - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inappproduct = args[:inappproduct] unless args[:inappproduct].nil? - end - end - - # - class Listing - include Google::Apis::Core::Hashable - - # Full description of the app; this may be up to 4000 characters in length. - # Corresponds to the JSON property `fullDescription` - # @return [String] - attr_accessor :full_description - - # Language localization code (for example, "de-AT" for Austrian German). - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # Short description of the app (previously known as promo text); this may be up - # to 80 characters in length. - # Corresponds to the JSON property `shortDescription` - # @return [String] - attr_accessor :short_description - - # App's localized title. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL of a promotional YouTube video for the app. - # Corresponds to the JSON property `video` - # @return [String] - attr_accessor :video - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @full_description = args[:full_description] unless args[:full_description].nil? - @language = args[:language] unless args[:language].nil? - @short_description = args[:short_description] unless args[:short_description].nil? - @title = args[:title] unless args[:title].nil? - @video = args[:video] unless args[:video].nil? - end - end - - # - class ListListingsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidpublisher#listingsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `listings` - # @return [Array] - attr_accessor :listings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @listings = args[:listings] unless args[:listings].nil? - end - end - - # - class MonthDay - include Google::Apis::Core::Hashable - - # Day of a month, value in [1, 31] range. Valid range depends on the specified - # month. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day - - # Month of a year. e.g. 1 = JAN, 2 = FEB etc. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @day = args[:day] unless args[:day].nil? - @month = args[:month] unless args[:month].nil? - end - end - - # - class PageInfo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `resultPerPage` - # @return [Fixnum] - attr_accessor :result_per_page - - # - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @result_per_page = args[:result_per_page] unless args[:result_per_page].nil? - @start_index = args[:start_index] unless args[:start_index].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - end - end - - # - class Price - include Google::Apis::Core::Hashable - - # 3 letter Currency code, as defined by ISO 4217. - # Corresponds to the JSON property `currency` - # @return [String] - attr_accessor :currency - - # The price in millionths of the currency base unit represented as a string. - # Corresponds to the JSON property `priceMicros` - # @return [String] - attr_accessor :price_micros - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @currency = args[:currency] unless args[:currency].nil? - @price_micros = args[:price_micros] unless args[:price_micros].nil? - end - end - - # A ProductPurchase resource indicates the status of a user's inapp product - # purchase. - class ProductPurchase - include Google::Apis::Core::Hashable - - # The consumption state of the inapp product. Possible values are: - # - Yet to be consumed - # - Consumed - # Corresponds to the JSON property `consumptionState` - # @return [Fixnum] - attr_accessor :consumption_state - - # A developer-specified string that contains supplemental information about an - # order. - # Corresponds to the JSON property `developerPayload` - # @return [String] - attr_accessor :developer_payload - - # This kind represents an inappPurchase object in the androidpublisher service. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The purchase state of the order. Possible values are: - # - Purchased - # - Cancelled - # Corresponds to the JSON property `purchaseState` - # @return [Fixnum] - attr_accessor :purchase_state - - # The time the product was purchased, in milliseconds since the epoch (Jan 1, - # 1970). - # Corresponds to the JSON property `purchaseTimeMillis` - # @return [String] - attr_accessor :purchase_time_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @consumption_state = args[:consumption_state] unless args[:consumption_state].nil? - @developer_payload = args[:developer_payload] unless args[:developer_payload].nil? - @kind = args[:kind] unless args[:kind].nil? - @purchase_state = args[:purchase_state] unless args[:purchase_state].nil? - @purchase_time_millis = args[:purchase_time_millis] unless args[:purchase_time_millis].nil? - end - end - - # - class Season - include Google::Apis::Core::Hashable - - # Inclusive end date of the recurrence period. - # Corresponds to the JSON property `end` - # @return [Google::Apis::AndroidpublisherV2::MonthDay] - attr_accessor :end - - # Inclusive start date of the recurrence period. - # Corresponds to the JSON property `start` - # @return [Google::Apis::AndroidpublisherV2::MonthDay] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # A SubscriptionDeferralInfo contains the data needed to defer a subscription - # purchase to a future expiry time. - class SubscriptionDeferralInfo - include Google::Apis::Core::Hashable - - # The desired next expiry time for the subscription in milliseconds since Epoch. - # The given time must be after the current expiry time for the subscription. - # Corresponds to the JSON property `desiredExpiryTimeMillis` - # @return [String] - attr_accessor :desired_expiry_time_millis - - # The expected expiry time for the subscription. If the current expiry time for - # the subscription is not the value specified here, the deferral will not occur. - # Corresponds to the JSON property `expectedExpiryTimeMillis` - # @return [String] - attr_accessor :expected_expiry_time_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @desired_expiry_time_millis = args[:desired_expiry_time_millis] unless args[:desired_expiry_time_millis].nil? - @expected_expiry_time_millis = args[:expected_expiry_time_millis] unless args[:expected_expiry_time_millis].nil? - end - end - - # A SubscriptionPurchase resource indicates the status of a user's subscription - # purchase. - class SubscriptionPurchase - include Google::Apis::Core::Hashable - - # Whether the subscription will automatically be renewed when it reaches its - # current expiry time. - # Corresponds to the JSON property `autoRenewing` - # @return [Boolean] - attr_accessor :auto_renewing - alias_method :auto_renewing?, :auto_renewing - - # Time at which the subscription will expire, in milliseconds since Epoch. - # Corresponds to the JSON property `expiryTimeMillis` - # @return [String] - attr_accessor :expiry_time_millis - - # This kind represents a subscriptionPurchase object in the androidpublisher - # service. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Time at which the subscription was granted, in milliseconds since Epoch. - # Corresponds to the JSON property `startTimeMillis` - # @return [String] - attr_accessor :start_time_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_renewing = args[:auto_renewing] unless args[:auto_renewing].nil? - @expiry_time_millis = args[:expiry_time_millis] unless args[:expiry_time_millis].nil? - @kind = args[:kind] unless args[:kind].nil? - @start_time_millis = args[:start_time_millis] unless args[:start_time_millis].nil? - end - end - - # - class DeferSubscriptionPurchasesRequest - include Google::Apis::Core::Hashable - - # A SubscriptionDeferralInfo contains the data needed to defer a subscription - # purchase to a future expiry time. - # Corresponds to the JSON property `deferralInfo` - # @return [Google::Apis::AndroidpublisherV2::SubscriptionDeferralInfo] - attr_accessor :deferral_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deferral_info = args[:deferral_info] unless args[:deferral_info].nil? - end - end - - # - class DeferSubscriptionPurchasesResponse - include Google::Apis::Core::Hashable - - # The new expiry time for the subscription in milliseconds since the Epoch. - # Corresponds to the JSON property `newExpiryTimeMillis` - # @return [String] - attr_accessor :new_expiry_time_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_expiry_time_millis = args[:new_expiry_time_millis] unless args[:new_expiry_time_millis].nil? - end - end - - # - class Testers - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `googleGroups` - # @return [Array] - attr_accessor :google_groups - - # - # Corresponds to the JSON property `googlePlusCommunities` - # @return [Array] - attr_accessor :google_plus_communities - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @google_groups = args[:google_groups] unless args[:google_groups].nil? - @google_plus_communities = args[:google_plus_communities] unless args[:google_plus_communities].nil? - end - end - - # - class TokenPagination - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # 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) - @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 - - # - class Track - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `track` - # @return [String] - attr_accessor :track - - # - # Corresponds to the JSON property `userFraction` - # @return [Float] - attr_accessor :user_fraction - - # - # Corresponds to the JSON property `versionCodes` - # @return [Array] - attr_accessor :version_codes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @track = args[:track] unless args[:track].nil? - @user_fraction = args[:user_fraction] unless args[:user_fraction].nil? - @version_codes = args[:version_codes] unless args[:version_codes].nil? - end - end - - # - class ListTracksResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # androidpublisher#tracksListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `tracks` - # @return [Array] - attr_accessor :tracks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @tracks = args[:tracks] unless args[:tracks].nil? - end - end - end - end -end diff --git a/generated/google/apis/androidpublisher_v2/representations.rb b/generated/google/apis/androidpublisher_v2/representations.rb deleted file mode 100644 index de54f13cd..000000000 --- a/generated/google/apis/androidpublisher_v2/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/androidpublisher_v2/service.rb b/generated/google/apis/androidpublisher_v2/service.rb deleted file mode 100644 index 50849b4d1..000000000 --- a/generated/google/apis/androidpublisher_v2/service.rb +++ /dev/null @@ -1,2390 +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 AndroidpublisherV2 - # Google Play Developer API - # - # Lets Android application developers access their Google Play accounts. - # - # @example - # require 'google/apis/androidpublisher_v2' - # - # Androidpublisher = Google::Apis::AndroidpublisherV2 # Alias the module - # service = Androidpublisher::AndroidPublisherService.new - # - # @see https://developers.google.com/android-publisher - class AndroidPublisherService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - attr_accessor :quota_user - - # @return [String] - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'androidpublisher/v2/applications/') - end - - # Commits/applies the changes made in this edit back to the app. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::AppEdit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::AppEdit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def commit_edit(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}:commit' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::AppEdit::Representation - command.response_class = Google::Apis::AndroidpublisherV2::AppEdit - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 an edit for an app. Creating a new edit will automatically delete any - # of your previous edits so this method need only be called if you want to - # preemptively abandon an edit. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_edit(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}' - command = make_simple_command(:delete, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 information about the edit specified. Calls will fail if the edit is - # no long active (e.g. has been deleted, superseded or expired). - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::AppEdit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::AppEdit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_edit(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::AppEdit::Representation - command.response_class = Google::Apis::AndroidpublisherV2::AppEdit - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 new edit for an app, populated with the app's current state. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [Google::Apis::AndroidpublisherV2::AppEdit] app_edit_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::AndroidpublisherV2::AppEdit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::AppEdit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_edit(package_name, app_edit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::AppEdit::Representation - command.request_object = app_edit_object - command.response_representation = Google::Apis::AndroidpublisherV2::AppEdit::Representation - command.response_class = Google::Apis::AndroidpublisherV2::AppEdit - command.params['packageName'] = package_name unless package_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Checks that the edit can be successfully committed. The edit's changes are not - # applied to the live app. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::AppEdit] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::AppEdit] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def validate_edit(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}:validate' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::AppEdit::Representation - command.response_class = Google::Apis::AndroidpublisherV2::AppEdit - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 APK-specific localized listing for a specified APK and language - # code. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The APK version code whose APK-specific listings should be read or modified. - # @param [String] language - # The language code (a BCP-47 language tag) of the APK-specific localized - # listing to read or modify. For example, to select Austrian German, pass "de-AT" - # . - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_apk_listing(package_name, edit_id, apk_version_code, language, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}' - command = make_simple_command(:delete, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['language'] = language unless language.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 all the APK-specific localized listings for a specified APK. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The APK version code whose APK-specific listings should be read or modified. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_all_apk_listings(package_name, edit_id, apk_version_code, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/listings' - command = make_simple_command(:delete, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.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 - - # Fetches the APK-specific localized listing for a specified APK and language - # code. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The APK version code whose APK-specific listings should be read or modified. - # @param [String] language - # The language code (a BCP-47 language tag) of the APK-specific localized - # listing to read or modify. For example, to select Austrian German, pass "de-AT" - # . - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ApkListing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ApkListing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_apk_listing(package_name, edit_id, apk_version_code, language, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ApkListing::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ApkListing - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['language'] = language unless language.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 APK-specific localized listings for a specified APK. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The APK version code whose APK-specific listings should be read or modified. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ListApkListingsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ListApkListingsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_apk_listings(package_name, edit_id, apk_version_code, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/listings' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ListApkListingsResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ListApkListingsResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.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 or creates the APK-specific localized listing for a specified APK and - # language code. This method supports patch semantics. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The APK version code whose APK-specific listings should be read or modified. - # @param [String] language - # The language code (a BCP-47 language tag) of the APK-specific localized - # listing to read or modify. For example, to select Austrian German, pass "de-AT" - # . - # @param [Google::Apis::AndroidpublisherV2::ApkListing] apk_listing_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::AndroidpublisherV2::ApkListing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ApkListing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_apk_listing(package_name, edit_id, apk_version_code, language, apk_listing_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::ApkListing::Representation - command.request_object = apk_listing_object - command.response_representation = Google::Apis::AndroidpublisherV2::ApkListing::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ApkListing - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['language'] = language unless language.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 or creates the APK-specific localized listing for a specified APK and - # language code. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The APK version code whose APK-specific listings should be read or modified. - # @param [String] language - # The language code (a BCP-47 language tag) of the APK-specific localized - # listing to read or modify. For example, to select Austrian German, pass "de-AT" - # . - # @param [Google::Apis::AndroidpublisherV2::ApkListing] apk_listing_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::AndroidpublisherV2::ApkListing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ApkListing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_apk_listing(package_name, edit_id, apk_version_code, language, apk_listing_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::ApkListing::Representation - command.request_object = apk_listing_object - command.response_representation = Google::Apis::AndroidpublisherV2::ApkListing::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ApkListing - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['language'] = language unless language.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 new APK without uploading the APK itself to Google Play, instead - # hosting the APK at a specified URL. This function is only available to - # enterprises using Google Play for Work whose application is configured to - # restrict distribution to the enterprise domain. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Google::Apis::AndroidpublisherV2::ApksAddExternallyHostedRequest] apks_add_externally_hosted_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::AndroidpublisherV2::ApksAddExternallyHostedResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ApksAddExternallyHostedResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_externally_hosted_apk(package_name, edit_id, apks_add_externally_hosted_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/externallyHosted' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::ApksAddExternallyHostedRequest::Representation - command.request_object = apks_add_externally_hosted_request_object - command.response_representation = Google::Apis::AndroidpublisherV2::ApksAddExternallyHostedResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ApksAddExternallyHostedResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 - - # - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ListApksResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ListApksResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_apks(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ListApksResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ListApksResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 - - # - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidpublisherV2::Apk] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Apk] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_apk(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::AndroidpublisherV2::Apk::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Apk - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 - - # Fetches app details for this edit. This includes the default language and - # developer support contact information. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::AppDetails] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::AppDetails] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_detail(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/details' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::AppDetails::Representation - command.response_class = Google::Apis::AndroidpublisherV2::AppDetails - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 app details for this edit. This method supports patch semantics. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Google::Apis::AndroidpublisherV2::AppDetails] app_details_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::AndroidpublisherV2::AppDetails] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::AppDetails] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_detail(package_name, edit_id, app_details_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/details' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::AppDetails::Representation - command.request_object = app_details_object - command.response_representation = Google::Apis::AndroidpublisherV2::AppDetails::Representation - command.response_class = Google::Apis::AndroidpublisherV2::AppDetails - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 app details for this edit. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Google::Apis::AndroidpublisherV2::AppDetails] app_details_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::AndroidpublisherV2::AppDetails] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::AppDetails] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_detail(package_name, edit_id, app_details_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/details' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::AppDetails::Representation - command.request_object = app_details_object - command.response_representation = Google::Apis::AndroidpublisherV2::AppDetails::Representation - command.response_class = Google::Apis::AndroidpublisherV2::AppDetails - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 - - # Fetches the Expansion File configuration for the APK specified. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The version code of the APK whose Expansion File configuration is being read - # or modified. - # @param [String] expansion_file_type - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ExpansionFile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ExpansionFile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_expansion_file(package_name, edit_id, apk_version_code, expansion_file_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ExpansionFile::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ExpansionFile - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['expansionFileType'] = expansion_file_type unless expansion_file_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the APK's Expansion File configuration to reference another APK's - # Expansion Files. To add a new Expansion File use the Upload method. This - # method supports patch semantics. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The version code of the APK whose Expansion File configuration is being read - # or modified. - # @param [String] expansion_file_type - # @param [Google::Apis::AndroidpublisherV2::ExpansionFile] expansion_file_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::AndroidpublisherV2::ExpansionFile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ExpansionFile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_expansion_file(package_name, edit_id, apk_version_code, expansion_file_type, expansion_file_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::ExpansionFile::Representation - command.request_object = expansion_file_object - command.response_representation = Google::Apis::AndroidpublisherV2::ExpansionFile::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ExpansionFile - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['expansionFileType'] = expansion_file_type unless expansion_file_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the APK's Expansion File configuration to reference another APK's - # Expansion Files. To add a new Expansion File use the Upload method. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The version code of the APK whose Expansion File configuration is being read - # or modified. - # @param [String] expansion_file_type - # @param [Google::Apis::AndroidpublisherV2::ExpansionFile] expansion_file_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::AndroidpublisherV2::ExpansionFile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ExpansionFile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_expansion_file(package_name, edit_id, apk_version_code, expansion_file_type, expansion_file_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::ExpansionFile::Representation - command.request_object = expansion_file_object - command.response_representation = Google::Apis::AndroidpublisherV2::ExpansionFile::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ExpansionFile - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['expansionFileType'] = expansion_file_type unless expansion_file_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Uploads and attaches a new Expansion File to the APK specified. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [Fixnum] apk_version_code - # The version code of the APK whose Expansion File configuration is being read - # or modified. - # @param [String] expansion_file_type - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidpublisherV2::UploadExpansionFilesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::UploadExpansionFilesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_expansion_file(package_name, edit_id, apk_version_code, expansion_file_type, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/apks/{apkVersionCode}/expansionFiles/{expansionFileType}' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::AndroidpublisherV2::UploadExpansionFilesResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::UploadExpansionFilesResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['apkVersionCode'] = apk_version_code unless apk_version_code.nil? - command.params['expansionFileType'] = expansion_file_type unless expansion_file_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the image (specified by id) from the edit. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing whose - # images are to read or modified. For example, to select Austrian German, pass " - # de-AT". - # @param [String] image_type - # @param [String] image_id - # Unique identifier an image within the set of images attached to this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_image(package_name, edit_id, language, image_type, image_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}/{imageType}/{imageId}' - command = make_simple_command(:delete, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.nil? - command.params['imageType'] = image_type unless image_type.nil? - command.params['imageId'] = image_id unless image_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 all images for the specified language and image type. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing whose - # images are to read or modified. For example, to select Austrian German, pass " - # de-AT". - # @param [String] image_type - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ImagesDeleteAllResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ImagesDeleteAllResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_all_images(package_name, edit_id, language, image_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}/{imageType}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ImagesDeleteAllResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ImagesDeleteAllResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.nil? - command.params['imageType'] = image_type unless image_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all images for the specified language and image type. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing whose - # images are to read or modified. For example, to select Austrian German, pass " - # de-AT". - # @param [String] image_type - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ListImagesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ListImagesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_images(package_name, edit_id, language, image_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}/{imageType}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ListImagesResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ListImagesResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.nil? - command.params['imageType'] = image_type unless image_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Uploads a new image and adds it to the list of images for the specified - # language and image type. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing whose - # images are to read or modified. For example, to select Austrian German, pass " - # de-AT". - # @param [String] image_type - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidpublisherV2::UploadImagesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::UploadImagesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_image(package_name, edit_id, language, image_type, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}/{imageType}' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::AndroidpublisherV2::UploadImagesResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::UploadImagesResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.nil? - command.params['imageType'] = image_type unless image_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the specified localized store listing from an edit. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing to read or - # modify. For example, to select Austrian German, pass "de-AT". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_listing(package_name, edit_id, language, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}' - command = make_simple_command(:delete, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.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 all localized listings from an edit. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_all_listings(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings' - command = make_simple_command(:delete, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 - - # Fetches information about a localized store listing. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing to read or - # modify. For example, to select Austrian German, pass "de-AT". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::Listing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Listing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_listing(package_name, edit_id, language, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::Listing::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Listing - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.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 all of the localized store listings attached to this edit. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ListListingsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ListListingsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_listings(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ListListingsResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ListListingsResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 or updates a localized store listing. This method supports patch - # semantics. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing to read or - # modify. For example, to select Austrian German, pass "de-AT". - # @param [Google::Apis::AndroidpublisherV2::Listing] listing_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::AndroidpublisherV2::Listing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Listing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_listing(package_name, edit_id, language, listing_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::Listing::Representation - command.request_object = listing_object - command.response_representation = Google::Apis::AndroidpublisherV2::Listing::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Listing - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.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 or updates a localized store listing. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] language - # The language code (a BCP-47 language tag) of the localized listing to read or - # modify. For example, to select Austrian German, pass "de-AT". - # @param [Google::Apis::AndroidpublisherV2::Listing] listing_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::AndroidpublisherV2::Listing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Listing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_listing(package_name, edit_id, language, listing_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/listings/{language}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::Listing::Representation - command.request_object = listing_object - command.response_representation = Google::Apis::AndroidpublisherV2::Listing::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Listing - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['language'] = language unless language.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] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] track - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::Testers] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Testers] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tester(package_name, edit_id, track, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/testers/{track}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::Testers::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Testers - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['track'] = track unless track.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] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] track - # @param [Google::Apis::AndroidpublisherV2::Testers] testers_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::AndroidpublisherV2::Testers] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Testers] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tester(package_name, edit_id, track, testers_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/testers/{track}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::Testers::Representation - command.request_object = testers_object - command.response_representation = Google::Apis::AndroidpublisherV2::Testers::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Testers - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['track'] = track unless track.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] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] track - # @param [Google::Apis::AndroidpublisherV2::Testers] testers_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::AndroidpublisherV2::Testers] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Testers] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tester(package_name, edit_id, track, testers_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/testers/{track}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::Testers::Representation - command.request_object = testers_object - command.response_representation = Google::Apis::AndroidpublisherV2::Testers::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Testers - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['track'] = track unless track.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 - - # Fetches the track configuration for the specified track type. Includes the APK - # version codes that are in this track. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] track - # The track type to read or modify. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidpublisherV2::Track] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Track] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_track(package_name, edit_id, track, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/tracks/{track}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::Track::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Track - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['track'] = track unless track.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 track configurations for this edit. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::ListTracksResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ListTracksResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tracks(package_name, edit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/tracks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ListTracksResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ListTracksResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_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 track configuration for the specified track type. When halted, the - # rollout track cannot be updated without adding new APKs, and adding new APKs - # will cause it to resume. This method supports patch semantics. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] track - # The track type to read or modify. - # @param [Google::Apis::AndroidpublisherV2::Track] track_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::AndroidpublisherV2::Track] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Track] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_track(package_name, edit_id, track, track_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/tracks/{track}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::Track::Representation - command.request_object = track_object - command.response_representation = Google::Apis::AndroidpublisherV2::Track::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Track - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['track'] = track unless track.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 track configuration for the specified track type. When halted, the - # rollout track cannot be updated without adding new APKs, and adding new APKs - # will cause it to resume. - # @param [String] package_name - # Unique identifier for the Android app that is being updated; for example, "com. - # spiffygame". - # @param [String] edit_id - # Unique identifier for this edit. - # @param [String] track - # The track type to read or modify. - # @param [Google::Apis::AndroidpublisherV2::Track] track_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::AndroidpublisherV2::Track] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::Track] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_track(package_name, edit_id, track, track_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/edits/{editId}/tracks/{track}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::Track::Representation - command.request_object = track_object - command.response_representation = Google::Apis::AndroidpublisherV2::Track::Representation - command.response_class = Google::Apis::AndroidpublisherV2::Track - command.params['packageName'] = package_name unless package_name.nil? - command.params['editId'] = edit_id unless edit_id.nil? - command.params['track'] = track unless track.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the user's current inapp item or subscription entitlements - # @param [String] package_name - # The package name of the application the inapp product was sold in (for example, - # 'com.some.thing'). - # @param [Fixnum] max_results - # @param [String] product_id - # The product id of the inapp product (for example, 'sku1'). This can be used to - # restrict the result set. - # @param [Fixnum] start_index - # @param [String] 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::AndroidpublisherV2::ListEntitlementsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ListEntitlementsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_entitlements(package_name, max_results: nil, product_id: nil, start_index: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/entitlements' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ListEntitlementsResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ListEntitlementsResponse - command.params['packageName'] = package_name unless package_name.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['productId'] = product_id unless product_id.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # - # @param [Google::Apis::AndroidpublisherV2::InAppProductsBatchRequest] in_app_products_batch_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidpublisherV2::InAppProductsBatchResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::InAppProductsBatchResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_in_app_products(in_app_products_batch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'inappproducts/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::InAppProductsBatchRequest::Representation - command.request_object = in_app_products_batch_request_object - command.response_representation = Google::Apis::AndroidpublisherV2::InAppProductsBatchResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::InAppProductsBatchResponse - 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 in-app product for an app. - # @param [String] package_name - # Unique identifier for the Android app with the in-app product; for example, " - # com.spiffygame". - # @param [String] sku - # Unique identifier for the in-app product. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_in_app_product(package_name, sku, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/inappproducts/{sku}' - command = make_simple_command(:delete, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['sku'] = sku unless sku.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 information about the in-app product specified. - # @param [String] package_name - # @param [String] sku - # Unique identifier for the in-app product. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::InAppProduct] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_in_app_product(package_name, sku, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/inappproducts/{sku}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::InAppProduct::Representation - command.response_class = Google::Apis::AndroidpublisherV2::InAppProduct - command.params['packageName'] = package_name unless package_name.nil? - command.params['sku'] = sku unless sku.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 new in-app product for an app. - # @param [String] package_name - # Unique identifier for the Android app; for example, "com.spiffygame". - # @param [Google::Apis::AndroidpublisherV2::InAppProduct] in_app_product_object - # @param [Boolean] auto_convert_missing_prices - # If true the prices for all regions targeted by the parent app that don't have - # a price specified for this in-app product will be auto converted to the target - # currency based on the default price. Defaults to false. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::InAppProduct] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_in_app_product(package_name, in_app_product_object = nil, auto_convert_missing_prices: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/inappproducts' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::InAppProduct::Representation - command.request_object = in_app_product_object - command.response_representation = Google::Apis::AndroidpublisherV2::InAppProduct::Representation - command.response_class = Google::Apis::AndroidpublisherV2::InAppProduct - command.params['packageName'] = package_name unless package_name.nil? - command.query['autoConvertMissingPrices'] = auto_convert_missing_prices unless auto_convert_missing_prices.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all the in-app products for an Android app, both subscriptions and - # managed in-app products.. - # @param [String] package_name - # Unique identifier for the Android app with in-app products; for example, "com. - # spiffygame". - # @param [Fixnum] max_results - # @param [Fixnum] start_index - # @param [String] 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::AndroidpublisherV2::ListInAppProductsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ListInAppProductsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_in_app_products(package_name, max_results: nil, start_index: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/inappproducts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ListInAppProductsResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ListInAppProductsResponse - command.params['packageName'] = package_name unless package_name.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the details of an in-app product. This method supports patch semantics. - # @param [String] package_name - # Unique identifier for the Android app with the in-app product; for example, " - # com.spiffygame". - # @param [String] sku - # Unique identifier for the in-app product. - # @param [Google::Apis::AndroidpublisherV2::InAppProduct] in_app_product_object - # @param [Boolean] auto_convert_missing_prices - # If true the prices for all regions targeted by the parent app that don't have - # a price specified for this in-app product will be auto converted to the target - # currency based on the default price. Defaults to false. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::InAppProduct] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_in_app_product(package_name, sku, in_app_product_object = nil, auto_convert_missing_prices: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/inappproducts/{sku}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::InAppProduct::Representation - command.request_object = in_app_product_object - command.response_representation = Google::Apis::AndroidpublisherV2::InAppProduct::Representation - command.response_class = Google::Apis::AndroidpublisherV2::InAppProduct - command.params['packageName'] = package_name unless package_name.nil? - command.params['sku'] = sku unless sku.nil? - command.query['autoConvertMissingPrices'] = auto_convert_missing_prices unless auto_convert_missing_prices.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 details of an in-app product. - # @param [String] package_name - # Unique identifier for the Android app with the in-app product; for example, " - # com.spiffygame". - # @param [String] sku - # Unique identifier for the in-app product. - # @param [Google::Apis::AndroidpublisherV2::InAppProduct] in_app_product_object - # @param [Boolean] auto_convert_missing_prices - # If true the prices for all regions targeted by the parent app that don't have - # a price specified for this in-app product will be auto converted to the target - # currency based on the default price. Defaults to false. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::AndroidpublisherV2::InAppProduct] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::InAppProduct] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_in_app_product(package_name, sku, in_app_product_object = nil, auto_convert_missing_prices: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/inappproducts/{sku}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::InAppProduct::Representation - command.request_object = in_app_product_object - command.response_representation = Google::Apis::AndroidpublisherV2::InAppProduct::Representation - command.response_class = Google::Apis::AndroidpublisherV2::InAppProduct - command.params['packageName'] = package_name unless package_name.nil? - command.params['sku'] = sku unless sku.nil? - command.query['autoConvertMissingPrices'] = auto_convert_missing_prices unless auto_convert_missing_prices.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Checks the purchase and consumption status of an inapp item. - # @param [String] package_name - # The package name of the application the inapp product was sold in (for example, - # 'com.some.thing'). - # @param [String] product_id - # The inapp product SKU (for example, 'com.some.thing.inapp1'). - # @param [String] token - # The token provided to the user's device when the inapp product was purchased. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidpublisherV2::ProductPurchase] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::ProductPurchase] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_purchase_product(package_name, product_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/purchases/products/{productId}/tokens/{token}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::ProductPurchase::Representation - command.response_class = Google::Apis::AndroidpublisherV2::ProductPurchase - command.params['packageName'] = package_name unless package_name.nil? - command.params['productId'] = product_id unless product_id.nil? - command.params['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Cancels a user's subscription purchase. The subscription remains valid until - # its expiration time. - # @param [String] package_name - # The package name of the application for which this subscription was purchased ( - # for example, 'com.some.thing'). - # @param [String] subscription_id - # The purchased subscription ID (for example, 'monthly001'). - # @param [String] token - # The token provided to the user's device when the subscription was purchased. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_purchase_subscription(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:cancel' - command = make_simple_command(:post, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.params['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Defers a user's subscription purchase until a specified future expiration time. - # @param [String] package_name - # The package name of the application for which this subscription was purchased ( - # for example, 'com.some.thing'). - # @param [String] subscription_id - # The purchased subscription ID (for example, 'monthly001'). - # @param [String] token - # The token provided to the user's device when the subscription was purchased. - # @param [Google::Apis::AndroidpublisherV2::DeferSubscriptionPurchasesRequest] defer_subscription_purchases_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::AndroidpublisherV2::DeferSubscriptionPurchasesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::DeferSubscriptionPurchasesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def defer_purchase_subscription(package_name, subscription_id, token, defer_subscription_purchases_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:defer' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::AndroidpublisherV2::DeferSubscriptionPurchasesRequest::Representation - command.request_object = defer_subscription_purchases_request_object - command.response_representation = Google::Apis::AndroidpublisherV2::DeferSubscriptionPurchasesResponse::Representation - command.response_class = Google::Apis::AndroidpublisherV2::DeferSubscriptionPurchasesResponse - command.params['packageName'] = package_name unless package_name.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.params['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Checks whether a user's subscription purchase is valid and returns its expiry - # time. - # @param [String] package_name - # The package name of the application for which this subscription was purchased ( - # for example, 'com.some.thing'). - # @param [String] subscription_id - # The purchased subscription ID (for example, 'monthly001'). - # @param [String] token - # The token provided to the user's device when the subscription was purchased. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AndroidpublisherV2::SubscriptionPurchase] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AndroidpublisherV2::SubscriptionPurchase] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_purchase_subscription(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::AndroidpublisherV2::SubscriptionPurchase::Representation - command.response_class = Google::Apis::AndroidpublisherV2::SubscriptionPurchase - command.params['packageName'] = package_name unless package_name.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.params['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Refunds a user's subscription purchase, but the subscription remains valid - # until its expiration time and it will continue to recur. - # @param [String] package_name - # The package name of the application for which this subscription was purchased ( - # for example, 'com.some.thing'). - # @param [String] subscription_id - # The purchased subscription ID (for example, 'monthly001'). - # @param [String] token - # The token provided to the user's device when the subscription was purchased. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def refund_purchase_subscription(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:refund' - command = make_simple_command(:post, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.params['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Refunds and immediately revokes a user's subscription purchase. Access to the - # subscription will be terminated immediately and it will stop recurring. - # @param [String] package_name - # The package name of the application for which this subscription was purchased ( - # for example, 'com.some.thing'). - # @param [String] subscription_id - # The purchased subscription ID (for example, 'monthly001'). - # @param [String] token - # The token provided to the user's device when the subscription was purchased. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def revoke_purchase_subscription(package_name, subscription_id, token, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:revoke' - command = make_simple_command(:post, path, options) - command.params['packageName'] = package_name unless package_name.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.params['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - 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 diff --git a/generated/google/apis/appsactivity_v1.rb b/generated/google/apis/appsactivity_v1.rb deleted file mode 100644 index dab295b88..000000000 --- a/generated/google/apis/appsactivity_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/appsactivity_v1/classes.rb b/generated/google/apis/appsactivity_v1/classes.rb deleted file mode 100644 index a3bf20c3a..000000000 --- a/generated/google/apis/appsactivity_v1/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - 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] - attr_accessor :added_parents - - # The removed parent(s). - # Corresponds to the JSON property `removedParents` - # @return [Array] - 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] - attr_accessor :added_permissions - - # Lists all Permission objects removed. - # Corresponds to the JSON property `removedPermissions` - # @return [Array] - 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 diff --git a/generated/google/apis/appsactivity_v1/representations.rb b/generated/google/apis/appsactivity_v1/representations.rb deleted file mode 100644 index 31b609079..000000000 --- a/generated/google/apis/appsactivity_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/appsactivity_v1/service.rb b/generated/google/apis/appsactivity_v1/service.rb deleted file mode 100644 index 9a9850ef8..000000000 --- a/generated/google/apis/appsactivity_v1/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/appstate_v1.rb b/generated/google/apis/appstate_v1.rb deleted file mode 100644 index 091114857..000000000 --- a/generated/google/apis/appstate_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/appstate_v1/classes.rb b/generated/google/apis/appstate_v1/classes.rb deleted file mode 100644 index 4d22ee0d7..000000000 --- a/generated/google/apis/appstate_v1/classes.rb +++ /dev/null @@ -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] - 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 diff --git a/generated/google/apis/appstate_v1/representations.rb b/generated/google/apis/appstate_v1/representations.rb deleted file mode 100644 index c1d7745a1..000000000 --- a/generated/google/apis/appstate_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/appstate_v1/service.rb b/generated/google/apis/appstate_v1/service.rb deleted file mode 100644 index 160bde640..000000000 --- a/generated/google/apis/appstate_v1/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/autoscaler_v1beta2.rb b/generated/google/apis/autoscaler_v1beta2.rb deleted file mode 100644 index dc22b2e84..000000000 --- a/generated/google/apis/autoscaler_v1beta2.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/autoscaler_v1beta2/classes.rb b/generated/google/apis/autoscaler_v1beta2/classes.rb deleted file mode 100644 index 87dfaa87f..000000000 --- a/generated/google/apis/autoscaler_v1beta2/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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 diff --git a/generated/google/apis/autoscaler_v1beta2/representations.rb b/generated/google/apis/autoscaler_v1beta2/representations.rb deleted file mode 100644 index b4ac163fa..000000000 --- a/generated/google/apis/autoscaler_v1beta2/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/autoscaler_v1beta2/service.rb b/generated/google/apis/autoscaler_v1beta2/service.rb deleted file mode 100644 index 2ede2f782..000000000 --- a/generated/google/apis/autoscaler_v1beta2/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/bigquery_v2.rb b/generated/google/apis/bigquery_v2.rb deleted file mode 100644 index f639f80a8..000000000 --- a/generated/google/apis/bigquery_v2.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/bigquery_v2/classes.rb b/generated/google/apis/bigquery_v2/classes.rb deleted file mode 100644 index 0c4292d69..000000000 --- a/generated/google/apis/bigquery_v2/classes.rb +++ /dev/null @@ -1,2249 +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 - include Google::Apis::Core::Hashable - - # [Optional] Indicates if BigQuery should accept rows that are missing trailing - # optional columns. If true, BigQuery treats missing trailing columns as null - # values. If false, records with missing trailing columns are treated as bad - # records, and if there are too many bad records, an invalid error is returned - # in the job result. The default value is false. - # Corresponds to the JSON property `allowJaggedRows` - # @return [Boolean] - attr_accessor :allow_jagged_rows - alias_method :allow_jagged_rows?, :allow_jagged_rows - - # [Optional] Indicates if BigQuery should allow quoted data sections that - # contain newline characters in a CSV file. The default value is false. - # Corresponds to the JSON property `allowQuotedNewlines` - # @return [Boolean] - attr_accessor :allow_quoted_newlines - alias_method :allow_quoted_newlines?, :allow_quoted_newlines - - # [Optional] The character encoding of the data. The supported values are UTF-8 - # or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the - # raw, binary data has been split using the values of the quote and - # fieldDelimiter properties. - # Corresponds to the JSON property `encoding` - # @return [String] - attr_accessor :encoding - - # [Optional] The separator for fields in a CSV file. BigQuery converts the - # string to ISO-8859-1 encoding, and then uses the first byte of the encoded - # string to split the data in its raw, binary state. BigQuery also supports the - # escape sequence "\t" to specify a tab separator. The default value is a comma ( - # ','). - # Corresponds to the JSON property `fieldDelimiter` - # @return [String] - attr_accessor :field_delimiter - - # [Optional] The value that is used to quote data sections in a CSV file. - # BigQuery converts the string to ISO-8859-1 encoding, and then uses the first - # byte of the encoded string to split the data in its raw, binary state. The - # default value is a double-quote ('"'). If your data does not contain quoted - # sections, set the property value to an empty string. If your data contains - # quoted newline characters, you must also set the allowQuotedNewlines property - # to true. - # Corresponds to the JSON property `quote` - # @return [String] - attr_accessor :quote - - # [Optional] The number of rows at the top of a CSV file that BigQuery will skip - # when reading the data. The default value is 0. This property is useful if you - # have header rows in the file that should be skipped. - # Corresponds to the JSON property `skipLeadingRows` - # @return [Fixnum] - attr_accessor :skip_leading_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allow_jagged_rows = args[:allow_jagged_rows] unless args[:allow_jagged_rows].nil? - @allow_quoted_newlines = args[:allow_quoted_newlines] unless args[:allow_quoted_newlines].nil? - @encoding = args[:encoding] unless args[:encoding].nil? - @field_delimiter = args[:field_delimiter] unless args[:field_delimiter].nil? - @quote = args[:quote] unless args[:quote].nil? - @skip_leading_rows = args[:skip_leading_rows] unless args[:skip_leading_rows].nil? - end - end - - # - class Dataset - include Google::Apis::Core::Hashable - - # [Optional] An array of objects that define dataset access for one or more - # entities. You can set this property when inserting or updating a dataset in - # order to control who is allowed to access the data. If unspecified at dataset - # creation time, BigQuery adds default dataset access for the following entities: - # access.specialGroup: projectReaders; access.role: READER; access.specialGroup: - # projectWriters; access.role: WRITER; access.specialGroup: projectOwners; - # access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: - # OWNER; - # Corresponds to the JSON property `access` - # @return [Array] - attr_accessor :access - - # [Output-only] The time when this dataset was created, in milliseconds since - # the epoch. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # [Required] A reference that identifies the dataset. - # Corresponds to the JSON property `datasetReference` - # @return [Google::Apis::BigqueryV2::DatasetReference] - attr_accessor :dataset_reference - - # [Experimental] The default lifetime of all tables in the dataset, in - # milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this - # property is set, all newly-created tables in the dataset will have an - # expirationTime property set to the creation time plus the value in this - # property, and changing the value will only affect new tables, not existing - # ones. When the expirationTime for a given table is reached, that table will be - # deleted automatically. If a table's expirationTime is modified or removed - # before the table expires, or if you provide an explicit expirationTime when - # creating a table, that value takes precedence over the default expiration time - # indicated by this property. - # Corresponds to the JSON property `defaultTableExpirationMs` - # @return [String] - attr_accessor :default_table_expiration_ms - - # [Optional] A user-friendly description of the dataset. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output-only] A hash of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # [Optional] A descriptive name for the dataset. - # Corresponds to the JSON property `friendlyName` - # @return [String] - attr_accessor :friendly_name - - # [Output-only] The fully-qualified unique name of the dataset in the format - # projectId:datasetId. The dataset name without the project name is given in the - # datasetId field. When creating a new dataset, leave this field blank, and - # instead specify the datasetId field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output-only] The resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output-only] The date when this dataset or any of its tables was last - # modified, in milliseconds since the epoch. - # Corresponds to the JSON property `lastModifiedTime` - # @return [String] - attr_accessor :last_modified_time - - # [Experimental] The location where the data resides. If not present, the data - # will be stored in the US. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output-only] A URL that can be used to access the resource again. You can use - # this URL in Get or Update requests to the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access = args[:access] unless args[:access].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @dataset_reference = args[:dataset_reference] unless args[:dataset_reference].nil? - @default_table_expiration_ms = args[:default_table_expiration_ms] unless args[:default_table_expiration_ms].nil? - @description = args[:description] unless args[:description].nil? - @etag = args[:etag] unless args[:etag].nil? - @friendly_name = args[:friendly_name] unless args[:friendly_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @location = args[:location] unless args[:location].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - - # - class Access - include Google::Apis::Core::Hashable - - # [Pick one] A domain to grant access to. Any users signed in with the domain - # specified will be granted the specified access. Example: "example.com". - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # [Pick one] An email address of a Google Group to grant access to. - # Corresponds to the JSON property `groupByEmail` - # @return [String] - attr_accessor :group_by_email - - # [Required] Describes the rights granted to the user specified by the other - # member of the access object. The following string values are supported: READER, - # WRITER, OWNER. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # [Pick one] A special group to grant access to. Possible values include: - # projectOwners: Owners of the enclosing project. projectReaders: Readers of the - # enclosing project. projectWriters: Writers of the enclosing project. - # allAuthenticatedUsers: All authenticated BigQuery users. - # Corresponds to the JSON property `specialGroup` - # @return [String] - attr_accessor :special_group - - # [Pick one] An email address of a user to grant access to. For example: fred@ - # example.com. - # Corresponds to the JSON property `userByEmail` - # @return [String] - attr_accessor :user_by_email - - # [Pick one] A view from a different dataset to grant access to. Queries - # executed against that view will have read access to tables in this dataset. - # The role field is not required when this field is set. If that view is updated - # by any user, access to the view needs to be granted again via an update - # operation. - # Corresponds to the JSON property `view` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :view - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @domain = args[:domain] unless args[:domain].nil? - @group_by_email = args[:group_by_email] unless args[:group_by_email].nil? - @role = args[:role] unless args[:role].nil? - @special_group = args[:special_group] unless args[:special_group].nil? - @user_by_email = args[:user_by_email] unless args[:user_by_email].nil? - @view = args[:view] unless args[:view].nil? - end - end - end - - # - class DatasetList - include Google::Apis::Core::Hashable - - # An array of the dataset resources in the project. Each resource contains basic - # information. For full information about a particular dataset resource, use the - # Datasets: get method. This property is omitted when there are no datasets in - # the project. - # Corresponds to the JSON property `datasets` - # @return [Array] - attr_accessor :datasets - - # A hash value of the results page. You can use this property to determine if - # the page has changed since the last request. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The list type. This property always returns the value "bigquery#datasetList". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token that can be used to request the next results page. This property is - # omitted on the final results 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) - @datasets = args[:datasets] unless args[:datasets].nil? - @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? - end - - # - class Dataset - include Google::Apis::Core::Hashable - - # The dataset reference. Use this property to access specific parts of the - # dataset's ID, such as project ID or dataset ID. - # Corresponds to the JSON property `datasetReference` - # @return [Google::Apis::BigqueryV2::DatasetReference] - attr_accessor :dataset_reference - - # A descriptive name for the dataset, if one exists. - # Corresponds to the JSON property `friendlyName` - # @return [String] - attr_accessor :friendly_name - - # The fully-qualified, unique, opaque ID of the dataset. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The resource type. This property always returns the value "bigquery#dataset". - # 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) - @dataset_reference = args[:dataset_reference] unless args[:dataset_reference].nil? - @friendly_name = args[:friendly_name] unless args[:friendly_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - end - - # - class DatasetReference - include Google::Apis::Core::Hashable - - # [Required] A unique ID for this dataset, without the project name. The ID must - # contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The - # maximum length is 1,024 characters. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # [Optional] The ID of the project containing this dataset. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - end - end - - # - class ErrorProto - include Google::Apis::Core::Hashable - - # Debugging information. This property is internal to Google and should not be - # used. - # Corresponds to the JSON property `debugInfo` - # @return [String] - attr_accessor :debug_info - - # Specifies where the error occurred, if present. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # A human-readable description of the error. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A short error code that summarizes the error. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @debug_info = args[:debug_info] unless args[:debug_info].nil? - @location = args[:location] unless args[:location].nil? - @message = args[:message] unless args[:message].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - - # - class ExternalDataConfiguration - include Google::Apis::Core::Hashable - - # [Optional] The compression type of the data source. Possible values include - # GZIP and NONE. The default value is NONE. - # Corresponds to the JSON property `compression` - # @return [String] - attr_accessor :compression - - # Additional properties to set if sourceFormat is set to CSV. - # Corresponds to the JSON property `csvOptions` - # @return [Google::Apis::BigqueryV2::CsvOptions] - attr_accessor :csv_options - - # [Optional] Indicates if BigQuery should allow extra values that are not - # represented in the table schema. If true, the extra values are ignored. If - # false, records with extra columns are treated as bad records, and if there are - # too many bad records, an invalid error is returned in the job result. The - # default value is false. The sourceFormat property determines what BigQuery - # treats as an extra value: CSV: Trailing columns - # Corresponds to the JSON property `ignoreUnknownValues` - # @return [Boolean] - attr_accessor :ignore_unknown_values - alias_method :ignore_unknown_values?, :ignore_unknown_values - - # [Optional] The maximum number of bad records that BigQuery can ignore when - # reading data. If the number of bad records exceeds this value, an invalid - # error is returned in the job result. The default value is 0, which requires - # that all records are valid. - # Corresponds to the JSON property `maxBadRecords` - # @return [Fixnum] - attr_accessor :max_bad_records - - # [Required] The schema for the data. - # Corresponds to the JSON property `schema` - # @return [Google::Apis::BigqueryV2::TableSchema] - attr_accessor :schema - - # [Optional] The data format. External data sources must be in CSV format. The - # default value is CSV. - # Corresponds to the JSON property `sourceFormat` - # @return [String] - attr_accessor :source_format - - # [Required] The fully-qualified URIs that point to your data in Google Cloud - # Storage. Each URI can contain one '*' wildcard character and it must come - # after the 'bucket' name. CSV limits related to load jobs apply to external - # data sources, plus an additional limit of 10 GB maximum size across all URIs. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @compression = args[:compression] unless args[:compression].nil? - @csv_options = args[:csv_options] unless args[:csv_options].nil? - @ignore_unknown_values = args[:ignore_unknown_values] unless args[:ignore_unknown_values].nil? - @max_bad_records = args[:max_bad_records] unless args[:max_bad_records].nil? - @schema = args[:schema] unless args[:schema].nil? - @source_format = args[:source_format] unless args[:source_format].nil? - @source_uris = args[:source_uris] unless args[:source_uris].nil? - end - end - - # - class GetQueryResultsResponse - include Google::Apis::Core::Hashable - - # Whether the query result was fetched from the query cache. - # Corresponds to the JSON property `cacheHit` - # @return [Boolean] - attr_accessor :cache_hit - alias_method :cache_hit?, :cache_hit - - # A hash of this response. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Whether the query has completed or not. If rows or totalRows are present, this - # will always be true. If this is false, totalRows will not be available. - # Corresponds to the JSON property `jobComplete` - # @return [Boolean] - attr_accessor :job_complete - alias_method :job_complete?, :job_complete - - # Reference to the BigQuery Job that was created to run the query. This field - # will be present even if the original request timed out, in which case - # GetQueryResults can be used to read the results once the query has completed. - # Since this API only returns the first page of results, subsequent pages can be - # fetched via the same mechanism (GetQueryResults). - # Corresponds to the JSON property `jobReference` - # @return [Google::Apis::BigqueryV2::JobReference] - attr_accessor :job_reference - - # The resource type of the response. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used for paging results. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # An object with as many results as can be contained within the maximum - # permitted reply size. To get any additional rows, you can call GetQueryResults - # and specify the jobReference returned above. Present only when the query - # completes successfully. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The schema of the results. Present only when the query completes successfully. - # Corresponds to the JSON property `schema` - # @return [Google::Apis::BigqueryV2::TableSchema] - attr_accessor :schema - - # The total number of bytes processed for this query. - # Corresponds to the JSON property `totalBytesProcessed` - # @return [String] - attr_accessor :total_bytes_processed - - # The total number of rows in the complete query result set, which can be more - # than the number of rows in this single page of results. Present only when the - # query completes successfully. - # Corresponds to the JSON property `totalRows` - # @return [String] - attr_accessor :total_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cache_hit = args[:cache_hit] unless args[:cache_hit].nil? - @etag = args[:etag] unless args[:etag].nil? - @job_complete = args[:job_complete] unless args[:job_complete].nil? - @job_reference = args[:job_reference] unless args[:job_reference].nil? - @kind = args[:kind] unless args[:kind].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @rows = args[:rows] unless args[:rows].nil? - @schema = args[:schema] unless args[:schema].nil? - @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil? - @total_rows = args[:total_rows] unless args[:total_rows].nil? - end - end - - # - class Job - include Google::Apis::Core::Hashable - - # [Required] Describes the job configuration. - # Corresponds to the JSON property `configuration` - # @return [Google::Apis::BigqueryV2::JobConfiguration] - attr_accessor :configuration - - # [Output-only] A hash of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # [Output-only] Opaque ID field of the job - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Optional] Reference describing the unique-per-user name of the job. - # Corresponds to the JSON property `jobReference` - # @return [Google::Apis::BigqueryV2::JobReference] - attr_accessor :job_reference - - # [Output-only] The type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output-only] A URL that can be used to access this resource again. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output-only] Information about the job, including starting time and ending - # time of the job. - # Corresponds to the JSON property `statistics` - # @return [Google::Apis::BigqueryV2::JobStatistics] - attr_accessor :statistics - - # [Output-only] The status of this job. Examine this value when polling an - # asynchronous job to see if the job is complete. - # Corresponds to the JSON property `status` - # @return [Google::Apis::BigqueryV2::JobStatus] - attr_accessor :status - - # [Output-only] Email address of the user who ran the job. - # Corresponds to the JSON property `user_email` - # @return [String] - attr_accessor :user_email - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @configuration = args[:configuration] unless args[:configuration].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @job_reference = args[:job_reference] unless args[:job_reference].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @statistics = args[:statistics] unless args[:statistics].nil? - @status = args[:status] unless args[:status].nil? - @user_email = args[:user_email] unless args[:user_email].nil? - end - end - - # - class CancelJobResponse - include Google::Apis::Core::Hashable - - # The final state of the job. - # Corresponds to the JSON property `job` - # @return [Google::Apis::BigqueryV2::Job] - attr_accessor :job - - # The resource type of the response. - # 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) - @job = args[:job] unless args[:job].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class JobConfiguration - include Google::Apis::Core::Hashable - - # [Pick one] Copies a table. - # Corresponds to the JSON property `copy` - # @return [Google::Apis::BigqueryV2::JobConfigurationTableCopy] - attr_accessor :copy - - # [Optional] If set, don't actually run this job. A valid query will return a - # mostly empty response with some processing statistics, while an invalid query - # will return the same error it would if it wasn't a dry run. Behavior of non- - # query jobs is undefined. - # Corresponds to the JSON property `dryRun` - # @return [Boolean] - attr_accessor :dry_run - alias_method :dry_run?, :dry_run - - # [Pick one] Configures an extract job. - # Corresponds to the JSON property `extract` - # @return [Google::Apis::BigqueryV2::JobConfigurationExtract] - attr_accessor :extract - - # [Pick one] Configures a link job. - # Corresponds to the JSON property `link` - # @return [Google::Apis::BigqueryV2::JobConfigurationLink] - attr_accessor :link - - # [Pick one] Configures a load job. - # Corresponds to the JSON property `load` - # @return [Google::Apis::BigqueryV2::JobConfigurationLoad] - attr_accessor :load - - # [Pick one] Configures a query job. - # Corresponds to the JSON property `query` - # @return [Google::Apis::BigqueryV2::JobConfigurationQuery] - attr_accessor :query - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @copy = args[:copy] unless args[:copy].nil? - @dry_run = args[:dry_run] unless args[:dry_run].nil? - @extract = args[:extract] unless args[:extract].nil? - @link = args[:link] unless args[:link].nil? - @load = args[:load] unless args[:load].nil? - @query = args[:query] unless args[:query].nil? - end - end - - # - class JobConfigurationExtract - include Google::Apis::Core::Hashable - - # [Optional] The compression type to use for exported files. Possible values - # include GZIP and NONE. The default value is NONE. - # Corresponds to the JSON property `compression` - # @return [String] - attr_accessor :compression - - # [Optional] The exported file format. Possible values include CSV, - # NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested - # or repeated fields cannot be exported as CSV. - # Corresponds to the JSON property `destinationFormat` - # @return [String] - attr_accessor :destination_format - - # [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as - # necessary. The fully-qualified Google Cloud Storage URI where the extracted - # table should be written. - # Corresponds to the JSON property `destinationUri` - # @return [String] - attr_accessor :destination_uri - - # [Pick one] A list of fully-qualified Google Cloud Storage URIs where the - # extracted table should be written. - # Corresponds to the JSON property `destinationUris` - # @return [Array] - attr_accessor :destination_uris - - # [Optional] Delimiter to use between fields in the exported data. Default is ',' - # Corresponds to the JSON property `fieldDelimiter` - # @return [String] - attr_accessor :field_delimiter - - # [Optional] Whether to print out a header row in the results. Default is true. - # Corresponds to the JSON property `printHeader` - # @return [Boolean] - attr_accessor :print_header - alias_method :print_header?, :print_header - - # [Required] A reference to the table being exported. - # Corresponds to the JSON property `sourceTable` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :source_table - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @compression = args[:compression] unless args[:compression].nil? - @destination_format = args[:destination_format] unless args[:destination_format].nil? - @destination_uri = args[:destination_uri] unless args[:destination_uri].nil? - @destination_uris = args[:destination_uris] unless args[:destination_uris].nil? - @field_delimiter = args[:field_delimiter] unless args[:field_delimiter].nil? - @print_header = args[:print_header] unless args[:print_header].nil? - @source_table = args[:source_table] unless args[:source_table].nil? - end - end - - # - class JobConfigurationLink - include Google::Apis::Core::Hashable - - # [Optional] Specifies whether the job is allowed to create new tables. The - # following values are supported: CREATE_IF_NEEDED: If the table does not exist, - # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it - # does not, a 'notFound' error is returned in the job result. The default value - # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one - # atomic update upon job completion. - # Corresponds to the JSON property `createDisposition` - # @return [String] - attr_accessor :create_disposition - - # [Required] The destination table of the link job. - # Corresponds to the JSON property `destinationTable` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :destination_table - - # [Required] URI of source table to link. - # Corresponds to the JSON property `sourceUri` - # @return [Array] - attr_accessor :source_uri - - # [Optional] Specifies the action that occurs if the destination table already - # exists. The following values are supported: WRITE_TRUNCATE: If the table - # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table - # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the - # table already exists and contains data, a 'duplicate' error is returned in the - # job result. The default value is WRITE_EMPTY. Each action is atomic and only - # occurs if BigQuery is able to complete the job successfully. Creation, - # truncation and append actions occur as one atomic update upon job completion. - # Corresponds to the JSON property `writeDisposition` - # @return [String] - attr_accessor :write_disposition - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_disposition = args[:create_disposition] unless args[:create_disposition].nil? - @destination_table = args[:destination_table] unless args[:destination_table].nil? - @source_uri = args[:source_uri] unless args[:source_uri].nil? - @write_disposition = args[:write_disposition] unless args[:write_disposition].nil? - end - end - - # - class JobConfigurationLoad - include Google::Apis::Core::Hashable - - # [Optional] Accept rows that are missing trailing optional columns. The missing - # values are treated as nulls. If false, records with missing trailing columns - # are treated as bad records, and if there are too many bad records, an invalid - # error is returned in the job result. The default value is false. Only - # applicable to CSV, ignored for other formats. - # Corresponds to the JSON property `allowJaggedRows` - # @return [Boolean] - attr_accessor :allow_jagged_rows - alias_method :allow_jagged_rows?, :allow_jagged_rows - - # Indicates if BigQuery should allow quoted data sections that contain newline - # characters in a CSV file. The default value is false. - # Corresponds to the JSON property `allowQuotedNewlines` - # @return [Boolean] - attr_accessor :allow_quoted_newlines - alias_method :allow_quoted_newlines?, :allow_quoted_newlines - - # [Optional] Specifies whether the job is allowed to create new tables. The - # following values are supported: CREATE_IF_NEEDED: If the table does not exist, - # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it - # does not, a 'notFound' error is returned in the job result. The default value - # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one - # atomic update upon job completion. - # Corresponds to the JSON property `createDisposition` - # @return [String] - attr_accessor :create_disposition - - # [Required] The destination table to load the data into. - # Corresponds to the JSON property `destinationTable` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :destination_table - - # [Optional] The character encoding of the data. The supported values are UTF-8 - # or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the - # raw, binary data has been split using the values of the quote and - # fieldDelimiter properties. - # Corresponds to the JSON property `encoding` - # @return [String] - attr_accessor :encoding - - # [Optional] The separator for fields in a CSV file. BigQuery converts the - # string to ISO-8859-1 encoding, and then uses the first byte of the encoded - # string to split the data in its raw, binary state. BigQuery also supports the - # escape sequence "\t" to specify a tab separator. The default value is a comma ( - # ','). - # Corresponds to the JSON property `fieldDelimiter` - # @return [String] - attr_accessor :field_delimiter - - # [Optional] Indicates if BigQuery should allow extra values that are not - # represented in the table schema. If true, the extra values are ignored. If - # false, records with extra columns are treated as bad records, and if there are - # too many bad records, an invalid error is returned in the job result. The - # default value is false. The sourceFormat property determines what BigQuery - # treats as an extra value: CSV: Trailing columns JSON: Named values that don't - # match any column names - # Corresponds to the JSON property `ignoreUnknownValues` - # @return [Boolean] - attr_accessor :ignore_unknown_values - alias_method :ignore_unknown_values?, :ignore_unknown_values - - # [Optional] The maximum number of bad records that BigQuery can ignore when - # running the job. If the number of bad records exceeds this value, an invalid - # error is returned in the job result. The default value is 0, which requires - # that all records are valid. - # Corresponds to the JSON property `maxBadRecords` - # @return [Fixnum] - attr_accessor :max_bad_records - - # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which - # entity properties to load into BigQuery from a Cloud Datastore backup. - # Property names are case sensitive and must be top-level properties. If no - # properties are specified, BigQuery loads all properties. If any named property - # isn't found in the Cloud Datastore backup, an invalid error is returned in the - # job result. - # Corresponds to the JSON property `projectionFields` - # @return [Array] - attr_accessor :projection_fields - - # [Optional] The value that is used to quote data sections in a CSV file. - # BigQuery converts the string to ISO-8859-1 encoding, and then uses the first - # byte of the encoded string to split the data in its raw, binary state. The - # default value is a double-quote ('"'). If your data does not contain quoted - # sections, set the property value to an empty string. If your data contains - # quoted newline characters, you must also set the allowQuotedNewlines property - # to true. - # Corresponds to the JSON property `quote` - # @return [String] - attr_accessor :quote - - # [Optional] The schema for the destination table. The schema can be omitted if - # the destination table already exists or if the schema can be inferred from the - # loaded data. - # Corresponds to the JSON property `schema` - # @return [Google::Apis::BigqueryV2::TableSchema] - attr_accessor :schema - - # [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[, - # Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". - # Corresponds to the JSON property `schemaInline` - # @return [String] - attr_accessor :schema_inline - - # [Deprecated] The format of the schemaInline property. - # Corresponds to the JSON property `schemaInlineFormat` - # @return [String] - attr_accessor :schema_inline_format - - # [Optional] The number of rows at the top of a CSV file that BigQuery will skip - # when loading the data. The default value is 0. This property is useful if you - # have header rows in the file that should be skipped. - # Corresponds to the JSON property `skipLeadingRows` - # @return [Fixnum] - attr_accessor :skip_leading_rows - - # [Optional] The format of the data files. For CSV files, specify "CSV". For - # datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, - # specify "NEWLINE_DELIMITED_JSON". The default value is CSV. - # Corresponds to the JSON property `sourceFormat` - # @return [String] - attr_accessor :source_format - - # [Required] The fully-qualified URIs that point to your data in Google Cloud - # Storage. Each URI can contain one '*' wildcard character and it must come - # after the 'bucket' name. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - # [Optional] Specifies the action that occurs if the destination table already - # exists. The following values are supported: WRITE_TRUNCATE: If the table - # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table - # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the - # table already exists and contains data, a 'duplicate' error is returned in the - # job result. The default value is WRITE_APPEND. Each action is atomic and only - # occurs if BigQuery is able to complete the job successfully. Creation, - # truncation and append actions occur as one atomic update upon job completion. - # Corresponds to the JSON property `writeDisposition` - # @return [String] - attr_accessor :write_disposition - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allow_jagged_rows = args[:allow_jagged_rows] unless args[:allow_jagged_rows].nil? - @allow_quoted_newlines = args[:allow_quoted_newlines] unless args[:allow_quoted_newlines].nil? - @create_disposition = args[:create_disposition] unless args[:create_disposition].nil? - @destination_table = args[:destination_table] unless args[:destination_table].nil? - @encoding = args[:encoding] unless args[:encoding].nil? - @field_delimiter = args[:field_delimiter] unless args[:field_delimiter].nil? - @ignore_unknown_values = args[:ignore_unknown_values] unless args[:ignore_unknown_values].nil? - @max_bad_records = args[:max_bad_records] unless args[:max_bad_records].nil? - @projection_fields = args[:projection_fields] unless args[:projection_fields].nil? - @quote = args[:quote] unless args[:quote].nil? - @schema = args[:schema] unless args[:schema].nil? - @schema_inline = args[:schema_inline] unless args[:schema_inline].nil? - @schema_inline_format = args[:schema_inline_format] unless args[:schema_inline_format].nil? - @skip_leading_rows = args[:skip_leading_rows] unless args[:skip_leading_rows].nil? - @source_format = args[:source_format] unless args[:source_format].nil? - @source_uris = args[:source_uris] unless args[:source_uris].nil? - @write_disposition = args[:write_disposition] unless args[:write_disposition].nil? - end - end - - # - class JobConfigurationQuery - include Google::Apis::Core::Hashable - - # If true, allows the query to produce arbitrarily large result tables at a - # slight cost in performance. Requires destinationTable to be set. - # Corresponds to the JSON property `allowLargeResults` - # @return [Boolean] - attr_accessor :allow_large_results - alias_method :allow_large_results?, :allow_large_results - - # [Optional] Specifies whether the job is allowed to create new tables. The - # following values are supported: CREATE_IF_NEEDED: If the table does not exist, - # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it - # does not, a 'notFound' error is returned in the job result. The default value - # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one - # atomic update upon job completion. - # Corresponds to the JSON property `createDisposition` - # @return [String] - attr_accessor :create_disposition - - # [Optional] Specifies the default dataset to use for unqualified table names in - # the query. - # Corresponds to the JSON property `defaultDataset` - # @return [Google::Apis::BigqueryV2::DatasetReference] - attr_accessor :default_dataset - - # [Optional] Describes the table where the query results should be stored. If - # not present, a new table will be created to store the results. - # Corresponds to the JSON property `destinationTable` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :destination_table - - # [Optional] Flattens all nested and repeated fields in the query results. The - # default value is true. allowLargeResults must be true if this is set to false. - # Corresponds to the JSON property `flattenResults` - # @return [Boolean] - attr_accessor :flatten_results - alias_method :flatten_results?, :flatten_results - - # [Deprecated] This property is deprecated. - # Corresponds to the JSON property `preserveNulls` - # @return [Boolean] - attr_accessor :preserve_nulls - alias_method :preserve_nulls?, :preserve_nulls - - # [Optional] Specifies a priority for the query. Possible values include - # INTERACTIVE and BATCH. The default value is INTERACTIVE. - # Corresponds to the JSON property `priority` - # @return [String] - attr_accessor :priority - - # [Required] BigQuery SQL query to execute. - # Corresponds to the JSON property `query` - # @return [String] - attr_accessor :query - - # [Experimental] If querying an external data source outside of BigQuery, - # describes the data format, location and other properties of the data source. - # By defining these properties, the data source can then be queried as if it - # were a standard BigQuery table. - # Corresponds to the JSON property `tableDefinitions` - # @return [Hash] - attr_accessor :table_definitions - - # [Optional] Whether to look for the result in the query cache. The query cache - # is a best-effort cache that will be flushed whenever tables in the query are - # modified. Moreover, the query cache is only available when a query does not - # have a destination table specified. The default value is true. - # Corresponds to the JSON property `useQueryCache` - # @return [Boolean] - attr_accessor :use_query_cache - alias_method :use_query_cache?, :use_query_cache - - # [Optional] Specifies the action that occurs if the destination table already - # exists. The following values are supported: WRITE_TRUNCATE: If the table - # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table - # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the - # table already exists and contains data, a 'duplicate' error is returned in the - # job result. The default value is WRITE_EMPTY. Each action is atomic and only - # occurs if BigQuery is able to complete the job successfully. Creation, - # truncation and append actions occur as one atomic update upon job completion. - # Corresponds to the JSON property `writeDisposition` - # @return [String] - attr_accessor :write_disposition - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allow_large_results = args[:allow_large_results] unless args[:allow_large_results].nil? - @create_disposition = args[:create_disposition] unless args[:create_disposition].nil? - @default_dataset = args[:default_dataset] unless args[:default_dataset].nil? - @destination_table = args[:destination_table] unless args[:destination_table].nil? - @flatten_results = args[:flatten_results] unless args[:flatten_results].nil? - @preserve_nulls = args[:preserve_nulls] unless args[:preserve_nulls].nil? - @priority = args[:priority] unless args[:priority].nil? - @query = args[:query] unless args[:query].nil? - @table_definitions = args[:table_definitions] unless args[:table_definitions].nil? - @use_query_cache = args[:use_query_cache] unless args[:use_query_cache].nil? - @write_disposition = args[:write_disposition] unless args[:write_disposition].nil? - end - end - - # - class JobConfigurationTableCopy - include Google::Apis::Core::Hashable - - # [Optional] Specifies whether the job is allowed to create new tables. The - # following values are supported: CREATE_IF_NEEDED: If the table does not exist, - # BigQuery creates the table. CREATE_NEVER: The table must already exist. If it - # does not, a 'notFound' error is returned in the job result. The default value - # is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one - # atomic update upon job completion. - # Corresponds to the JSON property `createDisposition` - # @return [String] - attr_accessor :create_disposition - - # [Required] The destination table - # Corresponds to the JSON property `destinationTable` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :destination_table - - # [Pick one] Source table to copy. - # Corresponds to the JSON property `sourceTable` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :source_table - - # [Pick one] Source tables to copy. - # Corresponds to the JSON property `sourceTables` - # @return [Array] - attr_accessor :source_tables - - # [Optional] Specifies the action that occurs if the destination table already - # exists. The following values are supported: WRITE_TRUNCATE: If the table - # already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table - # already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the - # table already exists and contains data, a 'duplicate' error is returned in the - # job result. The default value is WRITE_EMPTY. Each action is atomic and only - # occurs if BigQuery is able to complete the job successfully. Creation, - # truncation and append actions occur as one atomic update upon job completion. - # Corresponds to the JSON property `writeDisposition` - # @return [String] - attr_accessor :write_disposition - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_disposition = args[:create_disposition] unless args[:create_disposition].nil? - @destination_table = args[:destination_table] unless args[:destination_table].nil? - @source_table = args[:source_table] unless args[:source_table].nil? - @source_tables = args[:source_tables] unless args[:source_tables].nil? - @write_disposition = args[:write_disposition] unless args[:write_disposition].nil? - end - end - - # - class JobList - include Google::Apis::Core::Hashable - - # A hash of this page of results. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # List of jobs that were requested. - # Corresponds to the JSON property `jobs` - # @return [Array] - attr_accessor :jobs - - # The resource type of the response. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token to request 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) - @etag = args[:etag] unless args[:etag].nil? - @jobs = args[:jobs] unless args[:jobs].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - - # - class Job - include Google::Apis::Core::Hashable - - # [Full-projection-only] Specifies the job configuration. - # Corresponds to the JSON property `configuration` - # @return [Google::Apis::BigqueryV2::JobConfiguration] - attr_accessor :configuration - - # A result object that will be present only if the job has failed. - # Corresponds to the JSON property `errorResult` - # @return [Google::Apis::BigqueryV2::ErrorProto] - attr_accessor :error_result - - # Unique opaque ID of the job. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Job reference uniquely identifying the job. - # Corresponds to the JSON property `jobReference` - # @return [Google::Apis::BigqueryV2::JobReference] - attr_accessor :job_reference - - # The resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Running state of the job. When the state is DONE, errorResult can be checked - # to determine whether the job succeeded or failed. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # [Output-only] Information about the job, including starting time and ending - # time of the job. - # Corresponds to the JSON property `statistics` - # @return [Google::Apis::BigqueryV2::JobStatistics] - attr_accessor :statistics - - # [Full-projection-only] Describes the state of the job. - # Corresponds to the JSON property `status` - # @return [Google::Apis::BigqueryV2::JobStatus] - attr_accessor :status - - # [Full-projection-only] Email address of the user who ran the job. - # Corresponds to the JSON property `user_email` - # @return [String] - attr_accessor :user_email - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @configuration = args[:configuration] unless args[:configuration].nil? - @error_result = args[:error_result] unless args[:error_result].nil? - @id = args[:id] unless args[:id].nil? - @job_reference = args[:job_reference] unless args[:job_reference].nil? - @kind = args[:kind] unless args[:kind].nil? - @state = args[:state] unless args[:state].nil? - @statistics = args[:statistics] unless args[:statistics].nil? - @status = args[:status] unless args[:status].nil? - @user_email = args[:user_email] unless args[:user_email].nil? - end - end - end - - # - class JobReference - include Google::Apis::Core::Hashable - - # [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), - # numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 - # characters. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - # [Required] The ID of the project containing this job. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - end - end - - # - class JobStatistics - include Google::Apis::Core::Hashable - - # [Output-only] Creation time of this job, in milliseconds since the epoch. This - # field will be present on all jobs. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # [Output-only] End time of this job, in milliseconds since the epoch. This - # field will be present whenever a job is in the DONE state. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # [Output-only] Statistics for an extract job. - # Corresponds to the JSON property `extract` - # @return [Google::Apis::BigqueryV2::JobStatistics4] - attr_accessor :extract - - # [Output-only] Statistics for a load job. - # Corresponds to the JSON property `load` - # @return [Google::Apis::BigqueryV2::JobStatistics3] - attr_accessor :load - - # [Output-only] Statistics for a query job. - # Corresponds to the JSON property `query` - # @return [Google::Apis::BigqueryV2::JobStatistics2] - attr_accessor :query - - # [Output-only] Start time of this job, in milliseconds since the epoch. This - # field will be present when the job transitions from the PENDING state to - # either RUNNING or DONE. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # [Output-only] [Deprecated] Use the bytes processed in the query statistics - # instead. - # Corresponds to the JSON property `totalBytesProcessed` - # @return [String] - attr_accessor :total_bytes_processed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @end_time = args[:end_time] unless args[:end_time].nil? - @extract = args[:extract] unless args[:extract].nil? - @load = args[:load] unless args[:load].nil? - @query = args[:query] unless args[:query].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil? - end - end - - # - class JobStatistics2 - include Google::Apis::Core::Hashable - - # [Output-only] Whether the query result was fetched from the query cache. - # Corresponds to the JSON property `cacheHit` - # @return [Boolean] - attr_accessor :cache_hit - alias_method :cache_hit?, :cache_hit - - # [Output-only] Total bytes processed for this job. - # Corresponds to the JSON property `totalBytesProcessed` - # @return [String] - attr_accessor :total_bytes_processed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cache_hit = args[:cache_hit] unless args[:cache_hit].nil? - @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil? - end - end - - # - class JobStatistics3 - include Google::Apis::Core::Hashable - - # [Output-only] Number of bytes of source data in a joad job. - # Corresponds to the JSON property `inputFileBytes` - # @return [String] - attr_accessor :input_file_bytes - - # [Output-only] Number of source files in a load job. - # Corresponds to the JSON property `inputFiles` - # @return [String] - attr_accessor :input_files - - # [Output-only] Size of the loaded data in bytes. Note that while an import job - # is in the running state, this value may change. - # Corresponds to the JSON property `outputBytes` - # @return [String] - attr_accessor :output_bytes - - # [Output-only] Number of rows imported in a load job. Note that while an import - # job is in the running state, this value may change. - # Corresponds to the JSON property `outputRows` - # @return [String] - attr_accessor :output_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @input_file_bytes = args[:input_file_bytes] unless args[:input_file_bytes].nil? - @input_files = args[:input_files] unless args[:input_files].nil? - @output_bytes = args[:output_bytes] unless args[:output_bytes].nil? - @output_rows = args[:output_rows] unless args[:output_rows].nil? - end - end - - # - class JobStatistics4 - include Google::Apis::Core::Hashable - - # [Experimental] Number of files per destination URI or URI pattern specified in - # the extract configuration. These values will be in the same order as the URIs - # specified in the 'destinationUris' field. - # Corresponds to the JSON property `destinationUriFileCounts` - # @return [Array] - attr_accessor :destination_uri_file_counts - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_uri_file_counts = args[:destination_uri_file_counts] unless args[:destination_uri_file_counts].nil? - end - end - - # - class JobStatus - include Google::Apis::Core::Hashable - - # [Output-only] Final error result of the job. If present, indicates that the - # job has completed and was unsuccessful. - # Corresponds to the JSON property `errorResult` - # @return [Google::Apis::BigqueryV2::ErrorProto] - attr_accessor :error_result - - # [Output-only] All errors encountered during the running of the job. Errors - # here do not necessarily mean that the job has completed or was unsuccessful. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # [Output-only] Running state of the job. - # 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) - @error_result = args[:error_result] unless args[:error_result].nil? - @errors = args[:errors] unless args[:errors].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # - class ProjectList - include Google::Apis::Core::Hashable - - # A hash of the page of results - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The type of list. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token to request the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Projects to which you have at least READ access. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects - - # The total number of projects in the list. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @projects = args[:projects] unless args[:projects].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - - # - class Project - include Google::Apis::Core::Hashable - - # A descriptive name for this project. - # Corresponds to the JSON property `friendlyName` - # @return [String] - attr_accessor :friendly_name - - # An opaque ID of this project. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The numeric ID of this project. - # Corresponds to the JSON property `numericId` - # @return [String] - attr_accessor :numeric_id - - # A unique reference to this project. - # Corresponds to the JSON property `projectReference` - # @return [Google::Apis::BigqueryV2::ProjectReference] - attr_accessor :project_reference - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @friendly_name = args[:friendly_name] unless args[:friendly_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @numeric_id = args[:numeric_id] unless args[:numeric_id].nil? - @project_reference = args[:project_reference] unless args[:project_reference].nil? - end - end - end - - # - class ProjectReference - include Google::Apis::Core::Hashable - - # [Required] ID of the project. Can be either the numeric ID or the assigned ID - # of the project. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] unless args[:project_id].nil? - end - end - - # - class QueryRequest - include Google::Apis::Core::Hashable - - # [Optional] Specifies the default datasetId and projectId to assume for any - # unqualified table names in the query. If not set, all table names in the query - # string must be qualified in the format 'datasetId.tableId'. - # Corresponds to the JSON property `defaultDataset` - # @return [Google::Apis::BigqueryV2::DatasetReference] - attr_accessor :default_dataset - - # [Optional] If set, don't actually run this job. A valid query will return a - # mostly empty response with some processing statistics, while an invalid query - # will return the same error it would if it wasn't a dry run. - # Corresponds to the JSON property `dryRun` - # @return [Boolean] - attr_accessor :dry_run - alias_method :dry_run?, :dry_run - - # The resource type of the request. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Optional] The maximum number of rows of data to return per page of results. - # Setting this flag to a small value such as 1000 and then paging through - # results might improve reliability when the query result set is large. In - # addition to this limit, responses are also limited to 10 MB. By default, there - # is no maximum row count, and only the byte limit applies. - # Corresponds to the JSON property `maxResults` - # @return [Fixnum] - attr_accessor :max_results - - # [Deprecated] This property is deprecated. - # Corresponds to the JSON property `preserveNulls` - # @return [Boolean] - attr_accessor :preserve_nulls - alias_method :preserve_nulls?, :preserve_nulls - - # [Required] A query string, following the BigQuery query syntax, of the query - # to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId] - # ". - # Corresponds to the JSON property `query` - # @return [String] - attr_accessor :query - - # [Optional] How long to wait for the query to complete, in milliseconds, before - # the request times out and returns. Note that this is only a timeout for the - # request, not the query. If the query takes longer to run than the timeout - # value, the call returns without any results and with the 'jobComplete' flag - # set to false. You can call GetQueryResults() to wait for the query to complete - # and read the results. The default value is 10000 milliseconds (10 seconds). - # Corresponds to the JSON property `timeoutMs` - # @return [Fixnum] - attr_accessor :timeout_ms - - # [Optional] Whether to look for the result in the query cache. The query cache - # is a best-effort cache that will be flushed whenever tables in the query are - # modified. The default value is true. - # Corresponds to the JSON property `useQueryCache` - # @return [Boolean] - attr_accessor :use_query_cache - alias_method :use_query_cache?, :use_query_cache - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default_dataset = args[:default_dataset] unless args[:default_dataset].nil? - @dry_run = args[:dry_run] unless args[:dry_run].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_results = args[:max_results] unless args[:max_results].nil? - @preserve_nulls = args[:preserve_nulls] unless args[:preserve_nulls].nil? - @query = args[:query] unless args[:query].nil? - @timeout_ms = args[:timeout_ms] unless args[:timeout_ms].nil? - @use_query_cache = args[:use_query_cache] unless args[:use_query_cache].nil? - end - end - - # - class QueryResponse - include Google::Apis::Core::Hashable - - # Whether the query result was fetched from the query cache. - # Corresponds to the JSON property `cacheHit` - # @return [Boolean] - attr_accessor :cache_hit - alias_method :cache_hit?, :cache_hit - - # Whether the query has completed or not. If rows or totalRows are present, this - # will always be true. If this is false, totalRows will not be available. - # Corresponds to the JSON property `jobComplete` - # @return [Boolean] - attr_accessor :job_complete - alias_method :job_complete?, :job_complete - - # Reference to the Job that was created to run the query. This field will be - # present even if the original request timed out, in which case GetQueryResults - # can be used to read the results once the query has completed. Since this API - # only returns the first page of results, subsequent pages can be fetched via - # the same mechanism (GetQueryResults). - # Corresponds to the JSON property `jobReference` - # @return [Google::Apis::BigqueryV2::JobReference] - attr_accessor :job_reference - - # The resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used for paging results. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # An object with as many results as can be contained within the maximum - # permitted reply size. To get any additional rows, you can call GetQueryResults - # and specify the jobReference returned above. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The schema of the results. Present only when the query completes successfully. - # Corresponds to the JSON property `schema` - # @return [Google::Apis::BigqueryV2::TableSchema] - attr_accessor :schema - - # The total number of bytes processed for this query. If this query was a dry - # run, this is the number of bytes that would be processed if the query were run. - # Corresponds to the JSON property `totalBytesProcessed` - # @return [String] - attr_accessor :total_bytes_processed - - # The total number of rows in the complete query result set, which can be more - # than the number of rows in this single page of results. - # Corresponds to the JSON property `totalRows` - # @return [String] - attr_accessor :total_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cache_hit = args[:cache_hit] unless args[:cache_hit].nil? - @job_complete = args[:job_complete] unless args[:job_complete].nil? - @job_reference = args[:job_reference] unless args[:job_reference].nil? - @kind = args[:kind] unless args[:kind].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @rows = args[:rows] unless args[:rows].nil? - @schema = args[:schema] unless args[:schema].nil? - @total_bytes_processed = args[:total_bytes_processed] unless args[:total_bytes_processed].nil? - @total_rows = args[:total_rows] unless args[:total_rows].nil? - end - end - - # - class Table - include Google::Apis::Core::Hashable - - # [Output-only] The time when this table was created, in milliseconds since the - # epoch. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # [Optional] A user-friendly description of this table. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output-only] A hash of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # [Optional] The time when this table expires, in milliseconds since the epoch. - # If not present, the table will persist indefinitely. Expired tables will be - # deleted and their storage reclaimed. - # Corresponds to the JSON property `expirationTime` - # @return [String] - attr_accessor :expiration_time - - # [Optional] A descriptive name for this table. - # Corresponds to the JSON property `friendlyName` - # @return [String] - attr_accessor :friendly_name - - # [Output-only] An opaque ID uniquely identifying the table. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output-only] The type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output-only] The time when this table was last modified, in milliseconds - # since the epoch. - # Corresponds to the JSON property `lastModifiedTime` - # @return [String] - attr_accessor :last_modified_time - - # [Output-only] The size of the table in bytes. This property is unavailable for - # tables that are actively receiving streaming inserts. - # Corresponds to the JSON property `numBytes` - # @return [String] - attr_accessor :num_bytes - - # [Output-only] The number of rows of data in this table. This property is - # unavailable for tables that are actively receiving streaming inserts. - # Corresponds to the JSON property `numRows` - # @return [String] - attr_accessor :num_rows - - # [Optional] Describes the schema of this table. - # Corresponds to the JSON property `schema` - # @return [Google::Apis::BigqueryV2::TableSchema] - attr_accessor :schema - - # [Output-only] A URL that can be used to access this resource again. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Required] Reference describing the ID of this table. - # Corresponds to the JSON property `tableReference` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :table_reference - - # [Output-only] Describes the table type. The following values are supported: - # TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. - # The default value is TABLE. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # [Optional] The view definition. - # Corresponds to the JSON property `view` - # @return [Google::Apis::BigqueryV2::ViewDefinition] - attr_accessor :view - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @description = args[:description] unless args[:description].nil? - @etag = args[:etag] unless args[:etag].nil? - @expiration_time = args[:expiration_time] unless args[:expiration_time].nil? - @friendly_name = args[:friendly_name] unless args[:friendly_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @num_bytes = args[:num_bytes] unless args[:num_bytes].nil? - @num_rows = args[:num_rows] unless args[:num_rows].nil? - @schema = args[:schema] unless args[:schema].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @table_reference = args[:table_reference] unless args[:table_reference].nil? - @type = args[:type] unless args[:type].nil? - @view = args[:view] unless args[:view].nil? - end - end - - # - class TableCell - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `v` - # @return [Object] - attr_accessor :v - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @v = args[:v] unless args[:v].nil? - end - end - - # - class InsertAllTableDataRequest - include Google::Apis::Core::Hashable - - # [Optional] Accept rows that contain values that do not match the schema. The - # unknown values are ignored. Default is false, which treats unknown values as - # errors. - # Corresponds to the JSON property `ignoreUnknownValues` - # @return [Boolean] - attr_accessor :ignore_unknown_values - alias_method :ignore_unknown_values?, :ignore_unknown_values - - # The resource type of the response. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The rows to insert. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # [Optional] Insert all valid rows of a request, even if invalid rows exist. The - # default value is false, which causes the entire request to fail if any invalid - # rows exist. - # Corresponds to the JSON property `skipInvalidRows` - # @return [Boolean] - attr_accessor :skip_invalid_rows - alias_method :skip_invalid_rows?, :skip_invalid_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ignore_unknown_values = args[:ignore_unknown_values] unless args[:ignore_unknown_values].nil? - @kind = args[:kind] unless args[:kind].nil? - @rows = args[:rows] unless args[:rows].nil? - @skip_invalid_rows = args[:skip_invalid_rows] unless args[:skip_invalid_rows].nil? - end - - # - class Row - include Google::Apis::Core::Hashable - - # [Optional] A unique ID for each row. BigQuery uses this property to detect - # duplicate insertion requests on a best-effort basis. - # Corresponds to the JSON property `insertId` - # @return [String] - attr_accessor :insert_id - - # Represents a single JSON object. - # Corresponds to the JSON property `json` - # @return [Hash] - attr_accessor :json - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @insert_id = args[:insert_id] unless args[:insert_id].nil? - @json = args[:json] unless args[:json].nil? - end - end - end - - # - class InsertAllTableDataResponse - include Google::Apis::Core::Hashable - - # An array of errors for rows that were not inserted. - # Corresponds to the JSON property `insertErrors` - # @return [Array] - attr_accessor :insert_errors - - # The resource type of the response. - # 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) - @insert_errors = args[:insert_errors] unless args[:insert_errors].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class InsertError - include Google::Apis::Core::Hashable - - # Error information for the row indicated by the index property. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # The index of the row that error applies to. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @errors = args[:errors] unless args[:errors].nil? - @index = args[:index] unless args[:index].nil? - end - end - end - - # - class TableDataList - include Google::Apis::Core::Hashable - - # A hash of this page of results. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The resource type of the response. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used for paging results. Providing this token instead of the - # startIndex parameter can help you retrieve stable results when an underlying - # table is changing. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Rows of results. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The total number of rows in the complete table. - # Corresponds to the JSON property `totalRows` - # @return [String] - attr_accessor :total_rows - - 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? - @page_token = args[:page_token] unless args[:page_token].nil? - @rows = args[:rows] unless args[:rows].nil? - @total_rows = args[:total_rows] unless args[:total_rows].nil? - end - end - - # - class TableFieldSchema - include Google::Apis::Core::Hashable - - # [Optional] The field description. The maximum length is 16K characters. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Optional] Describes the nested schema fields if the type property is set to - # RECORD. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # [Optional] The field mode. Possible values include NULLABLE, REQUIRED and - # REPEATED. The default value is NULLABLE. - # Corresponds to the JSON property `mode` - # @return [String] - attr_accessor :mode - - # [Required] The field name. The name must contain only letters (a-z, A-Z), - # numbers (0-9), or underscores (_), and must start with a letter or underscore. - # The maximum length is 128 characters. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, - # BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains - # a nested schema). - # 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) - @description = args[:description] unless args[:description].nil? - @fields = args[:fields] unless args[:fields].nil? - @mode = args[:mode] unless args[:mode].nil? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class TableList - include Google::Apis::Core::Hashable - - # A hash of this page of results. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The type of list. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token to request the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Tables in the requested dataset. - # Corresponds to the JSON property `tables` - # @return [Array] - attr_accessor :tables - - # The total number of tables in the dataset. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @tables = args[:tables] unless args[:tables].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - - # - class Table - include Google::Apis::Core::Hashable - - # The user-friendly name for this table. - # Corresponds to the JSON property `friendlyName` - # @return [String] - attr_accessor :friendly_name - - # An opaque ID of the table - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A reference uniquely identifying the table. - # Corresponds to the JSON property `tableReference` - # @return [Google::Apis::BigqueryV2::TableReference] - attr_accessor :table_reference - - # The type of table. Possible values are: TABLE, VIEW. - # 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) - @friendly_name = args[:friendly_name] unless args[:friendly_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @table_reference = args[:table_reference] unless args[:table_reference].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # - class TableReference - include Google::Apis::Core::Hashable - - # [Required] The ID of the dataset containing this table. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # [Required] The ID of the project containing this table. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), - # numbers (0-9), or underscores (_). The maximum length is 1,024 characters. - # Corresponds to the JSON property `tableId` - # @return [String] - attr_accessor :table_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @table_id = args[:table_id] unless args[:table_id].nil? - end - end - - # - class TableRow - include Google::Apis::Core::Hashable - - # Represents a single row in the result set, consisting of one or more fields. - # Corresponds to the JSON property `f` - # @return [Array] - attr_accessor :f - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @f = args[:f] unless args[:f].nil? - end - end - - # - class TableSchema - include Google::Apis::Core::Hashable - - # Describes the fields in a table. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] unless args[:fields].nil? - end - end - - # - class ViewDefinition - include Google::Apis::Core::Hashable - - # [Required] A query that BigQuery executes when the view is referenced. - # Corresponds to the JSON property `query` - # @return [String] - attr_accessor :query - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @query = args[:query] unless args[:query].nil? - end - end - end - end -end diff --git a/generated/google/apis/bigquery_v2/representations.rb b/generated/google/apis/bigquery_v2/representations.rb deleted file mode 100644 index 62a6493ac..000000000 --- a/generated/google/apis/bigquery_v2/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/bigquery_v2/service.rb b/generated/google/apis/bigquery_v2/service.rb deleted file mode 100644 index bf51df608..000000000 --- a/generated/google/apis/bigquery_v2/service.rb +++ /dev/null @@ -1,1003 +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 BigqueryV2 - # BigQuery API - # - # A data platform for customers to create, manage, share and query data. - # - # @example - # require 'google/apis/bigquery_v2' - # - # Bigquery = Google::Apis::BigqueryV2 # Alias the module - # service = Bigquery::BigqueryService.new - # - # @see https://cloud.google.com/bigquery/ - class BigqueryService < 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/', 'bigquery/v2/') - end - - # Deletes the dataset specified by the datasetId value. Before you can delete a - # dataset, you must delete all its tables, either manually or by specifying - # deleteContents. Immediately after deletion, you can create another dataset - # with the same name. - # @param [String] project_id - # Project ID of the dataset being deleted - # @param [String] dataset_id - # Dataset ID of dataset being deleted - # @param [Boolean] delete_contents - # If True, delete all the tables in the dataset. If False and the dataset - # contains tables, the request will fail. Default is False - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}' - command = make_simple_command(:delete, path, options) - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['deleteContents'] = delete_contents unless delete_contents.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 dataset specified by datasetID. - # @param [String] project_id - # Project ID of the requested dataset - # @param [String] dataset_id - # Dataset ID of the requested dataset - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BigqueryV2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(project_id, dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation - command.response_class = Google::Apis::BigqueryV2::Dataset - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_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 new empty dataset. - # @param [String] project_id - # Project ID of the new dataset - # @param [Google::Apis::BigqueryV2::Dataset] dataset_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::BigqueryV2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(project_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation - command.response_class = Google::Apis::BigqueryV2::Dataset - 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 datasets in the specified project to which you have been granted the - # READER dataset role. - # @param [String] project_id - # Project ID of the datasets to be listed - # @param [Boolean] all - # Whether to list all datasets, including hidden ones - # @param [Fixnum] max_results - # The maximum number of results to return - # @param [String] page_token - # Page token, returned by a previous call, to request the next page of results - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BigqueryV2::DatasetList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::DatasetList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datasets(project_id, all: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::DatasetList::Representation - command.response_class = Google::Apis::BigqueryV2::DatasetList - command.params['projectId'] = project_id unless project_id.nil? - command.query['all'] = all unless all.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 - - # Updates information in an existing dataset. The update method replaces the - # entire dataset resource, whereas the patch method only replaces fields that - # are provided in the submitted dataset resource. This method supports patch - # semantics. - # @param [String] project_id - # Project ID of the dataset being updated - # @param [String] dataset_id - # Dataset ID of the dataset being updated - # @param [Google::Apis::BigqueryV2::Dataset] dataset_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::BigqueryV2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation - command.response_class = Google::Apis::BigqueryV2::Dataset - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_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 information in an existing dataset. The update method replaces the - # entire dataset resource, whereas the patch method only replaces fields that - # are provided in the submitted dataset resource. - # @param [String] project_id - # Project ID of the dataset being updated - # @param [String] dataset_id - # Dataset ID of the dataset being updated - # @param [Google::Apis::BigqueryV2::Dataset] dataset_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::BigqueryV2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation - command.response_class = Google::Apis::BigqueryV2::Dataset - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_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 - - # Requests that a job be cancelled. This call will return immediately, and the - # client will need to poll for the job status to see if the cancel completed - # successfully. - # @param [String] project_id - # Project ID of the job to cancel - # @param [String] job_id - # Job ID of the job to cancel - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BigqueryV2::CancelJobResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::CancelJobResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_job(project_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'project/{projectId}/jobs/{jobId}/cancel' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BigqueryV2::CancelJobResponse::Representation - command.response_class = Google::Apis::BigqueryV2::CancelJobResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns information about a specific job. Job information is available for a - # six month period after creation. Requires that you're the person who ran the - # job, or have the Is Owner project role. - # @param [String] project_id - # Project ID of the requested job - # @param [String] job_id - # Job ID of the requested job - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BigqueryV2::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_job(project_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/jobs/{jobId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::Job::Representation - command.response_class = Google::Apis::BigqueryV2::Job - command.params['projectId'] = project_id unless project_id.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the results of a query job. - # @param [String] project_id - # Project ID of the query job - # @param [String] job_id - # Job ID of the query job - # @param [Fixnum] max_results - # Maximum number of results to read - # @param [String] page_token - # Page token, returned by a previous call, to request the next page of results - # @param [String] start_index - # Zero-based index of the starting row - # @param [Fixnum] timeout_ms - # How long to wait for the query to complete, in milliseconds, before returning. - # Default is to return immediately. If the timeout passes before the job - # completes, the request will fail with a TIMEOUT error - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BigqueryV2::GetQueryResultsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::GetQueryResultsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_query_results(project_id, job_id, max_results: nil, page_token: nil, start_index: nil, timeout_ms: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/queries/{jobId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::GetQueryResultsResponse::Representation - command.response_class = Google::Apis::BigqueryV2::GetQueryResultsResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['timeoutMs'] = timeout_ms unless timeout_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 - - # Starts a new asynchronous job. Requires the Can View project role. - # @param [String] project_id - # Project ID of the project that will be billed for the job - # @param [Google::Apis::BigqueryV2::Job] job_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::BigqueryV2::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::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(project_id, job_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'projects/{projectId}/jobs' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::BigqueryV2::Job::Representation - command.request_object = job_object - command.response_representation = Google::Apis::BigqueryV2::Job::Representation - command.response_class = Google::Apis::BigqueryV2::Job - 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 jobs that you started in the specified project. The job list returns - # in reverse chronological order of when the jobs were created, starting with - # the most recent job created. Requires the Can View project role, or the Is - # Owner project role if you set the allUsers property. - # @param [String] project_id - # Project ID of the jobs to list - # @param [Boolean] all_users - # Whether to display jobs owned by all users in the project. Default false - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # Page token, returned by a previous call, to request the next page of results - # @param [String] projection - # Restrict information returned to a set of selected fields - # @param [Array, String] state_filter - # Filter for job state - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BigqueryV2::JobList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::JobList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_jobs(project_id, all_users: nil, max_results: nil, page_token: nil, projection: nil, state_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/jobs' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::JobList::Representation - command.response_class = Google::Apis::BigqueryV2::JobList - command.params['projectId'] = project_id unless project_id.nil? - command.query['allUsers'] = all_users unless all_users.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projection'] = projection unless projection.nil? - command.query['stateFilter'] = state_filter unless state_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 - - # Runs a BigQuery SQL query synchronously and returns query results if the query - # completes within a specified timeout. - # @param [String] project_id - # Project ID of the project billed for the query - # @param [Google::Apis::BigqueryV2::QueryRequest] query_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BigqueryV2::QueryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::QueryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(project_id, query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/queries' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BigqueryV2::QueryRequest::Representation - command.request_object = query_request_object - command.response_representation = Google::Apis::BigqueryV2::QueryResponse::Representation - command.response_class = Google::Apis::BigqueryV2::QueryResponse - 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 projects to which you have been granted any project role. - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # Page token, returned by a previous call, to request the next page of results - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BigqueryV2::ProjectList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::ProjectList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::ProjectList::Representation - command.response_class = Google::Apis::BigqueryV2::ProjectList - 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 - - # Streams data into BigQuery one record at a time without needing to run a load - # job. Requires the WRITER dataset role. - # @param [String] project_id - # Project ID of the destination table. - # @param [String] dataset_id - # Dataset ID of the destination table. - # @param [String] table_id - # Table ID of the destination table. - # @param [Google::Apis::BigqueryV2::InsertAllTableDataRequest] insert_all_table_data_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::BigqueryV2::InsertAllTableDataResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::InsertAllTableDataResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_all_table_data(project_id, dataset_id, table_id, insert_all_table_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BigqueryV2::InsertAllTableDataRequest::Representation - command.request_object = insert_all_table_data_request_object - command.response_representation = Google::Apis::BigqueryV2::InsertAllTableDataResponse::Representation - command.response_class = Google::Apis::BigqueryV2::InsertAllTableDataResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.params['tableId'] = table_id unless table_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 table data from a specified set of rows. Requires the READER dataset - # role. - # @param [String] project_id - # Project ID of the table to read - # @param [String] dataset_id - # Dataset ID of the table to read - # @param [String] table_id - # Table ID of the table to read - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # Page token, returned by a previous call, identifying the result set - # @param [String] start_index - # Zero-based index of the starting row to read - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BigqueryV2::TableDataList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::TableDataList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::TableDataList::Representation - command.response_class = Google::Apis::BigqueryV2::TableDataList - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.params['tableId'] = table_id unless table_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.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 - - # Deletes the table specified by tableId from the dataset. If the table contains - # data, all the data will be deleted. - # @param [String] project_id - # Project ID of the table to delete - # @param [String] dataset_id - # Dataset ID of the table to delete - # @param [String] table_id - # Table ID of the table 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_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}' - command = make_simple_command(:delete, path, options) - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.params['tableId'] = table_id unless table_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 table resource by table ID. This method does not return the - # data in the table, it only returns the table resource, which describes the - # structure of this table. - # @param [String] project_id - # Project ID of the requested table - # @param [String] dataset_id - # Dataset ID of the requested table - # @param [String] table_id - # Table ID of the requested table - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BigqueryV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::Table::Representation - command.response_class = Google::Apis::BigqueryV2::Table - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.params['tableId'] = table_id unless table_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 new, empty table in the dataset. - # @param [String] project_id - # Project ID of the new table - # @param [String] dataset_id - # Dataset ID of the new table - # @param [Google::Apis::BigqueryV2::Table] table_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::BigqueryV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(project_id, dataset_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BigqueryV2::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::BigqueryV2::Table::Representation - command.response_class = Google::Apis::BigqueryV2::Table - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_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 tables in the specified dataset. Requires the READER dataset role. - # @param [String] project_id - # Project ID of the tables to list - # @param [String] dataset_id - # Dataset ID of the tables to list - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # Page token, returned by a previous call, to request the next page of results - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BigqueryV2::TableList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::TableList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BigqueryV2::TableList::Representation - command.response_class = Google::Apis::BigqueryV2::TableList - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_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 - - # Updates information in an existing table. The update method replaces the - # entire table resource, whereas the patch method only replaces fields that are - # provided in the submitted table resource. This method supports patch semantics. - # @param [String] project_id - # Project ID of the table to update - # @param [String] dataset_id - # Dataset ID of the table to update - # @param [String] table_id - # Table ID of the table to update - # @param [Google::Apis::BigqueryV2::Table] table_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::BigqueryV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::BigqueryV2::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::BigqueryV2::Table::Representation - command.response_class = Google::Apis::BigqueryV2::Table - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.params['tableId'] = table_id unless table_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 information in an existing table. The update method replaces the - # entire table resource, whereas the patch method only replaces fields that are - # provided in the submitted table resource. - # @param [String] project_id - # Project ID of the table to update - # @param [String] dataset_id - # Dataset ID of the table to update - # @param [String] table_id - # Table ID of the table to update - # @param [Google::Apis::BigqueryV2::Table] table_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::BigqueryV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::BigqueryV2::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::BigqueryV2::Table::Representation - command.response_class = Google::Apis::BigqueryV2::Table - command.params['projectId'] = project_id unless project_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.params['tableId'] = table_id unless table_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 diff --git a/generated/google/apis/blogger_v3.rb b/generated/google/apis/blogger_v3.rb deleted file mode 100644 index 65fd0980d..000000000 --- a/generated/google/apis/blogger_v3.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/blogger_v3/classes.rb b/generated/google/apis/blogger_v3/classes.rb deleted file mode 100644 index 7126bbfaa..000000000 --- a/generated/google/apis/blogger_v3/classes.rb +++ /dev/null @@ -1,1354 +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 - include Google::Apis::Core::Hashable - - # The JSON custom meta-data for the Blog - # Corresponds to the JSON property `customMetaData` - # @return [String] - attr_accessor :custom_meta_data - - # The description of this blog. This is displayed underneath the title. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The identifier for this resource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of this entry. Always blogger#blog - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The locale this Blog is set to. - # Corresponds to the JSON property `locale` - # @return [Google::Apis::BloggerV3::Blog::Locale] - attr_accessor :locale - - # The name of this blog. This is displayed as the title. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The container of pages in this blog. - # Corresponds to the JSON property `pages` - # @return [Google::Apis::BloggerV3::Blog::Pages] - attr_accessor :pages - - # The container of posts in this blog. - # Corresponds to the JSON property `posts` - # @return [Google::Apis::BloggerV3::Blog::Posts] - attr_accessor :posts - - # RFC 3339 date-time when this blog was published. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # The API REST URL to fetch this resource from. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The status of the blog. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # RFC 3339 date-time when this blog was last updated. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The URL where this blog is published. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_meta_data = args[:custom_meta_data] unless args[:custom_meta_data].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @locale = args[:locale] unless args[:locale].nil? - @name = args[:name] unless args[:name].nil? - @pages = args[:pages] unless args[:pages].nil? - @posts = args[:posts] unless args[:posts].nil? - @published = args[:published] unless args[:published].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @updated = args[:updated] unless args[:updated].nil? - @url = args[:url] unless args[:url].nil? - end - - # The locale this Blog is set to. - class Locale - include Google::Apis::Core::Hashable - - # The country this blog's locale is set to. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # The language this blog is authored in. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # The language variant this blog is authored in. - # Corresponds to the JSON property `variant` - # @return [String] - attr_accessor :variant - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @language = args[:language] unless args[:language].nil? - @variant = args[:variant] unless args[:variant].nil? - end - end - - # The container of pages in this blog. - class Pages - include Google::Apis::Core::Hashable - - # The URL of the container for pages in this blog. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The count of pages in this blog. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # The container of posts in this blog. - class Posts - include Google::Apis::Core::Hashable - - # The List of Posts for this Blog. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The URL of the container for posts in this blog. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The count of posts in this blog. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - - # - class BlogList - include Google::Apis::Core::Hashable - - # Admin level list of blog per-user information - # Corresponds to the JSON property `blogUserInfos` - # @return [Array] - attr_accessor :blog_user_infos - - # The list of Blogs this user has Authorship or Admin rights over. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of this entity. Always blogger#blogList - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @blog_user_infos = args[:blog_user_infos] unless args[:blog_user_infos].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class BlogPerUserInfo - include Google::Apis::Core::Hashable - - # ID of the Blog resource - # Corresponds to the JSON property `blogId` - # @return [String] - attr_accessor :blog_id - - # True if the user has Admin level access to the blog. - # Corresponds to the JSON property `hasAdminAccess` - # @return [Boolean] - attr_accessor :has_admin_access - alias_method :has_admin_access?, :has_admin_access - - # The kind of this entity. Always blogger#blogPerUserInfo - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The Photo Album Key for the user when adding photos to the blog - # Corresponds to the JSON property `photosAlbumKey` - # @return [String] - attr_accessor :photos_album_key - - # Access permissions that the user has for the blog (ADMIN, AUTHOR, or READER). - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # ID of the User - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @blog_id = args[:blog_id] unless args[:blog_id].nil? - @has_admin_access = args[:has_admin_access] unless args[:has_admin_access].nil? - @kind = args[:kind] unless args[:kind].nil? - @photos_album_key = args[:photos_album_key] unless args[:photos_album_key].nil? - @role = args[:role] unless args[:role].nil? - @user_id = args[:user_id] unless args[:user_id].nil? - end - end - - # - class BlogUserInfo - include Google::Apis::Core::Hashable - - # The Blog resource. - # Corresponds to the JSON property `blog` - # @return [Google::Apis::BloggerV3::Blog] - attr_accessor :blog - - # Information about a User for the Blog. - # Corresponds to the JSON property `blog_user_info` - # @return [Google::Apis::BloggerV3::BlogPerUserInfo] - attr_accessor :blog_user_info - - # The kind of this entity. Always blogger#blogUserInfo - # 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) - @blog = args[:blog] unless args[:blog].nil? - @blog_user_info = args[:blog_user_info] unless args[:blog_user_info].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class Comment - include Google::Apis::Core::Hashable - - # The author of this Comment. - # Corresponds to the JSON property `author` - # @return [Google::Apis::BloggerV3::Comment::Author] - attr_accessor :author - - # Data about the blog containing this comment. - # Corresponds to the JSON property `blog` - # @return [Google::Apis::BloggerV3::Comment::Blog] - attr_accessor :blog - - # The actual content of the comment. May include HTML markup. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The identifier for this resource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Data about the comment this is in reply to. - # Corresponds to the JSON property `inReplyTo` - # @return [Google::Apis::BloggerV3::Comment::InReplyTo] - attr_accessor :in_reply_to - - # The kind of this entry. Always blogger#comment - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Data about the post containing this comment. - # Corresponds to the JSON property `post` - # @return [Google::Apis::BloggerV3::Comment::Post] - attr_accessor :post - - # RFC 3339 date-time when this comment was published. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # The API REST URL to fetch this resource from. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The status of the comment (only populated for admin users) - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # RFC 3339 date-time when this comment was last updated. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author = args[:author] unless args[:author].nil? - @blog = args[:blog] unless args[:blog].nil? - @content = args[:content] unless args[:content].nil? - @id = args[:id] unless args[:id].nil? - @in_reply_to = args[:in_reply_to] unless args[:in_reply_to].nil? - @kind = args[:kind] unless args[:kind].nil? - @post = args[:post] unless args[:post].nil? - @published = args[:published] unless args[:published].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @updated = args[:updated] unless args[:updated].nil? - end - - # The author of this Comment. - class Author - include Google::Apis::Core::Hashable - - # The display name. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The identifier of the Comment creator. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The comment creator's avatar. - # Corresponds to the JSON property `image` - # @return [Google::Apis::BloggerV3::Comment::Author::Image] - attr_accessor :image - - # The URL of the Comment creator's Profile page. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The comment creator's avatar. - class Image - include Google::Apis::Core::Hashable - - # The comment creator's avatar URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @url = args[:url] unless args[:url].nil? - end - end - end - - # Data about the blog containing this comment. - class Blog - include Google::Apis::Core::Hashable - - # The identifier of the blog containing this comment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - - # Data about the comment this is in reply to. - class InReplyTo - include Google::Apis::Core::Hashable - - # The identified of the parent of this comment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - - # Data about the post containing this comment. - class Post - include Google::Apis::Core::Hashable - - # The identifier of the post containing this comment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - end - - # - class CommentList - include Google::Apis::Core::Hashable - - # Etag of the response. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The List of Comments for a Post. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of this entry. Always blogger#commentList - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to fetch the next page, if one exists. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Pagination token to fetch the previous page, if one exists. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - end - end - - # - class Page - include Google::Apis::Core::Hashable - - # The author of this Page. - # Corresponds to the JSON property `author` - # @return [Google::Apis::BloggerV3::Page::Author] - attr_accessor :author - - # Data about the blog containing this Page. - # Corresponds to the JSON property `blog` - # @return [Google::Apis::BloggerV3::Page::Blog] - attr_accessor :blog - - # The body content of this Page, in HTML. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # Etag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The identifier for this resource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of this entity. Always blogger#page - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # RFC 3339 date-time when this Page was published. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # The API REST URL to fetch this resource from. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The status of the page for admin resources (either LIVE or DRAFT). - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The title of this entity. This is the name displayed in the Admin user - # interface. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # RFC 3339 date-time when this Page was last updated. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The URL that this Page is displayed at. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author = args[:author] unless args[:author].nil? - @blog = args[:blog] unless args[:blog].nil? - @content = args[:content] unless args[:content].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @published = args[:published] unless args[:published].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - @url = args[:url] unless args[:url].nil? - end - - # The author of this Page. - class Author - include Google::Apis::Core::Hashable - - # The display name. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The identifier of the Page creator. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The page author's avatar. - # Corresponds to the JSON property `image` - # @return [Google::Apis::BloggerV3::Page::Author::Image] - attr_accessor :image - - # The URL of the Page creator's Profile page. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The page author's avatar. - class Image - include Google::Apis::Core::Hashable - - # The page author's avatar URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @url = args[:url] unless args[:url].nil? - end - end - end - - # Data about the blog containing this Page. - class Blog - include Google::Apis::Core::Hashable - - # The identifier of the blog containing this page. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - end - - # - class PageList - include Google::Apis::Core::Hashable - - # Etag of the response. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The list of Pages for a Blog. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of this entity. Always blogger#pageList - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to fetch the next page, if one exists. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - 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 Pageviews - include Google::Apis::Core::Hashable - - # Blog Id - # Corresponds to the JSON property `blogId` - # @return [String] - attr_accessor :blog_id - - # The container of posts in this blog. - # Corresponds to the JSON property `counts` - # @return [Array] - attr_accessor :counts - - # The kind of this entry. Always blogger#page_views - # 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) - @blog_id = args[:blog_id] unless args[:blog_id].nil? - @counts = args[:counts] unless args[:counts].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Count - include Google::Apis::Core::Hashable - - # Count of page views for the given time range - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # Time range the given count applies to - # Corresponds to the JSON property `timeRange` - # @return [String] - attr_accessor :time_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @time_range = args[:time_range] unless args[:time_range].nil? - end - end - end - - # - class Post - include Google::Apis::Core::Hashable - - # The author of this Post. - # Corresponds to the JSON property `author` - # @return [Google::Apis::BloggerV3::Post::Author] - attr_accessor :author - - # Data about the blog containing this Post. - # Corresponds to the JSON property `blog` - # @return [Google::Apis::BloggerV3::Post::Blog] - attr_accessor :blog - - # The content of the Post. May contain HTML markup. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The JSON meta-data for the Post. - # Corresponds to the JSON property `customMetaData` - # @return [String] - attr_accessor :custom_meta_data - - # Etag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The identifier of this Post. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Display image for the Post. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # The kind of this entity. Always blogger#post - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The list of labels this Post was tagged with. - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # The location for geotagged posts. - # Corresponds to the JSON property `location` - # @return [Google::Apis::BloggerV3::Post::Location] - attr_accessor :location - - # RFC 3339 date-time when this Post was published. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # Comment control and display setting for readers of this post. - # Corresponds to the JSON property `readerComments` - # @return [String] - attr_accessor :reader_comments - - # The container of comments on this Post. - # Corresponds to the JSON property `replies` - # @return [Google::Apis::BloggerV3::Post::Replies] - attr_accessor :replies - - # The API REST URL to fetch this resource from. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Status of the post. Only set for admin-level requests - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The title of the Post. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The title link URL, similar to atom's related link. - # Corresponds to the JSON property `titleLink` - # @return [String] - attr_accessor :title_link - - # RFC 3339 date-time when this Post was last updated. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The URL where this Post is displayed. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author = args[:author] unless args[:author].nil? - @blog = args[:blog] unless args[:blog].nil? - @content = args[:content] unless args[:content].nil? - @custom_meta_data = args[:custom_meta_data] unless args[:custom_meta_data].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @images = args[:images] unless args[:images].nil? - @kind = args[:kind] unless args[:kind].nil? - @labels = args[:labels] unless args[:labels].nil? - @location = args[:location] unless args[:location].nil? - @published = args[:published] unless args[:published].nil? - @reader_comments = args[:reader_comments] unless args[:reader_comments].nil? - @replies = args[:replies] unless args[:replies].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @title = args[:title] unless args[:title].nil? - @title_link = args[:title_link] unless args[:title_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @url = args[:url] unless args[:url].nil? - end - - # The author of this Post. - class Author - include Google::Apis::Core::Hashable - - # The display name. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The identifier of the Post creator. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The Post author's avatar. - # Corresponds to the JSON property `image` - # @return [Google::Apis::BloggerV3::Post::Author::Image] - attr_accessor :image - - # The URL of the Post creator's Profile page. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The Post author's avatar. - class Image - include Google::Apis::Core::Hashable - - # The Post author's avatar URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @url = args[:url] unless args[:url].nil? - end - end - end - - # Data about the blog containing this Post. - class Blog - include Google::Apis::Core::Hashable - - # The identifier of the Blog that contains this Post. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - - # - class Image - include Google::Apis::Core::Hashable - - # - # 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 - - # The location for geotagged posts. - class Location - include Google::Apis::Core::Hashable - - # Location's latitude. - # Corresponds to the JSON property `lat` - # @return [Float] - attr_accessor :lat - - # Location's longitude. - # Corresponds to the JSON property `lng` - # @return [Float] - attr_accessor :lng - - # Location name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Location's viewport span. Can be used when rendering a map preview. - # Corresponds to the JSON property `span` - # @return [String] - attr_accessor :span - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @lat = args[:lat] unless args[:lat].nil? - @lng = args[:lng] unless args[:lng].nil? - @name = args[:name] unless args[:name].nil? - @span = args[:span] unless args[:span].nil? - end - end - - # The container of comments on this Post. - class Replies - include Google::Apis::Core::Hashable - - # The List of Comments for this Post. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The URL of the comments on this post. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The count of comments on this post. - # Corresponds to the JSON property `totalItems` - # @return [String] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - - # - class PostList - include Google::Apis::Core::Hashable - - # Etag of the response. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The list of Posts for this Blog. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of this entity. Always blogger#postList - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to fetch the next page, if one exists. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - 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 PostPerUserInfo - include Google::Apis::Core::Hashable - - # ID of the Blog that the post resource belongs to. - # Corresponds to the JSON property `blogId` - # @return [String] - attr_accessor :blog_id - - # True if the user has Author level access to the post. - # Corresponds to the JSON property `hasEditAccess` - # @return [Boolean] - attr_accessor :has_edit_access - alias_method :has_edit_access?, :has_edit_access - - # The kind of this entity. Always blogger#postPerUserInfo - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # ID of the Post resource. - # Corresponds to the JSON property `postId` - # @return [String] - attr_accessor :post_id - - # ID of the User. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @blog_id = args[:blog_id] unless args[:blog_id].nil? - @has_edit_access = args[:has_edit_access] unless args[:has_edit_access].nil? - @kind = args[:kind] unless args[:kind].nil? - @post_id = args[:post_id] unless args[:post_id].nil? - @user_id = args[:user_id] unless args[:user_id].nil? - end - end - - # - class PostUserInfo - include Google::Apis::Core::Hashable - - # The kind of this entity. Always blogger#postUserInfo - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The Post resource. - # Corresponds to the JSON property `post` - # @return [Google::Apis::BloggerV3::Post] - attr_accessor :post - - # Information about a User for the Post. - # Corresponds to the JSON property `post_user_info` - # @return [Google::Apis::BloggerV3::PostPerUserInfo] - attr_accessor :post_user_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @post = args[:post] unless args[:post].nil? - @post_user_info = args[:post_user_info] unless args[:post_user_info].nil? - end - end - - # - class PostUserInfosList - include Google::Apis::Core::Hashable - - # The list of Posts with User information for the post, for this Blog. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of this entity. Always blogger#postList - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to fetch the next page, if one exists. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - 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 - - # - class User - include Google::Apis::Core::Hashable - - # Profile summary information. - # Corresponds to the JSON property `about` - # @return [String] - attr_accessor :about - - # The container of blogs for this user. - # Corresponds to the JSON property `blogs` - # @return [Google::Apis::BloggerV3::User::Blogs] - attr_accessor :blogs - - # The timestamp of when this profile was created, in seconds since epoch. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # The display name. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The identifier for this User. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of this entity. Always blogger#user - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This user's locale - # Corresponds to the JSON property `locale` - # @return [Google::Apis::BloggerV3::User::Locale] - attr_accessor :locale - - # The API REST URL to fetch this resource from. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The user's profile page. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @about = args[:about] unless args[:about].nil? - @blogs = args[:blogs] unless args[:blogs].nil? - @created = args[:created] unless args[:created].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @locale = args[:locale] unless args[:locale].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @url = args[:url] unless args[:url].nil? - end - - # The container of blogs for this user. - class Blogs - include Google::Apis::Core::Hashable - - # The URL of the Blogs for this user. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # This user's locale - class Locale - include Google::Apis::Core::Hashable - - # The user's country setting. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # The user's language setting. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # The user's language variant setting. - # Corresponds to the JSON property `variant` - # @return [String] - attr_accessor :variant - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @language = args[:language] unless args[:language].nil? - @variant = args[:variant] unless args[:variant].nil? - end - end - end - end - end -end diff --git a/generated/google/apis/blogger_v3/representations.rb b/generated/google/apis/blogger_v3/representations.rb deleted file mode 100644 index 39d74a810..000000000 --- a/generated/google/apis/blogger_v3/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/blogger_v3/service.rb b/generated/google/apis/blogger_v3/service.rb deleted file mode 100644 index bc89ca8bc..000000000 --- a/generated/google/apis/blogger_v3/service.rb +++ /dev/null @@ -1,1620 +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 BloggerV3 - # Blogger API - # - # API for access to the data within Blogger. - # - # @example - # require 'google/apis/blogger_v3' - # - # Blogger = Google::Apis::BloggerV3 # Alias the module - # service = Blogger::BloggerService.new - # - # @see https://developers.google.com/blogger/docs/3.0/getting_started - class BloggerService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - attr_accessor :quota_user - - # @return [String] - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'blogger/v3/') - end - - # Gets one blog and user info pair by blogId and userId. - # @param [String] user_id - # ID of the user whose blogs are to be fetched. Either the word 'self' (sans - # quote marks) or the user's profile identifier. - # @param [String] blog_id - # The ID of the blog to get. - # @param [Fixnum] max_posts - # Maximum number of posts to pull back with the blog. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::BlogUserInfo] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::BlogUserInfo] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_blog_user_info(user_id, blog_id, max_posts: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}/blogs/{blogId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::BlogUserInfo::Representation - command.response_class = Google::Apis::BloggerV3::BlogUserInfo - command.params['userId'] = user_id unless user_id.nil? - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['maxPosts'] = max_posts unless max_posts.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one blog by ID. - # @param [String] blog_id - # The ID of the blog to get. - # @param [Fixnum] max_posts - # Maximum number of posts to pull back with the blog. - # @param [String] view - # Access level with which to view the blog. Note that some fields require - # elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Blog] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Blog] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_blog(blog_id, max_posts: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::Blog::Representation - command.response_class = Google::Apis::BloggerV3::Blog - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['maxPosts'] = max_posts unless max_posts.nil? - command.query['view'] = view unless view.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 - - # Retrieve a Blog by URL. - # @param [String] url - # The URL of the blog to retrieve. - # @param [String] view - # Access level with which to view the blog. Note that some fields require - # elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Blog] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Blog] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_blog_by_url(url: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/byurl' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::Blog::Representation - command.response_class = Google::Apis::BloggerV3::Blog - command.query['url'] = url unless url.nil? - command.query['view'] = view unless view.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of blogs, possibly filtered. - # @param [String] user_id - # ID of the user whose blogs are to be fetched. Either the word 'self' (sans - # quote marks) or the user's profile identifier. - # @param [Boolean] fetch_user_info - # Whether the response is a list of blogs with per-user information instead of - # just blogs. - # @param [Array, String] role - # User access types for blogs to include in the results, e.g. AUTHOR will return - # blogs where the user has author level access. If no roles are specified, - # defaults to ADMIN and AUTHOR roles. - # @param [Array, String] status - # Blog statuses to include in the result (default: Live blogs only). Note that - # ADMIN access is required to view deleted blogs. - # @param [String] view - # Access level with which to view the blogs. Note that some fields require - # elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::BlogList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::BlogList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_blogs_by_user(user_id, fetch_user_info: nil, role: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}/blogs' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::BlogList::Representation - command.response_class = Google::Apis::BloggerV3::BlogList - command.params['userId'] = user_id unless user_id.nil? - command.query['fetchUserInfo'] = fetch_user_info unless fetch_user_info.nil? - command.query['role'] = role unless role.nil? - command.query['status'] = status unless status.nil? - command.query['view'] = view unless view.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Marks a comment as not spam. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [String] comment_id - # The ID of the comment to mark as not spam. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def approve_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/approve' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BloggerV3::Comment::Representation - command.response_class = Google::Apis::BloggerV3::Comment - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete a comment by ID. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [String] comment_id - # The ID of the comment 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_comment(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}' - command = make_simple_command(:delete, path, options) - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one comment by ID. - # @param [String] blog_id - # ID of the blog to containing the comment. - # @param [String] post_id - # ID of the post to fetch posts from. - # @param [String] comment_id - # The ID of the comment to get. - # @param [String] view - # Access level for the requested comment (default: READER). Note that some - # comments will require elevated permissions, for example comments where the - # parent posts which is in a draft state, or comments that are pending - # moderation. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_comment(blog_id, post_id, comment_id, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::Comment::Representation - command.response_class = Google::Apis::BloggerV3::Comment - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['view'] = view unless view.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the comments for a post, possibly filtered. - # @param [String] blog_id - # ID of the blog to fetch comments from. - # @param [String] post_id - # ID of the post to fetch posts from. - # @param [DateTime] end_date - # Latest date of comment to fetch, a date-time with RFC 3339 formatting. - # @param [Boolean] fetch_bodies - # Whether the body content of the comments is included. - # @param [Fixnum] max_results - # Maximum number of comments to include in the result. - # @param [String] page_token - # Continuation token if request is paged. - # @param [DateTime] start_date - # Earliest date of comment to fetch, a date-time with RFC 3339 formatting. - # @param [Array, String] status - # @param [String] view - # Access level with which to view the returned result. Note that some fields - # require elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::CommentList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::CommentList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_comments(blog_id, post_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/comments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::CommentList::Representation - command.response_class = Google::Apis::BloggerV3::CommentList - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['status'] = status unless status.nil? - command.query['view'] = view unless view.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the comments for a blog, across all posts, possibly filtered. - # @param [String] blog_id - # ID of the blog to fetch comments from. - # @param [DateTime] end_date - # Latest date of comment to fetch, a date-time with RFC 3339 formatting. - # @param [Boolean] fetch_bodies - # Whether the body content of the comments is included. - # @param [Fixnum] max_results - # Maximum number of comments to include in the result. - # @param [String] page_token - # Continuation token if request is paged. - # @param [DateTime] start_date - # Earliest date of comment to fetch, a date-time with RFC 3339 formatting. - # @param [Array, String] status - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::CommentList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::CommentList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_comments_by_blog(blog_id, end_date: nil, fetch_bodies: nil, max_results: nil, page_token: nil, start_date: nil, status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/comments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::CommentList::Representation - command.response_class = Google::Apis::BloggerV3::CommentList - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['status'] = status unless status.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Marks a comment as spam. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [String] comment_id - # The ID of the comment to mark as spam. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def mark_comment_as_spam(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/spam' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BloggerV3::Comment::Representation - command.response_class = Google::Apis::BloggerV3::Comment - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes the content of a comment. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [String] comment_id - # The ID of the comment to delete content from. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def remove_comment_content(blog_id, post_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BloggerV3::Comment::Representation - command.response_class = Google::Apis::BloggerV3::Comment - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieve pageview stats for a Blog. - # @param [String] blog_id - # The ID of the blog to get. - # @param [Array, String] range - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Pageviews] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Pageviews] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_page_view(blog_id, range: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pageviews' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::Pageviews::Representation - command.response_class = Google::Apis::BloggerV3::Pageviews - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['range'] = range unless range.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 a page by ID. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] page_id - # The ID of the Page. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages/{pageId}' - command = make_simple_command(:delete, path, options) - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['pageId'] = page_id unless page_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one blog page by ID. - # @param [String] blog_id - # ID of the blog containing the page. - # @param [String] page_id - # The ID of the page to get. - # @param [String] view - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Page] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Page] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_page(blog_id, page_id, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages/{pageId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::Page::Representation - command.response_class = Google::Apis::BloggerV3::Page - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['pageId'] = page_id unless page_id.nil? - command.query['view'] = view unless view.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Add a page. - # @param [String] blog_id - # ID of the blog to add the page to. - # @param [Google::Apis::BloggerV3::Page] page_object - # @param [Boolean] is_draft - # Whether to create the page as a draft (default: false). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Page] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Page] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_page(blog_id, page_object = nil, is_draft: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BloggerV3::Page::Representation - command.request_object = page_object - command.response_representation = Google::Apis::BloggerV3::Page::Representation - command.response_class = Google::Apis::BloggerV3::Page - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['isDraft'] = is_draft unless is_draft.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 pages for a blog, optionally including non-LIVE statuses. - # @param [String] blog_id - # ID of the blog to fetch Pages from. - # @param [Boolean] fetch_bodies - # Whether to retrieve the Page bodies. - # @param [Fixnum] max_results - # Maximum number of Pages to fetch. - # @param [String] page_token - # Continuation token if the request is paged. - # @param [Array, String] status - # @param [String] view - # Access level with which to view the returned result. Note that some fields - # require elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::PageList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::PageList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_pages(blog_id, fetch_bodies: nil, max_results: nil, page_token: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::PageList::Representation - command.response_class = Google::Apis::BloggerV3::PageList - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['status'] = status unless status.nil? - command.query['view'] = view unless view.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 a page. This method supports patch semantics. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] page_id - # The ID of the Page. - # @param [Google::Apis::BloggerV3::Page] page_object - # @param [Boolean] publish - # Whether a publish action should be performed when the page is updated (default: - # false). - # @param [Boolean] revert - # Whether a revert action should be performed when the page is updated (default: - # false). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Page] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Page] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages/{pageId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::BloggerV3::Page::Representation - command.request_object = page_object - command.response_representation = Google::Apis::BloggerV3::Page::Representation - command.response_class = Google::Apis::BloggerV3::Page - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['pageId'] = page_id unless page_id.nil? - command.query['publish'] = publish unless publish.nil? - command.query['revert'] = revert unless revert.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 - - # Publishes a draft page. - # @param [String] blog_id - # The ID of the blog. - # @param [String] page_id - # The ID of the page. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Page] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Page] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages/{pageId}/publish' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BloggerV3::Page::Representation - command.response_class = Google::Apis::BloggerV3::Page - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['pageId'] = page_id unless page_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Revert a published or scheduled page to draft state. - # @param [String] blog_id - # The ID of the blog. - # @param [String] page_id - # The ID of the page. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Page] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Page] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def revert_page(blog_id, page_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages/{pageId}/revert' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BloggerV3::Page::Representation - command.response_class = Google::Apis::BloggerV3::Page - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['pageId'] = page_id unless page_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Update a page. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] page_id - # The ID of the Page. - # @param [Google::Apis::BloggerV3::Page] page_object - # @param [Boolean] publish - # Whether a publish action should be performed when the page is updated (default: - # false). - # @param [Boolean] revert - # Whether a revert action should be performed when the page is updated (default: - # false). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Page] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Page] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_page(blog_id, page_id, page_object = nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/pages/{pageId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::BloggerV3::Page::Representation - command.request_object = page_object - command.response_representation = Google::Apis::BloggerV3::Page::Representation - command.response_class = Google::Apis::BloggerV3::Page - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['pageId'] = page_id unless page_id.nil? - command.query['publish'] = publish unless publish.nil? - command.query['revert'] = revert unless revert.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 post and user info pair, by post ID and user ID. The post user info - # contains per-user information about the post, such as access rights, specific - # to the user. - # @param [String] user_id - # ID of the user for the per-user information to be fetched. Either the word ' - # self' (sans quote marks) or the user's profile identifier. - # @param [String] blog_id - # The ID of the blog. - # @param [String] post_id - # The ID of the post to get. - # @param [Fixnum] max_comments - # Maximum number of comments to pull back on a post. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::BloggerV3::PostUserInfo] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::PostUserInfo] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_post_user_info(user_id, blog_id, post_id, max_comments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}/blogs/{blogId}/posts/{postId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::PostUserInfo::Representation - command.response_class = Google::Apis::BloggerV3::PostUserInfo - command.params['userId'] = user_id unless user_id.nil? - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['maxComments'] = max_comments unless max_comments.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 post and post user info pairs, possibly filtered. The post - # user info contains per-user information about the post, such as access rights, - # specific to the user. - # @param [String] user_id - # ID of the user for the per-user information to be fetched. Either the word ' - # self' (sans quote marks) or the user's profile identifier. - # @param [String] blog_id - # ID of the blog to fetch posts from. - # @param [DateTime] end_date - # Latest post date to fetch, a date-time with RFC 3339 formatting. - # @param [Boolean] fetch_bodies - # Whether the body content of posts is included. Default is false. - # @param [String] labels - # Comma-separated list of labels to search for. - # @param [Fixnum] max_results - # Maximum number of posts to fetch. - # @param [String] order_by - # Sort order applied to search results. Default is published. - # @param [String] page_token - # Continuation token if the request is paged. - # @param [DateTime] start_date - # Earliest post date to fetch, a date-time with RFC 3339 formatting. - # @param [Array, String] status - # @param [String] view - # Access level with which to view the returned result. Note that some fields - # require elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::PostUserInfosList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::PostUserInfosList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_post_user_info(user_id, blog_id, end_date: nil, fetch_bodies: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}/blogs/{blogId}/posts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::PostUserInfosList::Representation - command.response_class = Google::Apis::BloggerV3::PostUserInfosList - command.params['userId'] = user_id unless user_id.nil? - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil? - command.query['labels'] = labels unless labels.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['status'] = status unless status.nil? - command.query['view'] = view unless view.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 a post by ID. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}' - command = make_simple_command(:delete, path, options) - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a post by ID. - # @param [String] blog_id - # ID of the blog to fetch the post from. - # @param [String] post_id - # The ID of the post - # @param [Boolean] fetch_body - # Whether the body content of the post is included (default: true). This should - # be set to false when the post bodies are not required, to help minimize - # traffic. - # @param [Boolean] fetch_images - # Whether image URL metadata for each post is included (default: false). - # @param [Fixnum] max_comments - # Maximum number of comments to pull back on a post. - # @param [String] view - # Access level with which to view the returned result. Note that some fields - # require elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Post] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Post] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_post(blog_id, post_id, fetch_body: nil, fetch_images: nil, max_comments: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::Post::Representation - command.response_class = Google::Apis::BloggerV3::Post - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['fetchBody'] = fetch_body unless fetch_body.nil? - command.query['fetchImages'] = fetch_images unless fetch_images.nil? - command.query['maxComments'] = max_comments unless max_comments.nil? - command.query['view'] = view unless view.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 - - # Retrieve a Post by Path. - # @param [String] blog_id - # ID of the blog to fetch the post from. - # @param [Fixnum] max_comments - # Maximum number of comments to pull back on a post. - # @param [String] path - # Path of the Post to retrieve. - # @param [String] view - # Access level with which to view the returned result. Note that some fields - # require elevated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Post] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Post] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_post_by_path(blog_id, max_comments: nil, path: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/bypath' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::Post::Representation - command.response_class = Google::Apis::BloggerV3::Post - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['maxComments'] = max_comments unless max_comments.nil? - command.query['path'] = path unless path.nil? - command.query['view'] = view unless view.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 - - # Add a post. - # @param [String] blog_id - # ID of the blog to add the post to. - # @param [Google::Apis::BloggerV3::Post] post_object - # @param [Boolean] fetch_body - # Whether the body content of the post is included with the result (default: - # true). - # @param [Boolean] fetch_images - # Whether image URL metadata for each post is included in the returned result ( - # default: false). - # @param [Boolean] is_draft - # Whether to create the post as a draft (default: false). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Post] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Post] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_post(blog_id, post_object = nil, fetch_body: nil, fetch_images: nil, is_draft: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BloggerV3::Post::Representation - command.request_object = post_object - command.response_representation = Google::Apis::BloggerV3::Post::Representation - command.response_class = Google::Apis::BloggerV3::Post - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['fetchBody'] = fetch_body unless fetch_body.nil? - command.query['fetchImages'] = fetch_images unless fetch_images.nil? - command.query['isDraft'] = is_draft unless is_draft.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of posts, possibly filtered. - # @param [String] blog_id - # ID of the blog to fetch posts from. - # @param [DateTime] end_date - # Latest post date to fetch, a date-time with RFC 3339 formatting. - # @param [Boolean] fetch_bodies - # Whether the body content of posts is included (default: true). This should be - # set to false when the post bodies are not required, to help minimize traffic. - # @param [Boolean] fetch_images - # Whether image URL metadata for each post is included. - # @param [String] labels - # Comma-separated list of labels to search for. - # @param [Fixnum] max_results - # Maximum number of posts to fetch. - # @param [String] order_by - # Sort search results - # @param [String] page_token - # Continuation token if the request is paged. - # @param [DateTime] start_date - # Earliest post date to fetch, a date-time with RFC 3339 formatting. - # @param [Array, String] status - # Statuses to include in the results. - # @param [String] view - # Access level with which to view the returned result. Note that some fields - # require escalated access. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::PostList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::PostList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_posts(blog_id, end_date: nil, fetch_bodies: nil, fetch_images: nil, labels: nil, max_results: nil, order_by: nil, page_token: nil, start_date: nil, status: nil, view: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::PostList::Representation - command.response_class = Google::Apis::BloggerV3::PostList - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil? - command.query['fetchImages'] = fetch_images unless fetch_images.nil? - command.query['labels'] = labels unless labels.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['status'] = status unless status.nil? - command.query['view'] = view unless view.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 a post. This method supports patch semantics. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [Google::Apis::BloggerV3::Post] post_object - # @param [Boolean] fetch_body - # Whether the body content of the post is included with the result (default: - # true). - # @param [Boolean] fetch_images - # Whether image URL metadata for each post is included in the returned result ( - # default: false). - # @param [Fixnum] max_comments - # Maximum number of comments to retrieve with the returned post. - # @param [Boolean] publish - # Whether a publish action should be performed when the post is updated (default: - # false). - # @param [Boolean] revert - # Whether a revert action should be performed when the post is updated (default: - # false). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Post] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Post] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::BloggerV3::Post::Representation - command.request_object = post_object - command.response_representation = Google::Apis::BloggerV3::Post::Representation - command.response_class = Google::Apis::BloggerV3::Post - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['fetchBody'] = fetch_body unless fetch_body.nil? - command.query['fetchImages'] = fetch_images unless fetch_images.nil? - command.query['maxComments'] = max_comments unless max_comments.nil? - command.query['publish'] = publish unless publish.nil? - command.query['revert'] = revert unless revert.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 - - # Publishes a draft post, optionally at the specific time of the given - # publishDate parameter. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [DateTime] publish_date - # Optional date and time to schedule the publishing of the Blog. If no - # publishDate parameter is given, the post is either published at the a - # previously saved schedule date (if present), or the current time. If a future - # date is given, the post will be scheduled to be published. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Post] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Post] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish_post(blog_id, post_id, publish_date: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/publish' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BloggerV3::Post::Representation - command.response_class = Google::Apis::BloggerV3::Post - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['publishDate'] = publish_date unless publish_date.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Revert a published or scheduled post to draft state. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::BloggerV3::Post] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Post] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def revert_post(blog_id, post_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}/revert' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BloggerV3::Post::Representation - command.response_class = Google::Apis::BloggerV3::Post - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Search for a post. - # @param [String] blog_id - # ID of the blog to fetch the post from. - # @param [Boolean] fetch_bodies - # Whether the body content of posts is included (default: true). This should be - # set to false when the post bodies are not required, to help minimize traffic. - # @param [String] order_by - # Sort search results - # @param [String] q - # Query terms to search this blog for matching posts. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::PostList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::PostList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_posts(blog_id, fetch_bodies: nil, order_by: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/search' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::PostList::Representation - command.response_class = Google::Apis::BloggerV3::PostList - command.params['blogId'] = blog_id unless blog_id.nil? - command.query['fetchBodies'] = fetch_bodies unless fetch_bodies.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['q'] = q unless q.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 a post. - # @param [String] blog_id - # The ID of the Blog. - # @param [String] post_id - # The ID of the Post. - # @param [Google::Apis::BloggerV3::Post] post_object - # @param [Boolean] fetch_body - # Whether the body content of the post is included with the result (default: - # true). - # @param [Boolean] fetch_images - # Whether image URL metadata for each post is included in the returned result ( - # default: false). - # @param [Fixnum] max_comments - # Maximum number of comments to retrieve with the returned post. - # @param [Boolean] publish - # Whether a publish action should be performed when the post is updated (default: - # false). - # @param [Boolean] revert - # Whether a revert action should be performed when the post is updated (default: - # false). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BloggerV3::Post] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::Post] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_post(blog_id, post_id, post_object = nil, fetch_body: nil, fetch_images: nil, max_comments: nil, publish: nil, revert: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'blogs/{blogId}/posts/{postId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::BloggerV3::Post::Representation - command.request_object = post_object - command.response_representation = Google::Apis::BloggerV3::Post::Representation - command.response_class = Google::Apis::BloggerV3::Post - command.params['blogId'] = blog_id unless blog_id.nil? - command.params['postId'] = post_id unless post_id.nil? - command.query['fetchBody'] = fetch_body unless fetch_body.nil? - command.query['fetchImages'] = fetch_images unless fetch_images.nil? - command.query['maxComments'] = max_comments unless max_comments.nil? - command.query['publish'] = publish unless publish.nil? - command.query['revert'] = revert unless revert.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one user by ID. - # @param [String] user_id - # The ID of the user to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::BloggerV3::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BloggerV3::User] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BloggerV3::User::Representation - command.response_class = Google::Apis::BloggerV3::User - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - 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 diff --git a/generated/google/apis/books_v1.rb b/generated/google/apis/books_v1.rb deleted file mode 100644 index dc3fa9bcd..000000000 --- a/generated/google/apis/books_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/books_v1/classes.rb b/generated/google/apis/books_v1/classes.rb deleted file mode 100644 index 67259bee2..000000000 --- a/generated/google/apis/books_v1/classes.rb +++ /dev/null @@ -1,3515 +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 BooksV1 - - # - class Annotation - include Google::Apis::Core::Hashable - - # Anchor text after excerpt. For requests, if the user bookmarked a screen that - # has no flowing text on it, then this field should be empty. - # Corresponds to the JSON property `afterSelectedText` - # @return [String] - attr_accessor :after_selected_text - - # Anchor text before excerpt. For requests, if the user bookmarked a screen that - # has no flowing text on it, then this field should be empty. - # Corresponds to the JSON property `beforeSelectedText` - # @return [String] - attr_accessor :before_selected_text - - # Selection ranges sent from the client. - # Corresponds to the JSON property `clientVersionRanges` - # @return [Google::Apis::BooksV1::Annotation::ClientVersionRanges] - attr_accessor :client_version_ranges - - # Timestamp for the created time of this annotation. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Selection ranges for the most recent content version. - # Corresponds to the JSON property `currentVersionRanges` - # @return [Google::Apis::BooksV1::Annotation::CurrentVersionRanges] - attr_accessor :current_version_ranges - - # User-created data for this annotation. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Indicates that this annotation is deleted. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # The highlight style for this annotation. - # Corresponds to the JSON property `highlightStyle` - # @return [String] - attr_accessor :highlight_style - - # Id of this annotation, in the form of a GUID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The layer this annotation is for. - # Corresponds to the JSON property `layerId` - # @return [String] - attr_accessor :layer_id - - # - # Corresponds to the JSON property `layerSummary` - # @return [Google::Apis::BooksV1::Annotation::LayerSummary] - attr_accessor :layer_summary - - # Pages that this annotation spans. - # Corresponds to the JSON property `pageIds` - # @return [Array] - attr_accessor :page_ids - - # Excerpt from the volume. - # Corresponds to the JSON property `selectedText` - # @return [String] - attr_accessor :selected_text - - # URL to this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Timestamp for the last time this annotation was modified. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The volume that this annotation belongs to. - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @after_selected_text = args[:after_selected_text] unless args[:after_selected_text].nil? - @before_selected_text = args[:before_selected_text] unless args[:before_selected_text].nil? - @client_version_ranges = args[:client_version_ranges] unless args[:client_version_ranges].nil? - @created = args[:created] unless args[:created].nil? - @current_version_ranges = args[:current_version_ranges] unless args[:current_version_ranges].nil? - @data = args[:data] unless args[:data].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @highlight_style = args[:highlight_style] unless args[:highlight_style].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @layer_id = args[:layer_id] unless args[:layer_id].nil? - @layer_summary = args[:layer_summary] unless args[:layer_summary].nil? - @page_ids = args[:page_ids] unless args[:page_ids].nil? - @selected_text = args[:selected_text] unless args[:selected_text].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - - # Selection ranges sent from the client. - class ClientVersionRanges - include Google::Apis::Core::Hashable - - # Range in CFI format for this annotation sent by client. - # Corresponds to the JSON property `cfiRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :cfi_range - - # Content version the client sent in. - # Corresponds to the JSON property `contentVersion` - # @return [String] - attr_accessor :content_version - - # Range in GB image format for this annotation sent by client. - # Corresponds to the JSON property `gbImageRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :gb_image_range - - # Range in GB text format for this annotation sent by client. - # Corresponds to the JSON property `gbTextRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :gb_text_range - - # Range in image CFI format for this annotation sent by client. - # Corresponds to the JSON property `imageCfiRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :image_cfi_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cfi_range = args[:cfi_range] unless args[:cfi_range].nil? - @content_version = args[:content_version] unless args[:content_version].nil? - @gb_image_range = args[:gb_image_range] unless args[:gb_image_range].nil? - @gb_text_range = args[:gb_text_range] unless args[:gb_text_range].nil? - @image_cfi_range = args[:image_cfi_range] unless args[:image_cfi_range].nil? - end - end - - # Selection ranges for the most recent content version. - class CurrentVersionRanges - include Google::Apis::Core::Hashable - - # Range in CFI format for this annotation for version above. - # Corresponds to the JSON property `cfiRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :cfi_range - - # Content version applicable to ranges below. - # Corresponds to the JSON property `contentVersion` - # @return [String] - attr_accessor :content_version - - # Range in GB image format for this annotation for version above. - # Corresponds to the JSON property `gbImageRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :gb_image_range - - # Range in GB text format for this annotation for version above. - # Corresponds to the JSON property `gbTextRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :gb_text_range - - # Range in image CFI format for this annotation for version above. - # Corresponds to the JSON property `imageCfiRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :image_cfi_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cfi_range = args[:cfi_range] unless args[:cfi_range].nil? - @content_version = args[:content_version] unless args[:content_version].nil? - @gb_image_range = args[:gb_image_range] unless args[:gb_image_range].nil? - @gb_text_range = args[:gb_text_range] unless args[:gb_text_range].nil? - @image_cfi_range = args[:image_cfi_range] unless args[:image_cfi_range].nil? - end - end - - # - class LayerSummary - include Google::Apis::Core::Hashable - - # Maximum allowed characters on this layer, especially for the "copy" layer. - # Corresponds to the JSON property `allowedCharacterCount` - # @return [Fixnum] - attr_accessor :allowed_character_count - - # Type of limitation on this layer. "limited" or "unlimited" for the "copy" - # layer. - # Corresponds to the JSON property `limitType` - # @return [String] - attr_accessor :limit_type - - # Remaining allowed characters on this layer, especially for the "copy" layer. - # Corresponds to the JSON property `remainingCharacterCount` - # @return [Fixnum] - attr_accessor :remaining_character_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allowed_character_count = args[:allowed_character_count] unless args[:allowed_character_count].nil? - @limit_type = args[:limit_type] unless args[:limit_type].nil? - @remaining_character_count = args[:remaining_character_count] unless args[:remaining_character_count].nil? - end - end - end - - # - class AnnotationData - include Google::Apis::Core::Hashable - - # The type of annotation this data is for. - # Corresponds to the JSON property `annotationType` - # @return [String] - attr_accessor :annotation_type - - # - # Corresponds to the JSON property `data` - # @return [Object] - attr_accessor :data - - # Base64 encoded data for this annotation data. - # Corresponds to the JSON property `encoded_data` - # @return [String] - attr_accessor :encoded_data - - # Unique id for this annotation data. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource Type - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The Layer id for this data. * - # Corresponds to the JSON property `layerId` - # @return [String] - attr_accessor :layer_id - - # URL for this resource. * - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Timestamp for the last time this data was updated. (RFC 3339 UTC date-time - # format). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The volume id for this data. * - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation_type = args[:annotation_type] unless args[:annotation_type].nil? - @data = args[:data] unless args[:data].nil? - @encoded_data = args[:encoded_data] unless args[:encoded_data].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @layer_id = args[:layer_id] unless args[:layer_id].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - end - - # - class Annotations - include Google::Apis::Core::Hashable - - # A list of annotations. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token to pass in for pagination for the next page. This will not be present if - # this request does not have more results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Total number of annotations found. This may be greater than the number of - # notes returned in this response if results have been paginated. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # - class AnnotationsSummary - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `layers` - # @return [Array] - attr_accessor :layers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @layers = args[:layers] unless args[:layers].nil? - end - - # - class Layer - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `allowedCharacterCount` - # @return [Fixnum] - attr_accessor :allowed_character_count - - # - # Corresponds to the JSON property `layerId` - # @return [String] - attr_accessor :layer_id - - # - # Corresponds to the JSON property `limitType` - # @return [String] - attr_accessor :limit_type - - # - # Corresponds to the JSON property `remainingCharacterCount` - # @return [Fixnum] - attr_accessor :remaining_character_count - - # - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allowed_character_count = args[:allowed_character_count] unless args[:allowed_character_count].nil? - @layer_id = args[:layer_id] unless args[:layer_id].nil? - @limit_type = args[:limit_type] unless args[:limit_type].nil? - @remaining_character_count = args[:remaining_character_count] unless args[:remaining_character_count].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - end - - # - class AnnotationsData - include Google::Apis::Core::Hashable - - # A list of Annotation Data. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token to pass in for pagination for the next page. This will not be present if - # this request does not have more results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The total number of volume annotations found. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # - class AnnotatinsRange - include Google::Apis::Core::Hashable - - # The offset from the ending position. - # Corresponds to the JSON property `endOffset` - # @return [String] - attr_accessor :end_offset - - # The ending position for the range. - # Corresponds to the JSON property `endPosition` - # @return [String] - attr_accessor :end_position - - # The offset from the starting position. - # Corresponds to the JSON property `startOffset` - # @return [String] - attr_accessor :start_offset - - # The starting position for the range. - # Corresponds to the JSON property `startPosition` - # @return [String] - attr_accessor :start_position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_offset = args[:end_offset] unless args[:end_offset].nil? - @end_position = args[:end_position] unless args[:end_position].nil? - @start_offset = args[:start_offset] unless args[:start_offset].nil? - @start_position = args[:start_position] unless args[:start_position].nil? - end - end - - # - class LoadingResource - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `author` - # @return [String] - attr_accessor :author - - # - # Corresponds to the JSON property `processingState` - # @return [String] - attr_accessor :processing_state - - # - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author = args[:author] unless args[:author].nil? - @processing_state = args[:processing_state] unless args[:processing_state].nil? - @title = args[:title] unless args[:title].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - end - - # - class RateRecommendedVolumeResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `consistency_token` - # @return [String] - attr_accessor :consistency_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @consistency_token = args[:consistency_token] unless args[:consistency_token].nil? - end - end - - # - class Bookshelf - include Google::Apis::Core::Hashable - - # Whether this bookshelf is PUBLIC or PRIVATE. - # Corresponds to the JSON property `access` - # @return [String] - attr_accessor :access - - # Created time for this bookshelf (formatted UTC timestamp with millisecond - # resolution). - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # Description of this bookshelf. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Id of this bookshelf, only unique by user. - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - - # Resource type for bookshelf metadata. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # URL to this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Title of this bookshelf. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Last modified time of this bookshelf (formatted UTC timestamp with millisecond - # resolution). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Number of volumes in this bookshelf. - # Corresponds to the JSON property `volumeCount` - # @return [Fixnum] - attr_accessor :volume_count - - # Last time a volume was added or removed from this bookshelf (formatted UTC - # timestamp with millisecond resolution). - # Corresponds to the JSON property `volumesLastUpdated` - # @return [DateTime] - attr_accessor :volumes_last_updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access = args[:access] unless args[:access].nil? - @created = args[:created] unless args[:created].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - @volume_count = args[:volume_count] unless args[:volume_count].nil? - @volumes_last_updated = args[:volumes_last_updated] unless args[:volumes_last_updated].nil? - end - end - - # - class Bookshelves - include Google::Apis::Core::Hashable - - # A list of bookshelves. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class Category - include Google::Apis::Core::Hashable - - # A list of onboarding categories. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Item - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `badgeUrl` - # @return [String] - attr_accessor :badge_url - - # - # Corresponds to the JSON property `categoryId` - # @return [String] - attr_accessor :category_id - - # - # 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) - @badge_url = args[:badge_url] unless args[:badge_url].nil? - @category_id = args[:category_id] unless args[:category_id].nil? - @name = args[:name] unless args[:name].nil? - end - end - end - - # - class ConcurrentAccessRestriction - include Google::Apis::Core::Hashable - - # Whether access is granted for this (user, device, volume). - # Corresponds to the JSON property `deviceAllowed` - # @return [Boolean] - attr_accessor :device_allowed - alias_method :device_allowed?, :device_allowed - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The maximum number of concurrent access licenses for this volume. - # Corresponds to the JSON property `maxConcurrentDevices` - # @return [Fixnum] - attr_accessor :max_concurrent_devices - - # Error/warning message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # Client nonce for verification. Download access and client-validation only. - # Corresponds to the JSON property `nonce` - # @return [String] - attr_accessor :nonce - - # Error/warning reason code. - # Corresponds to the JSON property `reasonCode` - # @return [String] - attr_accessor :reason_code - - # Whether this volume has any concurrent access restrictions. - # Corresponds to the JSON property `restricted` - # @return [Boolean] - attr_accessor :restricted - alias_method :restricted?, :restricted - - # Response signature. - # Corresponds to the JSON property `signature` - # @return [String] - attr_accessor :signature - - # Client app identifier for verification. Download access and client-validation - # only. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - # Time in seconds for license auto-expiration. - # Corresponds to the JSON property `timeWindowSeconds` - # @return [Fixnum] - attr_accessor :time_window_seconds - - # Identifies the volume for which this entry applies. - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @device_allowed = args[:device_allowed] unless args[:device_allowed].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_concurrent_devices = args[:max_concurrent_devices] unless args[:max_concurrent_devices].nil? - @message = args[:message] unless args[:message].nil? - @nonce = args[:nonce] unless args[:nonce].nil? - @reason_code = args[:reason_code] unless args[:reason_code].nil? - @restricted = args[:restricted] unless args[:restricted].nil? - @signature = args[:signature] unless args[:signature].nil? - @source = args[:source] unless args[:source].nil? - @time_window_seconds = args[:time_window_seconds] unless args[:time_window_seconds].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - end - - # - class DictLayerData - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `common` - # @return [Google::Apis::BooksV1::DictLayerData::Common] - attr_accessor :common - - # - # Corresponds to the JSON property `dict` - # @return [Google::Apis::BooksV1::DictLayerData::Dict] - attr_accessor :dict - - # - # 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) - @common = args[:common] unless args[:common].nil? - @dict = args[:dict] unless args[:dict].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Common - include Google::Apis::Core::Hashable - - # The display title and localized canonical name to use when searching for this - # entity on Google search. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] unless args[:title].nil? - end - end - - # - class Dict - include Google::Apis::Core::Hashable - - # The source, url and attribution for this dictionary data. - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::DictLayerData::Dict::Source] - attr_accessor :source - - # - # Corresponds to the JSON property `words` - # @return [Array] - attr_accessor :words - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] unless args[:source].nil? - @words = args[:words] unless args[:words].nil? - end - - # The source, url and attribution for this dictionary data. - class Source - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # - # 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) - @attribution = args[:attribution] unless args[:attribution].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # - class Word - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `derivatives` - # @return [Array] - attr_accessor :derivatives - - # - # Corresponds to the JSON property `examples` - # @return [Array] - attr_accessor :examples - - # - # Corresponds to the JSON property `senses` - # @return [Array] - attr_accessor :senses - - # The words with different meanings but not related words, e.g. "go" (game) and " - # go" (verb). - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::DictLayerData::Dict::Word::Source] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @derivatives = args[:derivatives] unless args[:derivatives].nil? - @examples = args[:examples] unless args[:examples].nil? - @senses = args[:senses] unless args[:senses].nil? - @source = args[:source] unless args[:source].nil? - end - - # - class Derivative - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::DictLayerData::Dict::Word::Derivative::Source] - attr_accessor :source - - # - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] unless args[:source].nil? - @text = args[:text] unless args[:text].nil? - end - - # - class Source - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # - # 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) - @attribution = args[:attribution] unless args[:attribution].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - - # - class Example - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::DictLayerData::Dict::Word::Example::Source] - attr_accessor :source - - # - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] unless args[:source].nil? - @text = args[:text] unless args[:text].nil? - end - - # - class Source - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # - # 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) - @attribution = args[:attribution] unless args[:attribution].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - - # - class Sense - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `conjugations` - # @return [Array] - attr_accessor :conjugations - - # - # Corresponds to the JSON property `definitions` - # @return [Array] - attr_accessor :definitions - - # - # Corresponds to the JSON property `partOfSpeech` - # @return [String] - attr_accessor :part_of_speech - - # - # Corresponds to the JSON property `pronunciation` - # @return [String] - attr_accessor :pronunciation - - # - # Corresponds to the JSON property `pronunciationUrl` - # @return [String] - attr_accessor :pronunciation_url - - # - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Source] - attr_accessor :source - - # - # Corresponds to the JSON property `syllabification` - # @return [String] - attr_accessor :syllabification - - # - # Corresponds to the JSON property `synonyms` - # @return [Array] - attr_accessor :synonyms - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @conjugations = args[:conjugations] unless args[:conjugations].nil? - @definitions = args[:definitions] unless args[:definitions].nil? - @part_of_speech = args[:part_of_speech] unless args[:part_of_speech].nil? - @pronunciation = args[:pronunciation] unless args[:pronunciation].nil? - @pronunciation_url = args[:pronunciation_url] unless args[:pronunciation_url].nil? - @source = args[:source] unless args[:source].nil? - @syllabification = args[:syllabification] unless args[:syllabification].nil? - @synonyms = args[:synonyms] unless args[:synonyms].nil? - end - - # - class Conjugation - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class Definition - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `definition` - # @return [String] - attr_accessor :definition - - # - # Corresponds to the JSON property `examples` - # @return [Array] - attr_accessor :examples - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @definition = args[:definition] unless args[:definition].nil? - @examples = args[:examples] unless args[:examples].nil? - end - - # - class Example - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Definition::Example::Source] - attr_accessor :source - - # - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] unless args[:source].nil? - @text = args[:text] unless args[:text].nil? - end - - # - class Source - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # - # 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) - @attribution = args[:attribution] unless args[:attribution].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - end - - # - class Source - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # - # 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) - @attribution = args[:attribution] unless args[:attribution].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # - class Synonym - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Synonym::Source] - attr_accessor :source - - # - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] unless args[:source].nil? - @text = args[:text] unless args[:text].nil? - end - - # - class Source - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # - # 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) - @attribution = args[:attribution] unless args[:attribution].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - end - - # The words with different meanings but not related words, e.g. "go" (game) and " - # go" (verb). - class Source - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # - # 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) - @attribution = args[:attribution] unless args[:attribution].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - end - end - - # - class DownloadAccessRestriction - include Google::Apis::Core::Hashable - - # If restricted, whether access is granted for this (user, device, volume). - # Corresponds to the JSON property `deviceAllowed` - # @return [Boolean] - attr_accessor :device_allowed - alias_method :device_allowed?, :device_allowed - - # If restricted, the number of content download licenses already acquired ( - # including the requesting client, if licensed). - # Corresponds to the JSON property `downloadsAcquired` - # @return [Fixnum] - attr_accessor :downloads_acquired - - # If deviceAllowed, whether access was just acquired with this request. - # Corresponds to the JSON property `justAcquired` - # @return [Boolean] - attr_accessor :just_acquired - alias_method :just_acquired?, :just_acquired - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # If restricted, the maximum number of content download licenses for this volume. - # Corresponds to the JSON property `maxDownloadDevices` - # @return [Fixnum] - attr_accessor :max_download_devices - - # Error/warning message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # Client nonce for verification. Download access and client-validation only. - # Corresponds to the JSON property `nonce` - # @return [String] - attr_accessor :nonce - - # Error/warning reason code. Additional codes may be added in the future. 0 OK - # 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 - # WARNING_USED_LAST_ACCESS - # Corresponds to the JSON property `reasonCode` - # @return [String] - attr_accessor :reason_code - - # Whether this volume has any download access restrictions. - # Corresponds to the JSON property `restricted` - # @return [Boolean] - attr_accessor :restricted - alias_method :restricted?, :restricted - - # Response signature. - # Corresponds to the JSON property `signature` - # @return [String] - attr_accessor :signature - - # Client app identifier for verification. Download access and client-validation - # only. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - # Identifies the volume for which this entry applies. - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @device_allowed = args[:device_allowed] unless args[:device_allowed].nil? - @downloads_acquired = args[:downloads_acquired] unless args[:downloads_acquired].nil? - @just_acquired = args[:just_acquired] unless args[:just_acquired].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_download_devices = args[:max_download_devices] unless args[:max_download_devices].nil? - @message = args[:message] unless args[:message].nil? - @nonce = args[:nonce] unless args[:nonce].nil? - @reason_code = args[:reason_code] unless args[:reason_code].nil? - @restricted = args[:restricted] unless args[:restricted].nil? - @signature = args[:signature] unless args[:signature].nil? - @source = args[:source] unless args[:source].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - end - - # - class DownloadAccesses - include Google::Apis::Core::Hashable - - # A list of download access responses. - # Corresponds to the JSON property `downloadAccessList` - # @return [Array] - attr_accessor :download_access_list - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @download_access_list = args[:download_access_list] unless args[:download_access_list].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class GeoLayerData - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `common` - # @return [Google::Apis::BooksV1::GeoLayerData::Common] - attr_accessor :common - - # - # Corresponds to the JSON property `geo` - # @return [Google::Apis::BooksV1::GeoLayerData::Geo] - attr_accessor :geo - - # - # 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) - @common = args[:common] unless args[:common].nil? - @geo = args[:geo] unless args[:geo].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Common - include Google::Apis::Core::Hashable - - # The language of the information url and description. - # Corresponds to the JSON property `lang` - # @return [String] - attr_accessor :lang - - # The URL for the preview image information. - # Corresponds to the JSON property `previewImageUrl` - # @return [String] - attr_accessor :preview_image_url - - # The description for this location. - # Corresponds to the JSON property `snippet` - # @return [String] - attr_accessor :snippet - - # The URL for information for this location. Ex: wikipedia link. - # Corresponds to the JSON property `snippetUrl` - # @return [String] - attr_accessor :snippet_url - - # The display title and localized canonical name to use when searching for this - # entity on Google search. - # 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) - @lang = args[:lang] unless args[:lang].nil? - @preview_image_url = args[:preview_image_url] unless args[:preview_image_url].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @snippet_url = args[:snippet_url] unless args[:snippet_url].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # - class Geo - include Google::Apis::Core::Hashable - - # The boundary of the location as a set of loops containing pairs of latitude, - # longitude coordinates. - # Corresponds to the JSON property `boundary` - # @return [Array>] - attr_accessor :boundary - - # The cache policy active for this data. EX: UNRESTRICTED, RESTRICTED, NEVER - # Corresponds to the JSON property `cachePolicy` - # @return [String] - attr_accessor :cache_policy - - # The country code of the location. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # The latitude of the location. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude of the location. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - # The type of map that should be used for this location. EX: HYBRID, ROADMAP, - # SATELLITE, TERRAIN - # Corresponds to the JSON property `mapType` - # @return [String] - attr_accessor :map_type - - # The viewport for showing this location. This is a latitude, longitude - # rectangle. - # Corresponds to the JSON property `viewport` - # @return [Google::Apis::BooksV1::GeoLayerData::Geo::Viewport] - attr_accessor :viewport - - # The Zoom level to use for the map. Zoom levels between 0 (the lowest zoom - # level, in which the entire world can be seen on one map) to 21+ (down to - # individual buildings). See: https://developers.google.com/maps/documentation/ - # staticmaps/#Zoomlevels - # Corresponds to the JSON property `zoom` - # @return [Fixnum] - attr_accessor :zoom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @boundary = args[:boundary] unless args[:boundary].nil? - @cache_policy = args[:cache_policy] unless args[:cache_policy].nil? - @country_code = args[:country_code] unless args[:country_code].nil? - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - @map_type = args[:map_type] unless args[:map_type].nil? - @viewport = args[:viewport] unless args[:viewport].nil? - @zoom = args[:zoom] unless args[:zoom].nil? - end - - # - class Boundary - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `latitude` - # @return [Fixnum] - attr_accessor :latitude - - # - # Corresponds to the JSON property `longitude` - # @return [Fixnum] - attr_accessor :longitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - end - end - - # The viewport for showing this location. This is a latitude, longitude - # rectangle. - class Viewport - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `hi` - # @return [Google::Apis::BooksV1::GeoLayerData::Geo::Viewport::Hi] - attr_accessor :hi - - # - # Corresponds to the JSON property `lo` - # @return [Google::Apis::BooksV1::GeoLayerData::Geo::Viewport::Lo] - attr_accessor :lo - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hi = args[:hi] unless args[:hi].nil? - @lo = args[:lo] unless args[:lo].nil? - end - - # - class Hi - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # - # 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) - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - end - end - - # - class Lo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # - # 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) - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - end - end - end - end - end - - # - class LayerSummaries - include Google::Apis::Core::Hashable - - # A list of layer summary items. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The total number of layer summaries found. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # - class LayerSummary - include Google::Apis::Core::Hashable - - # The number of annotations for this layer. - # Corresponds to the JSON property `annotationCount` - # @return [Fixnum] - attr_accessor :annotation_count - - # The list of annotation types contained for this layer. - # Corresponds to the JSON property `annotationTypes` - # @return [Array] - attr_accessor :annotation_types - - # Link to get data for this annotation. - # Corresponds to the JSON property `annotationsDataLink` - # @return [String] - attr_accessor :annotations_data_link - - # The link to get the annotations for this layer. - # Corresponds to the JSON property `annotationsLink` - # @return [String] - attr_accessor :annotations_link - - # The content version this resource is for. - # Corresponds to the JSON property `contentVersion` - # @return [String] - attr_accessor :content_version - - # The number of data items for this layer. - # Corresponds to the JSON property `dataCount` - # @return [Fixnum] - attr_accessor :data_count - - # Unique id of this layer summary. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource Type - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The layer id for this summary. - # Corresponds to the JSON property `layerId` - # @return [String] - attr_accessor :layer_id - - # URL to this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Timestamp for the last time an item in this layer was updated. (RFC 3339 UTC - # date-time format). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The current version of this layer's volume annotations. Note that this version - # applies only to the data in the books.layers.volumeAnnotations.* responses. - # The actual annotation data is versioned separately. - # Corresponds to the JSON property `volumeAnnotationsVersion` - # @return [String] - attr_accessor :volume_annotations_version - - # The volume id this resource is for. - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation_count = args[:annotation_count] unless args[:annotation_count].nil? - @annotation_types = args[:annotation_types] unless args[:annotation_types].nil? - @annotations_data_link = args[:annotations_data_link] unless args[:annotations_data_link].nil? - @annotations_link = args[:annotations_link] unless args[:annotations_link].nil? - @content_version = args[:content_version] unless args[:content_version].nil? - @data_count = args[:data_count] unless args[:data_count].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @layer_id = args[:layer_id] unless args[:layer_id].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @volume_annotations_version = args[:volume_annotations_version] unless args[:volume_annotations_version].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - end - - # - class Metadata - include Google::Apis::Core::Hashable - - # A list of offline dictionary metadata. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Item - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `download_url` - # @return [String] - attr_accessor :download_url - - # - # Corresponds to the JSON property `encrypted_key` - # @return [String] - attr_accessor :encrypted_key - - # - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # - # Corresponds to the JSON property `size` - # @return [String] - attr_accessor :size - - # - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @download_url = args[:download_url] unless args[:download_url].nil? - @encrypted_key = args[:encrypted_key] unless args[:encrypted_key].nil? - @language = args[:language] unless args[:language].nil? - @size = args[:size] unless args[:size].nil? - @version = args[:version] unless args[:version].nil? - end - end - end - - # - class Offers - include Google::Apis::Core::Hashable - - # A list of offers. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Item - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `artUrl` - # @return [String] - attr_accessor :art_url - - # - # Corresponds to the JSON property `gservicesKey` - # @return [String] - attr_accessor :gservices_key - - # - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @art_url = args[:art_url] unless args[:art_url].nil? - @gservices_key = args[:gservices_key] unless args[:gservices_key].nil? - @id = args[:id] unless args[:id].nil? - @items = args[:items] unless args[:items].nil? - end - - # - class Item - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `author` - # @return [String] - attr_accessor :author - - # - # Corresponds to the JSON property `canonicalVolumeLink` - # @return [String] - attr_accessor :canonical_volume_link - - # - # Corresponds to the JSON property `coverUrl` - # @return [String] - attr_accessor :cover_url - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author = args[:author] unless args[:author].nil? - @canonical_volume_link = args[:canonical_volume_link] unless args[:canonical_volume_link].nil? - @cover_url = args[:cover_url] unless args[:cover_url].nil? - @description = args[:description] unless args[:description].nil? - @title = args[:title] unless args[:title].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - end - end - end - - # - class ReadingPosition - include Google::Apis::Core::Hashable - - # Position in an EPUB as a CFI. - # Corresponds to the JSON property `epubCfiPosition` - # @return [String] - attr_accessor :epub_cfi_position - - # Position in a volume for image-based content. - # Corresponds to the JSON property `gbImagePosition` - # @return [String] - attr_accessor :gb_image_position - - # Position in a volume for text-based content. - # Corresponds to the JSON property `gbTextPosition` - # @return [String] - attr_accessor :gb_text_position - - # Resource type for a reading position. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Position in a PDF file. - # Corresponds to the JSON property `pdfPosition` - # @return [String] - attr_accessor :pdf_position - - # Timestamp when this reading position was last updated (formatted UTC timestamp - # with millisecond resolution). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Volume id associated with this reading position. - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @epub_cfi_position = args[:epub_cfi_position] unless args[:epub_cfi_position].nil? - @gb_image_position = args[:gb_image_position] unless args[:gb_image_position].nil? - @gb_text_position = args[:gb_text_position] unless args[:gb_text_position].nil? - @kind = args[:kind] unless args[:kind].nil? - @pdf_position = args[:pdf_position] unless args[:pdf_position].nil? - @updated = args[:updated] unless args[:updated].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - end - - # - class RequestAccess - include Google::Apis::Core::Hashable - - # A concurrent access response. - # Corresponds to the JSON property `concurrentAccess` - # @return [Google::Apis::BooksV1::ConcurrentAccessRestriction] - attr_accessor :concurrent_access - - # A download access response. - # Corresponds to the JSON property `downloadAccess` - # @return [Google::Apis::BooksV1::DownloadAccessRestriction] - attr_accessor :download_access - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @concurrent_access = args[:concurrent_access] unless args[:concurrent_access].nil? - @download_access = args[:download_access] unless args[:download_access].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class Review - include Google::Apis::Core::Hashable - - # Author of this review. - # Corresponds to the JSON property `author` - # @return [Google::Apis::BooksV1::Review::Author] - attr_accessor :author - - # Review text. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # Date of this review. - # Corresponds to the JSON property `date` - # @return [String] - attr_accessor :date - - # URL for the full review text, for reviews gathered from the web. - # Corresponds to the JSON property `fullTextUrl` - # @return [String] - attr_accessor :full_text_url - - # Resource type for a review. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE - # or NOT_RATED. - # Corresponds to the JSON property `rating` - # @return [String] - attr_accessor :rating - - # Information regarding the source of this review, when the review is not from a - # Google Books user. - # Corresponds to the JSON property `source` - # @return [Google::Apis::BooksV1::Review::Source] - attr_accessor :source - - # Title for this review. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Source type for this review. Possible values are EDITORIAL, WEB_USER or - # GOOGLE_USER. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Volume that this review is for. - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author = args[:author] unless args[:author].nil? - @content = args[:content] unless args[:content].nil? - @date = args[:date] unless args[:date].nil? - @full_text_url = args[:full_text_url] unless args[:full_text_url].nil? - @kind = args[:kind] unless args[:kind].nil? - @rating = args[:rating] unless args[:rating].nil? - @source = args[:source] unless args[:source].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - - # Author of this review. - class Author - include Google::Apis::Core::Hashable - - # Name of this person. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - end - end - - # Information regarding the source of this review, when the review is not from a - # Google Books user. - class Source - include Google::Apis::Core::Hashable - - # Name of the source. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Extra text about the source of the review. - # Corresponds to the JSON property `extraDescription` - # @return [String] - attr_accessor :extra_description - - # URL of the source of the review. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @extra_description = args[:extra_description] unless args[:extra_description].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - - # - class UserSettings - include Google::Apis::Core::Hashable - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # User settings in sub-objects, each for different purposes. - # Corresponds to the JSON property `notesExport` - # @return [Google::Apis::BooksV1::UserSettings::NotesExport] - attr_accessor :notes_export - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @notes_export = args[:notes_export] unless args[:notes_export].nil? - end - - # User settings in sub-objects, each for different purposes. - class NotesExport - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `folderName` - # @return [String] - attr_accessor :folder_name - - # - # Corresponds to the JSON property `isEnabled` - # @return [Boolean] - attr_accessor :is_enabled - alias_method :is_enabled?, :is_enabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @folder_name = args[:folder_name] unless args[:folder_name].nil? - @is_enabled = args[:is_enabled] unless args[:is_enabled].nil? - end - end - end - - # - class Volume - include Google::Apis::Core::Hashable - - # Any information about a volume related to reading or obtaining that volume - # text. This information can depend on country (books may be public domain in - # one country but not in another, e.g.). - # Corresponds to the JSON property `accessInfo` - # @return [Google::Apis::BooksV1::Volume::AccessInfo] - attr_accessor :access_info - - # Opaque identifier for a specific version of a volume resource. (In LITE - # projection) - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Unique identifier for a volume. (In LITE projection.) - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource type for a volume. (In LITE projection.) - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # What layers exist in this volume and high level information about them. - # Corresponds to the JSON property `layerInfo` - # @return [Google::Apis::BooksV1::Volume::LayerInfo] - attr_accessor :layer_info - - # Recommendation related information for this volume. - # Corresponds to the JSON property `recommendedInfo` - # @return [Google::Apis::BooksV1::Volume::RecommendedInfo] - attr_accessor :recommended_info - - # Any information about a volume related to the eBookstore and/or - # purchaseability. This information can depend on the country where the request - # originates from (i.e. books may not be for sale in certain countries). - # Corresponds to the JSON property `saleInfo` - # @return [Google::Apis::BooksV1::Volume::SaleInfo] - attr_accessor :sale_info - - # Search result information related to this volume. - # Corresponds to the JSON property `searchInfo` - # @return [Google::Apis::BooksV1::Volume::SearchInfo] - attr_accessor :search_info - - # URL to this resource. (In LITE projection.) - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # User specific information related to this volume. (e.g. page this user last - # read or whether they purchased this book) - # Corresponds to the JSON property `userInfo` - # @return [Google::Apis::BooksV1::Volume::UserInfo] - attr_accessor :user_info - - # General volume information. - # Corresponds to the JSON property `volumeInfo` - # @return [Google::Apis::BooksV1::Volume::VolumeInfo] - attr_accessor :volume_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_info = args[:access_info] unless args[:access_info].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @layer_info = args[:layer_info] unless args[:layer_info].nil? - @recommended_info = args[:recommended_info] unless args[:recommended_info].nil? - @sale_info = args[:sale_info] unless args[:sale_info].nil? - @search_info = args[:search_info] unless args[:search_info].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @user_info = args[:user_info] unless args[:user_info].nil? - @volume_info = args[:volume_info] unless args[:volume_info].nil? - end - - # Any information about a volume related to reading or obtaining that volume - # text. This information can depend on country (books may be public domain in - # one country but not in another, e.g.). - class AccessInfo - include Google::Apis::Core::Hashable - - # Combines the access and viewability of this volume into a single status field - # for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or - # NONE. (In LITE projection.) - # Corresponds to the JSON property `accessViewStatus` - # @return [String] - attr_accessor :access_view_status - - # The two-letter ISO_3166-1 country code for which this access information is - # valid. (In LITE projection.) - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # Information about a volume's download license access restrictions. - # Corresponds to the JSON property `downloadAccess` - # @return [Google::Apis::BooksV1::DownloadAccessRestriction] - attr_accessor :download_access - - # URL to the Google Drive viewer if this volume is uploaded by the user by - # selecting the file from Google Drive. - # Corresponds to the JSON property `driveImportedContentLink` - # @return [String] - attr_accessor :drive_imported_content_link - - # Whether this volume can be embedded in a viewport using the Embedded Viewer - # API. - # Corresponds to the JSON property `embeddable` - # @return [Boolean] - attr_accessor :embeddable - alias_method :embeddable?, :embeddable - - # Information about epub content. (In LITE projection.) - # Corresponds to the JSON property `epub` - # @return [Google::Apis::BooksV1::Volume::AccessInfo::Epub] - attr_accessor :epub - - # Whether this volume requires that the client explicitly request offline - # download license rather than have it done automatically when loading the - # content, if the client supports it. - # Corresponds to the JSON property `explicitOfflineLicenseManagement` - # @return [Boolean] - attr_accessor :explicit_offline_license_management - alias_method :explicit_offline_license_management?, :explicit_offline_license_management - - # Information about pdf content. (In LITE projection.) - # Corresponds to the JSON property `pdf` - # @return [Google::Apis::BooksV1::Volume::AccessInfo::Pdf] - attr_accessor :pdf - - # Whether or not this book is public domain in the country listed above. - # Corresponds to the JSON property `publicDomain` - # @return [Boolean] - attr_accessor :public_domain - alias_method :public_domain?, :public_domain - - # Whether quote sharing is allowed for this volume. - # Corresponds to the JSON property `quoteSharingAllowed` - # @return [Boolean] - attr_accessor :quote_sharing_allowed - alias_method :quote_sharing_allowed?, :quote_sharing_allowed - - # Whether text-to-speech is permitted for this volume. Values can be ALLOWED, - # ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. - # Corresponds to the JSON property `textToSpeechPermission` - # @return [String] - attr_accessor :text_to_speech_permission - - # For ordered but not yet processed orders, we give a URL that can be used to go - # to the appropriate Google Wallet page. - # Corresponds to the JSON property `viewOrderUrl` - # @return [String] - attr_accessor :view_order_url - - # The read access of a volume. Possible values are PARTIAL, ALL_PAGES, NO_PAGES - # or UNKNOWN. This value depends on the country listed above. A value of PARTIAL - # means that the publisher has allowed some portion of the volume to be viewed - # publicly, without purchase. This can apply to eBooks as well as non-eBooks. - # Public domain books will always have a value of ALL_PAGES. - # Corresponds to the JSON property `viewability` - # @return [String] - attr_accessor :viewability - - # URL to read this volume on the Google Books site. Link will not allow users to - # read non-viewable volumes. - # Corresponds to the JSON property `webReaderLink` - # @return [String] - attr_accessor :web_reader_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_view_status = args[:access_view_status] unless args[:access_view_status].nil? - @country = args[:country] unless args[:country].nil? - @download_access = args[:download_access] unless args[:download_access].nil? - @drive_imported_content_link = args[:drive_imported_content_link] unless args[:drive_imported_content_link].nil? - @embeddable = args[:embeddable] unless args[:embeddable].nil? - @epub = args[:epub] unless args[:epub].nil? - @explicit_offline_license_management = args[:explicit_offline_license_management] unless args[:explicit_offline_license_management].nil? - @pdf = args[:pdf] unless args[:pdf].nil? - @public_domain = args[:public_domain] unless args[:public_domain].nil? - @quote_sharing_allowed = args[:quote_sharing_allowed] unless args[:quote_sharing_allowed].nil? - @text_to_speech_permission = args[:text_to_speech_permission] unless args[:text_to_speech_permission].nil? - @view_order_url = args[:view_order_url] unless args[:view_order_url].nil? - @viewability = args[:viewability] unless args[:viewability].nil? - @web_reader_link = args[:web_reader_link] unless args[:web_reader_link].nil? - end - - # Information about epub content. (In LITE projection.) - class Epub - include Google::Apis::Core::Hashable - - # URL to retrieve ACS token for epub download. (In LITE projection.) - # Corresponds to the JSON property `acsTokenLink` - # @return [String] - attr_accessor :acs_token_link - - # URL to download epub. (In LITE projection.) - # Corresponds to the JSON property `downloadLink` - # @return [String] - attr_accessor :download_link - - # Is a flowing text epub available either as public domain or for purchase. (In - # LITE projection.) - # Corresponds to the JSON property `isAvailable` - # @return [Boolean] - attr_accessor :is_available - alias_method :is_available?, :is_available - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acs_token_link = args[:acs_token_link] unless args[:acs_token_link].nil? - @download_link = args[:download_link] unless args[:download_link].nil? - @is_available = args[:is_available] unless args[:is_available].nil? - end - end - - # Information about pdf content. (In LITE projection.) - class Pdf - include Google::Apis::Core::Hashable - - # URL to retrieve ACS token for pdf download. (In LITE projection.) - # Corresponds to the JSON property `acsTokenLink` - # @return [String] - attr_accessor :acs_token_link - - # URL to download pdf. (In LITE projection.) - # Corresponds to the JSON property `downloadLink` - # @return [String] - attr_accessor :download_link - - # Is a scanned image pdf available either as public domain or for purchase. (In - # LITE projection.) - # Corresponds to the JSON property `isAvailable` - # @return [Boolean] - attr_accessor :is_available - alias_method :is_available?, :is_available - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acs_token_link = args[:acs_token_link] unless args[:acs_token_link].nil? - @download_link = args[:download_link] unless args[:download_link].nil? - @is_available = args[:is_available] unless args[:is_available].nil? - end - end - end - - # What layers exist in this volume and high level information about them. - class LayerInfo - include Google::Apis::Core::Hashable - - # A layer should appear here if and only if the layer exists for this book. - # Corresponds to the JSON property `layers` - # @return [Array] - attr_accessor :layers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @layers = args[:layers] unless args[:layers].nil? - end - - # - class Layer - include Google::Apis::Core::Hashable - - # The layer id of this layer (e.g. "geo"). - # Corresponds to the JSON property `layerId` - # @return [String] - attr_accessor :layer_id - - # The current version of this layer's volume annotations. Note that this version - # applies only to the data in the books.layers.volumeAnnotations.* responses. - # The actual annotation data is versioned separately. - # Corresponds to the JSON property `volumeAnnotationsVersion` - # @return [String] - attr_accessor :volume_annotations_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @layer_id = args[:layer_id] unless args[:layer_id].nil? - @volume_annotations_version = args[:volume_annotations_version] unless args[:volume_annotations_version].nil? - end - end - end - - # Recommendation related information for this volume. - class RecommendedInfo - include Google::Apis::Core::Hashable - - # A text explaining why this volume is recommended. - # Corresponds to the JSON property `explanation` - # @return [String] - attr_accessor :explanation - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @explanation = args[:explanation] unless args[:explanation].nil? - end - end - - # Any information about a volume related to the eBookstore and/or - # purchaseability. This information can depend on the country where the request - # originates from (i.e. books may not be for sale in certain countries). - class SaleInfo - include Google::Apis::Core::Hashable - - # URL to purchase this volume on the Google Books site. (In LITE projection) - # Corresponds to the JSON property `buyLink` - # @return [String] - attr_accessor :buy_link - - # The two-letter ISO_3166-1 country code for which this sale information is - # valid. (In LITE projection.) - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # Whether or not this volume is an eBook (can be added to the My eBooks shelf). - # Corresponds to the JSON property `isEbook` - # @return [Boolean] - attr_accessor :is_ebook - alias_method :is_ebook?, :is_ebook - - # Suggested retail price. (In LITE projection.) - # Corresponds to the JSON property `listPrice` - # @return [Google::Apis::BooksV1::Volume::SaleInfo::ListPrice] - attr_accessor :list_price - - # Offers available for this volume (sales and rentals). - # Corresponds to the JSON property `offers` - # @return [Array] - attr_accessor :offers - - # The date on which this book is available for sale. - # Corresponds to the JSON property `onSaleDate` - # @return [DateTime] - attr_accessor :on_sale_date - - # The actual selling price of the book. This is the same as the suggested retail - # or list price unless there are offers or discounts on this volume. (In LITE - # projection.) - # Corresponds to the JSON property `retailPrice` - # @return [Google::Apis::BooksV1::Volume::SaleInfo::RetailPrice] - attr_accessor :retail_price - - # Whether or not this book is available for sale or offered for free in the - # Google eBookstore for the country listed above. Possible values are FOR_SALE, - # FOR_RENTAL_ONLY, FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER. - # Corresponds to the JSON property `saleability` - # @return [String] - attr_accessor :saleability - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @buy_link = args[:buy_link] unless args[:buy_link].nil? - @country = args[:country] unless args[:country].nil? - @is_ebook = args[:is_ebook] unless args[:is_ebook].nil? - @list_price = args[:list_price] unless args[:list_price].nil? - @offers = args[:offers] unless args[:offers].nil? - @on_sale_date = args[:on_sale_date] unless args[:on_sale_date].nil? - @retail_price = args[:retail_price] unless args[:retail_price].nil? - @saleability = args[:saleability] unless args[:saleability].nil? - end - - # Suggested retail price. (In LITE projection.) - class ListPrice - include Google::Apis::Core::Hashable - - # Amount in the currency listed below. (In LITE projection.) - # Corresponds to the JSON property `amount` - # @return [Float] - attr_accessor :amount - - # An ISO 4217, three-letter currency code. (In LITE projection.) - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @amount = args[:amount] unless args[:amount].nil? - @currency_code = args[:currency_code] unless args[:currency_code].nil? - end - end - - # - class Offer - include Google::Apis::Core::Hashable - - # The finsky offer type (e.g., PURCHASE=0 RENTAL=3) - # Corresponds to the JSON property `finskyOfferType` - # @return [Fixnum] - attr_accessor :finsky_offer_type - - # Offer list (=undiscounted) price in Micros. - # Corresponds to the JSON property `listPrice` - # @return [Google::Apis::BooksV1::Volume::SaleInfo::Offer::ListPrice] - attr_accessor :list_price - - # The rental duration (for rental offers only). - # Corresponds to the JSON property `rentalDuration` - # @return [Google::Apis::BooksV1::Volume::SaleInfo::Offer::RentalDuration] - attr_accessor :rental_duration - - # Offer retail (=discounted) price in Micros - # Corresponds to the JSON property `retailPrice` - # @return [Google::Apis::BooksV1::Volume::SaleInfo::Offer::RetailPrice] - attr_accessor :retail_price - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @finsky_offer_type = args[:finsky_offer_type] unless args[:finsky_offer_type].nil? - @list_price = args[:list_price] unless args[:list_price].nil? - @rental_duration = args[:rental_duration] unless args[:rental_duration].nil? - @retail_price = args[:retail_price] unless args[:retail_price].nil? - end - - # Offer list (=undiscounted) price in Micros. - class ListPrice - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `amountInMicros` - # @return [Float] - attr_accessor :amount_in_micros - - # - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @amount_in_micros = args[:amount_in_micros] unless args[:amount_in_micros].nil? - @currency_code = args[:currency_code] unless args[:currency_code].nil? - end - end - - # The rental duration (for rental offers only). - class RentalDuration - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `count` - # @return [Float] - attr_accessor :count - - # - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @unit = args[:unit] unless args[:unit].nil? - end - end - - # Offer retail (=discounted) price in Micros - class RetailPrice - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `amountInMicros` - # @return [Float] - attr_accessor :amount_in_micros - - # - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @amount_in_micros = args[:amount_in_micros] unless args[:amount_in_micros].nil? - @currency_code = args[:currency_code] unless args[:currency_code].nil? - end - end - end - - # The actual selling price of the book. This is the same as the suggested retail - # or list price unless there are offers or discounts on this volume. (In LITE - # projection.) - class RetailPrice - include Google::Apis::Core::Hashable - - # Amount in the currency listed below. (In LITE projection.) - # Corresponds to the JSON property `amount` - # @return [Float] - attr_accessor :amount - - # An ISO 4217, three-letter currency code. (In LITE projection.) - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @amount = args[:amount] unless args[:amount].nil? - @currency_code = args[:currency_code] unless args[:currency_code].nil? - end - end - end - - # Search result information related to this volume. - class SearchInfo - include Google::Apis::Core::Hashable - - # A text snippet containing the search query. - # Corresponds to the JSON property `textSnippet` - # @return [String] - attr_accessor :text_snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text_snippet = args[:text_snippet] unless args[:text_snippet].nil? - end - end - - # User specific information related to this volume. (e.g. page this user last - # read or whether they purchased this book) - class UserInfo - include Google::Apis::Core::Hashable - - # Copy/Paste accounting information. - # Corresponds to the JSON property `copy` - # @return [Google::Apis::BooksV1::Volume::UserInfo::Copy] - attr_accessor :copy - - # Whether or not this volume is currently in "my books." - # Corresponds to the JSON property `isInMyBooks` - # @return [Boolean] - attr_accessor :is_in_my_books - alias_method :is_in_my_books?, :is_in_my_books - - # Whether or not this volume was pre-ordered by the authenticated user making - # the request. (In LITE projection.) - # Corresponds to the JSON property `isPreordered` - # @return [Boolean] - attr_accessor :is_preordered - alias_method :is_preordered?, :is_preordered - - # Whether or not this volume was purchased by the authenticated user making the - # request. (In LITE projection.) - # Corresponds to the JSON property `isPurchased` - # @return [Boolean] - attr_accessor :is_purchased - alias_method :is_purchased?, :is_purchased - - # Whether or not this volume was user uploaded. - # Corresponds to the JSON property `isUploaded` - # @return [Boolean] - attr_accessor :is_uploaded - alias_method :is_uploaded?, :is_uploaded - - # The user's current reading position in the volume, if one is available. (In - # LITE projection.) - # Corresponds to the JSON property `readingPosition` - # @return [Google::Apis::BooksV1::ReadingPosition] - attr_accessor :reading_position - - # Period during this book is/was a valid rental. - # Corresponds to the JSON property `rentalPeriod` - # @return [Google::Apis::BooksV1::Volume::UserInfo::RentalPeriod] - attr_accessor :rental_period - - # Whether this book is an active or an expired rental. - # Corresponds to the JSON property `rentalState` - # @return [String] - attr_accessor :rental_state - - # This user's review of this volume, if one exists. - # Corresponds to the JSON property `review` - # @return [Google::Apis::BooksV1::Review] - attr_accessor :review - - # Timestamp when this volume was last modified by a user action, such as a - # reading position update, volume purchase or writing a review. (RFC 3339 UTC - # date-time format). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # - # Corresponds to the JSON property `userUploadedVolumeInfo` - # @return [Google::Apis::BooksV1::Volume::UserInfo::UserUploadedVolumeInfo] - attr_accessor :user_uploaded_volume_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @copy = args[:copy] unless args[:copy].nil? - @is_in_my_books = args[:is_in_my_books] unless args[:is_in_my_books].nil? - @is_preordered = args[:is_preordered] unless args[:is_preordered].nil? - @is_purchased = args[:is_purchased] unless args[:is_purchased].nil? - @is_uploaded = args[:is_uploaded] unless args[:is_uploaded].nil? - @reading_position = args[:reading_position] unless args[:reading_position].nil? - @rental_period = args[:rental_period] unless args[:rental_period].nil? - @rental_state = args[:rental_state] unless args[:rental_state].nil? - @review = args[:review] unless args[:review].nil? - @updated = args[:updated] unless args[:updated].nil? - @user_uploaded_volume_info = args[:user_uploaded_volume_info] unless args[:user_uploaded_volume_info].nil? - end - - # Copy/Paste accounting information. - class Copy - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `allowedCharacterCount` - # @return [Fixnum] - attr_accessor :allowed_character_count - - # - # Corresponds to the JSON property `limitType` - # @return [String] - attr_accessor :limit_type - - # - # Corresponds to the JSON property `remainingCharacterCount` - # @return [Fixnum] - attr_accessor :remaining_character_count - - # - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allowed_character_count = args[:allowed_character_count] unless args[:allowed_character_count].nil? - @limit_type = args[:limit_type] unless args[:limit_type].nil? - @remaining_character_count = args[:remaining_character_count] unless args[:remaining_character_count].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # Period during this book is/was a valid rental. - class RentalPeriod - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `endUtcSec` - # @return [String] - attr_accessor :end_utc_sec - - # - # Corresponds to the JSON property `startUtcSec` - # @return [String] - attr_accessor :start_utc_sec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_utc_sec = args[:end_utc_sec] unless args[:end_utc_sec].nil? - @start_utc_sec = args[:start_utc_sec] unless args[:start_utc_sec].nil? - end - end - - # - class UserUploadedVolumeInfo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `processingState` - # @return [String] - attr_accessor :processing_state - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @processing_state = args[:processing_state] unless args[:processing_state].nil? - end - end - end - - # General volume information. - class VolumeInfo - include Google::Apis::Core::Hashable - - # Whether anonymous logging should be allowed. - # Corresponds to the JSON property `allowAnonLogging` - # @return [Boolean] - attr_accessor :allow_anon_logging - alias_method :allow_anon_logging?, :allow_anon_logging - - # The names of the authors and/or editors for this volume. (In LITE projection) - # Corresponds to the JSON property `authors` - # @return [Array] - attr_accessor :authors - - # The mean review rating for this volume. (min = 1.0, max = 5.0) - # Corresponds to the JSON property `averageRating` - # @return [Float] - attr_accessor :average_rating - - # Canonical URL for a volume. (In LITE projection.) - # Corresponds to the JSON property `canonicalVolumeLink` - # @return [String] - attr_accessor :canonical_volume_link - - # A list of subject categories, such as "Fiction", "Suspense", etc. - # Corresponds to the JSON property `categories` - # @return [Array] - attr_accessor :categories - - # An identifier for the version of the volume content (text & images). (In LITE - # projection) - # Corresponds to the JSON property `contentVersion` - # @return [String] - attr_accessor :content_version - - # A synopsis of the volume. The text of the description is formatted in HTML and - # includes simple formatting elements, such as b, i, and br tags. (In LITE - # projection.) - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Physical dimensions of this volume. - # Corresponds to the JSON property `dimensions` - # @return [Google::Apis::BooksV1::Volume::VolumeInfo::Dimensions] - attr_accessor :dimensions - - # A list of image links for all the sizes that are available. (In LITE - # projection.) - # Corresponds to the JSON property `imageLinks` - # @return [Google::Apis::BooksV1::Volume::VolumeInfo::ImageLinks] - attr_accessor :image_links - - # Industry standard identifiers for this volume. - # Corresponds to the JSON property `industryIdentifiers` - # @return [Array] - attr_accessor :industry_identifiers - - # URL to view information about this volume on the Google Books site. (In LITE - # projection) - # Corresponds to the JSON property `infoLink` - # @return [String] - attr_accessor :info_link - - # Best language for this volume (based on content). It is the two-letter ISO 639- - # 1 code such as 'fr', 'en', etc. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # The main category to which this volume belongs. It will be the category from - # the categories list returned below that has the highest weight. - # Corresponds to the JSON property `mainCategory` - # @return [String] - attr_accessor :main_category - - # - # Corresponds to the JSON property `maturityRating` - # @return [String] - attr_accessor :maturity_rating - - # Total number of pages as per publisher metadata. - # Corresponds to the JSON property `pageCount` - # @return [Fixnum] - attr_accessor :page_count - - # URL to preview this volume on the Google Books site. - # Corresponds to the JSON property `previewLink` - # @return [String] - attr_accessor :preview_link - - # Type of publication of this volume. Possible values are BOOK or MAGAZINE. - # Corresponds to the JSON property `printType` - # @return [String] - attr_accessor :print_type - - # Total number of printed pages in generated pdf representation. - # Corresponds to the JSON property `printedPageCount` - # @return [Fixnum] - attr_accessor :printed_page_count - - # Date of publication. (In LITE projection.) - # Corresponds to the JSON property `publishedDate` - # @return [String] - attr_accessor :published_date - - # Publisher of this volume. (In LITE projection.) - # Corresponds to the JSON property `publisher` - # @return [String] - attr_accessor :publisher - - # The number of review ratings for this volume. - # Corresponds to the JSON property `ratingsCount` - # @return [Fixnum] - attr_accessor :ratings_count - - # The reading modes available for this volume. - # Corresponds to the JSON property `readingModes` - # @return [Object] - attr_accessor :reading_modes - - # Total number of sample pages as per publisher metadata. - # Corresponds to the JSON property `samplePageCount` - # @return [Fixnum] - attr_accessor :sample_page_count - - # Volume subtitle. (In LITE projection.) - # Corresponds to the JSON property `subtitle` - # @return [String] - attr_accessor :subtitle - - # Volume title. (In LITE projection.) - # 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) - @allow_anon_logging = args[:allow_anon_logging] unless args[:allow_anon_logging].nil? - @authors = args[:authors] unless args[:authors].nil? - @average_rating = args[:average_rating] unless args[:average_rating].nil? - @canonical_volume_link = args[:canonical_volume_link] unless args[:canonical_volume_link].nil? - @categories = args[:categories] unless args[:categories].nil? - @content_version = args[:content_version] unless args[:content_version].nil? - @description = args[:description] unless args[:description].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @image_links = args[:image_links] unless args[:image_links].nil? - @industry_identifiers = args[:industry_identifiers] unless args[:industry_identifiers].nil? - @info_link = args[:info_link] unless args[:info_link].nil? - @language = args[:language] unless args[:language].nil? - @main_category = args[:main_category] unless args[:main_category].nil? - @maturity_rating = args[:maturity_rating] unless args[:maturity_rating].nil? - @page_count = args[:page_count] unless args[:page_count].nil? - @preview_link = args[:preview_link] unless args[:preview_link].nil? - @print_type = args[:print_type] unless args[:print_type].nil? - @printed_page_count = args[:printed_page_count] unless args[:printed_page_count].nil? - @published_date = args[:published_date] unless args[:published_date].nil? - @publisher = args[:publisher] unless args[:publisher].nil? - @ratings_count = args[:ratings_count] unless args[:ratings_count].nil? - @reading_modes = args[:reading_modes] unless args[:reading_modes].nil? - @sample_page_count = args[:sample_page_count] unless args[:sample_page_count].nil? - @subtitle = args[:subtitle] unless args[:subtitle].nil? - @title = args[:title] unless args[:title].nil? - end - - # Physical dimensions of this volume. - class Dimensions - include Google::Apis::Core::Hashable - - # Height or length of this volume (in cm). - # Corresponds to the JSON property `height` - # @return [String] - attr_accessor :height - - # Thickness of this volume (in cm). - # Corresponds to the JSON property `thickness` - # @return [String] - attr_accessor :thickness - - # Width of this volume (in cm). - # Corresponds to the JSON property `width` - # @return [String] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @height = args[:height] unless args[:height].nil? - @thickness = args[:thickness] unless args[:thickness].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # A list of image links for all the sizes that are available. (In LITE - # projection.) - class ImageLinks - include Google::Apis::Core::Hashable - - # Image link for extra large size (width of ~1280 pixels). (In LITE projection) - # Corresponds to the JSON property `extraLarge` - # @return [String] - attr_accessor :extra_large - - # Image link for large size (width of ~800 pixels). (In LITE projection) - # Corresponds to the JSON property `large` - # @return [String] - attr_accessor :large - - # Image link for medium size (width of ~575 pixels). (In LITE projection) - # Corresponds to the JSON property `medium` - # @return [String] - attr_accessor :medium - - # Image link for small size (width of ~300 pixels). (In LITE projection) - # Corresponds to the JSON property `small` - # @return [String] - attr_accessor :small - - # Image link for small thumbnail size (width of ~80 pixels). (In LITE projection) - # Corresponds to the JSON property `smallThumbnail` - # @return [String] - attr_accessor :small_thumbnail - - # Image link for thumbnail size (width of ~128 pixels). (In LITE projection) - # Corresponds to the JSON property `thumbnail` - # @return [String] - attr_accessor :thumbnail - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @extra_large = args[:extra_large] unless args[:extra_large].nil? - @large = args[:large] unless args[:large].nil? - @medium = args[:medium] unless args[:medium].nil? - @small = args[:small] unless args[:small].nil? - @small_thumbnail = args[:small_thumbnail] unless args[:small_thumbnail].nil? - @thumbnail = args[:thumbnail] unless args[:thumbnail].nil? - end - end - - # - class IndustryIdentifier - include Google::Apis::Core::Hashable - - # Industry specific volume identifier. - # Corresponds to the JSON property `identifier` - # @return [String] - attr_accessor :identifier - - # Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. - # 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) - @identifier = args[:identifier] unless args[:identifier].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - end - - # - class Volume2 - include Google::Apis::Core::Hashable - - # A list of volumes. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # 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 - - # - class VolumeAnnotation - include Google::Apis::Core::Hashable - - # The annotation data id for this volume annotation. - # Corresponds to the JSON property `annotationDataId` - # @return [String] - attr_accessor :annotation_data_id - - # Link to get data for this annotation. - # Corresponds to the JSON property `annotationDataLink` - # @return [String] - attr_accessor :annotation_data_link - - # The type of annotation this is. - # Corresponds to the JSON property `annotationType` - # @return [String] - attr_accessor :annotation_type - - # The content ranges to identify the selected text. - # Corresponds to the JSON property `contentRanges` - # @return [Google::Apis::BooksV1::VolumeAnnotation::ContentRanges] - attr_accessor :content_ranges - - # Data for this annotation. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Indicates that this annotation is deleted. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # Unique id of this volume annotation. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Resource Type - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The Layer this annotation is for. - # Corresponds to the JSON property `layerId` - # @return [String] - attr_accessor :layer_id - - # Pages the annotation spans. - # Corresponds to the JSON property `pageIds` - # @return [Array] - attr_accessor :page_ids - - # Excerpt from the volume. - # Corresponds to the JSON property `selectedText` - # @return [String] - attr_accessor :selected_text - - # URL to this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Timestamp for the last time this anntoation was updated. (RFC 3339 UTC date- - # time format). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The Volume this annotation is for. - # Corresponds to the JSON property `volumeId` - # @return [String] - attr_accessor :volume_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation_data_id = args[:annotation_data_id] unless args[:annotation_data_id].nil? - @annotation_data_link = args[:annotation_data_link] unless args[:annotation_data_link].nil? - @annotation_type = args[:annotation_type] unless args[:annotation_type].nil? - @content_ranges = args[:content_ranges] unless args[:content_ranges].nil? - @data = args[:data] unless args[:data].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @layer_id = args[:layer_id] unless args[:layer_id].nil? - @page_ids = args[:page_ids] unless args[:page_ids].nil? - @selected_text = args[:selected_text] unless args[:selected_text].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @volume_id = args[:volume_id] unless args[:volume_id].nil? - end - - # The content ranges to identify the selected text. - class ContentRanges - include Google::Apis::Core::Hashable - - # Range in CFI format for this annotation for version above. - # Corresponds to the JSON property `cfiRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :cfi_range - - # Content version applicable to ranges below. - # Corresponds to the JSON property `contentVersion` - # @return [String] - attr_accessor :content_version - - # Range in GB image format for this annotation for version above. - # Corresponds to the JSON property `gbImageRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :gb_image_range - - # Range in GB text format for this annotation for version above. - # Corresponds to the JSON property `gbTextRange` - # @return [Google::Apis::BooksV1::AnnotatinsRange] - attr_accessor :gb_text_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cfi_range = args[:cfi_range] unless args[:cfi_range].nil? - @content_version = args[:content_version] unless args[:content_version].nil? - @gb_image_range = args[:gb_image_range] unless args[:gb_image_range].nil? - @gb_text_range = args[:gb_text_range] unless args[:gb_text_range].nil? - end - end - end - - # - class Volumeannotations - include Google::Apis::Core::Hashable - - # A list of volume annotations. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token to pass in for pagination for the next page. This will not be present if - # this request does not have more results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The total number of volume annotations found. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - # The version string for all of the volume annotations in this layer (not just - # the ones in this response). Note: the version string doesn't apply to the - # annotation data, just the information in this response (e.g. the location of - # annotations in the book). - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - 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? - @total_items = args[:total_items] unless args[:total_items].nil? - @version = args[:version] unless args[:version].nil? - end - end - - # - class Volumes - include Google::Apis::Core::Hashable - - # A list of volumes. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Resource type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Total number of volumes found. This might be greater than the number of - # volumes returned in this response if results have been paginated. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - end -end diff --git a/generated/google/apis/books_v1/representations.rb b/generated/google/apis/books_v1/representations.rb deleted file mode 100644 index e6f044d1c..000000000 --- a/generated/google/apis/books_v1/representations.rb +++ /dev/null @@ -1,1361 +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 BooksV1 - - class Annotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ClientVersionRanges - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CurrentVersionRanges - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LayerSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class AnnotationData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Annotations - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AnnotationsSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Layer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class AnnotationsData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AnnotatinsRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LoadingResource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RateRecommendedVolumeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Bookshelf - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Bookshelves - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Category - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Item - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ConcurrentAccessRestriction - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DictLayerData - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Common - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Dict - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Word - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Derivative - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Example - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Sense - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Conjugation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Definition - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Example - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Synonym - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - end - - class DownloadAccessRestriction - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DownloadAccesses - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoLayerData - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Common - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Geo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Boundary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Viewport - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Hi - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Lo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - end - - class LayerSummaries - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LayerSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Item - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Offers - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Item - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Item - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class ReadingPosition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RequestAccess - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Review - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Author - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class UserSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - - class NotesExport - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Volume - class Representation < Google::Apis::Core::JsonRepresentation; end - - class AccessInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Epub - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Pdf - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class LayerInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Layer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class RecommendedInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SaleInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ListPrice - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Offer - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ListPrice - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RentalDuration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RetailPrice - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class RetailPrice - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class SearchInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Copy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RentalPeriod - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserUploadedVolumeInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class VolumeInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Dimensions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImageLinks - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class IndustryIdentifier - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Volume2 - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VolumeAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ContentRanges - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Volumeannotations - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Volumes - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Annotation - class Representation < Google::Apis::Core::JsonRepresentation - property :after_selected_text, as: 'afterSelectedText' - property :before_selected_text, as: 'beforeSelectedText' - property :client_version_ranges, as: 'clientVersionRanges', class: Google::Apis::BooksV1::Annotation::ClientVersionRanges, decorator: Google::Apis::BooksV1::Annotation::ClientVersionRanges::Representation - - property :created, as: 'created', type: DateTime - - property :current_version_ranges, as: 'currentVersionRanges', class: Google::Apis::BooksV1::Annotation::CurrentVersionRanges, decorator: Google::Apis::BooksV1::Annotation::CurrentVersionRanges::Representation - - property :data, as: 'data' - property :deleted, as: 'deleted' - property :highlight_style, as: 'highlightStyle' - property :id, as: 'id' - property :kind, as: 'kind' - property :layer_id, as: 'layerId' - property :layer_summary, as: 'layerSummary', class: Google::Apis::BooksV1::Annotation::LayerSummary, decorator: Google::Apis::BooksV1::Annotation::LayerSummary::Representation - - collection :page_ids, as: 'pageIds' - property :selected_text, as: 'selectedText' - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :volume_id, as: 'volumeId' - end - - # @private - class ClientVersionRanges - class Representation < Google::Apis::Core::JsonRepresentation - property :cfi_range, as: 'cfiRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :content_version, as: 'contentVersion' - property :gb_image_range, as: 'gbImageRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :gb_text_range, as: 'gbTextRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :image_cfi_range, as: 'imageCfiRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - end - end - - # @private - class CurrentVersionRanges - class Representation < Google::Apis::Core::JsonRepresentation - property :cfi_range, as: 'cfiRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :content_version, as: 'contentVersion' - property :gb_image_range, as: 'gbImageRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :gb_text_range, as: 'gbTextRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :image_cfi_range, as: 'imageCfiRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - end - end - - # @private - class LayerSummary - class Representation < Google::Apis::Core::JsonRepresentation - property :allowed_character_count, as: 'allowedCharacterCount' - property :limit_type, as: 'limitType' - property :remaining_character_count, as: 'remainingCharacterCount' - end - end - end - - # @private - class AnnotationData - class Representation < Google::Apis::Core::JsonRepresentation - property :annotation_type, as: 'annotationType' - property :data, as: 'data' - property :encoded_data, :base64 => true, as: 'encoded_data' - property :id, as: 'id' - property :kind, as: 'kind' - property :layer_id, as: 'layerId' - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :volume_id, as: 'volumeId' - end - end - - # @private - class Annotations - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::Annotation, decorator: Google::Apis::BooksV1::Annotation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - - # @private - class AnnotationsSummary - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :layers, as: 'layers', class: Google::Apis::BooksV1::AnnotationsSummary::Layer, decorator: Google::Apis::BooksV1::AnnotationsSummary::Layer::Representation - - end - - # @private - class Layer - class Representation < Google::Apis::Core::JsonRepresentation - property :allowed_character_count, as: 'allowedCharacterCount' - property :layer_id, as: 'layerId' - property :limit_type, as: 'limitType' - property :remaining_character_count, as: 'remainingCharacterCount' - property :updated, as: 'updated', type: DateTime - - end - end - end - - # @private - class AnnotationsData - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::AnnotationData, decorator: Google::Apis::BooksV1::AnnotationData::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - - # @private - class AnnotatinsRange - class Representation < Google::Apis::Core::JsonRepresentation - property :end_offset, as: 'endOffset' - property :end_position, as: 'endPosition' - property :start_offset, as: 'startOffset' - property :start_position, as: 'startPosition' - end - end - - # @private - class LoadingResource - class Representation < Google::Apis::Core::JsonRepresentation - property :author, as: 'author' - property :processing_state, as: 'processingState' - property :title, as: 'title' - property :volume_id, as: 'volumeId' - end - end - - # @private - class RateRecommendedVolumeResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :consistency_token, as: 'consistency_token' - end - end - - # @private - class Bookshelf - class Representation < Google::Apis::Core::JsonRepresentation - property :access, as: 'access' - property :created, as: 'created', type: DateTime - - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - property :volume_count, as: 'volumeCount' - property :volumes_last_updated, as: 'volumesLastUpdated', type: DateTime - - end - end - - # @private - class Bookshelves - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::Bookshelf, decorator: Google::Apis::BooksV1::Bookshelf::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Category - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::Category::Item, decorator: Google::Apis::BooksV1::Category::Item::Representation - - property :kind, as: 'kind' - end - - # @private - class Item - class Representation < Google::Apis::Core::JsonRepresentation - property :badge_url, as: 'badgeUrl' - property :category_id, as: 'categoryId' - property :name, as: 'name' - end - end - end - - # @private - class ConcurrentAccessRestriction - class Representation < Google::Apis::Core::JsonRepresentation - property :device_allowed, as: 'deviceAllowed' - property :kind, as: 'kind' - property :max_concurrent_devices, as: 'maxConcurrentDevices' - property :message, as: 'message' - property :nonce, as: 'nonce' - property :reason_code, as: 'reasonCode' - property :restricted, as: 'restricted' - property :signature, as: 'signature' - property :source, as: 'source' - property :time_window_seconds, as: 'timeWindowSeconds' - property :volume_id, as: 'volumeId' - end - end - - # @private - class DictLayerData - class Representation < Google::Apis::Core::JsonRepresentation - property :common, as: 'common', class: Google::Apis::BooksV1::DictLayerData::Common, decorator: Google::Apis::BooksV1::DictLayerData::Common::Representation - - property :dict, as: 'dict', class: Google::Apis::BooksV1::DictLayerData::Dict, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Representation - - property :kind, as: 'kind' - end - - # @private - class Common - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - end - end - - # @private - class Dict - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::BooksV1::DictLayerData::Dict::Source, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Source::Representation - - collection :words, as: 'words', class: Google::Apis::BooksV1::DictLayerData::Dict::Word, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Representation - - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :url, as: 'url' - end - end - - # @private - class Word - class Representation < Google::Apis::Core::JsonRepresentation - collection :derivatives, as: 'derivatives', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Derivative, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Derivative::Representation - - collection :examples, as: 'examples', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Example, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Example::Representation - - collection :senses, as: 'senses', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Representation - - property :source, as: 'source', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Source, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Source::Representation - - end - - # @private - class Derivative - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Derivative::Source, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Derivative::Source::Representation - - property :text, as: 'text' - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :url, as: 'url' - end - end - end - - # @private - class Example - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Example::Source, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Example::Source::Representation - - property :text, as: 'text' - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :url, as: 'url' - end - end - end - - # @private - class Sense - class Representation < Google::Apis::Core::JsonRepresentation - collection :conjugations, as: 'conjugations', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Conjugation, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Conjugation::Representation - - collection :definitions, as: 'definitions', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Definition, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Definition::Representation - - property :part_of_speech, as: 'partOfSpeech' - property :pronunciation, as: 'pronunciation' - property :pronunciation_url, as: 'pronunciationUrl' - property :source, as: 'source', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Source, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Source::Representation - - property :syllabification, as: 'syllabification' - collection :synonyms, as: 'synonyms', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Synonym, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Synonym::Representation - - end - - # @private - class Conjugation - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - - # @private - class Definition - class Representation < Google::Apis::Core::JsonRepresentation - property :definition, as: 'definition' - collection :examples, as: 'examples', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Definition::Example, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Definition::Example::Representation - - end - - # @private - class Example - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Definition::Example::Source, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Definition::Example::Source::Representation - - property :text, as: 'text' - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :url, as: 'url' - end - end - end - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :url, as: 'url' - end - end - - # @private - class Synonym - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Synonym::Source, decorator: Google::Apis::BooksV1::DictLayerData::Dict::Word::Sense::Synonym::Source::Representation - - property :text, as: 'text' - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :url, as: 'url' - end - end - end - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :url, as: 'url' - end - end - end - end - end - - # @private - class DownloadAccessRestriction - class Representation < Google::Apis::Core::JsonRepresentation - property :device_allowed, as: 'deviceAllowed' - property :downloads_acquired, as: 'downloadsAcquired' - property :just_acquired, as: 'justAcquired' - property :kind, as: 'kind' - property :max_download_devices, as: 'maxDownloadDevices' - property :message, as: 'message' - property :nonce, as: 'nonce' - property :reason_code, as: 'reasonCode' - property :restricted, as: 'restricted' - property :signature, as: 'signature' - property :source, as: 'source' - property :volume_id, as: 'volumeId' - end - end - - # @private - class DownloadAccesses - class Representation < Google::Apis::Core::JsonRepresentation - collection :download_access_list, as: 'downloadAccessList', class: Google::Apis::BooksV1::DownloadAccessRestriction, decorator: Google::Apis::BooksV1::DownloadAccessRestriction::Representation - - property :kind, as: 'kind' - end - end - - # @private - class GeoLayerData - class Representation < Google::Apis::Core::JsonRepresentation - property :common, as: 'common', class: Google::Apis::BooksV1::GeoLayerData::Common, decorator: Google::Apis::BooksV1::GeoLayerData::Common::Representation - - property :geo, as: 'geo', class: Google::Apis::BooksV1::GeoLayerData::Geo, decorator: Google::Apis::BooksV1::GeoLayerData::Geo::Representation - - property :kind, as: 'kind' - end - - # @private - class Common - class Representation < Google::Apis::Core::JsonRepresentation - property :lang, as: 'lang' - property :preview_image_url, as: 'previewImageUrl' - property :snippet, as: 'snippet' - property :snippet_url, as: 'snippetUrl' - property :title, as: 'title' - end - end - - # @private - class Geo - class Representation < Google::Apis::Core::JsonRepresentation - collection :boundary, as: 'boundary', :class => Array do - include Representable::JSON::Collection - items class: Google::Apis::BooksV1::GeoLayerData::Geo::Boundary, decorator: Google::Apis::BooksV1::GeoLayerData::Geo::Boundary::Representation - - end - - property :cache_policy, as: 'cachePolicy' - property :country_code, as: 'countryCode' - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - property :map_type, as: 'mapType' - property :viewport, as: 'viewport', class: Google::Apis::BooksV1::GeoLayerData::Geo::Viewport, decorator: Google::Apis::BooksV1::GeoLayerData::Geo::Viewport::Representation - - property :zoom, as: 'zoom' - end - - # @private - class Boundary - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - - # @private - class Viewport - class Representation < Google::Apis::Core::JsonRepresentation - property :hi, as: 'hi', class: Google::Apis::BooksV1::GeoLayerData::Geo::Viewport::Hi, decorator: Google::Apis::BooksV1::GeoLayerData::Geo::Viewport::Hi::Representation - - property :lo, as: 'lo', class: Google::Apis::BooksV1::GeoLayerData::Geo::Viewport::Lo, decorator: Google::Apis::BooksV1::GeoLayerData::Geo::Viewport::Lo::Representation - - end - - # @private - class Hi - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - - # @private - class Lo - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - end - end - end - - # @private - class LayerSummaries - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::LayerSummary, decorator: Google::Apis::BooksV1::LayerSummary::Representation - - property :kind, as: 'kind' - property :total_items, as: 'totalItems' - end - end - - # @private - class LayerSummary - class Representation < Google::Apis::Core::JsonRepresentation - property :annotation_count, as: 'annotationCount' - collection :annotation_types, as: 'annotationTypes' - property :annotations_data_link, as: 'annotationsDataLink' - property :annotations_link, as: 'annotationsLink' - property :content_version, as: 'contentVersion' - property :data_count, as: 'dataCount' - property :id, as: 'id' - property :kind, as: 'kind' - property :layer_id, as: 'layerId' - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :volume_annotations_version, as: 'volumeAnnotationsVersion' - property :volume_id, as: 'volumeId' - end - end - - # @private - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::Metadata::Item, decorator: Google::Apis::BooksV1::Metadata::Item::Representation - - property :kind, as: 'kind' - end - - # @private - class Item - class Representation < Google::Apis::Core::JsonRepresentation - property :download_url, as: 'download_url' - property :encrypted_key, as: 'encrypted_key' - property :language, as: 'language' - property :size, as: 'size' - property :version, as: 'version' - end - end - end - - # @private - class Offers - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::Offers::Item, decorator: Google::Apis::BooksV1::Offers::Item::Representation - - property :kind, as: 'kind' - end - - # @private - class Item - class Representation < Google::Apis::Core::JsonRepresentation - property :art_url, as: 'artUrl' - property :gservices_key, as: 'gservicesKey' - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::BooksV1::Offers::Item::Item, decorator: Google::Apis::BooksV1::Offers::Item::Item::Representation - - end - - # @private - class Item - class Representation < Google::Apis::Core::JsonRepresentation - property :author, as: 'author' - property :canonical_volume_link, as: 'canonicalVolumeLink' - property :cover_url, as: 'coverUrl' - property :description, as: 'description' - property :title, as: 'title' - property :volume_id, as: 'volumeId' - end - end - end - end - - # @private - class ReadingPosition - class Representation < Google::Apis::Core::JsonRepresentation - property :epub_cfi_position, as: 'epubCfiPosition' - property :gb_image_position, as: 'gbImagePosition' - property :gb_text_position, as: 'gbTextPosition' - property :kind, as: 'kind' - property :pdf_position, as: 'pdfPosition' - property :updated, as: 'updated', type: DateTime - - property :volume_id, as: 'volumeId' - end - end - - # @private - class RequestAccess - class Representation < Google::Apis::Core::JsonRepresentation - property :concurrent_access, as: 'concurrentAccess', class: Google::Apis::BooksV1::ConcurrentAccessRestriction, decorator: Google::Apis::BooksV1::ConcurrentAccessRestriction::Representation - - property :download_access, as: 'downloadAccess', class: Google::Apis::BooksV1::DownloadAccessRestriction, decorator: Google::Apis::BooksV1::DownloadAccessRestriction::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Review - class Representation < Google::Apis::Core::JsonRepresentation - property :author, as: 'author', class: Google::Apis::BooksV1::Review::Author, decorator: Google::Apis::BooksV1::Review::Author::Representation - - property :content, as: 'content' - property :date, as: 'date' - property :full_text_url, as: 'fullTextUrl' - property :kind, as: 'kind' - property :rating, as: 'rating' - property :source, as: 'source', class: Google::Apis::BooksV1::Review::Source, decorator: Google::Apis::BooksV1::Review::Source::Representation - - property :title, as: 'title' - property :type, as: 'type' - property :volume_id, as: 'volumeId' - end - - # @private - class Author - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - end - end - - # @private - class Source - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :extra_description, as: 'extraDescription' - property :url, as: 'url' - end - end - end - - # @private - class UserSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :notes_export, as: 'notesExport', class: Google::Apis::BooksV1::UserSettings::NotesExport, decorator: Google::Apis::BooksV1::UserSettings::NotesExport::Representation - - end - - # @private - class NotesExport - class Representation < Google::Apis::Core::JsonRepresentation - property :folder_name, as: 'folderName' - property :is_enabled, as: 'isEnabled' - end - end - end - - # @private - class Volume - class Representation < Google::Apis::Core::JsonRepresentation - property :access_info, as: 'accessInfo', class: Google::Apis::BooksV1::Volume::AccessInfo, decorator: Google::Apis::BooksV1::Volume::AccessInfo::Representation - - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :layer_info, as: 'layerInfo', class: Google::Apis::BooksV1::Volume::LayerInfo, decorator: Google::Apis::BooksV1::Volume::LayerInfo::Representation - - property :recommended_info, as: 'recommendedInfo', class: Google::Apis::BooksV1::Volume::RecommendedInfo, decorator: Google::Apis::BooksV1::Volume::RecommendedInfo::Representation - - property :sale_info, as: 'saleInfo', class: Google::Apis::BooksV1::Volume::SaleInfo, decorator: Google::Apis::BooksV1::Volume::SaleInfo::Representation - - property :search_info, as: 'searchInfo', class: Google::Apis::BooksV1::Volume::SearchInfo, decorator: Google::Apis::BooksV1::Volume::SearchInfo::Representation - - property :self_link, as: 'selfLink' - property :user_info, as: 'userInfo', class: Google::Apis::BooksV1::Volume::UserInfo, decorator: Google::Apis::BooksV1::Volume::UserInfo::Representation - - property :volume_info, as: 'volumeInfo', class: Google::Apis::BooksV1::Volume::VolumeInfo, decorator: Google::Apis::BooksV1::Volume::VolumeInfo::Representation - - end - - # @private - class AccessInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :access_view_status, as: 'accessViewStatus' - property :country, as: 'country' - property :download_access, as: 'downloadAccess', class: Google::Apis::BooksV1::DownloadAccessRestriction, decorator: Google::Apis::BooksV1::DownloadAccessRestriction::Representation - - property :drive_imported_content_link, as: 'driveImportedContentLink' - property :embeddable, as: 'embeddable' - property :epub, as: 'epub', class: Google::Apis::BooksV1::Volume::AccessInfo::Epub, decorator: Google::Apis::BooksV1::Volume::AccessInfo::Epub::Representation - - property :explicit_offline_license_management, as: 'explicitOfflineLicenseManagement' - property :pdf, as: 'pdf', class: Google::Apis::BooksV1::Volume::AccessInfo::Pdf, decorator: Google::Apis::BooksV1::Volume::AccessInfo::Pdf::Representation - - property :public_domain, as: 'publicDomain' - property :quote_sharing_allowed, as: 'quoteSharingAllowed' - property :text_to_speech_permission, as: 'textToSpeechPermission' - property :view_order_url, as: 'viewOrderUrl' - property :viewability, as: 'viewability' - property :web_reader_link, as: 'webReaderLink' - end - - # @private - class Epub - class Representation < Google::Apis::Core::JsonRepresentation - property :acs_token_link, as: 'acsTokenLink' - property :download_link, as: 'downloadLink' - property :is_available, as: 'isAvailable' - end - end - - # @private - class Pdf - class Representation < Google::Apis::Core::JsonRepresentation - property :acs_token_link, as: 'acsTokenLink' - property :download_link, as: 'downloadLink' - property :is_available, as: 'isAvailable' - end - end - end - - # @private - class LayerInfo - class Representation < Google::Apis::Core::JsonRepresentation - collection :layers, as: 'layers', class: Google::Apis::BooksV1::Volume::LayerInfo::Layer, decorator: Google::Apis::BooksV1::Volume::LayerInfo::Layer::Representation - - end - - # @private - class Layer - class Representation < Google::Apis::Core::JsonRepresentation - property :layer_id, as: 'layerId' - property :volume_annotations_version, as: 'volumeAnnotationsVersion' - end - end - end - - # @private - class RecommendedInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :explanation, as: 'explanation' - end - end - - # @private - class SaleInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :buy_link, as: 'buyLink' - property :country, as: 'country' - property :is_ebook, as: 'isEbook' - property :list_price, as: 'listPrice', class: Google::Apis::BooksV1::Volume::SaleInfo::ListPrice, decorator: Google::Apis::BooksV1::Volume::SaleInfo::ListPrice::Representation - - collection :offers, as: 'offers', class: Google::Apis::BooksV1::Volume::SaleInfo::Offer, decorator: Google::Apis::BooksV1::Volume::SaleInfo::Offer::Representation - - property :on_sale_date, as: 'onSaleDate', type: DateTime - - property :retail_price, as: 'retailPrice', class: Google::Apis::BooksV1::Volume::SaleInfo::RetailPrice, decorator: Google::Apis::BooksV1::Volume::SaleInfo::RetailPrice::Representation - - property :saleability, as: 'saleability' - end - - # @private - class ListPrice - class Representation < Google::Apis::Core::JsonRepresentation - property :amount, as: 'amount' - property :currency_code, as: 'currencyCode' - end - end - - # @private - class Offer - class Representation < Google::Apis::Core::JsonRepresentation - property :finsky_offer_type, as: 'finskyOfferType' - property :list_price, as: 'listPrice', class: Google::Apis::BooksV1::Volume::SaleInfo::Offer::ListPrice, decorator: Google::Apis::BooksV1::Volume::SaleInfo::Offer::ListPrice::Representation - - property :rental_duration, as: 'rentalDuration', class: Google::Apis::BooksV1::Volume::SaleInfo::Offer::RentalDuration, decorator: Google::Apis::BooksV1::Volume::SaleInfo::Offer::RentalDuration::Representation - - property :retail_price, as: 'retailPrice', class: Google::Apis::BooksV1::Volume::SaleInfo::Offer::RetailPrice, decorator: Google::Apis::BooksV1::Volume::SaleInfo::Offer::RetailPrice::Representation - - end - - # @private - class ListPrice - class Representation < Google::Apis::Core::JsonRepresentation - property :amount_in_micros, as: 'amountInMicros' - property :currency_code, as: 'currencyCode' - end - end - - # @private - class RentalDuration - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :unit, as: 'unit' - end - end - - # @private - class RetailPrice - class Representation < Google::Apis::Core::JsonRepresentation - property :amount_in_micros, as: 'amountInMicros' - property :currency_code, as: 'currencyCode' - end - end - end - - # @private - class RetailPrice - class Representation < Google::Apis::Core::JsonRepresentation - property :amount, as: 'amount' - property :currency_code, as: 'currencyCode' - end - end - end - - # @private - class SearchInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :text_snippet, as: 'textSnippet' - end - end - - # @private - class UserInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :copy, as: 'copy', class: Google::Apis::BooksV1::Volume::UserInfo::Copy, decorator: Google::Apis::BooksV1::Volume::UserInfo::Copy::Representation - - property :is_in_my_books, as: 'isInMyBooks' - property :is_preordered, as: 'isPreordered' - property :is_purchased, as: 'isPurchased' - property :is_uploaded, as: 'isUploaded' - property :reading_position, as: 'readingPosition', class: Google::Apis::BooksV1::ReadingPosition, decorator: Google::Apis::BooksV1::ReadingPosition::Representation - - property :rental_period, as: 'rentalPeriod', class: Google::Apis::BooksV1::Volume::UserInfo::RentalPeriod, decorator: Google::Apis::BooksV1::Volume::UserInfo::RentalPeriod::Representation - - property :rental_state, as: 'rentalState' - property :review, as: 'review', class: Google::Apis::BooksV1::Review, decorator: Google::Apis::BooksV1::Review::Representation - - property :updated, as: 'updated', type: DateTime - - property :user_uploaded_volume_info, as: 'userUploadedVolumeInfo', class: Google::Apis::BooksV1::Volume::UserInfo::UserUploadedVolumeInfo, decorator: Google::Apis::BooksV1::Volume::UserInfo::UserUploadedVolumeInfo::Representation - - end - - # @private - class Copy - class Representation < Google::Apis::Core::JsonRepresentation - property :allowed_character_count, as: 'allowedCharacterCount' - property :limit_type, as: 'limitType' - property :remaining_character_count, as: 'remainingCharacterCount' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class RentalPeriod - class Representation < Google::Apis::Core::JsonRepresentation - property :end_utc_sec, as: 'endUtcSec' - property :start_utc_sec, as: 'startUtcSec' - end - end - - # @private - class UserUploadedVolumeInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :processing_state, as: 'processingState' - end - end - end - - # @private - class VolumeInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :allow_anon_logging, as: 'allowAnonLogging' - collection :authors, as: 'authors' - property :average_rating, as: 'averageRating' - property :canonical_volume_link, as: 'canonicalVolumeLink' - collection :categories, as: 'categories' - property :content_version, as: 'contentVersion' - property :description, as: 'description' - property :dimensions, as: 'dimensions', class: Google::Apis::BooksV1::Volume::VolumeInfo::Dimensions, decorator: Google::Apis::BooksV1::Volume::VolumeInfo::Dimensions::Representation - - property :image_links, as: 'imageLinks', class: Google::Apis::BooksV1::Volume::VolumeInfo::ImageLinks, decorator: Google::Apis::BooksV1::Volume::VolumeInfo::ImageLinks::Representation - - collection :industry_identifiers, as: 'industryIdentifiers', class: Google::Apis::BooksV1::Volume::VolumeInfo::IndustryIdentifier, decorator: Google::Apis::BooksV1::Volume::VolumeInfo::IndustryIdentifier::Representation - - property :info_link, as: 'infoLink' - property :language, as: 'language' - property :main_category, as: 'mainCategory' - property :maturity_rating, as: 'maturityRating' - property :page_count, as: 'pageCount' - property :preview_link, as: 'previewLink' - property :print_type, as: 'printType' - property :printed_page_count, as: 'printedPageCount' - property :published_date, as: 'publishedDate' - property :publisher, as: 'publisher' - property :ratings_count, as: 'ratingsCount' - property :reading_modes, as: 'readingModes' - property :sample_page_count, as: 'samplePageCount' - property :subtitle, as: 'subtitle' - property :title, as: 'title' - end - - # @private - class Dimensions - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :thickness, as: 'thickness' - property :width, as: 'width' - end - end - - # @private - class ImageLinks - class Representation < Google::Apis::Core::JsonRepresentation - property :extra_large, as: 'extraLarge' - property :large, as: 'large' - property :medium, as: 'medium' - property :small, as: 'small' - property :small_thumbnail, as: 'smallThumbnail' - property :thumbnail, as: 'thumbnail' - end - end - - # @private - class IndustryIdentifier - class Representation < Google::Apis::Core::JsonRepresentation - property :identifier, as: 'identifier' - property :type, as: 'type' - end - end - end - end - - # @private - class Volume2 - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::Volume, decorator: Google::Apis::BooksV1::Volume::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class VolumeAnnotation - class Representation < Google::Apis::Core::JsonRepresentation - property :annotation_data_id, as: 'annotationDataId' - property :annotation_data_link, as: 'annotationDataLink' - property :annotation_type, as: 'annotationType' - property :content_ranges, as: 'contentRanges', class: Google::Apis::BooksV1::VolumeAnnotation::ContentRanges, decorator: Google::Apis::BooksV1::VolumeAnnotation::ContentRanges::Representation - - property :data, as: 'data' - property :deleted, as: 'deleted' - property :id, as: 'id' - property :kind, as: 'kind' - property :layer_id, as: 'layerId' - collection :page_ids, as: 'pageIds' - property :selected_text, as: 'selectedText' - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :volume_id, as: 'volumeId' - end - - # @private - class ContentRanges - class Representation < Google::Apis::Core::JsonRepresentation - property :cfi_range, as: 'cfiRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :content_version, as: 'contentVersion' - property :gb_image_range, as: 'gbImageRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - property :gb_text_range, as: 'gbTextRange', class: Google::Apis::BooksV1::AnnotatinsRange, decorator: Google::Apis::BooksV1::AnnotatinsRange::Representation - - end - end - end - - # @private - class Volumeannotations - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::VolumeAnnotation, decorator: Google::Apis::BooksV1::VolumeAnnotation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - property :version, as: 'version' - end - end - - # @private - class Volumes - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::BooksV1::Volume, decorator: Google::Apis::BooksV1::Volume::Representation - - property :kind, as: 'kind' - property :total_items, as: 'totalItems' - end - end - end - end -end diff --git a/generated/google/apis/books_v1/service.rb b/generated/google/apis/books_v1/service.rb deleted file mode 100644 index ca6a006d1..000000000 --- a/generated/google/apis/books_v1/service.rb +++ /dev/null @@ -1,2170 +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 BooksV1 - # Books API - # - # Lets you search for books and manage your Google Books library. - # - # @example - # require 'google/apis/books_v1' - # - # Books = Google::Apis::BooksV1 # Alias the module - # service = Books::BooksService.new - # - # @see https://developers.google.com/books/docs/v1/getting_started - class BooksService < 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/', 'books/v1/') - end - - # Retrieves metadata for a specific bookshelf for the specified user. - # @param [String] user_id - # ID of user for whom to retrieve bookshelves. - # @param [String] shelf - # ID of bookshelf to retrieve. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Bookshelf] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Bookshelf] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bookshelf(user_id, shelf, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}/bookshelves/{shelf}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Bookshelf::Representation - command.response_class = Google::Apis::BooksV1::Bookshelf - command.params['userId'] = user_id unless user_id.nil? - command.params['shelf'] = shelf unless shelf.nil? - command.query['source'] = source unless source.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 public bookshelves for the specified user. - # @param [String] user_id - # ID of user for whom to retrieve bookshelves. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Bookshelves] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Bookshelves] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bookshelves(user_id, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}/bookshelves' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Bookshelves::Representation - command.response_class = Google::Apis::BooksV1::Bookshelves - command.params['userId'] = user_id unless user_id.nil? - command.query['source'] = source unless source.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 volumes in a specific bookshelf for the specified user. - # @param [String] user_id - # ID of user for whom to retrieve bookshelf volumes. - # @param [String] shelf - # ID of bookshelf to retrieve volumes. - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [Boolean] show_preorders - # Set to true to show pre-ordered books. Defaults to false. - # @param [String] source - # String to identify the originator of this request. - # @param [Fixnum] start_index - # Index of the first element to return (starts at 0) - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bookshelf_volumes(user_id, shelf, max_results: nil, show_preorders: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/{userId}/bookshelves/{shelf}/volumes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.params['userId'] = user_id unless user_id.nil? - command.params['shelf'] = shelf unless shelf.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['showPreorders'] = show_preorders unless show_preorders.nil? - command.query['source'] = source unless source.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 - - # - # @param [String] drive_document_id - # A drive document id. The upload_client_token must not be set. - # @param [String] mime_type - # The document MIME type. It can be set only if the drive_document_id is set. - # @param [String] name - # The document name. It can be set only if the drive_document_id is set. - # @param [String] upload_client_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::BooksV1::LoadingResource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::LoadingResource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_book(drive_document_id: nil, mime_type: nil, name: nil, upload_client_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'cloudloading/addBook' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BooksV1::LoadingResource::Representation - command.response_class = Google::Apis::BooksV1::LoadingResource - command.query['drive_document_id'] = drive_document_id unless drive_document_id.nil? - command.query['mime_type'] = mime_type unless mime_type.nil? - command.query['name'] = name unless name.nil? - command.query['upload_client_token'] = upload_client_token unless upload_client_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 - - # Remove the book and its contents - # @param [String] volume_id - # The id of the book to be removed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_book(volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'cloudloading/deleteBook' - command = make_simple_command(:post, path, options) - command.query['volumeId'] = volume_id unless volume_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 - - # - # @param [Google::Apis::BooksV1::LoadingResource] loading_resource_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::BooksV1::LoadingResource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::LoadingResource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_book(loading_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'cloudloading/updateBook' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BooksV1::LoadingResource::Representation - command.request_object = loading_resource_object - command.response_representation = Google::Apis::BooksV1::LoadingResource::Representation - command.response_class = Google::Apis::BooksV1::LoadingResource - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of offline dictionary meatadata available - # @param [String] cpksver - # The device/version ID from which to request the data. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Metadata] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::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_offline_metadata_dictionary(cpksver: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'dictionary/listOfflineMetadata' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Metadata::Representation - command.response_class = Google::Apis::BooksV1::Metadata - command.query['cpksver'] = cpksver unless cpksver.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 layer summary for a volume. - # @param [String] volume_id - # The volume to retrieve layers for. - # @param [String] summary_id - # The ID for the layer to get the summary for. - # @param [String] content_version - # The content version for the requested volume. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::LayerSummary] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::LayerSummary] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer(volume_id, summary_id, content_version: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}/layersummary/{summaryId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::LayerSummary::Representation - command.response_class = Google::Apis::BooksV1::LayerSummary - command.params['volumeId'] = volume_id unless volume_id.nil? - command.params['summaryId'] = summary_id unless summary_id.nil? - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['source'] = source unless source.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 layer summaries for a volume. - # @param [String] volume_id - # The volume to retrieve layers for. - # @param [String] content_version - # The content version for the requested volume. - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # The value of the nextToken from the previous page. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::LayerSummaries] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::LayerSummaries] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layers(volume_id, content_version: nil, max_results: nil, page_token: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}/layersummary' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::LayerSummaries::Representation - command.response_class = Google::Apis::BooksV1::LayerSummaries - command.params['volumeId'] = volume_id unless volume_id.nil? - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['source'] = source unless source.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 annotation data. - # @param [String] volume_id - # The volume to retrieve annotations for. - # @param [String] layer_id - # The ID for the layer to get the annotations. - # @param [String] annotation_data_id - # The ID of the annotation data to retrieve. - # @param [Boolean] allow_web_definitions - # For the dictionary layer. Whether or not to allow web definitions. - # @param [String] content_version - # The content version for the volume you are trying to retrieve. - # @param [Fixnum] h - # The requested pixel height for any images. If height is provided width must - # also be provided. - # @param [String] locale - # The locale information for the data. ISO-639-1 language and ISO-3166-1 country - # code. Ex: 'en_US'. - # @param [Fixnum] scale - # The requested scale for the image. - # @param [String] source - # String to identify the originator of this request. - # @param [Fixnum] w - # The requested pixel width for any images. If width is provided height must - # also be provided. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::AnnotationData] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::AnnotationData] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer_annotation_data(volume_id, layer_id, annotation_data_id, allow_web_definitions: nil, content_version: nil, h: nil, locale: nil, scale: nil, source: nil, w: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::AnnotationData::Representation - command.response_class = Google::Apis::BooksV1::AnnotationData - command.params['volumeId'] = volume_id unless volume_id.nil? - command.params['layerId'] = layer_id unless layer_id.nil? - command.params['annotationDataId'] = annotation_data_id unless annotation_data_id.nil? - command.query['allowWebDefinitions'] = allow_web_definitions unless allow_web_definitions.nil? - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['h'] = h unless h.nil? - command.query['locale'] = locale unless locale.nil? - command.query['scale'] = scale unless scale.nil? - command.query['source'] = source unless source.nil? - command.query['w'] = w unless w.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 annotation data for a volume and layer. - # @param [String] volume_id - # The volume to retrieve annotation data for. - # @param [String] layer_id - # The ID for the layer to get the annotation data. - # @param [Array, String] annotation_data_id - # The list of Annotation Data Ids to retrieve. Pagination is ignored if this is - # set. - # @param [String] content_version - # The content version for the requested volume. - # @param [Fixnum] h - # The requested pixel height for any images. If height is provided width must - # also be provided. - # @param [String] locale - # The locale information for the data. ISO-639-1 language and ISO-3166-1 country - # code. Ex: 'en_US'. - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # The value of the nextToken from the previous page. - # @param [Fixnum] scale - # The requested scale for the image. - # @param [String] source - # String to identify the originator of this request. - # @param [String] updated_max - # RFC 3339 timestamp to restrict to items updated prior to this timestamp ( - # exclusive). - # @param [String] updated_min - # RFC 3339 timestamp to restrict to items updated since this timestamp ( - # inclusive). - # @param [Fixnum] w - # The requested pixel width for any images. If width is provided height must - # also be provided. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::AnnotationsData] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::AnnotationsData] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer_annotation_data(volume_id, layer_id, annotation_data_id: nil, content_version: nil, h: nil, locale: nil, max_results: nil, page_token: nil, scale: nil, source: nil, updated_max: nil, updated_min: nil, w: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}/layers/{layerId}/data' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::AnnotationsData::Representation - command.response_class = Google::Apis::BooksV1::AnnotationsData - command.params['volumeId'] = volume_id unless volume_id.nil? - command.params['layerId'] = layer_id unless layer_id.nil? - command.query['annotationDataId'] = annotation_data_id unless annotation_data_id.nil? - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['h'] = h unless h.nil? - command.query['locale'] = locale unless locale.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['scale'] = scale unless scale.nil? - command.query['source'] = source unless source.nil? - command.query['updatedMax'] = updated_max unless updated_max.nil? - command.query['updatedMin'] = updated_min unless updated_min.nil? - command.query['w'] = w unless w.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 volume annotation. - # @param [String] volume_id - # The volume to retrieve annotations for. - # @param [String] layer_id - # The ID for the layer to get the annotations. - # @param [String] annotation_id - # The ID of the volume annotation to retrieve. - # @param [String] locale - # The locale information for the data. ISO-639-1 language and ISO-3166-1 country - # code. Ex: 'en_US'. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::VolumeAnnotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::VolumeAnnotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer_volume_annotation(volume_id, layer_id, annotation_id, locale: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::VolumeAnnotation::Representation - command.response_class = Google::Apis::BooksV1::VolumeAnnotation - command.params['volumeId'] = volume_id unless volume_id.nil? - command.params['layerId'] = layer_id unless layer_id.nil? - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['locale'] = locale unless locale.nil? - command.query['source'] = source unless source.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 volume annotations for a volume and layer. - # @param [String] volume_id - # The volume to retrieve annotations for. - # @param [String] layer_id - # The ID for the layer to get the annotations. - # @param [String] content_version - # The content version for the requested volume. - # @param [String] end_offset - # The end offset to end retrieving data from. - # @param [String] end_position - # The end position to end retrieving data from. - # @param [String] locale - # The locale information for the data. ISO-639-1 language and ISO-3166-1 country - # code. Ex: 'en_US'. - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # The value of the nextToken from the previous page. - # @param [Boolean] show_deleted - # Set to true to return deleted annotations. updatedMin must be in the request - # to use this. Defaults to false. - # @param [String] source - # String to identify the originator of this request. - # @param [String] start_offset - # The start offset to start retrieving data from. - # @param [String] start_position - # The start position to start retrieving data from. - # @param [String] updated_max - # RFC 3339 timestamp to restrict to items updated prior to this timestamp ( - # exclusive). - # @param [String] updated_min - # RFC 3339 timestamp to restrict to items updated since this timestamp ( - # inclusive). - # @param [String] volume_annotations_version - # The version of the volume annotations that you are requesting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Volumeannotations] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumeannotations] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer_volume_annotations(volume_id, layer_id, content_version: nil, end_offset: nil, end_position: nil, locale: nil, max_results: nil, page_token: nil, show_deleted: nil, source: nil, start_offset: nil, start_position: nil, updated_max: nil, updated_min: nil, volume_annotations_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}/layers/{layerId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumeannotations::Representation - command.response_class = Google::Apis::BooksV1::Volumeannotations - command.params['volumeId'] = volume_id unless volume_id.nil? - command.params['layerId'] = layer_id unless layer_id.nil? - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['endOffset'] = end_offset unless end_offset.nil? - command.query['endPosition'] = end_position unless end_position.nil? - command.query['locale'] = locale unless locale.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['source'] = source unless source.nil? - command.query['startOffset'] = start_offset unless start_offset.nil? - command.query['startPosition'] = start_position unless start_position.nil? - command.query['updatedMax'] = updated_max unless updated_max.nil? - command.query['updatedMin'] = updated_min unless updated_min.nil? - command.query['volumeAnnotationsVersion'] = volume_annotations_version unless volume_annotations_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 - - # Gets the current settings for the 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::BooksV1::UserSettings] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::UserSettings] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_settings(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'myconfig/getUserSettings' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::UserSettings::Representation - command.response_class = Google::Apis::BooksV1::UserSettings - 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 - - # Release downloaded content access restriction. - # @param [String] cpksver - # The device/version ID from which to release the restriction. - # @param [String] locale - # ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. - # @param [String] source - # String to identify the originator of this request. - # @param [Array, String] volume_ids - # The volume(s) to release restrictions 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::BooksV1::DownloadAccesses] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::DownloadAccesses] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def release_download_access(cpksver: nil, locale: nil, source: nil, volume_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'myconfig/releaseDownloadAccess' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BooksV1::DownloadAccesses::Representation - command.response_class = Google::Apis::BooksV1::DownloadAccesses - command.query['cpksver'] = cpksver unless cpksver.nil? - command.query['locale'] = locale unless locale.nil? - command.query['source'] = source unless source.nil? - command.query['volumeIds'] = volume_ids unless volume_ids.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 - - # Request concurrent and download access restrictions. - # @param [String] cpksver - # The device/version ID from which to request the restrictions. - # @param [String] license_types - # The type of access license to request. If not specified, the default is BOTH. - # @param [String] locale - # ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. - # @param [String] nonce - # The client nonce value. - # @param [String] source - # String to identify the originator of this request. - # @param [String] volume_id - # The volume to request concurrent/download restrictions 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::BooksV1::RequestAccess] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::RequestAccess] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def request_access(cpksver: nil, license_types: nil, locale: nil, nonce: nil, source: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'myconfig/requestAccess' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BooksV1::RequestAccess::Representation - command.response_class = Google::Apis::BooksV1::RequestAccess - command.query['cpksver'] = cpksver unless cpksver.nil? - command.query['licenseTypes'] = license_types unless license_types.nil? - command.query['locale'] = locale unless locale.nil? - command.query['nonce'] = nonce unless nonce.nil? - command.query['source'] = source unless source.nil? - command.query['volumeId'] = volume_id unless volume_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 - - # Request downloaded content access for specified volumes on the My eBooks shelf. - # @param [String] cpksver - # The device/version ID from which to release the restriction. - # @param [Array, String] features - # List of features supported by the client, i.e., 'RENTALS' - # @param [String] locale - # ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. - # @param [String] nonce - # The client nonce value. - # @param [Boolean] show_preorders - # Set to true to show pre-ordered books. Defaults to false. - # @param [String] source - # String to identify the originator of this request. - # @param [Array, String] volume_ids - # The volume(s) to request download restrictions 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def sync_volume_licenses(cpksver: nil, features: nil, locale: nil, nonce: nil, show_preorders: nil, source: nil, volume_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'myconfig/syncVolumeLicenses' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.query['cpksver'] = cpksver unless cpksver.nil? - command.query['features'] = features unless features.nil? - command.query['locale'] = locale unless locale.nil? - command.query['nonce'] = nonce unless nonce.nil? - command.query['showPreorders'] = show_preorders unless show_preorders.nil? - command.query['source'] = source unless source.nil? - command.query['volumeIds'] = volume_ids unless volume_ids.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets the settings for the user. If a sub-object is specified, it will - # overwrite the existing sub-object stored in the server. Unspecified sub- - # objects will retain the existing value. - # @param [Google::Apis::BooksV1::UserSettings] user_settings_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::BooksV1::UserSettings] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::UserSettings] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_settings(user_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'myconfig/updateUserSettings' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BooksV1::UserSettings::Representation - command.request_object = user_settings_object - command.response_representation = Google::Apis::BooksV1::UserSettings::Representation - command.response_class = Google::Apis::BooksV1::UserSettings - 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 annotation. - # @param [String] annotation_id - # The ID for the annotation to delete. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_my_library_annotation(annotation_id, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/annotations/{annotationId}' - command = make_simple_command(:delete, path, options) - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['source'] = source unless source.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 annotation. - # @param [Google::Apis::BooksV1::Annotation] annotation_object - # @param [String] country - # ISO-3166-1 code to override the IP-based location. - # @param [Boolean] show_only_summary_in_response - # Requests that only the summary of the specified layer be provided in the - # response. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_library_annotation(annotation_object = nil, country: nil, show_only_summary_in_response: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/annotations' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::BooksV1::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::BooksV1::Annotation::Representation - command.response_class = Google::Apis::BooksV1::Annotation - command.query['country'] = country unless country.nil? - command.query['showOnlySummaryInResponse'] = show_only_summary_in_response unless show_only_summary_in_response.nil? - command.query['source'] = source unless source.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 annotations, possibly filtered. - # @param [String] content_version - # The content version for the requested volume. - # @param [String] layer_id - # The layer ID to limit annotation by. - # @param [Array, String] layer_ids - # The layer ID(s) to limit annotation by. - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # The value of the nextToken from the previous page. - # @param [Boolean] show_deleted - # Set to true to return deleted annotations. updatedMin must be in the request - # to use this. Defaults to false. - # @param [String] source - # String to identify the originator of this request. - # @param [String] updated_max - # RFC 3339 timestamp to restrict to items updated prior to this timestamp ( - # exclusive). - # @param [String] updated_min - # RFC 3339 timestamp to restrict to items updated since this timestamp ( - # inclusive). - # @param [String] volume_id - # The volume to restrict annotations to. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Annotations] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Annotations] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_library_annotations(content_version: nil, layer_id: nil, layer_ids: nil, max_results: nil, page_token: nil, show_deleted: nil, source: nil, updated_max: nil, updated_min: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/annotations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Annotations::Representation - command.response_class = Google::Apis::BooksV1::Annotations - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['layerId'] = layer_id unless layer_id.nil? - command.query['layerIds'] = layer_ids unless layer_ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['source'] = source unless source.nil? - command.query['updatedMax'] = updated_max unless updated_max.nil? - command.query['updatedMin'] = updated_min unless updated_min.nil? - command.query['volumeId'] = volume_id unless volume_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 summary of specified layers. - # @param [Array, String] layer_ids - # Array of layer IDs to get the summary for. - # @param [String] volume_id - # Volume id to get the summary 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::BooksV1::AnnotationsSummary] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::AnnotationsSummary] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def summarize_my_library_annotation(layer_ids: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/annotations/summary' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BooksV1::AnnotationsSummary::Representation - command.response_class = Google::Apis::BooksV1::AnnotationsSummary - command.query['layerIds'] = layer_ids unless layer_ids.nil? - command.query['volumeId'] = volume_id unless volume_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 annotation. - # @param [String] annotation_id - # The ID for the annotation to update. - # @param [Google::Apis::BooksV1::Annotation] annotation_object - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_library_annotation(annotation_id, annotation_object = nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/annotations/{annotationId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::BooksV1::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::BooksV1::Annotation::Representation - command.response_class = Google::Apis::BooksV1::Annotation - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['source'] = source unless source.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Adds a volume to a bookshelf. - # @param [String] shelf - # ID of bookshelf to which to add a volume. - # @param [String] reason - # The reason for which the book is added to the library. - # @param [String] source - # String to identify the originator of this request. - # @param [String] volume_id - # ID of volume to add. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 add_my_library_volume(shelf, reason: nil, source: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/bookshelves/{shelf}/addVolume' - command = make_simple_command(:post, path, options) - command.params['shelf'] = shelf unless shelf.nil? - command.query['reason'] = reason unless reason.nil? - command.query['source'] = source unless source.nil? - command.query['volumeId'] = volume_id unless volume_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 - - # Clears all volumes from a bookshelf. - # @param [String] shelf - # ID of bookshelf from which to remove a volume. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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 clear_my_library_volumes(shelf, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/bookshelves/{shelf}/clearVolumes' - command = make_simple_command(:post, path, options) - command.params['shelf'] = shelf unless shelf.nil? - command.query['source'] = source unless source.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 metadata for a specific bookshelf belonging to the authenticated - # user. - # @param [String] shelf - # ID of bookshelf to retrieve. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Bookshelf] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Bookshelf] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_library_bookshelf(shelf, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/bookshelves/{shelf}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Bookshelf::Representation - command.response_class = Google::Apis::BooksV1::Bookshelf - command.params['shelf'] = shelf unless shelf.nil? - command.query['source'] = source unless source.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 bookshelves belonging to the authenticated user. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Bookshelves] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Bookshelves] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_library_bookshelves(source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/bookshelves' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Bookshelves::Representation - command.response_class = Google::Apis::BooksV1::Bookshelves - command.query['source'] = source unless source.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 - - # Moves a volume within a bookshelf. - # @param [String] shelf - # ID of bookshelf with the volume. - # @param [String] source - # String to identify the originator of this request. - # @param [String] volume_id - # ID of volume to move. - # @param [Fixnum] volume_position - # Position on shelf to move the item (0 puts the item before the current first - # item, 1 puts it between the first and the second and so on.) - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def move_my_library_volume(shelf, source: nil, volume_id: nil, volume_position: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/bookshelves/{shelf}/moveVolume' - command = make_simple_command(:post, path, options) - command.params['shelf'] = shelf unless shelf.nil? - command.query['source'] = source unless source.nil? - command.query['volumeId'] = volume_id unless volume_id.nil? - command.query['volumePosition'] = volume_position unless volume_position.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes a volume from a bookshelf. - # @param [String] shelf - # ID of bookshelf from which to remove a volume. - # @param [String] reason - # The reason for which the book is removed from the library. - # @param [String] source - # String to identify the originator of this request. - # @param [String] volume_id - # ID of volume to remove. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 remove_my_library_volume(shelf, reason: nil, source: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/bookshelves/{shelf}/removeVolume' - command = make_simple_command(:post, path, options) - command.params['shelf'] = shelf unless shelf.nil? - command.query['reason'] = reason unless reason.nil? - command.query['source'] = source unless source.nil? - command.query['volumeId'] = volume_id unless volume_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 volume information for volumes on a bookshelf. - # @param [String] shelf - # The bookshelf ID or name retrieve volumes for. - # @param [String] country - # ISO-3166-1 code to override the IP-based location. - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] q - # Full-text search query string in this bookshelf. - # @param [Boolean] show_preorders - # Set to true to show pre-ordered books. Defaults to false. - # @param [String] source - # String to identify the originator of this request. - # @param [Fixnum] start_index - # Index of the first element to return (starts at 0) - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_library_volumes(shelf, country: nil, max_results: nil, projection: nil, q: nil, show_preorders: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/bookshelves/{shelf}/volumes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.params['shelf'] = shelf unless shelf.nil? - command.query['country'] = country unless country.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['projection'] = projection unless projection.nil? - command.query['q'] = q unless q.nil? - command.query['showPreorders'] = show_preorders unless show_preorders.nil? - command.query['source'] = source unless source.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 - - # Retrieves my reading position information for a volume. - # @param [String] volume_id - # ID of volume for which to retrieve a reading position. - # @param [String] content_version - # Volume content version for which this reading position is requested. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::ReadingPosition] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::ReadingPosition] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_library_reading_position(volume_id, content_version: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/readingpositions/{volumeId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::ReadingPosition::Representation - command.response_class = Google::Apis::BooksV1::ReadingPosition - command.params['volumeId'] = volume_id unless volume_id.nil? - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['source'] = source unless source.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets my reading position information for a volume. - # @param [String] volume_id - # ID of volume for which to update the reading position. - # @param [String] action - # Action that caused this reading position to be set. - # @param [String] content_version - # Volume content version for which this reading position applies. - # @param [String] device_cookie - # Random persistent device cookie optional on set position. - # @param [String] position - # Position string for the new volume reading position. - # @param [String] source - # String to identify the originator of this request. - # @param [String] timestamp - # RFC 3339 UTC format timestamp associated with this reading position. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 set_my_library_reading_position(volume_id, action: nil, content_version: nil, device_cookie: nil, position: nil, source: nil, timestamp: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'mylibrary/readingpositions/{volumeId}/setPosition' - command = make_simple_command(:post, path, options) - command.params['volumeId'] = volume_id unless volume_id.nil? - command.query['action'] = action unless action.nil? - command.query['contentVersion'] = content_version unless content_version.nil? - command.query['deviceCookie'] = device_cookie unless device_cookie.nil? - command.query['position'] = position unless position.nil? - command.query['source'] = source unless source.nil? - command.query['timestamp'] = timestamp unless timestamp.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 categories for onboarding experience. - # @param [String] locale - # ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Category] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Category] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_onboarding_categories(locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'onboarding/listCategories' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Category::Representation - command.response_class = Google::Apis::BooksV1::Category - 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 - - # List available volumes under categories for onboarding experience. - # @param [Array, String] category_id - # List of category ids requested. - # @param [String] locale - # ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. - # @param [String] max_allowed_maturity_rating - # The maximum allowed maturity rating of returned volumes. Books with a higher - # maturity rating are filtered out. - # @param [Fixnum] page_size - # Number of maximum results per page to be included in the response. - # @param [String] page_token - # The value of the nextToken from the previous page. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Volume2] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volume2] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_onboarding_category_volumes(category_id: nil, locale: nil, max_allowed_maturity_rating: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'onboarding/listCategoryVolumes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volume2::Representation - command.response_class = Google::Apis::BooksV1::Volume2 - command.query['categoryId'] = category_id unless category_id.nil? - command.query['locale'] = locale unless locale.nil? - command.query['maxAllowedMaturityRating'] = max_allowed_maturity_rating unless max_allowed_maturity_rating.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # - # @param [String] android_id - # device android_id - # @param [String] device - # device device - # @param [String] manufacturer - # device manufacturer - # @param [String] model - # device model - # @param [String] offer_id - # @param [String] product - # device product - # @param [String] serial - # device serial - # @param [String] volume_id - # Volume id to exercise the offer - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 accept_promo_offer(android_id: nil, device: nil, manufacturer: nil, model: nil, offer_id: nil, product: nil, serial: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'promooffer/accept' - command = make_simple_command(:post, path, options) - command.query['androidId'] = android_id unless android_id.nil? - command.query['device'] = device unless device.nil? - command.query['manufacturer'] = manufacturer unless manufacturer.nil? - command.query['model'] = model unless model.nil? - command.query['offerId'] = offer_id unless offer_id.nil? - command.query['product'] = product unless product.nil? - command.query['serial'] = serial unless serial.nil? - command.query['volumeId'] = volume_id unless volume_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 - - # - # @param [String] android_id - # device android_id - # @param [String] device - # device device - # @param [String] manufacturer - # device manufacturer - # @param [String] model - # device model - # @param [String] offer_id - # Offer to dimiss - # @param [String] product - # device product - # @param [String] serial - # device serial - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 dismiss_promo_offer(android_id: nil, device: nil, manufacturer: nil, model: nil, offer_id: nil, product: nil, serial: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'promooffer/dismiss' - command = make_simple_command(:post, path, options) - command.query['androidId'] = android_id unless android_id.nil? - command.query['device'] = device unless device.nil? - command.query['manufacturer'] = manufacturer unless manufacturer.nil? - command.query['model'] = model unless model.nil? - command.query['offerId'] = offer_id unless offer_id.nil? - command.query['product'] = product unless product.nil? - command.query['serial'] = serial unless serial.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of promo offers available to the user - # @param [String] android_id - # device android_id - # @param [String] device - # device device - # @param [String] manufacturer - # device manufacturer - # @param [String] model - # device model - # @param [String] product - # device product - # @param [String] serial - # device serial - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Offers] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Offers] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_promo_offer(android_id: nil, device: nil, manufacturer: nil, model: nil, product: nil, serial: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'promooffer/get' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Offers::Representation - command.response_class = Google::Apis::BooksV1::Offers - command.query['androidId'] = android_id unless android_id.nil? - command.query['device'] = device unless device.nil? - command.query['manufacturer'] = manufacturer unless manufacturer.nil? - command.query['model'] = model unless model.nil? - command.query['product'] = product unless product.nil? - command.query['serial'] = serial unless serial.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 volume information for a single volume. - # @param [String] volume_id - # ID of volume to retrieve. - # @param [String] country - # ISO-3166-1 code to override the IP-based location. - # @param [String] partner - # Brand results for partner ID. - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] source - # String to identify the originator of this request. - # @param [Boolean] user_library_consistent_read - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Volume] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volume] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_volume(volume_id, country: nil, partner: nil, projection: nil, source: nil, user_library_consistent_read: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volume::Representation - command.response_class = Google::Apis::BooksV1::Volume - command.params['volumeId'] = volume_id unless volume_id.nil? - command.query['country'] = country unless country.nil? - command.query['partner'] = partner unless partner.nil? - command.query['projection'] = projection unless projection.nil? - command.query['source'] = source unless source.nil? - command.query['user_library_consistent_read'] = user_library_consistent_read unless user_library_consistent_read.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 - - # Performs a book search. - # @param [String] download - # Restrict to volumes by download availability. - # @param [String] filter - # Filter search results. - # @param [String] lang_restrict - # Restrict results to books with this language code. - # @param [String] library_restrict - # Restrict search to this user's library. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] order_by - # Sort search results. - # @param [String] partner - # Restrict and brand results for partner ID. - # @param [String] print_type - # Restrict to books or magazines. - # @param [String] projection - # Restrict information returned to a set of selected fields. - # @param [String] q - # Full-text search query string. - # @param [Boolean] show_preorders - # Set to true to show books available for preorder. Defaults to false. - # @param [String] source - # String to identify the originator of this request. - # @param [Fixnum] start_index - # Index of the first result to return (starts at 0) - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_volumes(download: nil, filter: nil, lang_restrict: nil, library_restrict: nil, max_results: nil, order_by: nil, partner: nil, print_type: nil, projection: nil, q: nil, show_preorders: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.query['download'] = download unless download.nil? - command.query['filter'] = filter unless filter.nil? - command.query['langRestrict'] = lang_restrict unless lang_restrict.nil? - command.query['libraryRestrict'] = library_restrict unless library_restrict.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['partner'] = partner unless partner.nil? - command.query['printType'] = print_type unless print_type.nil? - command.query['projection'] = projection unless projection.nil? - command.query['q'] = q unless q.nil? - command.query['showPreorders'] = show_preorders unless show_preorders.nil? - command.query['source'] = source unless source.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 - - # Return a list of associated books. - # @param [String] volume_id - # ID of the source volume. - # @param [String] association - # Association type. - # @param [String] locale - # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for - # generating recommendations. - # @param [String] max_allowed_maturity_rating - # The maximum allowed maturity rating of returned recommendations. Books with a - # higher maturity rating are filtered out. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_associated_volumes(volume_id, association: nil, locale: nil, max_allowed_maturity_rating: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/{volumeId}/associated' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.params['volumeId'] = volume_id unless volume_id.nil? - command.query['association'] = association unless association.nil? - command.query['locale'] = locale unless locale.nil? - command.query['maxAllowedMaturityRating'] = max_allowed_maturity_rating unless max_allowed_maturity_rating.nil? - command.query['source'] = source unless source.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 - - # Return a list of books in My Library. - # @param [Array, String] acquire_method - # How the book was aquired - # @param [String] locale - # ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for - # generating recommendations. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [Array, String] processing_state - # The processing state of the user uploaded volumes to be returned. Applicable - # only if the UPLOADED is specified in the acquireMethod. - # @param [String] source - # String to identify the originator of this request. - # @param [Fixnum] start_index - # Index of the first result to return (starts at 0) - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_my_books(acquire_method: nil, locale: nil, max_results: nil, processing_state: nil, source: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/mybooks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.query['acquireMethod'] = acquire_method unless acquire_method.nil? - command.query['locale'] = locale unless locale.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['processingState'] = processing_state unless processing_state.nil? - command.query['source'] = source unless source.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 - - # Return a list of recommended books for the current user. - # @param [String] locale - # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for - # generating recommendations. - # @param [String] max_allowed_maturity_rating - # The maximum allowed maturity rating of returned recommendations. Books with a - # higher maturity rating are filtered out. - # @param [String] source - # String to identify the originator of this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_recommended_volumes(locale: nil, max_allowed_maturity_rating: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/recommended' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.query['locale'] = locale unless locale.nil? - command.query['maxAllowedMaturityRating'] = max_allowed_maturity_rating unless max_allowed_maturity_rating.nil? - command.query['source'] = source unless source.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 - - # Rate a recommended book for the current user. - # @param [String] locale - # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for - # generating recommendations. - # @param [String] rating - # Rating to be given to the volume. - # @param [String] source - # String to identify the originator of this request. - # @param [String] volume_id - # ID of the source volume. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::BooksV1::RateRecommendedVolumeResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::RateRecommendedVolumeResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def rate_recommended_volume(locale: nil, rating: nil, source: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/recommended/rate' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::BooksV1::RateRecommendedVolumeResponse::Representation - command.response_class = Google::Apis::BooksV1::RateRecommendedVolumeResponse - command.query['locale'] = locale unless locale.nil? - command.query['rating'] = rating unless rating.nil? - command.query['source'] = source unless source.nil? - command.query['volumeId'] = volume_id unless volume_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 - - # Return a list of books uploaded by the current user. - # @param [String] locale - # ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for - # generating recommendations. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [Array, String] processing_state - # The processing state of the user uploaded volumes to be returned. - # @param [String] source - # String to identify the originator of this request. - # @param [Fixnum] start_index - # Index of the first result to return (starts at 0) - # @param [Array, String] volume_id - # The ids of the volumes to be returned. If not specified all that match the - # processingState 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::BooksV1::Volumes] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BooksV1::Volumes] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_uploaded_volumes(locale: nil, max_results: nil, processing_state: nil, source: nil, start_index: nil, volume_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'volumes/useruploaded' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::BooksV1::Volumes::Representation - command.response_class = Google::Apis::BooksV1::Volumes - command.query['locale'] = locale unless locale.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['processingState'] = processing_state unless processing_state.nil? - command.query['source'] = source unless source.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['volumeId'] = volume_id unless volume_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 diff --git a/generated/google/apis/calendar_v3.rb b/generated/google/apis/calendar_v3.rb deleted file mode 100644 index cbd64e07c..000000000 --- a/generated/google/apis/calendar_v3.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/calendar_v3/classes.rb b/generated/google/apis/calendar_v3/classes.rb deleted file mode 100644 index 5df997e8c..000000000 --- a/generated/google/apis/calendar_v3/classes.rb +++ /dev/null @@ -1,1666 +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 - include Google::Apis::Core::Hashable - - # ETag of the collection. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # List of rules on the access control list. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of the collection ("calendar#acl"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. Omitted if no further - # results are available, in which case nextSyncToken is provided. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Token used at a later point in time to retrieve only the entries that have - # changed since this result was returned. Omitted if further results are - # available, in which case nextPageToken is provided. - # Corresponds to the JSON property `nextSyncToken` - # @return [String] - attr_accessor :next_sync_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? - @next_sync_token = args[:next_sync_token] unless args[:next_sync_token].nil? - end - end - - # - class AclRule - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Identifier of the ACL rule. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource ("calendar#aclRule"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The role assigned to the scope. Possible values are: - # - "none" - Provides no access. - # - "freeBusyReader" - Provides read access to free/busy information. - # - "reader" - Provides read access to the calendar. Private events will appear - # to users with reader access, but event details will be hidden. - # - "writer" - Provides read and write access to the calendar. Private events - # will appear to users with writer access, and event details will be visible. - # - "owner" - Provides ownership of the calendar. This role has all of the - # permissions of the writer role with the additional ability to see and - # manipulate ACLs. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # The scope of the rule. - # Corresponds to the JSON property `scope` - # @return [Google::Apis::CalendarV3::AclRule::Scope] - attr_accessor :scope - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @role = args[:role] unless args[:role].nil? - @scope = args[:scope] unless args[:scope].nil? - end - - # The scope of the rule. - class Scope - include Google::Apis::Core::Hashable - - # The type of the scope. Possible values are: - # - "default" - The public scope. This is the default value. - # - "user" - Limits the scope to a single user. - # - "group" - Limits the scope to a group. - # - "domain" - Limits the scope to a domain. Note: The permissions granted to - # the "default", or public, scope apply to any user, authenticated or not. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The email address of a user or group, or the name of a domain, depending on - # the scope type. Omitted for type "default". - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - - # - class Calendar - include Google::Apis::Core::Hashable - - # Description of the calendar. Optional. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Identifier of the calendar. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource ("calendar#calendar"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Geographic location of the calendar as free-form text. Optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # Title of the calendar. - # Corresponds to the JSON property `summary` - # @return [String] - attr_accessor :summary - - # The time zone of the calendar. (Formatted as an IANA Time Zone Database name, - # e.g. "Europe/Zurich".) Optional. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @location = args[:location] unless args[:location].nil? - @summary = args[:summary] unless args[:summary].nil? - @time_zone = args[:time_zone] unless args[:time_zone].nil? - end - end - - # - class CalendarList - include Google::Apis::Core::Hashable - - # ETag of the collection. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Calendars that are present on the user's calendar list. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of the collection ("calendar#calendarList"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. Omitted if no further - # results are available, in which case nextSyncToken is provided. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Token used at a later point in time to retrieve only the entries that have - # changed since this result was returned. Omitted if further results are - # available, in which case nextPageToken is provided. - # Corresponds to the JSON property `nextSyncToken` - # @return [String] - attr_accessor :next_sync_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? - @next_sync_token = args[:next_sync_token] unless args[:next_sync_token].nil? - end - end - - # - class CalendarListEntry - include Google::Apis::Core::Hashable - - # The effective access role that the authenticated user has on the calendar. - # Read-only. Possible values are: - # - "freeBusyReader" - Provides read access to free/busy information. - # - "reader" - Provides read access to the calendar. Private events will appear - # to users with reader access, but event details will be hidden. - # - "writer" - Provides read and write access to the calendar. Private events - # will appear to users with writer access, and event details will be visible. - # - "owner" - Provides ownership of the calendar. This role has all of the - # permissions of the writer role with the additional ability to see and - # manipulate ACLs. - # Corresponds to the JSON property `accessRole` - # @return [String] - attr_accessor :access_role - - # The main color of the calendar in the hexadecimal format "#0088aa". This - # property supersedes the index-based colorId property. Optional. - # Corresponds to the JSON property `backgroundColor` - # @return [String] - attr_accessor :background_color - - # The color of the calendar. This is an ID referring to an entry in the calendar - # section of the colors definition (see the colors endpoint). Optional. - # Corresponds to the JSON property `colorId` - # @return [String] - attr_accessor :color_id - - # The default reminders that the authenticated user has for this calendar. - # Corresponds to the JSON property `defaultReminders` - # @return [Array] - attr_accessor :default_reminders - - # Whether this calendar list entry has been deleted from the calendar list. Read- - # only. Optional. The default is False. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # Description of the calendar. Optional. Read-only. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The foreground color of the calendar in the hexadecimal format "#ffffff". This - # property supersedes the index-based colorId property. Optional. - # Corresponds to the JSON property `foregroundColor` - # @return [String] - attr_accessor :foreground_color - - # Whether the calendar has been hidden from the list. Optional. The default is - # False. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # Identifier of the calendar. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource ("calendar#calendarListEntry"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Geographic location of the calendar as free-form text. Optional. Read-only. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # The notifications that the authenticated user is receiving for this calendar. - # Corresponds to the JSON property `notificationSettings` - # @return [Google::Apis::CalendarV3::CalendarListEntry::NotificationSettings] - attr_accessor :notification_settings - - # Whether the calendar is the primary calendar of the authenticated user. Read- - # only. Optional. The default is False. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Whether the calendar content shows up in the calendar UI. Optional. The - # default is False. - # Corresponds to the JSON property `selected` - # @return [Boolean] - attr_accessor :selected - alias_method :selected?, :selected - - # Title of the calendar. Read-only. - # Corresponds to the JSON property `summary` - # @return [String] - attr_accessor :summary - - # The summary that the authenticated user has set for this calendar. Optional. - # Corresponds to the JSON property `summaryOverride` - # @return [String] - attr_accessor :summary_override - - # The time zone of the calendar. Optional. Read-only. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_role = args[:access_role] unless args[:access_role].nil? - @background_color = args[:background_color] unless args[:background_color].nil? - @color_id = args[:color_id] unless args[:color_id].nil? - @default_reminders = args[:default_reminders] unless args[:default_reminders].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @description = args[:description] unless args[:description].nil? - @etag = args[:etag] unless args[:etag].nil? - @foreground_color = args[:foreground_color] unless args[:foreground_color].nil? - @hidden = args[:hidden] unless args[:hidden].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @location = args[:location] unless args[:location].nil? - @notification_settings = args[:notification_settings] unless args[:notification_settings].nil? - @primary = args[:primary] unless args[:primary].nil? - @selected = args[:selected] unless args[:selected].nil? - @summary = args[:summary] unless args[:summary].nil? - @summary_override = args[:summary_override] unless args[:summary_override].nil? - @time_zone = args[:time_zone] unless args[:time_zone].nil? - end - - # The notifications that the authenticated user is receiving for this calendar. - class NotificationSettings - include Google::Apis::Core::Hashable - - # The list of notifications set for this calendar. - # Corresponds to the JSON property `notifications` - # @return [Array] - attr_accessor :notifications - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @notifications = args[:notifications] unless args[:notifications].nil? - end - end - end - - # - class CalendarNotification - include Google::Apis::Core::Hashable - - # The method used to deliver the notification. Possible values are: - # - "email" - Reminders are sent via email. - # - "sms" - Reminders are sent via SMS. This value is read-only and is ignored - # on inserts and updates. - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :delivery_method - - # The type of notification. Possible values are: - # - "eventCreation" - Notification sent when a new event is put on the calendar. - # - "eventChange" - Notification sent when an event is changed. - # - "eventCancellation" - Notification sent when an event is cancelled. - # - "eventResponse" - Notification sent when an event is changed. - # - "agenda" - An agenda with the events of the day (sent out in the morning). - # 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) - @delivery_method = args[:delivery_method] unless args[:delivery_method].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - 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] - 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 - - # - class ColorDefinition - include Google::Apis::Core::Hashable - - # The background color associated with this color definition. - # Corresponds to the JSON property `background` - # @return [String] - attr_accessor :background - - # The foreground color that can be used to write on top of a background with ' - # background' color. - # Corresponds to the JSON property `foreground` - # @return [String] - attr_accessor :foreground - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @background = args[:background] unless args[:background].nil? - @foreground = args[:foreground] unless args[:foreground].nil? - end - end - - # - class Colors - include Google::Apis::Core::Hashable - - # Palette of calendar colors, mapping from the color ID to its definition. A - # calendarListEntry resource refers to one of these color IDs in its color field. - # Read-only. - # Corresponds to the JSON property `calendar` - # @return [Hash] - attr_accessor :calendar - - # Palette of event colors, mapping from the color ID to its definition. An event - # resource may refer to one of these color IDs in its color field. Read-only. - # Corresponds to the JSON property `event` - # @return [Hash] - attr_accessor :event - - # Type of the resource ("calendar#colors"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Last modification time of the color palette (as a RFC 3339 timestamp). Read- - # only. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @calendar = args[:calendar] unless args[:calendar].nil? - @event = args[:event] unless args[:event].nil? - @kind = args[:kind] unless args[:kind].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class Error - include Google::Apis::Core::Hashable - - # Domain, or broad category, of the error. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # Specific reason for the error. Some of the possible values are: - # - "groupTooBig" - The group of users requested is too large for a single query. - # - # - "tooManyCalendarsRequested" - The number of calendars requested is too large - # for a single query. - # - "notFound" - The requested resource was not found. - # - "internalError" - The API service has encountered an internal error. - # Additional error types may be added in the future, so clients should - # gracefully handle additional error statuses not included in this list. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @domain = args[:domain] unless args[:domain].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - - # - class Event - include Google::Apis::Core::Hashable - - # Whether anyone can invite themselves to the event. Optional. The default is - # False. - # Corresponds to the JSON property `anyoneCanAddSelf` - # @return [Boolean] - attr_accessor :anyone_can_add_self - alias_method :anyone_can_add_self?, :anyone_can_add_self - - # The attendees of the event. - # Corresponds to the JSON property `attendees` - # @return [Array] - attr_accessor :attendees - - # Whether attendees may have been omitted from the event's representation. When - # retrieving an event, this may be due to a restriction specified by the - # maxAttendee query parameter. When updating an event, this can be used to only - # update the participant's response. Optional. The default is False. - # Corresponds to the JSON property `attendeesOmitted` - # @return [Boolean] - attr_accessor :attendees_omitted - alias_method :attendees_omitted?, :attendees_omitted - - # The color of the event. This is an ID referring to an entry in the event - # section of the colors definition (see the colors endpoint). Optional. - # Corresponds to the JSON property `colorId` - # @return [String] - attr_accessor :color_id - - # Creation time of the event (as a RFC 3339 timestamp). Read-only. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # The creator of the event. Read-only. - # Corresponds to the JSON property `creator` - # @return [Google::Apis::CalendarV3::Event::Creator] - attr_accessor :creator - - # Description of the event. Optional. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The (exclusive) end time of the event. For a recurring event, this is the end - # time of the first instance. - # Corresponds to the JSON property `end` - # @return [Google::Apis::CalendarV3::EventDateTime] - attr_accessor :end - - # Whether the end time is actually unspecified. An end time is still provided - # for compatibility reasons, even if this attribute is set to True. The default - # is False. - # Corresponds to the JSON property `endTimeUnspecified` - # @return [Boolean] - attr_accessor :end_time_unspecified - alias_method :end_time_unspecified?, :end_time_unspecified - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Extended properties of the event. - # Corresponds to the JSON property `extendedProperties` - # @return [Google::Apis::CalendarV3::Event::ExtendedProperties] - attr_accessor :extended_properties - - # A gadget that extends this event. - # Corresponds to the JSON property `gadget` - # @return [Google::Apis::CalendarV3::Event::Gadget] - attr_accessor :gadget - - # Whether attendees other than the organizer can invite others to the event. - # Optional. The default is True. - # Corresponds to the JSON property `guestsCanInviteOthers` - # @return [Boolean] - attr_accessor :guests_can_invite_others - alias_method :guests_can_invite_others?, :guests_can_invite_others - - # Whether attendees other than the organizer can modify the event. Optional. The - # default is False. - # Corresponds to the JSON property `guestsCanModify` - # @return [Boolean] - attr_accessor :guests_can_modify - alias_method :guests_can_modify?, :guests_can_modify - - # Whether attendees other than the organizer can see who the event's attendees - # are. Optional. The default is True. - # Corresponds to the JSON property `guestsCanSeeOtherGuests` - # @return [Boolean] - attr_accessor :guests_can_see_other_guests - alias_method :guests_can_see_other_guests?, :guests_can_see_other_guests - - # An absolute link to the Google+ hangout associated with this event. Read-only. - # Corresponds to the JSON property `hangoutLink` - # @return [String] - attr_accessor :hangout_link - - # An absolute link to this event in the Google Calendar Web UI. Read-only. - # Corresponds to the JSON property `htmlLink` - # @return [String] - attr_accessor :html_link - - # Event ID in the iCalendar format. - # Corresponds to the JSON property `iCalUID` - # @return [String] - attr_accessor :i_cal_uid - - # Identifier of the event. When creating new single or recurring events, you can - # specify their IDs. Provided IDs must follow these rules: - # - characters allowed in the ID are those used in base32hex encoding, i.e. - # lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 - # - the length of the ID must be between 5 and 1024 characters - # - the ID must be unique per calendar Due to the globally distributed nature - # of the system, we cannot guarantee that ID collisions will be detected at - # event creation time. To minimize the risk of collisions we recommend using an - # established UUID algorithm such as one described in RFC4122. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource ("calendar#event"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Geographic location of the event as free-form text. Optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # Whether this is a locked event copy where no changes can be made to the main - # event fields "summary", "description", "location", "start", "end" or " - # recurrence". The default is False. Read-Only. - # Corresponds to the JSON property `locked` - # @return [Boolean] - attr_accessor :locked - alias_method :locked?, :locked - - # The organizer of the event. If the organizer is also an attendee, this is - # indicated with a separate entry in attendees with the organizer field set to - # True. To change the organizer, use the move operation. Read-only, except when - # importing an event. - # Corresponds to the JSON property `organizer` - # @return [Google::Apis::CalendarV3::Event::Organizer] - attr_accessor :organizer - - # For an instance of a recurring event, this is the time at which this event - # would start according to the recurrence data in the recurring event identified - # by recurringEventId. Immutable. - # Corresponds to the JSON property `originalStartTime` - # @return [Google::Apis::CalendarV3::EventDateTime] - attr_accessor :original_start_time - - # Whether this is a private event copy where changes are not shared with other - # copies on other calendars. Optional. Immutable. The default is False. - # Corresponds to the JSON property `privateCopy` - # @return [Boolean] - attr_accessor :private_copy - alias_method :private_copy?, :private_copy - - # List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This - # field is omitted for single events or instances of recurring events. - # Corresponds to the JSON property `recurrence` - # @return [Array] - attr_accessor :recurrence - - # For an instance of a recurring event, this is the event ID of the recurring - # event itself. Immutable. - # Corresponds to the JSON property `recurringEventId` - # @return [String] - attr_accessor :recurring_event_id - - # Information about the event's reminders for the authenticated user. - # Corresponds to the JSON property `reminders` - # @return [Google::Apis::CalendarV3::Event::Reminders] - attr_accessor :reminders - - # Sequence number as per iCalendar. - # Corresponds to the JSON property `sequence` - # @return [Fixnum] - attr_accessor :sequence - - # Source of an event from which it was created; for example a web page, an email - # message or any document identifiable by an URL using HTTP/HTTPS protocol. - # Accessible only by the creator of the event. - # Corresponds to the JSON property `source` - # @return [Google::Apis::CalendarV3::Event::Source] - attr_accessor :source - - # The (inclusive) start time of the event. For a recurring event, this is the - # start time of the first instance. - # Corresponds to the JSON property `start` - # @return [Google::Apis::CalendarV3::EventDateTime] - attr_accessor :start - - # Status of the event. Optional. Possible values are: - # - "confirmed" - The event is confirmed. This is the default status. - # - "tentative" - The event is tentatively confirmed. - # - "cancelled" - The event is cancelled. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Title of the event. - # Corresponds to the JSON property `summary` - # @return [String] - attr_accessor :summary - - # Whether the event blocks time on the calendar. Optional. Possible values are: - # - "opaque" - The event blocks time on the calendar. This is the default value. - # - "transparent" - The event does not block time on the calendar. - # Corresponds to the JSON property `transparency` - # @return [String] - attr_accessor :transparency - - # Last modification time of the event (as a RFC 3339 timestamp). Read-only. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # Visibility of the event. Optional. Possible values are: - # - "default" - Uses the default visibility for events on the calendar. This is - # the default value. - # - "public" - The event is public and event details are visible to all readers - # of the calendar. - # - "private" - The event is private and only event attendees may view event - # details. - # - "confidential" - The event is private. This value is provided for - # compatibility reasons. - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @anyone_can_add_self = args[:anyone_can_add_self] unless args[:anyone_can_add_self].nil? - @attendees = args[:attendees] unless args[:attendees].nil? - @attendees_omitted = args[:attendees_omitted] unless args[:attendees_omitted].nil? - @color_id = args[:color_id] unless args[:color_id].nil? - @created = args[:created] unless args[:created].nil? - @creator = args[:creator] unless args[:creator].nil? - @description = args[:description] unless args[:description].nil? - @end = args[:end] unless args[:end].nil? - @end_time_unspecified = args[:end_time_unspecified] unless args[:end_time_unspecified].nil? - @etag = args[:etag] unless args[:etag].nil? - @extended_properties = args[:extended_properties] unless args[:extended_properties].nil? - @gadget = args[:gadget] unless args[:gadget].nil? - @guests_can_invite_others = args[:guests_can_invite_others] unless args[:guests_can_invite_others].nil? - @guests_can_modify = args[:guests_can_modify] unless args[:guests_can_modify].nil? - @guests_can_see_other_guests = args[:guests_can_see_other_guests] unless args[:guests_can_see_other_guests].nil? - @hangout_link = args[:hangout_link] unless args[:hangout_link].nil? - @html_link = args[:html_link] unless args[:html_link].nil? - @i_cal_uid = args[:i_cal_uid] unless args[:i_cal_uid].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @location = args[:location] unless args[:location].nil? - @locked = args[:locked] unless args[:locked].nil? - @organizer = args[:organizer] unless args[:organizer].nil? - @original_start_time = args[:original_start_time] unless args[:original_start_time].nil? - @private_copy = args[:private_copy] unless args[:private_copy].nil? - @recurrence = args[:recurrence] unless args[:recurrence].nil? - @recurring_event_id = args[:recurring_event_id] unless args[:recurring_event_id].nil? - @reminders = args[:reminders] unless args[:reminders].nil? - @sequence = args[:sequence] unless args[:sequence].nil? - @source = args[:source] unless args[:source].nil? - @start = args[:start] unless args[:start].nil? - @status = args[:status] unless args[:status].nil? - @summary = args[:summary] unless args[:summary].nil? - @transparency = args[:transparency] unless args[:transparency].nil? - @updated = args[:updated] unless args[:updated].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - - # The creator of the event. Read-only. - class Creator - include Google::Apis::Core::Hashable - - # The creator's name, if available. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The creator's email address, if available. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The creator's Profile ID, if available. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Whether the creator corresponds to the calendar on which this copy of the - # event appears. Read-only. The default is False. - # Corresponds to the JSON property `self` - # @return [Boolean] - attr_accessor :self - alias_method :self?, :self - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @id = args[:id] unless args[:id].nil? - @self = args[:self] unless args[:self].nil? - end - end - - # Extended properties of the event. - class ExtendedProperties - include Google::Apis::Core::Hashable - - # Properties that are private to the copy of the event that appears on this - # calendar. - # Corresponds to the JSON property `private` - # @return [Hash] - attr_accessor :private - - # Properties that are shared between copies of the event on other attendees' - # calendars. - # Corresponds to the JSON property `shared` - # @return [Hash] - attr_accessor :shared - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @private = args[:private] unless args[:private].nil? - @shared = args[:shared] unless args[:shared].nil? - end - end - - # A gadget that extends this event. - class Gadget - include Google::Apis::Core::Hashable - - # The gadget's display mode. Optional. Possible values are: - # - "icon" - The gadget displays next to the event's title in the calendar view. - # - "chip" - The gadget displays when the event is clicked. - # Corresponds to the JSON property `display` - # @return [String] - attr_accessor :display_mode - - # The gadget's height in pixels. Optional. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The gadget's icon URL. - # Corresponds to the JSON property `iconLink` - # @return [String] - attr_accessor :icon_link - - # The gadget's URL. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # Preferences. - # Corresponds to the JSON property `preferences` - # @return [Hash] - attr_accessor :preferences - - # The gadget's title. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The gadget's type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The gadget's width in pixels. Optional. - # 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) - @display_mode = args[:display_mode] unless args[:display_mode].nil? - @height = args[:height] unless args[:height].nil? - @icon_link = args[:icon_link] unless args[:icon_link].nil? - @link = args[:link] unless args[:link].nil? - @preferences = args[:preferences] unless args[:preferences].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # The organizer of the event. If the organizer is also an attendee, this is - # indicated with a separate entry in attendees with the organizer field set to - # True. To change the organizer, use the move operation. Read-only, except when - # importing an event. - class Organizer - include Google::Apis::Core::Hashable - - # The organizer's name, if available. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The organizer's email address, if available. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The organizer's Profile ID, if available. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Whether the organizer corresponds to the calendar on which this copy of the - # event appears. Read-only. The default is False. - # Corresponds to the JSON property `self` - # @return [Boolean] - attr_accessor :self - alias_method :self?, :self - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @id = args[:id] unless args[:id].nil? - @self = args[:self] unless args[:self].nil? - end - end - - # Information about the event's reminders for the authenticated user. - class Reminders - include Google::Apis::Core::Hashable - - # If the event doesn't use the default reminders, this lists the reminders - # specific to the event, or, if not set, indicates that no reminders are set for - # this event. - # Corresponds to the JSON property `overrides` - # @return [Array] - attr_accessor :overrides - - # Whether the default reminders of the calendar apply to the event. - # Corresponds to the JSON property `useDefault` - # @return [Boolean] - attr_accessor :use_default - alias_method :use_default?, :use_default - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @overrides = args[:overrides] unless args[:overrides].nil? - @use_default = args[:use_default] unless args[:use_default].nil? - end - end - - # Source of an event from which it was created; for example a web page, an email - # message or any document identifiable by an URL using HTTP/HTTPS protocol. - # Accessible only by the creator of the event. - class Source - include Google::Apis::Core::Hashable - - # Title of the source; for example a title of a web page or an email subject. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL of the source pointing to a resource. URL's protocol must be HTTP or HTTPS. - # 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) - @title = args[:title] unless args[:title].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - - # - class EventAttachment - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # - class EventAttendee - include Google::Apis::Core::Hashable - - # Number of additional guests. Optional. The default is 0. - # Corresponds to the JSON property `additionalGuests` - # @return [Fixnum] - attr_accessor :additional_guests - - # The attendee's response comment. Optional. - # Corresponds to the JSON property `comment` - # @return [String] - attr_accessor :comment - - # The attendee's name, if available. Optional. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The attendee's email address, if available. This field must be present when - # adding an attendee. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The attendee's Profile ID, if available. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Whether this is an optional attendee. Optional. The default is False. - # Corresponds to the JSON property `optional` - # @return [Boolean] - attr_accessor :optional - alias_method :optional?, :optional - - # Whether the attendee is the organizer of the event. Read-only. The default is - # False. - # Corresponds to the JSON property `organizer` - # @return [Boolean] - attr_accessor :organizer - alias_method :organizer?, :organizer - - # Whether the attendee is a resource. Read-only. The default is False. - # Corresponds to the JSON property `resource` - # @return [Boolean] - attr_accessor :resource - alias_method :resource?, :resource - - # The attendee's response status. Possible values are: - # - "needsAction" - The attendee has not responded to the invitation. - # - "declined" - The attendee has declined the invitation. - # - "tentative" - The attendee has tentatively accepted the invitation. - # - "accepted" - The attendee has accepted the invitation. - # Corresponds to the JSON property `responseStatus` - # @return [String] - attr_accessor :response_status - - # Whether this entry represents the calendar on which this copy of the event - # appears. Read-only. The default is False. - # Corresponds to the JSON property `self` - # @return [Boolean] - attr_accessor :self - alias_method :self?, :self - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_guests = args[:additional_guests] unless args[:additional_guests].nil? - @comment = args[:comment] unless args[:comment].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @id = args[:id] unless args[:id].nil? - @optional = args[:optional] unless args[:optional].nil? - @organizer = args[:organizer] unless args[:organizer].nil? - @resource = args[:resource] unless args[:resource].nil? - @response_status = args[:response_status] unless args[:response_status].nil? - @self = args[:self] unless args[:self].nil? - end - end - - # - class EventDateTime - include Google::Apis::Core::Hashable - - # The date, in the format "yyyy-mm-dd", if this is an all-day event. - # Corresponds to the JSON property `date` - # @return [Date] - attr_accessor :date - - # The time, as a combined date-time value (formatted according to RFC 3339). A - # time zone offset is required unless a time zone is explicitly specified in - # timeZone. - # Corresponds to the JSON property `dateTime` - # @return [DateTime] - attr_accessor :date_time - - # The time zone in which the time is specified. (Formatted as an IANA Time Zone - # Database name, e.g. "Europe/Zurich".) For recurring events this field is - # required and specifies the time zone in which the recurrence is expanded. For - # single events this field is optional and indicates a custom time zone for the - # event start/end. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @date = args[:date] unless args[:date].nil? - @date_time = args[:date_time] unless args[:date_time].nil? - @time_zone = args[:time_zone] unless args[:time_zone].nil? - end - end - - # - class EventReminder - include Google::Apis::Core::Hashable - - # The method used by this reminder. Possible values are: - # - "email" - Reminders are sent via email. - # - "sms" - Reminders are sent via SMS. - # - "popup" - Reminders are sent via a UI popup. - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :reminder_method - - # Number of minutes before the start of the event when the reminder should - # trigger. - # Corresponds to the JSON property `minutes` - # @return [Fixnum] - attr_accessor :minutes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reminder_method = args[:reminder_method] unless args[:reminder_method].nil? - @minutes = args[:minutes] unless args[:minutes].nil? - end - end - - # - class Events - include Google::Apis::Core::Hashable - - # The user's access role for this calendar. Read-only. Possible values are: - # - "none" - The user has no access. - # - "freeBusyReader" - The user has read access to free/busy information. - # - "reader" - The user has read access to the calendar. Private events will - # appear to users with reader access, but event details will be hidden. - # - "writer" - The user has read and write access to the calendar. Private - # events will appear to users with writer access, and event details will be - # visible. - # - "owner" - The user has ownership of the calendar. This role has all of the - # permissions of the writer role with the additional ability to see and - # manipulate ACLs. - # Corresponds to the JSON property `accessRole` - # @return [String] - attr_accessor :access_role - - # The default reminders on the calendar for the authenticated user. These - # reminders apply to all events on this calendar that do not explicitly override - # them (i.e. do not have reminders.useDefault set to True). - # Corresponds to the JSON property `defaultReminders` - # @return [Array] - attr_accessor :default_reminders - - # Description of the calendar. Read-only. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # ETag of the collection. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # List of events on the calendar. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of the collection ("calendar#events"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. Omitted if no further - # results are available, in which case nextSyncToken is provided. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Token used at a later point in time to retrieve only the entries that have - # changed since this result was returned. Omitted if further results are - # available, in which case nextPageToken is provided. - # Corresponds to the JSON property `nextSyncToken` - # @return [String] - attr_accessor :next_sync_token - - # Title of the calendar. Read-only. - # Corresponds to the JSON property `summary` - # @return [String] - attr_accessor :summary - - # The time zone of the calendar. Read-only. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - # Last modification time of the calendar (as a RFC 3339 timestamp). Read-only. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_role = args[:access_role] unless args[:access_role].nil? - @default_reminders = args[:default_reminders] unless args[:default_reminders].nil? - @description = args[:description] unless args[:description].nil? - @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? - @next_sync_token = args[:next_sync_token] unless args[:next_sync_token].nil? - @summary = args[:summary] unless args[:summary].nil? - @time_zone = args[:time_zone] unless args[:time_zone].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class FreeBusyCalendar - include Google::Apis::Core::Hashable - - # List of time ranges during which this calendar should be regarded as busy. - # Corresponds to the JSON property `busy` - # @return [Array] - attr_accessor :busy - - # Optional error(s) (if computation for the calendar failed). - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @busy = args[:busy] unless args[:busy].nil? - @errors = args[:errors] unless args[:errors].nil? - end - end - - # - class FreeBusyGroup - include Google::Apis::Core::Hashable - - # List of calendars' identifiers within a group. - # Corresponds to the JSON property `calendars` - # @return [Array] - attr_accessor :calendars - - # Optional error(s) (if computation for the group failed). - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @calendars = args[:calendars] unless args[:calendars].nil? - @errors = args[:errors] unless args[:errors].nil? - end - end - - # - class FreeBusyRequest - include Google::Apis::Core::Hashable - - # Maximal number of calendars for which FreeBusy information is to be provided. - # Optional. - # Corresponds to the JSON property `calendarExpansionMax` - # @return [Fixnum] - attr_accessor :calendar_expansion_max - - # Maximal number of calendar identifiers to be provided for a single group. - # Optional. An error will be returned for a group with more members than this - # value. - # Corresponds to the JSON property `groupExpansionMax` - # @return [Fixnum] - attr_accessor :group_expansion_max - - # List of calendars and/or groups to query. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The end of the interval for the query. - # Corresponds to the JSON property `timeMax` - # @return [DateTime] - attr_accessor :time_max - - # The start of the interval for the query. - # Corresponds to the JSON property `timeMin` - # @return [DateTime] - attr_accessor :time_min - - # Time zone used in the response. Optional. The default is UTC. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @calendar_expansion_max = args[:calendar_expansion_max] unless args[:calendar_expansion_max].nil? - @group_expansion_max = args[:group_expansion_max] unless args[:group_expansion_max].nil? - @items = args[:items] unless args[:items].nil? - @time_max = args[:time_max] unless args[:time_max].nil? - @time_min = args[:time_min] unless args[:time_min].nil? - @time_zone = args[:time_zone] unless args[:time_zone].nil? - end - end - - # - class FreeBusyRequestItem - include Google::Apis::Core::Hashable - - # The identifier of a calendar or a group. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - - # - class FreeBusyResponse - include Google::Apis::Core::Hashable - - # List of free/busy information for calendars. - # Corresponds to the JSON property `calendars` - # @return [Hash] - attr_accessor :calendars - - # Expansion of groups. - # Corresponds to the JSON property `groups` - # @return [Hash] - attr_accessor :groups - - # Type of the resource ("calendar#freeBusy"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The end of the interval. - # Corresponds to the JSON property `timeMax` - # @return [DateTime] - attr_accessor :time_max - - # The start of the interval. - # Corresponds to the JSON property `timeMin` - # @return [DateTime] - attr_accessor :time_min - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @calendars = args[:calendars] unless args[:calendars].nil? - @groups = args[:groups] unless args[:groups].nil? - @kind = args[:kind] unless args[:kind].nil? - @time_max = args[:time_max] unless args[:time_max].nil? - @time_min = args[:time_min] unless args[:time_min].nil? - end - end - - # - class Setting - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The id of the user setting. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource ("calendar#setting"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Value of the user setting. The format of the value depends on the ID of the - # setting. It must always be a UTF-8 string of length up to 1024 characters. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class Settings - include Google::Apis::Core::Hashable - - # Etag of the collection. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # List of user settings. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of the collection ("calendar#settings"). - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. Omitted if no further - # results are available, in which case nextSyncToken is provided. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Token used at a later point in time to retrieve only the entries that have - # changed since this result was returned. Omitted if further results are - # available, in which case nextPageToken is provided. - # Corresponds to the JSON property `nextSyncToken` - # @return [String] - attr_accessor :next_sync_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? - @next_sync_token = args[:next_sync_token] unless args[:next_sync_token].nil? - end - end - - # - class TimePeriod - include Google::Apis::Core::Hashable - - # The (exclusive) end of the time period. - # Corresponds to the JSON property `end` - # @return [DateTime] - attr_accessor :end - - # The (inclusive) start of the time period. - # Corresponds to the JSON property `start` - # @return [DateTime] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @start = args[:start] unless args[:start].nil? - end - end - end - end -end diff --git a/generated/google/apis/calendar_v3/representations.rb b/generated/google/apis/calendar_v3/representations.rb deleted file mode 100644 index 55babd2f6..000000000 --- a/generated/google/apis/calendar_v3/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/calendar_v3/service.rb b/generated/google/apis/calendar_v3/service.rb deleted file mode 100644 index 1931ecb74..000000000 --- a/generated/google/apis/calendar_v3/service.rb +++ /dev/null @@ -1,1927 +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 CalendarV3 - # Calendar API - # - # Lets you manipulate events and other calendar data. - # - # @example - # require 'google/apis/calendar_v3' - # - # Calendar = Google::Apis::CalendarV3 # Alias the module - # service = Calendar::CalendarService.new - # - # @see https://developers.google.com/google-apps/calendar/firstapp - class CalendarService < 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/', 'calendar/v3/') - end - - # Deletes an access control rule. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] rule_id - # ACL rule identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/acl/{ruleId}' - command = make_simple_command(:delete, path, options) - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['ruleId'] = rule_id unless rule_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 an access control rule. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] rule_id - # ACL rule identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CalendarV3::AclRule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::AclRule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_acl(calendar_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/acl/{ruleId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::AclRule::Representation - command.response_class = Google::Apis::CalendarV3::AclRule - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['ruleId'] = rule_id unless rule_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 an access control rule. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::AclRule] acl_rule_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::CalendarV3::AclRule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::AclRule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_acl(calendar_id, acl_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/acl' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::AclRule::Representation - command.request_object = acl_rule_object - command.response_representation = Google::Apis::CalendarV3::AclRule::Representation - command.response_class = Google::Apis::CalendarV3::AclRule - command.params['calendarId'] = calendar_id unless calendar_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 rules in the access control list for the calendar. - # @param [String] calendar_id - # Calendar identifier. - # @param [Fixnum] max_results - # Maximum number of entries returned on one result page. By default the value is - # 100 entries. The page size can never be larger than 250 entries. Optional. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [Boolean] show_deleted - # Whether to include deleted ACLs in the result. Deleted ACLs are represented by - # role equal to "none". Deleted ACLs will always be included if syncToken is - # provided. Optional. The default is False. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. All entries deleted - # since the previous list request will always be in the result set and it is not - # allowed to set showDeleted to False. - # If the syncToken expires, the server will respond with a 410 GONE response - # code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Acl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Acl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_acls(calendar_id, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/acl' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Acl::Representation - command.response_class = Google::Apis::CalendarV3::Acl - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['syncToken'] = sync_token unless sync_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 an access control rule. This method supports patch semantics. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] rule_id - # ACL rule identifier. - # @param [Google::Apis::CalendarV3::AclRule] acl_rule_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::CalendarV3::AclRule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::AclRule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_acl(calendar_id, rule_id, acl_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/acl/{ruleId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::CalendarV3::AclRule::Representation - command.request_object = acl_rule_object - command.response_representation = Google::Apis::CalendarV3::AclRule::Representation - command.response_class = Google::Apis::CalendarV3::AclRule - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['ruleId'] = rule_id unless rule_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 access control rule. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] rule_id - # ACL rule identifier. - # @param [Google::Apis::CalendarV3::AclRule] acl_rule_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::CalendarV3::AclRule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::AclRule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_acl(calendar_id, rule_id, acl_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/acl/{ruleId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::CalendarV3::AclRule::Representation - command.request_object = acl_rule_object - command.response_representation = Google::Apis::CalendarV3::AclRule::Representation - command.response_class = Google::Apis::CalendarV3::AclRule - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['ruleId'] = rule_id unless rule_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 - - # Watch for changes to ACL resources. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::Channel] channel_object - # @param [Fixnum] max_results - # Maximum number of entries returned on one result page. By default the value is - # 100 entries. The page size can never be larger than 250 entries. Optional. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [Boolean] show_deleted - # Whether to include deleted ACLs in the result. Deleted ACLs are represented by - # role equal to "none". Deleted ACLs will always be included if syncToken is - # provided. Optional. The default is False. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. All entries deleted - # since the previous list request will always be in the result set and it is not - # allowed to set showDeleted to False. - # If the syncToken expires, the server will respond with a 410 GONE response - # code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::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_acl(calendar_id, channel_object = nil, max_results: nil, page_token: nil, show_deleted: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/acl/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::CalendarV3::Channel::Representation - command.response_class = Google::Apis::CalendarV3::Channel - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['syncToken'] = sync_token unless sync_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 - - # Deletes an entry on the user's calendar list. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/calendarList/{calendarId}' - command = make_simple_command(:delete, path, options) - command.params['calendarId'] = calendar_id unless calendar_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 an entry on the user's calendar list. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CalendarV3::CalendarListEntry] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::CalendarListEntry] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar_list(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/calendarList/{calendarId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation - command.response_class = Google::Apis::CalendarV3::CalendarListEntry - command.params['calendarId'] = calendar_id unless calendar_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 - - # Adds an entry to the user's calendar list. - # @param [Google::Apis::CalendarV3::CalendarListEntry] calendar_list_entry_object - # @param [Boolean] color_rgb_format - # Whether to use the foregroundColor and backgroundColor fields to write the - # calendar colors (RGB). If this feature is used, the index-based colorId field - # will be set to the best matching option automatically. Optional. The default - # is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::CalendarListEntry] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::CalendarListEntry] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar_list(calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/calendarList' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation - command.request_object = calendar_list_entry_object - command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation - command.response_class = Google::Apis::CalendarV3::CalendarListEntry - command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.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 entries on the user's calendar list. - # @param [Fixnum] max_results - # Maximum number of entries returned on one result page. By default the value is - # 100 entries. The page size can never be larger than 250 entries. Optional. - # @param [String] min_access_role - # The minimum access role for the user in the returned entries. Optional. The - # default is no restriction. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [Boolean] show_deleted - # Whether to include deleted calendar list entries in the result. Optional. The - # default is False. - # @param [Boolean] show_hidden - # Whether to show hidden entries. Optional. The default is False. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. If only read-only - # fields such as calendar properties or ACLs have changed, the entry won't be - # returned. All entries deleted and hidden since the previous list request will - # always be in the result set and it is not allowed to set showDeleted neither - # showHidden to False. - # To ensure client state consistency minAccessRole query parameter cannot be - # specified together with nextSyncToken. - # If the syncToken expires, the server will respond with a 410 GONE response - # code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::CalendarList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::CalendarList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar_lists(max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/calendarList' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::CalendarList::Representation - command.response_class = Google::Apis::CalendarV3::CalendarList - command.query['maxResults'] = max_results unless max_results.nil? - command.query['minAccessRole'] = min_access_role unless min_access_role.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['showHidden'] = show_hidden unless show_hidden.nil? - command.query['syncToken'] = sync_token unless sync_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 an entry on the user's calendar list. This method supports patch - # semantics. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::CalendarListEntry] calendar_list_entry_object - # @param [Boolean] color_rgb_format - # Whether to use the foregroundColor and backgroundColor fields to write the - # calendar colors (RGB). If this feature is used, the index-based colorId field - # will be set to the best matching option automatically. Optional. The default - # is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::CalendarListEntry] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::CalendarListEntry] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/calendarList/{calendarId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation - command.request_object = calendar_list_entry_object - command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation - command.response_class = Google::Apis::CalendarV3::CalendarListEntry - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.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 entry on the user's calendar list. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::CalendarListEntry] calendar_list_entry_object - # @param [Boolean] color_rgb_format - # Whether to use the foregroundColor and backgroundColor fields to write the - # calendar colors (RGB). If this feature is used, the index-based colorId field - # will be set to the best matching option automatically. Optional. The default - # is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::CalendarListEntry] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::CalendarListEntry] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar_list(calendar_id, calendar_list_entry_object = nil, color_rgb_format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/calendarList/{calendarId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation - command.request_object = calendar_list_entry_object - command.response_representation = Google::Apis::CalendarV3::CalendarListEntry::Representation - command.response_class = Google::Apis::CalendarV3::CalendarListEntry - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['colorRgbFormat'] = color_rgb_format unless color_rgb_format.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 - - # Watch for changes to CalendarList resources. - # @param [Google::Apis::CalendarV3::Channel] channel_object - # @param [Fixnum] max_results - # Maximum number of entries returned on one result page. By default the value is - # 100 entries. The page size can never be larger than 250 entries. Optional. - # @param [String] min_access_role - # The minimum access role for the user in the returned entries. Optional. The - # default is no restriction. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [Boolean] show_deleted - # Whether to include deleted calendar list entries in the result. Optional. The - # default is False. - # @param [Boolean] show_hidden - # Whether to show hidden entries. Optional. The default is False. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. If only read-only - # fields such as calendar properties or ACLs have changed, the entry won't be - # returned. All entries deleted and hidden since the previous list request will - # always be in the result set and it is not allowed to set showDeleted neither - # showHidden to False. - # To ensure client state consistency minAccessRole query parameter cannot be - # specified together with nextSyncToken. - # If the syncToken expires, the server will respond with a 410 GONE response - # code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::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_calendar_list(channel_object = nil, max_results: nil, min_access_role: nil, page_token: nil, show_deleted: nil, show_hidden: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/calendarList/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::CalendarV3::Channel::Representation - command.response_class = Google::Apis::CalendarV3::Channel - command.query['maxResults'] = max_results unless max_results.nil? - command.query['minAccessRole'] = min_access_role unless min_access_role.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['showHidden'] = show_hidden unless show_hidden.nil? - command.query['syncToken'] = sync_token unless sync_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 - - # Clears a primary calendar. This operation deletes all events associated with - # the primary calendar of an account. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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 clear_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/clear' - command = make_simple_command(:post, path, options) - command.params['calendarId'] = calendar_id unless calendar_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 a secondary calendar. Use calendars.clear for clearing all events on - # primary calendars. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}' - command = make_simple_command(:delete, path, options) - command.params['calendarId'] = calendar_id unless calendar_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 metadata for a calendar. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CalendarV3::Calendar] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Calendar] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar(calendar_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Calendar::Representation - command.response_class = Google::Apis::CalendarV3::Calendar - command.params['calendarId'] = calendar_id unless calendar_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 secondary calendar. - # @param [Google::Apis::CalendarV3::Calendar] calendar_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::CalendarV3::Calendar] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Calendar] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar(calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::Calendar::Representation - command.request_object = calendar_object - command.response_representation = Google::Apis::CalendarV3::Calendar::Representation - command.response_class = Google::Apis::CalendarV3::Calendar - 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 metadata for a calendar. This method supports patch semantics. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::Calendar] calendar_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::CalendarV3::Calendar] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Calendar] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::CalendarV3::Calendar::Representation - command.request_object = calendar_object - command.response_representation = Google::Apis::CalendarV3::Calendar::Representation - command.response_class = Google::Apis::CalendarV3::Calendar - command.params['calendarId'] = calendar_id unless calendar_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 metadata for a calendar. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::Calendar] calendar_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::CalendarV3::Calendar] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Calendar] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_calendar(calendar_id, calendar_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::CalendarV3::Calendar::Representation - command.request_object = calendar_object - command.response_representation = Google::Apis::CalendarV3::Calendar::Representation - command.response_class = Google::Apis::CalendarV3::Calendar - command.params['calendarId'] = calendar_id unless calendar_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 - - # Stop watching resources through this channel - # @param [Google::Apis::CalendarV3::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 = 'channels/stop' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::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 - - # Returns the color definitions for calendars and events. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Colors] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Colors] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_color(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'colors' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Colors::Representation - command.response_class = Google::Apis::CalendarV3::Colors - 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 event. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] event_id - # Event identifier. - # @param [Boolean] send_notifications - # Whether to send notifications about the deletion of the event. Optional. The - # default is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_event(calendar_id, event_id, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/{eventId}' - command = make_simple_command(:delete, path, options) - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['eventId'] = event_id unless event_id.nil? - command.query['sendNotifications'] = send_notifications unless send_notifications.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 an event. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] event_id - # Event identifier. - # @param [Boolean] always_include_email - # Whether to always include a value in the email field for the organizer, - # creator and attendees, even if no real email is available (i.e. a generated, - # non-working value will be provided). The use of this option is discouraged and - # should only be used by clients which cannot handle the absence of an email - # address value in the mentioned places. Optional. The default is False. - # @param [Fixnum] max_attendees - # The maximum number of attendees to include in the response. If there are more - # than the specified number of attendees, only the participant is returned. - # Optional. - # @param [String] time_zone - # Time zone used in the response. Optional. The default is the time zone of the - # calendar. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Event] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Event] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event(calendar_id, event_id, always_include_email: nil, max_attendees: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/{eventId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Event::Representation - command.response_class = Google::Apis::CalendarV3::Event - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['eventId'] = event_id unless event_id.nil? - command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil? - command.query['maxAttendees'] = max_attendees unless max_attendees.nil? - command.query['timeZone'] = time_zone unless time_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 - - # Imports an event. This operation is used to add a private copy of an existing - # event to a calendar. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::Event] event_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::CalendarV3::Event] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Event] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_event(calendar_id, event_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/import' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::Event::Representation - command.request_object = event_object - command.response_representation = Google::Apis::CalendarV3::Event::Representation - command.response_class = Google::Apis::CalendarV3::Event - command.params['calendarId'] = calendar_id unless calendar_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 an event. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::Event] event_object - # @param [Fixnum] max_attendees - # The maximum number of attendees to include in the response. If there are more - # than the specified number of attendees, only the participant is returned. - # Optional. - # @param [Boolean] send_notifications - # Whether to send notifications about the creation of the new event. Optional. - # The default is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Event] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Event] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event(calendar_id, event_object = nil, max_attendees: nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::Event::Representation - command.request_object = event_object - command.response_representation = Google::Apis::CalendarV3::Event::Representation - command.response_class = Google::Apis::CalendarV3::Event - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['maxAttendees'] = max_attendees unless max_attendees.nil? - command.query['sendNotifications'] = send_notifications unless send_notifications.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 instances of the specified recurring event. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] event_id - # Recurring event identifier. - # @param [Boolean] always_include_email - # Whether to always include a value in the email field for the organizer, - # creator and attendees, even if no real email is available (i.e. a generated, - # non-working value will be provided). The use of this option is discouraged and - # should only be used by clients which cannot handle the absence of an email - # address value in the mentioned places. Optional. The default is False. - # @param [Fixnum] max_attendees - # The maximum number of attendees to include in the response. If there are more - # than the specified number of attendees, only the participant is returned. - # Optional. - # @param [Fixnum] max_results - # Maximum number of events returned on one result page. By default the value is - # 250 events. The page size can never be larger than 2500 events. Optional. - # @param [String] original_start - # The original start time of the instance in the result. Optional. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [Boolean] show_deleted - # Whether to include deleted events (with status equals "cancelled") in the - # result. Cancelled instances of recurring events will still be included if - # singleEvents is False. Optional. The default is False. - # @param [DateTime] time_max - # Upper bound (exclusive) for an event's start time to filter by. Optional. The - # default is not to filter by start time. - # @param [DateTime] time_min - # Lower bound (inclusive) for an event's end time to filter by. Optional. The - # default is not to filter by end time. - # @param [String] time_zone - # Time zone used in the response. Optional. The default is the time zone of the - # calendar. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Events] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Events] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def instances_event(calendar_id, event_id, always_include_email: nil, max_attendees: nil, max_results: nil, original_start: nil, page_token: nil, show_deleted: nil, time_max: nil, time_min: nil, time_zone: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/{eventId}/instances' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Events::Representation - command.response_class = Google::Apis::CalendarV3::Events - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['eventId'] = event_id unless event_id.nil? - command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil? - command.query['maxAttendees'] = max_attendees unless max_attendees.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['originalStart'] = original_start unless original_start.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['timeMax'] = time_max unless time_max.nil? - command.query['timeMin'] = time_min unless time_min.nil? - command.query['timeZone'] = time_zone unless time_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 - - # Returns events on the specified calendar. - # @param [String] calendar_id - # Calendar identifier. - # @param [Boolean] always_include_email - # Whether to always include a value in the email field for the organizer, - # creator and attendees, even if no real email is available (i.e. a generated, - # non-working value will be provided). The use of this option is discouraged and - # should only be used by clients which cannot handle the absence of an email - # address value in the mentioned places. Optional. The default is False. - # @param [String] i_cal_uid - # Specifies event ID in the iCalendar format to be included in the response. - # Optional. - # @param [Fixnum] max_attendees - # The maximum number of attendees to include in the response. If there are more - # than the specified number of attendees, only the participant is returned. - # Optional. - # @param [Fixnum] max_results - # Maximum number of events returned on one result page. By default the value is - # 250 events. The page size can never be larger than 2500 events. Optional. - # @param [String] order_by - # The order of the events returned in the result. Optional. The default is an - # unspecified, stable order. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [Array, String] private_extended_property - # Extended properties constraint specified as propertyName=value. Matches only - # private properties. This parameter might be repeated multiple times to return - # events that match all given constraints. - # @param [String] q - # Free text search terms to find events that match these terms in any field, - # except for extended properties. Optional. - # @param [Array, String] shared_extended_property - # Extended properties constraint specified as propertyName=value. Matches only - # shared properties. This parameter might be repeated multiple times to return - # events that match all given constraints. - # @param [Boolean] show_deleted - # Whether to include deleted events (with status equals "cancelled") in the - # result. Cancelled instances of recurring events (but not the underlying - # recurring event) will still be included if showDeleted and singleEvents are - # both False. If showDeleted and singleEvents are both True, only single - # instances of deleted events (but not the underlying recurring events) are - # returned. Optional. The default is False. - # @param [Boolean] show_hidden_invitations - # Whether to include hidden invitations in the result. Optional. The default is - # False. - # @param [Boolean] single_events - # Whether to expand recurring events into instances and only return single one- - # off events and instances of recurring events, but not the underlying recurring - # events themselves. Optional. The default is False. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. All events deleted - # since the previous list request will always be in the result set and it is not - # allowed to set showDeleted to False. - # There are several query parameters that cannot be specified together with - # nextSyncToken to ensure consistency of the client state. - # These are: - # - iCalUID - # - orderBy - # - privateExtendedProperty - # - q - # - sharedExtendedProperty - # - timeMin - # - timeMax - # - updatedMin If the syncToken expires, the server will respond with a 410 GONE - # response code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [DateTime] time_max - # Upper bound (exclusive) for an event's start time to filter by. Optional. The - # default is not to filter by start time. - # @param [DateTime] time_min - # Lower bound (inclusive) for an event's end time to filter by. Optional. The - # default is not to filter by end time. - # @param [String] time_zone - # Time zone used in the response. Optional. The default is the time zone of the - # calendar. - # @param [DateTime] updated_min - # Lower bound for an event's last modification time (as a RFC 3339 timestamp) to - # filter by. When specified, entries deleted since this time will always be - # included regardless of showDeleted. Optional. The default is not to filter by - # last modification 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::CalendarV3::Events] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Events] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_events(calendar_id, always_include_email: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Events::Representation - command.response_class = Google::Apis::CalendarV3::Events - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil? - command.query['iCalUID'] = i_cal_uid unless i_cal_uid.nil? - command.query['maxAttendees'] = max_attendees unless max_attendees.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['privateExtendedProperty'] = private_extended_property unless private_extended_property.nil? - command.query['q'] = q unless q.nil? - command.query['sharedExtendedProperty'] = shared_extended_property unless shared_extended_property.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['showHiddenInvitations'] = show_hidden_invitations unless show_hidden_invitations.nil? - command.query['singleEvents'] = single_events unless single_events.nil? - command.query['syncToken'] = sync_token unless sync_token.nil? - command.query['timeMax'] = time_max unless time_max.nil? - command.query['timeMin'] = time_min unless time_min.nil? - command.query['timeZone'] = time_zone unless time_zone.nil? - command.query['updatedMin'] = updated_min unless updated_min.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 - - # Moves an event to another calendar, i.e. changes an event's organizer. - # @param [String] calendar_id - # Calendar identifier of the source calendar where the event currently is on. - # @param [String] event_id - # Event identifier. - # @param [String] destination - # Calendar identifier of the target calendar where the event is to be moved to. - # @param [Boolean] send_notifications - # Whether to send notifications about the change of the event's organizer. - # Optional. The default is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Event] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Event] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def move_event(calendar_id, event_id, destination: nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/{eventId}/move' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::CalendarV3::Event::Representation - command.response_class = Google::Apis::CalendarV3::Event - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['eventId'] = event_id unless event_id.nil? - command.query['destination'] = destination unless destination.nil? - command.query['sendNotifications'] = send_notifications unless send_notifications.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 event. This method supports patch semantics. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] event_id - # Event identifier. - # @param [Google::Apis::CalendarV3::Event] event_object - # @param [Boolean] always_include_email - # Whether to always include a value in the email field for the organizer, - # creator and attendees, even if no real email is available (i.e. a generated, - # non-working value will be provided). The use of this option is discouraged and - # should only be used by clients which cannot handle the absence of an email - # address value in the mentioned places. Optional. The default is False. - # @param [Fixnum] max_attendees - # The maximum number of attendees to include in the response. If there are more - # than the specified number of attendees, only the participant is returned. - # Optional. - # @param [Boolean] send_notifications - # Whether to send notifications about the event update (e.g. attendee's - # responses, title changes, etc.). Optional. The default is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Event] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Event] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event(calendar_id, event_id, event_object = nil, always_include_email: nil, max_attendees: nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/{eventId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::CalendarV3::Event::Representation - command.request_object = event_object - command.response_representation = Google::Apis::CalendarV3::Event::Representation - command.response_class = Google::Apis::CalendarV3::Event - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['eventId'] = event_id unless event_id.nil? - command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil? - command.query['maxAttendees'] = max_attendees unless max_attendees.nil? - command.query['sendNotifications'] = send_notifications unless send_notifications.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 an event based on a simple text string. - # @param [String] calendar_id - # Calendar identifier. - # @param [Boolean] send_notifications - # Whether to send notifications about the creation of the event. Optional. The - # default is False. - # @param [String] text - # The text describing the event to be created. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Event] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Event] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def quick_add_event(calendar_id, send_notifications: nil, text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/quickAdd' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::CalendarV3::Event::Representation - command.response_class = Google::Apis::CalendarV3::Event - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['sendNotifications'] = send_notifications unless send_notifications.nil? - command.query['text'] = text unless text.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 event. - # @param [String] calendar_id - # Calendar identifier. - # @param [String] event_id - # Event identifier. - # @param [Google::Apis::CalendarV3::Event] event_object - # @param [Boolean] always_include_email - # Whether to always include a value in the email field for the organizer, - # creator and attendees, even if no real email is available (i.e. a generated, - # non-working value will be provided). The use of this option is discouraged and - # should only be used by clients which cannot handle the absence of an email - # address value in the mentioned places. Optional. The default is False. - # @param [Fixnum] max_attendees - # The maximum number of attendees to include in the response. If there are more - # than the specified number of attendees, only the participant is returned. - # Optional. - # @param [Boolean] send_notifications - # Whether to send notifications about the event update (e.g. attendee's - # responses, title changes, etc.). Optional. The default is False. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Event] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Event] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event(calendar_id, event_id, event_object = nil, always_include_email: nil, max_attendees: nil, send_notifications: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/{eventId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::CalendarV3::Event::Representation - command.request_object = event_object - command.response_representation = Google::Apis::CalendarV3::Event::Representation - command.response_class = Google::Apis::CalendarV3::Event - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.params['eventId'] = event_id unless event_id.nil? - command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil? - command.query['maxAttendees'] = max_attendees unless max_attendees.nil? - command.query['sendNotifications'] = send_notifications unless send_notifications.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 - - # Watch for changes to Events resources. - # @param [String] calendar_id - # Calendar identifier. - # @param [Google::Apis::CalendarV3::Channel] channel_object - # @param [Boolean] always_include_email - # Whether to always include a value in the email field for the organizer, - # creator and attendees, even if no real email is available (i.e. a generated, - # non-working value will be provided). The use of this option is discouraged and - # should only be used by clients which cannot handle the absence of an email - # address value in the mentioned places. Optional. The default is False. - # @param [String] i_cal_uid - # Specifies event ID in the iCalendar format to be included in the response. - # Optional. - # @param [Fixnum] max_attendees - # The maximum number of attendees to include in the response. If there are more - # than the specified number of attendees, only the participant is returned. - # Optional. - # @param [Fixnum] max_results - # Maximum number of events returned on one result page. By default the value is - # 250 events. The page size can never be larger than 2500 events. Optional. - # @param [String] order_by - # The order of the events returned in the result. Optional. The default is an - # unspecified, stable order. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [Array, String] private_extended_property - # Extended properties constraint specified as propertyName=value. Matches only - # private properties. This parameter might be repeated multiple times to return - # events that match all given constraints. - # @param [String] q - # Free text search terms to find events that match these terms in any field, - # except for extended properties. Optional. - # @param [Array, String] shared_extended_property - # Extended properties constraint specified as propertyName=value. Matches only - # shared properties. This parameter might be repeated multiple times to return - # events that match all given constraints. - # @param [Boolean] show_deleted - # Whether to include deleted events (with status equals "cancelled") in the - # result. Cancelled instances of recurring events (but not the underlying - # recurring event) will still be included if showDeleted and singleEvents are - # both False. If showDeleted and singleEvents are both True, only single - # instances of deleted events (but not the underlying recurring events) are - # returned. Optional. The default is False. - # @param [Boolean] show_hidden_invitations - # Whether to include hidden invitations in the result. Optional. The default is - # False. - # @param [Boolean] single_events - # Whether to expand recurring events into instances and only return single one- - # off events and instances of recurring events, but not the underlying recurring - # events themselves. Optional. The default is False. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. All events deleted - # since the previous list request will always be in the result set and it is not - # allowed to set showDeleted to False. - # There are several query parameters that cannot be specified together with - # nextSyncToken to ensure consistency of the client state. - # These are: - # - iCalUID - # - orderBy - # - privateExtendedProperty - # - q - # - sharedExtendedProperty - # - timeMin - # - timeMax - # - updatedMin If the syncToken expires, the server will respond with a 410 GONE - # response code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [DateTime] time_max - # Upper bound (exclusive) for an event's start time to filter by. Optional. The - # default is not to filter by start time. - # @param [DateTime] time_min - # Lower bound (inclusive) for an event's end time to filter by. Optional. The - # default is not to filter by end time. - # @param [String] time_zone - # Time zone used in the response. Optional. The default is the time zone of the - # calendar. - # @param [DateTime] updated_min - # Lower bound for an event's last modification time (as a RFC 3339 timestamp) to - # filter by. When specified, entries deleted since this time will always be - # included regardless of showDeleted. Optional. The default is not to filter by - # last modification 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::CalendarV3::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::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_event(calendar_id, channel_object = nil, always_include_email: nil, i_cal_uid: nil, max_attendees: nil, max_results: nil, order_by: nil, page_token: nil, private_extended_property: nil, q: nil, shared_extended_property: nil, show_deleted: nil, show_hidden_invitations: nil, single_events: nil, sync_token: nil, time_max: nil, time_min: nil, time_zone: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'calendars/{calendarId}/events/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::CalendarV3::Channel::Representation - command.response_class = Google::Apis::CalendarV3::Channel - command.params['calendarId'] = calendar_id unless calendar_id.nil? - command.query['alwaysIncludeEmail'] = always_include_email unless always_include_email.nil? - command.query['iCalUID'] = i_cal_uid unless i_cal_uid.nil? - command.query['maxAttendees'] = max_attendees unless max_attendees.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['privateExtendedProperty'] = private_extended_property unless private_extended_property.nil? - command.query['q'] = q unless q.nil? - command.query['sharedExtendedProperty'] = shared_extended_property unless shared_extended_property.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['showHiddenInvitations'] = show_hidden_invitations unless show_hidden_invitations.nil? - command.query['singleEvents'] = single_events unless single_events.nil? - command.query['syncToken'] = sync_token unless sync_token.nil? - command.query['timeMax'] = time_max unless time_max.nil? - command.query['timeMin'] = time_min unless time_min.nil? - command.query['timeZone'] = time_zone unless time_zone.nil? - command.query['updatedMin'] = updated_min unless updated_min.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 free/busy information for a set of calendars. - # @param [Google::Apis::CalendarV3::FreeBusyRequest] free_busy_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::CalendarV3::FreeBusyResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::FreeBusyResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_freebusy(free_busy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'freeBusy' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::FreeBusyRequest::Representation - command.request_object = free_busy_request_object - command.response_representation = Google::Apis::CalendarV3::FreeBusyResponse::Representation - command.response_class = Google::Apis::CalendarV3::FreeBusyResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a single user setting. - # @param [String] setting - # The id of the user setting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Setting] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Setting] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_setting(setting, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/settings/{setting}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Setting::Representation - command.response_class = Google::Apis::CalendarV3::Setting - command.params['setting'] = setting unless setting.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 all user settings for the authenticated user. - # @param [Fixnum] max_results - # Maximum number of entries returned on one result page. By default the value is - # 100 entries. The page size can never be larger than 250 entries. Optional. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. - # If the syncToken expires, the server will respond with a 410 GONE response - # code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Settings] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::Settings] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_settings(max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/settings' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::CalendarV3::Settings::Representation - command.response_class = Google::Apis::CalendarV3::Settings - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['syncToken'] = sync_token unless sync_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 - - # Watch for changes to Settings resources. - # @param [Google::Apis::CalendarV3::Channel] channel_object - # @param [Fixnum] max_results - # Maximum number of entries returned on one result page. By default the value is - # 100 entries. The page size can never be larger than 250 entries. Optional. - # @param [String] page_token - # Token specifying which result page to return. Optional. - # @param [String] sync_token - # Token obtained from the nextSyncToken field returned on the last page of - # results from the previous list request. It makes the result of this list - # request contain only entries that have changed since then. - # If the syncToken expires, the server will respond with a 410 GONE response - # code and the client should clear its storage and perform a full - # synchronization without any syncToken. - # Learn more about incremental synchronization. - # Optional. The default is to return all entries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::CalendarV3::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CalendarV3::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_setting(channel_object = nil, max_results: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/me/settings/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::CalendarV3::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::CalendarV3::Channel::Representation - command.response_class = Google::Apis::CalendarV3::Channel - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['syncToken'] = sync_token unless sync_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 diff --git a/generated/google/apis/civicinfo_v2.rb b/generated/google/apis/civicinfo_v2.rb deleted file mode 100644 index 2f5f77861..000000000 --- a/generated/google/apis/civicinfo_v2.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/civicinfo_v2/classes.rb b/generated/google/apis/civicinfo_v2/classes.rb deleted file mode 100644 index 050a70ff8..000000000 --- a/generated/google/apis/civicinfo_v2/classes.rb +++ /dev/null @@ -1,1057 +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 - - # Describes information about a regional election administrative area. - class AdministrationRegion - include Google::Apis::Core::Hashable - - # Information about an election administrative body (e.g. County Board of - # Elections). - # Corresponds to the JSON property `electionAdministrationBody` - # @return [Google::Apis::CivicinfoV2::AdministrativeBody] - attr_accessor :election_administration_body - - # An ID for this object. IDs may change in future requests and should not be - # cached. Access to this field requires special access that can be requested - # from the Request more link on the Quotas page. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Describes information about a regional election administrative area. - # Corresponds to the JSON property `local_jurisdiction` - # @return [Google::Apis::CivicinfoV2::AdministrationRegion] - attr_accessor :local_jurisdiction - - # The name of the jurisdiction. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A list of sources for this area. If multiple sources are listed the data has - # been aggregated from those sources. - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @election_administration_body = args[:election_administration_body] unless args[:election_administration_body].nil? - @id = args[:id] unless args[:id].nil? - @local_jurisdiction = args[:local_jurisdiction] unless args[:local_jurisdiction].nil? - @name = args[:name] unless args[:name].nil? - @sources = args[:sources] unless args[:sources].nil? - end - end - - # Information about an election administrative body (e.g. County Board of - # Elections). - class AdministrativeBody - include Google::Apis::Core::Hashable - - # A URL provided by this administrative body for information on absentee voting. - # Corresponds to the JSON property `absenteeVotingInfoUrl` - # @return [String] - attr_accessor :absentee_voting_info_url - - # A URL provided by this administrative body to give contest information to the - # voter. - # Corresponds to the JSON property `ballotInfoUrl` - # @return [String] - attr_accessor :ballot_info_url - - # A simple representation of an address. - # Corresponds to the JSON property `correspondenceAddress` - # @return [Google::Apis::CivicinfoV2::SimpleAddressType] - attr_accessor :correspondence_address - - # A URL provided by this administrative body for looking up general election - # information. - # Corresponds to the JSON property `electionInfoUrl` - # @return [String] - attr_accessor :election_info_url - - # The election officials for this election administrative body. - # Corresponds to the JSON property `electionOfficials` - # @return [Array] - attr_accessor :election_officials - - # A URL provided by this administrative body for confirming that the voter is - # registered to vote. - # Corresponds to the JSON property `electionRegistrationConfirmationUrl` - # @return [String] - attr_accessor :election_registration_confirmation_url - - # A URL provided by this administrative body for looking up how to register to - # vote. - # Corresponds to the JSON property `electionRegistrationUrl` - # @return [String] - attr_accessor :election_registration_url - - # A URL provided by this administrative body describing election rules to the - # voter. - # Corresponds to the JSON property `electionRulesUrl` - # @return [String] - attr_accessor :election_rules_url - - # A description of the hours of operation for this administrative body. - # Corresponds to the JSON property `hoursOfOperation` - # @return [String] - attr_accessor :hours_of_operation - - # The name of this election administrative body. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A simple representation of an address. - # Corresponds to the JSON property `physicalAddress` - # @return [Google::Apis::CivicinfoV2::SimpleAddressType] - attr_accessor :physical_address - - # A description of the services this administrative body may provide. - # Corresponds to the JSON property `voter_services` - # @return [Array] - attr_accessor :voter_services - - # A URL provided by this administrative body for looking up where to vote. - # Corresponds to the JSON property `votingLocationFinderUrl` - # @return [String] - attr_accessor :voting_location_finder_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @absentee_voting_info_url = args[:absentee_voting_info_url] unless args[:absentee_voting_info_url].nil? - @ballot_info_url = args[:ballot_info_url] unless args[:ballot_info_url].nil? - @correspondence_address = args[:correspondence_address] unless args[:correspondence_address].nil? - @election_info_url = args[:election_info_url] unless args[:election_info_url].nil? - @election_officials = args[:election_officials] unless args[:election_officials].nil? - @election_registration_confirmation_url = args[:election_registration_confirmation_url] unless args[:election_registration_confirmation_url].nil? - @election_registration_url = args[:election_registration_url] unless args[:election_registration_url].nil? - @election_rules_url = args[:election_rules_url] unless args[:election_rules_url].nil? - @hours_of_operation = args[:hours_of_operation] unless args[:hours_of_operation].nil? - @name = args[:name] unless args[:name].nil? - @physical_address = args[:physical_address] unless args[:physical_address].nil? - @voter_services = args[:voter_services] unless args[:voter_services].nil? - @voting_location_finder_url = args[:voting_location_finder_url] unless args[:voting_location_finder_url].nil? - end - end - - # Information about a candidate running for elected office. - class Candidate - include Google::Apis::Core::Hashable - - # The URL for the candidate's campaign web site. - # Corresponds to the JSON property `candidateUrl` - # @return [String] - attr_accessor :candidate_url - - # A list of known (social) media channels for this candidate. - # Corresponds to the JSON property `channels` - # @return [Array] - attr_accessor :channels - - # The email address for the candidate's campaign. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The candidate's name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The order the candidate appears on the ballot for this contest. - # Corresponds to the JSON property `orderOnBallot` - # @return [String] - attr_accessor :order_on_ballot - - # The full name of the party the candidate is a member of. - # Corresponds to the JSON property `party` - # @return [String] - attr_accessor :party - - # The voice phone number for the candidate's campaign office. - # Corresponds to the JSON property `phone` - # @return [String] - attr_accessor :phone - - # A URL for a photo of the candidate. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @candidate_url = args[:candidate_url] unless args[:candidate_url].nil? - @channels = args[:channels] unless args[:channels].nil? - @email = args[:email] unless args[:email].nil? - @name = args[:name] unless args[:name].nil? - @order_on_ballot = args[:order_on_ballot] unless args[:order_on_ballot].nil? - @party = args[:party] unless args[:party].nil? - @phone = args[:phone] unless args[:phone].nil? - @photo_url = args[:photo_url] unless args[:photo_url].nil? - end - end - - # A social media or web channel for a candidate. - class Channel - include Google::Apis::Core::Hashable - - # The unique public identifier for the candidate's channel. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of channel. The following is a list of types of channels, but is not - # exhaustive. More channel types may be added at a later time. One of: - # GooglePlus, YouTube, Facebook, Twitter - # 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? - @type = args[:type] unless args[:type].nil? - end - end - - # Information about a contest that appears on a voter's ballot. - class Contest - include Google::Apis::Core::Hashable - - # A number specifying the position of this contest on the voter's ballot. - # Corresponds to the JSON property `ballotPlacement` - # @return [String] - attr_accessor :ballot_placement - - # The candidate choices for this contest. - # Corresponds to the JSON property `candidates` - # @return [Array] - attr_accessor :candidates - - # Describes the geographic scope of a contest. - # Corresponds to the JSON property `district` - # @return [Google::Apis::CivicinfoV2::ElectoralDistrict] - attr_accessor :district - - # A description of any additional eligibility requirements for voting in this - # contest. - # Corresponds to the JSON property `electorateSpecifications` - # @return [String] - attr_accessor :electorate_specifications - - # An ID for this object. IDs may change in future requests and should not be - # cached. Access to this field requires special access that can be requested - # from the Request more link on the Quotas page. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The levels of government of the office for this contest. There may be more - # than one in cases where a jurisdiction effectively acts at two different - # levels of government; for example, the mayor of the District of Columbia acts - # at "locality" level, but also effectively at both "administrative-area-2" and " - # administrative-area-1". - # Corresponds to the JSON property `level` - # @return [Array] - attr_accessor :level - - # The number of candidates that will be elected to office in this contest. - # Corresponds to the JSON property `numberElected` - # @return [String] - attr_accessor :number_elected - - # The number of candidates that a voter may vote for in this contest. - # Corresponds to the JSON property `numberVotingFor` - # @return [String] - attr_accessor :number_voting_for - - # The name of the office for this contest. - # Corresponds to the JSON property `office` - # @return [String] - attr_accessor :office - - # If this is a partisan election, the name of the party it is for. - # Corresponds to the JSON property `primaryParty` - # @return [String] - attr_accessor :primary_party - - # A brief description of the referendum. This field is only populated for - # contests of type 'Referendum'. - # Corresponds to the JSON property `referendumSubtitle` - # @return [String] - attr_accessor :referendum_subtitle - - # The title of the referendum (e.g. 'Proposition 42'). This field is only - # populated for contests of type 'Referendum'. - # Corresponds to the JSON property `referendumTitle` - # @return [String] - attr_accessor :referendum_title - - # A link to the referendum. This field is only populated for contests of type ' - # Referendum'. - # Corresponds to the JSON property `referendumUrl` - # @return [String] - attr_accessor :referendum_url - - # The roles which this office fulfills. - # Corresponds to the JSON property `roles` - # @return [Array] - attr_accessor :roles - - # A list of sources for this contest. If multiple sources are listed, the data - # has been aggregated from those sources. - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - # "Yes" or "No" depending on whether this a contest being held outside the - # normal election cycle. - # Corresponds to the JSON property `special` - # @return [String] - attr_accessor :special - - # The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' - # for contests with candidates. For referenda this will be 'Referendum'. - # 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) - @ballot_placement = args[:ballot_placement] unless args[:ballot_placement].nil? - @candidates = args[:candidates] unless args[:candidates].nil? - @district = args[:district] unless args[:district].nil? - @electorate_specifications = args[:electorate_specifications] unless args[:electorate_specifications].nil? - @id = args[:id] unless args[:id].nil? - @level = args[:level] unless args[:level].nil? - @number_elected = args[:number_elected] unless args[:number_elected].nil? - @number_voting_for = args[:number_voting_for] unless args[:number_voting_for].nil? - @office = args[:office] unless args[:office].nil? - @primary_party = args[:primary_party] unless args[:primary_party].nil? - @referendum_subtitle = args[:referendum_subtitle] unless args[:referendum_subtitle].nil? - @referendum_title = args[:referendum_title] unless args[:referendum_title].nil? - @referendum_url = args[:referendum_url] unless args[:referendum_url].nil? - @roles = args[:roles] unless args[:roles].nil? - @sources = args[:sources] unless args[:sources].nil? - @special = args[:special] unless args[:special].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # The result of a division search query. - class SearchDivisionResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "civicinfo# - # divisionSearchResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @results = args[:results] unless args[:results].nil? - end - end - - # Represents a political geographic division that matches the requested query. - class DivisionSearchResult - include Google::Apis::Core::Hashable - - # Other Open Civic Data identifiers that refer to the same division -- for - # example, those that refer to other political divisions whose boundaries are - # defined to be coterminous with this one. For example, ocd-division/country:us/ - # state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, since - # Wyoming has only one Congressional district. - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - - # The name of the division. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The unique Open Civic Data identifier for this division. - # Corresponds to the JSON property `ocdId` - # @return [String] - attr_accessor :ocd_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aliases = args[:aliases] unless args[:aliases].nil? - @name = args[:name] unless args[:name].nil? - @ocd_id = args[:ocd_id] unless args[:ocd_id].nil? - end - end - - # Information about the election that was queried. - class Election - include Google::Apis::Core::Hashable - - # Day of the election in YYYY-MM-DD format. - # Corresponds to the JSON property `electionDay` - # @return [String] - attr_accessor :election_day - - # The unique ID of this election. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A displayable name for the election. - # 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) - @election_day = args[:election_day] unless args[:election_day].nil? - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Information about individual election officials. - class ElectionOfficial - include Google::Apis::Core::Hashable - - # The email address of the election official. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # The fax number of the election official. - # Corresponds to the JSON property `faxNumber` - # @return [String] - attr_accessor :fax_number - - # The full name of the election official. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The office phone number of the election official. - # Corresponds to the JSON property `officePhoneNumber` - # @return [String] - attr_accessor :office_phone_number - - # The title of the election official. - # 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) - @email_address = args[:email_address] unless args[:email_address].nil? - @fax_number = args[:fax_number] unless args[:fax_number].nil? - @name = args[:name] unless args[:name].nil? - @office_phone_number = args[:office_phone_number] unless args[:office_phone_number].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # The list of elections available for this version of the API. - class QueryElectionsResponse - include Google::Apis::Core::Hashable - - # A list of available elections - # Corresponds to the JSON property `elections` - # @return [Array] - attr_accessor :elections - - # Identifies what kind of resource this is. Value: the fixed string "civicinfo# - # electionsQueryResponse". - # 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) - @elections = args[:elections] unless args[:elections].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Describes the geographic scope of a contest. - class ElectoralDistrict - include Google::Apis::Core::Hashable - - # An identifier for this district, relative to its scope. For example, the 34th - # State Senate district would have id "34" and a scope of stateUpper. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of the district. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The geographic scope of this district. If unspecified the district's geography - # is not known. One of: national, statewide, congressional, stateUpper, - # stateLower, countywide, judicial, schoolBoard, cityWide, township, - # countyCouncil, cityCouncil, ward, special - # Corresponds to the JSON property `scope` - # @return [String] - attr_accessor :scope - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - @scope = args[:scope] unless args[:scope].nil? - end - end - - # Describes a political geography. - class GeographicDivision - include Google::Apis::Core::Hashable - - # Any other valid OCD IDs that refer to the same division. - # Because OCD IDs are meant to be human-readable and at least somewhat - # predictable, there are occasionally several identifiers for a single division. - # These identifiers are defined to be equivalent to one another, and one is - # always indicated as the primary identifier. The primary identifier will be - # returned in ocd_id above, and any other equivalent valid identifiers will be - # returned in this list. - # For example, if this division's OCD ID is ocd-division/country:us/district:dc, - # this will contain ocd-division/country:us/state:dc. - # Corresponds to the JSON property `alsoKnownAs` - # @return [Array] - attr_accessor :also_known_as - - # The name of the division. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # List of indices in the offices array, one for each office elected from this - # division. Will only be present if includeOffices was true (or absent) in the - # request. - # Corresponds to the JSON property `officeIndices` - # @return [Array] - attr_accessor :office_indices - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @also_known_as = args[:also_known_as] unless args[:also_known_as].nil? - @name = args[:name] unless args[:name].nil? - @office_indices = args[:office_indices] unless args[:office_indices].nil? - end - end - - # Information about an Office held by one or more Officials. - class Office - include Google::Apis::Core::Hashable - - # The OCD ID of the division with which this office is associated. - # Corresponds to the JSON property `divisionId` - # @return [String] - attr_accessor :division_id - - # The levels of government of which this office is part. There may be more than - # one in cases where a jurisdiction effectively acts at two different levels of - # government; for example, the mayor of the District of Columbia acts at " - # locality" level, but also effectively at both "administrative-area-2" and " - # administrative-area-1". - # Corresponds to the JSON property `levels` - # @return [Array] - attr_accessor :levels - - # The human-readable name of the office. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # List of indices in the officials array of people who presently hold this - # office. - # Corresponds to the JSON property `officialIndices` - # @return [Array] - attr_accessor :official_indices - - # The roles which this office fulfills. Roles are not meant to be exhaustive, or - # to exactly specify the entire set of responsibilities of a given office, but - # are meant to be rough categories that are useful for general selection from or - # sorting of a list of offices. - # Corresponds to the JSON property `roles` - # @return [Array] - attr_accessor :roles - - # A list of sources for this office. If multiple sources are listed, the data - # has been aggregated from those sources. - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @division_id = args[:division_id] unless args[:division_id].nil? - @levels = args[:levels] unless args[:levels].nil? - @name = args[:name] unless args[:name].nil? - @official_indices = args[:official_indices] unless args[:official_indices].nil? - @roles = args[:roles] unless args[:roles].nil? - @sources = args[:sources] unless args[:sources].nil? - end - end - - # Information about a person holding an elected office. - class Official - include Google::Apis::Core::Hashable - - # Addresses at which to contact the official. - # Corresponds to the JSON property `address` - # @return [Array] - attr_accessor :address - - # A list of known (social) media channels for this official. - # Corresponds to the JSON property `channels` - # @return [Array] - attr_accessor :channels - - # The direct email addresses for the official. - # Corresponds to the JSON property `emails` - # @return [Array] - attr_accessor :emails - - # The official's name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The full name of the party the official belongs to. - # Corresponds to the JSON property `party` - # @return [String] - attr_accessor :party - - # The official's public contact phone numbers. - # Corresponds to the JSON property `phones` - # @return [Array] - attr_accessor :phones - - # A URL for a photo of the official. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - # The official's public website URLs. - # Corresponds to the JSON property `urls` - # @return [Array] - attr_accessor :urls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address = args[:address] unless args[:address].nil? - @channels = args[:channels] unless args[:channels].nil? - @emails = args[:emails] unless args[:emails].nil? - @name = args[:name] unless args[:name].nil? - @party = args[:party] unless args[:party].nil? - @phones = args[:phones] unless args[:phones].nil? - @photo_url = args[:photo_url] unless args[:photo_url].nil? - @urls = args[:urls] unless args[:urls].nil? - end - end - - # A location where a voter can vote. This may be an early vote site, an election - # day voting location, or a drop off location for a completed ballot. - class PollingLocation - include Google::Apis::Core::Hashable - - # A simple representation of an address. - # Corresponds to the JSON property `address` - # @return [Google::Apis::CivicinfoV2::SimpleAddressType] - attr_accessor :address - - # The last date that this early vote site or drop off location may be used. This - # field is not populated for polling locations. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - # An ID for this object. IDs may change in future requests and should not be - # cached. Access to this field requires special access that can be requested - # from the Request more link on the Quotas page. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of the early vote site or drop off location. This field is not - # populated for polling locations. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Notes about this location (e.g. accessibility ramp or entrance to use). - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # A description of when this location is open. - # Corresponds to the JSON property `pollingHours` - # @return [String] - attr_accessor :polling_hours - - # A list of sources for this location. If multiple sources are listed the data - # has been aggregated from those sources. - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - # The first date that this early vote site or drop off location may be used. - # This field is not populated for polling locations. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - # The services provided by this early vote site or drop off location. This field - # is not populated for polling locations. - # Corresponds to the JSON property `voterServices` - # @return [String] - attr_accessor :voter_services - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address = args[:address] unless args[:address].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @polling_hours = args[:polling_hours] unless args[:polling_hours].nil? - @sources = args[:sources] unless args[:sources].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @voter_services = args[:voter_services] unless args[:voter_services].nil? - end - end - - # - class RepresentativeInfoData - include Google::Apis::Core::Hashable - - # Political geographic divisions that contain the requested address. - # Corresponds to the JSON property `divisions` - # @return [Hash] - attr_accessor :divisions - - # Elected offices referenced by the divisions listed above. Will only be present - # if includeOffices was true in the request. - # Corresponds to the JSON property `offices` - # @return [Array] - attr_accessor :offices - - # Officials holding the offices listed above. Will only be present if - # includeOffices was true in the request. - # Corresponds to the JSON property `officials` - # @return [Array] - attr_accessor :officials - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @divisions = args[:divisions] unless args[:divisions].nil? - @offices = args[:offices] unless args[:offices].nil? - @officials = args[:officials] unless args[:officials].nil? - end - end - - # The result of a representative info lookup query. - class RepresentativeInfoResponse - include Google::Apis::Core::Hashable - - # Political geographic divisions that contain the requested address. - # Corresponds to the JSON property `divisions` - # @return [Hash] - attr_accessor :divisions - - # Identifies what kind of resource this is. Value: the fixed string "civicinfo# - # representativeInfoResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A simple representation of an address. - # Corresponds to the JSON property `normalizedInput` - # @return [Google::Apis::CivicinfoV2::SimpleAddressType] - attr_accessor :normalized_input - - # Elected offices referenced by the divisions listed above. Will only be present - # if includeOffices was true in the request. - # Corresponds to the JSON property `offices` - # @return [Array] - attr_accessor :offices - - # Officials holding the offices listed above. Will only be present if - # includeOffices was true in the request. - # Corresponds to the JSON property `officials` - # @return [Array] - attr_accessor :officials - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @divisions = args[:divisions] unless args[:divisions].nil? - @kind = args[:kind] unless args[:kind].nil? - @normalized_input = args[:normalized_input] unless args[:normalized_input].nil? - @offices = args[:offices] unless args[:offices].nil? - @officials = args[:officials] unless args[:officials].nil? - end - end - - # A simple representation of an address. - class SimpleAddressType - include Google::Apis::Core::Hashable - - # The city or town for the address. - # Corresponds to the JSON property `city` - # @return [String] - attr_accessor :city - - # The street name and number of this address. - # Corresponds to the JSON property `line1` - # @return [String] - attr_accessor :line1 - - # The second line the address, if needed. - # Corresponds to the JSON property `line2` - # @return [String] - attr_accessor :line2 - - # The third line of the address, if needed. - # Corresponds to the JSON property `line3` - # @return [String] - attr_accessor :line3 - - # The name of the location. - # Corresponds to the JSON property `locationName` - # @return [String] - attr_accessor :location_name - - # The US two letter state abbreviation of the address. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # The US Postal Zip Code of the address. - # Corresponds to the JSON property `zip` - # @return [String] - attr_accessor :zip - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @city = args[:city] unless args[:city].nil? - @line1 = args[:line1] unless args[:line1].nil? - @line2 = args[:line2] unless args[:line2].nil? - @line3 = args[:line3] unless args[:line3].nil? - @location_name = args[:location_name] unless args[:location_name].nil? - @state = args[:state] unless args[:state].nil? - @zip = args[:zip] unless args[:zip].nil? - end - end - - # Contains information about the data source for the element containing it. - class Source - include Google::Apis::Core::Hashable - - # The name of the data source. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Whether this data comes from an official government source. - # Corresponds to the JSON property `official` - # @return [Boolean] - attr_accessor :official - alias_method :official?, :official - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @official = args[:official] unless args[:official].nil? - end - end - - # The result of a voter info lookup query. - class VoterInfoResponse - include Google::Apis::Core::Hashable - - # Contests that will appear on the voter's ballot. - # Corresponds to the JSON property `contests` - # @return [Array] - attr_accessor :contests - - # Locations where a voter is eligible to drop off a completed ballot. The voter - # must have received and completed a ballot prior to arriving at the location. - # The location may not have ballots available on the premises. These locations - # could be open on or before election day as indicated in the pollingHours field. - # Corresponds to the JSON property `dropOffLocations` - # @return [Array] - attr_accessor :drop_off_locations - - # Locations where the voter is eligible to vote early, prior to election day. - # Corresponds to the JSON property `earlyVoteSites` - # @return [Array] - attr_accessor :early_vote_sites - - # Information about the election that was queried. - # Corresponds to the JSON property `election` - # @return [Google::Apis::CivicinfoV2::Election] - attr_accessor :election - - # Identifies what kind of resource this is. Value: the fixed string "civicinfo# - # voterInfoResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A simple representation of an address. - # Corresponds to the JSON property `normalizedInput` - # @return [Google::Apis::CivicinfoV2::SimpleAddressType] - attr_accessor :normalized_input - - # If no election ID was specified in the query, and there was more than one - # election with data for the given voter, this will contain information about - # the other elections that could apply. - # Corresponds to the JSON property `otherElections` - # @return [Array] - attr_accessor :other_elections - - # Locations where the voter is eligible to vote on election day. - # Corresponds to the JSON property `pollingLocations` - # @return [Array] - attr_accessor :polling_locations - - # - # Corresponds to the JSON property `precinctId` - # @return [String] - attr_accessor :precinct_id - - # Local Election Information for the state that the voter votes in. For the US, - # there will only be one element in this array. - # Corresponds to the JSON property `state` - # @return [Array] - attr_accessor :state - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contests = args[:contests] unless args[:contests].nil? - @drop_off_locations = args[:drop_off_locations] unless args[:drop_off_locations].nil? - @early_vote_sites = args[:early_vote_sites] unless args[:early_vote_sites].nil? - @election = args[:election] unless args[:election].nil? - @kind = args[:kind] unless args[:kind].nil? - @normalized_input = args[:normalized_input] unless args[:normalized_input].nil? - @other_elections = args[:other_elections] unless args[:other_elections].nil? - @polling_locations = args[:polling_locations] unless args[:polling_locations].nil? - @precinct_id = args[:precinct_id] unless args[:precinct_id].nil? - @state = args[:state] unless args[:state].nil? - end - end - end - end -end diff --git a/generated/google/apis/civicinfo_v2/representations.rb b/generated/google/apis/civicinfo_v2/representations.rb deleted file mode 100644 index ccac09b6e..000000000 --- a/generated/google/apis/civicinfo_v2/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/civicinfo_v2/service.rb b/generated/google/apis/civicinfo_v2/service.rb deleted file mode 100644 index 4c8a158f2..000000000 --- a/generated/google/apis/civicinfo_v2/service.rb +++ /dev/null @@ -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] 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] 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] 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] 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 diff --git a/generated/google/apis/cloudlatencytest_v2.rb b/generated/google/apis/cloudlatencytest_v2.rb deleted file mode 100644 index 8aa1dfda7..000000000 --- a/generated/google/apis/cloudlatencytest_v2.rb +++ /dev/null @@ -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 \ No newline at end of file diff --git a/generated/google/apis/cloudlatencytest_v2/classes.rb b/generated/google/apis/cloudlatencytest_v2/classes.rb deleted file mode 100644 index 5d8b17363..000000000 --- a/generated/google/apis/cloudlatencytest_v2/classes.rb +++ /dev/null @@ -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] - 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] - attr_accessor :double_values - - # - # Corresponds to the JSON property `intValues` - # @return [Array] - attr_accessor :int_values - - # - # Corresponds to the JSON property `stringValues` - # @return [Array] - 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 diff --git a/generated/google/apis/cloudlatencytest_v2/representations.rb b/generated/google/apis/cloudlatencytest_v2/representations.rb deleted file mode 100644 index 6b00f1f76..000000000 --- a/generated/google/apis/cloudlatencytest_v2/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/cloudlatencytest_v2/service.rb b/generated/google/apis/cloudlatencytest_v2/service.rb deleted file mode 100644 index 6262decf2..000000000 --- a/generated/google/apis/cloudlatencytest_v2/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/cloudmonitoring_v2beta2.rb b/generated/google/apis/cloudmonitoring_v2beta2.rb deleted file mode 100644 index a9e45f73e..000000000 --- a/generated/google/apis/cloudmonitoring_v2beta2.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/cloudmonitoring_v2beta2/classes.rb b/generated/google/apis/cloudmonitoring_v2beta2/classes.rb deleted file mode 100644 index 9623ab0ca..000000000 --- a/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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 diff --git a/generated/google/apis/cloudmonitoring_v2beta2/representations.rb b/generated/google/apis/cloudmonitoring_v2beta2/representations.rb deleted file mode 100644 index 568062961..000000000 --- a/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/cloudmonitoring_v2beta2/service.rb b/generated/google/apis/cloudmonitoring_v2beta2/service.rb deleted file mode 100644 index 8d4abd94f..000000000 --- a/generated/google/apis/cloudmonitoring_v2beta2/service.rb +++ /dev/null @@ -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] 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] 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 diff --git a/generated/google/apis/cloudresourcemanager_v1beta1.rb b/generated/google/apis/cloudresourcemanager_v1beta1.rb deleted file mode 100644 index a632b095f..000000000 --- a/generated/google/apis/cloudresourcemanager_v1beta1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb deleted file mode 100644 index 89c972ee0..000000000 --- a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +++ /dev/null @@ -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] - 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] - 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 diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb b/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb deleted file mode 100644 index abf9718a1..000000000 --- a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb b/generated/google/apis/cloudresourcemanager_v1beta1/service.rb deleted file mode 100644 index 71e5df497..000000000 --- a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +++ /dev/null @@ -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 project’s name is `Howl` or 'howl'. name:HOWL ==> Equivalent to above. - # NAME:howl ==> Equivalent to above. labels.color:* ==> The project has the - # label "color". labels.color:red ==> The project’s label `color` has the value ` - # red`. labels.color:red 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 diff --git a/generated/google/apis/compute_v1.rb b/generated/google/apis/compute_v1.rb deleted file mode 100644 index 1c5ab0649..000000000 --- a/generated/google/apis/compute_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/compute_v1/classes.rb b/generated/google/apis/compute_v1/classes.rb deleted file mode 100644 index 10b63ff92..000000000 --- a/generated/google/apis/compute_v1/classes.rb +++ /dev/null @@ -1,6391 +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 ComputeV1 - - # An access configuration attached to an instance's network interface. - class AccessConfig - include Google::Apis::Core::Hashable - - # [Output Only] Type of the resource. Always compute#accessConfig for access - # configs. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this access configuration. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # An external IP address associated with this instance. Specify an unused static - # external IP address available to the project or leave this field undefined to - # use an IP from a shared ephemeral IP address pool. If you specify a static - # external IP address, it must live in the same region as the zone of the - # instance. - # Corresponds to the JSON property `natIP` - # @return [String] - attr_accessor :nat_ip - - # The type of configuration. The default and only option is ONE_TO_ONE_NAT. - # 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) - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @nat_ip = args[:nat_ip] unless args[:nat_ip].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A reserved address resource. - class Address - include Google::Apis::Core::Hashable - - # The static external IP address represented by this resource. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Type of the resource. Always compute#address for addresses. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. Specifically, the - # name must be 1-63 characters long and match the regular expression [a-z]([-a- - # z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, - # and all following characters must be a dash, lowercase letter, or digit, - # except the last character, which cannot be a dash. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] URL of the region where the regional address resides. This field - # is not applicable to global addresses. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The status of the address, which can be either IN_USE or - # RESERVED. An address that is RESERVED is currently reserved and available to - # use. An IN_USE address is currently being used by another resource and is not - # available. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] The URLs of the resources that are using this address. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address = args[:address] unless args[:address].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? - @region = args[:region] unless args[:region].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @users = args[:users] unless args[:users].nil? - end - end - - # - class AddressAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A map of scoped address lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#addressAggregatedList for - # aggregated lists of addresses. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # Contains a list of address resources. - class AddressList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Address resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#addressList for lists of - # addresses. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 AddressesScopedList - include Google::Apis::Core::Hashable - - # [Output Only] List of addresses contained in this scope. - # Corresponds to the JSON property `addresses` - # @return [Array] - attr_accessor :addresses - - # [Output Only] Informational warning which replaces the list of addresses when - # the list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::AddressesScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @addresses = args[:addresses] unless args[:addresses].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # [Output Only] Informational warning which replaces the list of addresses when - # the list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # An instance-attached disk resource. - class AttachedDisk - include Google::Apis::Core::Hashable - - # Specifies whether the disk will be auto-deleted when the instance is deleted ( - # but not when the disk is detached from the instance). - # Corresponds to the JSON property `autoDelete` - # @return [Boolean] - attr_accessor :auto_delete - alias_method :auto_delete?, :auto_delete - - # Indicates that this is a boot disk. The virtual machine will use the first - # partition of the disk for its root filesystem. - # Corresponds to the JSON property `boot` - # @return [Boolean] - attr_accessor :boot - alias_method :boot?, :boot - - # Specifies a unique device name of your choice that is reflected into the /dev/ - # tree of a Linux operating system running within the instance. This name can be - # used to reference the device for mounting, resizing, and so on, from within - # the instance. - # If not specified, the server chooses a default device name to apply to this - # disk, in the form persistent-disks-x, where x is a number assigned by Google - # Compute Engine. This field is only applicable for persistent disks. - # Corresponds to the JSON property `deviceName` - # @return [String] - attr_accessor :device_name - - # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. - # For example, if you have many disks attached to an instance, each disk would - # have a unique index number. If not specified, the server will choose an - # appropriate value. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # [Input Only] Specifies the parameters for a new disk that will be created - # alongside the new instance. Use initialization parameters to create boot disks - # or local SSDs attached to the new instance. - # This property is mutually exclusive with the source property; you can only - # define one or the other, but not both. - # Corresponds to the JSON property `initializeParams` - # @return [Google::Apis::ComputeV1::AttachedDiskInitializeParams] - attr_accessor :initialize_params - - # - # Corresponds to the JSON property `interface` - # @return [String] - attr_accessor :interface - - # [Output Only] Type of the resource. Always compute#attachedDisk for attached - # disks. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Any valid publicly visible licenses. - # Corresponds to the JSON property `licenses` - # @return [Array] - attr_accessor :licenses - - # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not - # specified, the default is to attach the disk in READ_WRITE mode. - # Corresponds to the JSON property `mode` - # @return [String] - attr_accessor :mode - - # Specifies a valid partial or full URL to an existing Persistent Disk resource. - # This field is only applicable for persistent disks. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, - # the default is PERSISTENT. - # 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) - @auto_delete = args[:auto_delete] unless args[:auto_delete].nil? - @boot = args[:boot] unless args[:boot].nil? - @device_name = args[:device_name] unless args[:device_name].nil? - @index = args[:index] unless args[:index].nil? - @initialize_params = args[:initialize_params] unless args[:initialize_params].nil? - @interface = args[:interface] unless args[:interface].nil? - @kind = args[:kind] unless args[:kind].nil? - @licenses = args[:licenses] unless args[:licenses].nil? - @mode = args[:mode] unless args[:mode].nil? - @source = args[:source] unless args[:source].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # [Input Only] Specifies the parameters for a new disk that will be created - # alongside the new instance. Use initialization parameters to create boot disks - # or local SSDs attached to the new instance. - # This property is mutually exclusive with the source property; you can only - # define one or the other, but not both. - class AttachedDiskInitializeParams - include Google::Apis::Core::Hashable - - # Specifies the disk name. If not specified, the default is to use the name of - # the instance. - # Corresponds to the JSON property `diskName` - # @return [String] - attr_accessor :disk_name - - # Specifies the size of the disk in base-2 GB. - # Corresponds to the JSON property `diskSizeGb` - # @return [String] - attr_accessor :disk_size_gb - - # Specifies the disk type to use to create the instance. If not specified, the - # default is pd-standard, specified using the full URL. For example: - # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd- - # standard - # Other values include pd-ssd and local-ssd. If you define this field, you can - # provide either the full or partial URL. For example, the following are valid - # values: - # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/ - # diskType - # - projects/project/zones/zone/diskTypes/diskType - # - zones/zone/diskTypes/diskType - # Corresponds to the JSON property `diskType` - # @return [String] - attr_accessor :disk_type - - # A source image used to create the disk. You can provide a private (custom) - # image, and Compute Engine will use the corresponding image from your project. - # For example: - # global/images/my-private-image - # Or you can provide an image from a publicly-available project. For example, to - # use a Debian image from the debian-cloud project, make sure to include the - # project in the URL: - # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD - # where vYYYYMMDD is the image version. The fully-qualified URL will also work - # in both cases. - # 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) - @disk_name = args[:disk_name] unless args[:disk_name].nil? - @disk_size_gb = args[:disk_size_gb] unless args[:disk_size_gb].nil? - @disk_type = args[:disk_type] unless args[:disk_type].nil? - @source_image = args[:source_image] unless args[:source_image].nil? - end - end - - # Message containing information of one individual backend. - class Backend - include Google::Apis::Core::Hashable - - # The balancing mode of this backend, default is UTILIZATION. - # Corresponds to the JSON property `balancingMode` - # @return [String] - attr_accessor :balancing_mode - - # The multiplier (a value between 0.0 and 1.0) of the max capacity (CPU or RPS, - # depending on 'balancingMode') the group should serve up to. 0 means the group - # is totally drained. Default value is 1. Valid range is [0.0, 1.0]. - # Corresponds to the JSON property `capacityScaler` - # @return [Float] - attr_accessor :capacity_scaler - - # An optional textual description of the resource, which is provided by the - # client when the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # URL of a zonal Cloud Resource View resource. This resource view defines the - # list of instances that serve traffic. Member virtual machine instances from - # each resource view must live in the same zone as the resource view itself. No - # two backends in a backend service are allowed to use same Resource View - # resource. - # Corresponds to the JSON property `group` - # @return [String] - attr_accessor :group - - # The max RPS of the group. Can be used with either balancing mode, but required - # if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set. - # Corresponds to the JSON property `maxRate` - # @return [Fixnum] - attr_accessor :max_rate - - # The max RPS that a single backed instance can handle. This is used to - # calculate the capacity of the group. Can be used in either balancing mode. For - # RATE mode, either maxRate or maxRatePerInstance must be set. - # Corresponds to the JSON property `maxRatePerInstance` - # @return [Float] - attr_accessor :max_rate_per_instance - - # Used when 'balancingMode' is UTILIZATION. This ratio defines the CPU - # utilization target for the group. The default is 0.8. Valid range is [0, 1]. - # Corresponds to the JSON property `maxUtilization` - # @return [Float] - attr_accessor :max_utilization - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @balancing_mode = args[:balancing_mode] unless args[:balancing_mode].nil? - @capacity_scaler = args[:capacity_scaler] unless args[:capacity_scaler].nil? - @description = args[:description] unless args[:description].nil? - @group = args[:group] unless args[:group].nil? - @max_rate = args[:max_rate] unless args[:max_rate].nil? - @max_rate_per_instance = args[:max_rate_per_instance] unless args[:max_rate_per_instance].nil? - @max_utilization = args[:max_utilization] unless args[:max_utilization].nil? - end - end - - # A BackendService resource. This resource defines a group of backend VMs - # together with their serving capacity. - # If you add field foo, you probably need to also add: com.google.cloud.cluster. - # manager.api.BackendServiceResource: foo com.google.cloud.cluster.manager. - # networking.entities: BackendService, BackendServiceEntity: getFoo, setFoo: - # Converters/mappers will need to be updated: com.google.cloud.cluster.manager. - # networking.services.backendservice.BackendServiceResourceConverter: toResource, - # updateEntity: copy foo com.google.cloud.cluster.mixer.protomappers. - # BackendServiceMappers.ResourceMapper: ResourceMapper: add a new map call - # Tests to update: com.google.cloud.cluster.manager.networking.services. - # backendservice.BackendServiceResourceConverterTest com.google.cloud.cluster. - # mixer.protomappers.BackendServiceMappersTest.testResourceMapping - class BackendService - include Google::Apis::Core::Hashable - - # The list of backends that serve this BackendService. - # Corresponds to the JSON property `backends` - # @return [Array] - attr_accessor :backends - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Fingerprint of this resource. A hash of the contents stored in this object. - # This field is used in optimistic locking. This field will be ignored when - # inserting a BackendService. An up-to-date fingerprint must be provided in - # order to update the BackendService. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # The list of URLs to the HttpHealthCheck resource for health checking this - # BackendService. Currently at most one health check can be specified, and a - # health check is required. - # Corresponds to the JSON property `healthChecks` - # @return [Array] - attr_accessor :health_checks - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Deprecated in favor of port_name. The TCP port to connect on the backend. The - # default value is 80. - # Corresponds to the JSON property `port` - # @return [Fixnum] - attr_accessor :port - - # Name of backend port. The same name should appear in the resource views - # referenced by this service. Required. - # Corresponds to the JSON property `portName` - # @return [String] - attr_accessor :port_name - - # - # Corresponds to the JSON property `protocol` - # @return [String] - attr_accessor :protocol - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # How many seconds to wait for the backend before considering it a failed - # request. Default is 30 seconds. - # Corresponds to the JSON property `timeoutSec` - # @return [Fixnum] - attr_accessor :timeout_sec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @backends = args[:backends] unless args[:backends].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @health_checks = args[:health_checks] unless args[:health_checks].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @port = args[:port] unless args[:port].nil? - @port_name = args[:port_name] unless args[:port_name].nil? - @protocol = args[:protocol] unless args[:protocol].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @timeout_sec = args[:timeout_sec] unless args[:timeout_sec].nil? - end - end - - # - class BackendServiceGroupHealth - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `healthStatus` - # @return [Array] - attr_accessor :health_status - - # Type of resource. - # 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) - @health_status = args[:health_status] unless args[:health_status].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Contains a list of BackendService resources. - class BackendServiceList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of BackendService resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # Deprecation status for a public resource. - class DeprecationStatus - include Google::Apis::Core::Hashable - - # An optional RFC3339 timestamp on or after which the deprecation state of this - # resource will be changed to DELETED. - # Corresponds to the JSON property `deleted` - # @return [String] - attr_accessor :deleted - - # An optional RFC3339 timestamp on or after which the deprecation state of this - # resource will be changed to DEPRECATED. - # Corresponds to the JSON property `deprecated` - # @return [String] - attr_accessor :deprecated - - # An optional RFC3339 timestamp on or after which the deprecation state of this - # resource will be changed to OBSOLETE. - # Corresponds to the JSON property `obsolete` - # @return [String] - attr_accessor :obsolete - - # The URL of the suggested replacement for a deprecated resource. The suggested - # replacement resource must be the same kind of resource as the deprecated - # resource. - # Corresponds to the JSON property `replacement` - # @return [String] - attr_accessor :replacement - - # The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or - # DELETED. Operations which create a new resource using a DEPRECATED resource - # will return successfully, but with a warning indicating the deprecated - # resource and recommending its replacement. Operations which use OBSOLETE or - # DELETED resources will be rejected and result in an error. - # 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 - - # A Disk resource. - class Disk - include Google::Apis::Core::Hashable - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Type of the resource. Always compute#disk for disks. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Last attach timestamp in RFC3339 text format. - # Corresponds to the JSON property `lastAttachTimestamp` - # @return [String] - attr_accessor :last_attach_timestamp - - # [Output Only] Last detach timestamp in RFC3339 text format. - # Corresponds to the JSON property `lastDetachTimestamp` - # @return [String] - attr_accessor :last_detach_timestamp - - # Any applicable publicly visible licenses. - # Corresponds to the JSON property `licenses` - # @return [Array] - attr_accessor :licenses - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. Specifically, the - # name must be 1-63 characters long and match the regular expression [a-z]([-a- - # z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, - # and all following characters must be a dash, lowercase letter, or digit, - # except the last character, which cannot be a dash. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Internal use only. - # Corresponds to the JSON property `options` - # @return [String] - attr_accessor :options - - # [Output Only] Server-defined fully-qualified URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Size of the persistent disk, specified in GB. You can specify this field when - # creating a persistent disk using the sourceImage or sourceSnapshot parameter, - # or specify it alone to create an empty persistent disk. - # If you specify this field along with sourceImage or sourceSnapshot, the value - # of sizeGb must not be less than the size of the sourceImage or the size of the - # snapshot. - # Corresponds to the JSON property `sizeGb` - # @return [String] - attr_accessor :size_gb - - # The source image used to create this disk. If the source image is deleted from - # the system, this field will not be set, even if an image with the same name - # has been re-created. - # When creating a disk, you can provide a private (custom) image using the - # following input, and Compute Engine will use the corresponding image from your - # project. For example: - # global/images/my-private-image - # Or you can provide an image from a publicly-available project. For example, to - # use a Debian image from the debian-cloud project, make sure to include the - # project in the URL: - # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD - # where vYYYYMMDD is the image version. The fully-qualified URL will also work - # in both cases. - # Corresponds to the JSON property `sourceImage` - # @return [String] - attr_accessor :source_image - - # The ID value of the image used to create this disk. This value identifies the - # exact image that was used to create this persistent disk. For example, if you - # created the persistent disk from an image that was later deleted and recreated - # under the same name, the source image ID would identify the exact version of - # the image that was used. - # Corresponds to the JSON property `sourceImageId` - # @return [String] - attr_accessor :source_image_id - - # The source snapshot used to create this disk. You can provide this as a - # partial or full URL to the resource. For example, the following are valid - # values: - # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/ - # snapshot - # - projects/project/global/snapshots/snapshot - # - global/snapshots/snapshot - # Corresponds to the JSON property `sourceSnapshot` - # @return [String] - attr_accessor :source_snapshot - - # [Output Only] The unique ID of the snapshot used to create this disk. This - # value identifies the exact snapshot that was used to create this persistent - # disk. For example, if you created the persistent disk from a snapshot that was - # later deleted and recreated under the same name, the source snapshot ID would - # identify the exact version of the snapshot that was used. - # Corresponds to the JSON property `sourceSnapshotId` - # @return [String] - attr_accessor :source_snapshot_id - - # [Output Only] The status of disk creation. Applicable statuses includes: - # CREATING, FAILED, READY, RESTORING. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # URL of the disk type resource describing which disk type to use to create the - # disk; provided by the client when the disk is created. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Links to the users of the disk (attached instances) in form: project/zones/ - # zone/instances/instance - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - # [Output Only] URL of the zone where the disk 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) - @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? - @last_attach_timestamp = args[:last_attach_timestamp] unless args[:last_attach_timestamp].nil? - @last_detach_timestamp = args[:last_detach_timestamp] unless args[:last_detach_timestamp].nil? - @licenses = args[:licenses] unless args[:licenses].nil? - @name = args[:name] unless args[:name].nil? - @options = args[:options] unless args[:options].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @size_gb = args[:size_gb] unless args[:size_gb].nil? - @source_image = args[:source_image] unless args[:source_image].nil? - @source_image_id = args[:source_image_id] unless args[:source_image_id].nil? - @source_snapshot = args[:source_snapshot] unless args[:source_snapshot].nil? - @source_snapshot_id = args[:source_snapshot_id] unless args[:source_snapshot_id].nil? - @status = args[:status] unless args[:status].nil? - @type = args[:type] unless args[:type].nil? - @users = args[:users] unless args[:users].nil? - @zone = args[:zone] unless args[:zone].nil? - end - end - - # - class DiskAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A map of scoped disk lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#diskAggregatedList for - # aggregated lists of persistent disks. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # A list of Disk resources. - class DiskList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of persistent disks. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#diskList for lists of disks. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 MoveDiskRequest - include Google::Apis::Core::Hashable - - # The URL of the destination zone to move the disk to. This can be a full or - # partial URL. For example, the following are all valid URLs to a zone: - # - https://www.googleapis.com/compute/v1/projects/project/zones/zone - # - projects/project/zones/zone - # - zones/zone - # Corresponds to the JSON property `destinationZone` - # @return [String] - attr_accessor :destination_zone - - # The URL of the target disk to move. This can be a full or partial URL. For - # example, the following are all valid URLs to a disk: - # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - # - projects/project/zones/zone/disks/disk - # - zones/zone/disks/disk - # Corresponds to the JSON property `targetDisk` - # @return [String] - attr_accessor :target_disk - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_zone = args[:destination_zone] unless args[:destination_zone].nil? - @target_disk = args[:target_disk] unless args[:target_disk].nil? - end - end - - # A disk type resource. - class DiskType - include Google::Apis::Core::Hashable - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # [Output Only] Server defined default disk size in GB. - # Corresponds to the JSON property `defaultDiskSizeGb` - # @return [String] - attr_accessor :default_disk_size_gb - - # Deprecation status for a public resource. - # Corresponds to the JSON property `deprecated` - # @return [Google::Apis::ComputeV1::DeprecationStatus] - attr_accessor :deprecated - - # [Output Only] An optional textual description of the resource. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Type of the resource. Always compute#diskType for disk types. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] An optional textual description of the valid disk size, such as " - # 10GB-10TB". - # Corresponds to the JSON property `validDiskSize` - # @return [String] - attr_accessor :valid_disk_size - - # [Output Only] URL of the zone where the disk type 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) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @default_disk_size_gb = args[:default_disk_size_gb] unless args[:default_disk_size_gb].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? - @name = args[:name] unless args[:name].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @valid_disk_size = args[:valid_disk_size] unless args[:valid_disk_size].nil? - @zone = args[:zone] unless args[:zone].nil? - end - end - - # - class DiskTypeAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A map of scoped disk type lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#diskTypeAggregatedList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # Contains a list of disk type resources. - class DiskTypeList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Disk Type resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#diskTypeList for disk types. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 DiskTypesScopedList - include Google::Apis::Core::Hashable - - # [Output Only] List of disk types contained in this scope. - # Corresponds to the JSON property `diskTypes` - # @return [Array] - attr_accessor :disk_types - - # [Output Only] Informational warning which replaces the list of disk types when - # the list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::DiskTypesScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disk_types = args[:disk_types] unless args[:disk_types].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # [Output Only] Informational warning which replaces the list of disk types when - # the list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # - class DisksScopedList - include Google::Apis::Core::Hashable - - # [Output Only] List of disks contained in this scope. - # Corresponds to the JSON property `disks` - # @return [Array] - attr_accessor :disks - - # [Output Only] Informational warning which replaces the list of disks when the - # list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::DisksScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disks = args[:disks] unless args[:disks].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # [Output Only] Informational warning which replaces the list of disks when the - # list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # A Firewall resource. - class Firewall - include Google::Apis::Core::Hashable - - # The list of rules specified by this firewall. Each rule specifies a protocol - # and port-range tuple that describes a permitted connection. - # Corresponds to the JSON property `allowed` - # @return [Array] - attr_accessor :allowed - - # [Output Only] Creation timestamp in RFC3339text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Ony] Type of the resource. Always compute#firewall for firewall rules. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. Specifically, the - # name must be 1-63 characters long and match the regular expression [a-z]([-a- - # z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, - # and all following characters must be a dash, lowercase letter, or digit, - # except the last character, which cannot be a dash. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL of the network resource for this firewall rule. This field is required for - # creating an instance but optional when creating a firewall rule. If not - # specified when creating a firewall rule, the default network is used: - # global/networks/default - # If you choose to specify this property, you can specify the network as a full - # or partial URL. For example, the following are all valid URLs: - # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my- - # network - # - projects/myproject/global/networks/my-network - # - global/networks/default - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The IP address blocks that this rule applies to, expressed in CIDR format. One - # or both of sourceRanges and sourceTags may be set. - # If both properties are set, an inbound connection is allowed if the range or - # the tag of the source matches the sourceRanges OR matches the sourceTags - # property; the connection does not need to match both properties. - # Corresponds to the JSON property `sourceRanges` - # @return [Array] - attr_accessor :source_ranges - - # A list of instance tags which this rule applies to. One or both of - # sourceRanges and sourceTags may be set. - # If both properties are set, an inbound connection is allowed if the range or - # the tag of the source matches the sourceRanges OR matches the sourceTags - # property; the connection does not need to match both properties. - # Corresponds to the JSON property `sourceTags` - # @return [Array] - attr_accessor :source_tags - - # A list of instance tags indicating sets of instances located on network which - # may make network connections as specified in allowed[]. If no targetTags are - # specified, the firewall rule applies to all instances on the specified network. - # Corresponds to the JSON property `targetTags` - # @return [Array] - attr_accessor :target_tags - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allowed = args[:allowed] unless args[:allowed].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? - @network = args[:network] unless args[:network].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @source_ranges = args[:source_ranges] unless args[:source_ranges].nil? - @source_tags = args[:source_tags] unless args[:source_tags].nil? - @target_tags = args[:target_tags] unless args[:target_tags].nil? - end - - # - class Allowed - include Google::Apis::Core::Hashable - - # The IP protocol that is allowed for this rule. The protocol type is required - # when creating a firewall. This value can either be one of the following well - # known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol - # number. - # Corresponds to the JSON property `IPProtocol` - # @return [String] - attr_accessor :ip_protocol - - # An optional list of ports which are allowed. This field is only applicable for - # UDP or TCP protocol. Each entry must be either an integer or a range. If not - # specified, connections through any port are allowed - # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. - # Corresponds to the JSON property `ports` - # @return [Array] - attr_accessor :ports - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ip_protocol = args[:ip_protocol] unless args[:ip_protocol].nil? - @ports = args[:ports] unless args[:ports].nil? - end - end - end - - # Contains a list of Firewall resources. - class FirewallList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Firewall resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#firewallList for lists of - # firewalls. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # A ForwardingRule resource. A ForwardingRule resource specifies which pool of - # target VMs to forward a packet to if it matches the given [IPAddress, - # IPProtocol, portRange] tuple. - class ForwardingRule - include Google::Apis::Core::Hashable - - # Value of the reserved IP address that this forwarding rule is serving on - # behalf of. For global forwarding rules, the address must be a global IP; for - # regional forwarding rules, the address must live in the same region as the - # forwarding rule. If left empty (default value), an ephemeral IP from the same - # scope (global or regional) will be assigned. - # Corresponds to the JSON property `IPAddress` - # @return [String] - attr_accessor :ip_address - - # The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', ' - # ESP', 'AH' or 'SCTP'. - # Corresponds to the JSON property `IPProtocol` - # @return [String] - attr_accessor :ip_protocol - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets - # addressed to ports in the specified range will be forwarded to 'target'. If ' - # portRange' is left empty (default value), all ports are forwarded. Forwarding - # rules with the same [IPAddress, IPProtocol] pair must have disjoint port - # ranges. - # Corresponds to the JSON property `portRange` - # @return [String] - attr_accessor :port_range - - # URL of the region where the regional forwarding rule resides (output only). - # This field is not applicable to global forwarding rules. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The URL of the target resource to receive the matched traffic. For regional - # forwarding rules, this target must live in the same region as the forwarding - # rule. For global forwarding rules, this target must be a global - # TargetHttpProxy resource. - # 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) - @ip_address = args[:ip_address] unless args[:ip_address].nil? - @ip_protocol = args[:ip_protocol] unless args[:ip_protocol].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? - @port_range = args[:port_range] unless args[:port_range].nil? - @region = args[:region] unless args[:region].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @target = args[:target] unless args[:target].nil? - end - end - - # - class ForwardingRuleAggregatedList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A map of scoped forwarding rule lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # Contains a list of ForwardingRule resources. - class ForwardingRuleList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of ForwardingRule resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # - class ForwardingRulesScopedList - include Google::Apis::Core::Hashable - - # List of forwarding rules contained in this scope. - # Corresponds to the JSON property `forwardingRules` - # @return [Array] - attr_accessor :forwarding_rules - - # Informational warning which replaces the list of forwarding rules when the - # list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::ForwardingRulesScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @forwarding_rules = args[:forwarding_rules] unless args[:forwarding_rules].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # Informational warning which replaces the list of forwarding rules when the - # list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # - class HealthCheckReference - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `healthCheck` - # @return [String] - attr_accessor :health_check - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @health_check = args[:health_check] unless args[:health_check].nil? - end - end - - # - class HealthStatus - include Google::Apis::Core::Hashable - - # Health state of the instance. - # Corresponds to the JSON property `healthState` - # @return [String] - attr_accessor :health_state - - # URL of the instance resource. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # The IP address represented by this resource. - # Corresponds to the JSON property `ipAddress` - # @return [String] - attr_accessor :ip_address - - # The port on the instance. - # Corresponds to the JSON property `port` - # @return [Fixnum] - attr_accessor :port - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @health_state = args[:health_state] unless args[:health_state].nil? - @instance = args[:instance] unless args[:instance].nil? - @ip_address = args[:ip_address] unless args[:ip_address].nil? - @port = args[:port] unless args[:port].nil? - end - end - - # A host-matching rule for a URL. If matched, will use the named PathMatcher to - # select the BackendService. - class HostRule - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The list of host patterns to match. They must be valid hostnames except that - # they may start with *. or *-. The * acts like a glob and will match any string - # of atoms (separated by .s and -s) to the left. - # Corresponds to the JSON property `hosts` - # @return [Array] - attr_accessor :hosts - - # The name of the PathMatcher to match the path portion of the URL, if the this - # HostRule matches the URL's host portion. - # Corresponds to the JSON property `pathMatcher` - # @return [String] - attr_accessor :path_matcher - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @hosts = args[:hosts] unless args[:hosts].nil? - @path_matcher = args[:path_matcher] unless args[:path_matcher].nil? - end - end - - # An HttpHealthCheck resource. This resource defines a template for how - # individual VMs should be checked for health, via HTTP. - class HttpHealthCheck - include Google::Apis::Core::Hashable - - # How often (in seconds) to send a health check. The default value is 5 seconds. - # Corresponds to the JSON property `checkIntervalSec` - # @return [Fixnum] - attr_accessor :check_interval_sec - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A so-far unhealthy VM will be marked healthy after this many consecutive - # successes. The default value is 2. - # Corresponds to the JSON property `healthyThreshold` - # @return [Fixnum] - attr_accessor :healthy_threshold - - # The value of the host header in the HTTP health check request. If left empty ( - # default value), the public IP on behalf of which this health check is - # performed will be used. - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The TCP port number for the HTTP health check request. The default value is 80. - # Corresponds to the JSON property `port` - # @return [Fixnum] - attr_accessor :port - - # The request path of the HTTP health check request. The default value is "/". - # Corresponds to the JSON property `requestPath` - # @return [String] - attr_accessor :request_path - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # How long (in seconds) to wait before claiming failure. The default value is 5 - # seconds. It is invalid for timeoutSec to have greater value than - # checkIntervalSec. - # Corresponds to the JSON property `timeoutSec` - # @return [Fixnum] - attr_accessor :timeout_sec - - # A so-far healthy VM will be marked unhealthy after this many consecutive - # failures. The default value is 2. - # Corresponds to the JSON property `unhealthyThreshold` - # @return [Fixnum] - attr_accessor :unhealthy_threshold - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @check_interval_sec = args[:check_interval_sec] unless args[:check_interval_sec].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @healthy_threshold = args[:healthy_threshold] unless args[:healthy_threshold].nil? - @host = args[:host] unless args[:host].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @port = args[:port] unless args[:port].nil? - @request_path = args[:request_path] unless args[:request_path].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @timeout_sec = args[:timeout_sec] unless args[:timeout_sec].nil? - @unhealthy_threshold = args[:unhealthy_threshold] unless args[:unhealthy_threshold].nil? - end - end - - # Contains a list of HttpHealthCheck resources. - class HttpHealthCheckList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of HttpHealthCheck resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # An Image resource. - class Image - include Google::Apis::Core::Hashable - - # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). - # Corresponds to the JSON property `archiveSizeBytes` - # @return [String] - attr_accessor :archive_size_bytes - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # Deprecation status for a public resource. - # Corresponds to the JSON property `deprecated` - # @return [Google::Apis::ComputeV1::DeprecationStatus] - attr_accessor :deprecated - - # Textual description of the resource; provided by the client when the resource - # is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Size of the image when restored onto a persistent disk (in GB). - # Corresponds to the JSON property `diskSizeGb` - # @return [String] - attr_accessor :disk_size_gb - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Type of the resource. Always compute#image for images. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Any applicable publicly visible licenses. - # Corresponds to the JSON property `licenses` - # @return [Array] - attr_accessor :licenses - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. Specifically, the - # name must be 1-63 characters long and match the regular expression [a-z]([-a- - # z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, - # and all following characters must be a dash, lowercase letter, or digit, - # except the last character, which cannot be a dash. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The parameters of the raw disk image. - # Corresponds to the JSON property `rawDisk` - # @return [Google::Apis::ComputeV1::Image::RawDisk] - attr_accessor :raw_disk - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # URL of the The source disk used to create this image. This can be a full or - # valid partial URL. You must provide either this property or the rawDisk.source - # property but not both to create an image. For example, the following are valid - # values: - # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disk/disk - # - projects/project/zones/zone/disk/disk - # - zones/zone/disks/disk - # Corresponds to the JSON property `sourceDisk` - # @return [String] - attr_accessor :source_disk - - # The ID value of the disk used to create this image. This value may be used to - # determine whether the image was taken from the current or a previous instance - # of a given disk name. - # Corresponds to the JSON property `sourceDiskId` - # @return [String] - attr_accessor :source_disk_id - - # The type of the image used to create this disk. The default and only value is - # RAW - # Corresponds to the JSON property `sourceType` - # @return [String] - attr_accessor :source_type - - # [Output Only] The status of the image. An image can be used to create other - # resources, such as instances, only after the image has been successfully - # created and the status is set to READY. Possible values are FAILED, PENDING, - # or READY. - # 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) - @archive_size_bytes = args[:archive_size_bytes] unless args[:archive_size_bytes].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @deprecated = args[:deprecated] unless args[:deprecated].nil? - @description = args[:description] unless args[:description].nil? - @disk_size_gb = args[:disk_size_gb] unless args[:disk_size_gb].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @licenses = args[:licenses] unless args[:licenses].nil? - @name = args[:name] unless args[:name].nil? - @raw_disk = args[:raw_disk] unless args[:raw_disk].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @source_disk = args[:source_disk] unless args[:source_disk].nil? - @source_disk_id = args[:source_disk_id] unless args[:source_disk_id].nil? - @source_type = args[:source_type] unless args[:source_type].nil? - @status = args[:status] unless args[:status].nil? - end - - # The parameters of the raw disk image. - class RawDisk - include Google::Apis::Core::Hashable - - # The format used to encode and transmit the block device, which should be TAR. - # This is just a container and transmission format and not a runtime format. - # Provided by the client when the disk image is created. - # Corresponds to the JSON property `containerType` - # @return [String] - attr_accessor :container_type - - # An optional SHA1 checksum of the disk image before unpackaging; provided by - # the client when the disk image is created. - # Corresponds to the JSON property `sha1Checksum` - # @return [String] - attr_accessor :sha1_checksum - - # The full Google Cloud Storage URL where the disk image is stored. You must - # provide either this property or the sourceDisk property but not both. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @container_type = args[:container_type] unless args[:container_type].nil? - @sha1_checksum = args[:sha1_checksum] unless args[:sha1_checksum].nil? - @source = args[:source] unless args[:source].nil? - end - end - end - - # Contains a list of Image resources. - class ImageList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of Image resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # An Instance resource. - class Instance - include Google::Apis::Core::Hashable - - # Allows this instance to send and receive packets with non-matching destination - # or source IPs. This is required if you plan to use this instance to forward - # routes. For more information, see Enabling IP Forwarding. - # Corresponds to the JSON property `canIpForward` - # @return [Boolean] - attr_accessor :can_ip_forward - alias_method :can_ip_forward?, :can_ip_forward - - # [Output Only] The CPU platform used by this instance. - # Corresponds to the JSON property `cpuPlatform` - # @return [String] - attr_accessor :cpu_platform - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Array of disks associated with this instance. Persistent disks must be created - # before you can assign them. - # Corresponds to the JSON property `disks` - # @return [Array] - attr_accessor :disks - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Type of the resource. Always compute#instance for instances. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Full or partial URL of the machine type resource to use for this instance. - # This is provided by the client when the instance is created. For example, the - # following is a valid partial url: - # zones/zone/machineTypes/machine-type - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # A metadata key/value entry. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::ComputeV1::Metadata] - attr_accessor :metadata - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. Specifically, the - # name must be 1-63 characters long and match the regular expression [a-z]([-a- - # z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, - # and all following characters must be a dash, lowercase letter, or digit, - # except the last character, which cannot be a dash. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # An array of configurations for this interface. This specifies how this - # interface is configured to interact with other network services, such as - # connecting to the internet. - # Corresponds to the JSON property `networkInterfaces` - # @return [Array] - attr_accessor :network_interfaces - - # Sets the scheduling options for an Instance. - # Corresponds to the JSON property `scheduling` - # @return [Google::Apis::ComputeV1::Scheduling] - attr_accessor :scheduling - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # A list of service accounts, with their specified scopes, authorized for this - # instance. Service accounts generate access tokens that can be accessed through - # the metadata server and used to authenticate applications on the instance. See - # Authenticating from Google Compute Engine for more information. - # Corresponds to the JSON property `serviceAccounts` - # @return [Array] - attr_accessor :service_accounts - - # [Output Only] The status of the instance. One of the following values: - # PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] An optional, human-readable explanation of the status. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # A set of instance tags. - # Corresponds to the JSON property `tags` - # @return [Google::Apis::ComputeV1::Tags] - attr_accessor :tags - - # [Output Only] URL of the zone where the instance 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) - @can_ip_forward = args[:can_ip_forward] unless args[:can_ip_forward].nil? - @cpu_platform = args[:cpu_platform] unless args[:cpu_platform].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @disks = args[:disks] unless args[:disks].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @machine_type = args[:machine_type] unless args[:machine_type].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @name = args[:name] unless args[:name].nil? - @network_interfaces = args[:network_interfaces] unless args[:network_interfaces].nil? - @scheduling = args[:scheduling] unless args[:scheduling].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @service_accounts = args[:service_accounts] unless args[:service_accounts].nil? - @status = args[:status] unless args[:status].nil? - @status_message = args[:status_message] unless args[:status_message].nil? - @tags = args[:tags] unless args[:tags].nil? - @zone = args[:zone] unless args[:zone].nil? - end - end - - # - class InstanceAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A map of scoped instance lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#instanceAggregatedList for - # aggregated lists of Instance resources. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # Contains a list of instance resources. - class InstanceList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Instance resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#instanceList for lists of - # Instance resources. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 MoveInstanceRequest - include Google::Apis::Core::Hashable - - # The URL of the destination zone to move the instance to. This can be a full or - # partial URL. For example, the following are all valid URLs to a zone: - # - https://www.googleapis.com/compute/v1/projects/project/zones/zone - # - projects/project/zones/zone - # - zones/zone - # Corresponds to the JSON property `destinationZone` - # @return [String] - attr_accessor :destination_zone - - # The URL of the target instance to move. This can be a full or partial URL. For - # example, the following are all valid URLs to an instance: - # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ - # instance - # - projects/project/zones/zone/instances/instance - # - zones/zone/instances/instance - # Corresponds to the JSON property `targetInstance` - # @return [String] - attr_accessor :target_instance - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_zone = args[:destination_zone] unless args[:destination_zone].nil? - @target_instance = args[:target_instance] unless args[:target_instance].nil? - end - end - - # - class InstanceProperties - include Google::Apis::Core::Hashable - - # A boolean that specifies if instances created from this template can send - # packets with source IP addresses other than their own or receive packets with - # destination IP addresses other than their own. If you use these instances as - # an IP gateway or as the next-hop in a Route resource, specify true. Otherwise, - # specify false. - # Corresponds to the JSON property `canIpForward` - # @return [Boolean] - attr_accessor :can_ip_forward - alias_method :can_ip_forward?, :can_ip_forward - - # An optional text description for the instances that are created from this - # instance template. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # An array of disks that are associated with the instances that are created from - # this template. - # Corresponds to the JSON property `disks` - # @return [Array] - attr_accessor :disks - - # The machine type to use for instances that are created from this template. - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # A metadata key/value entry. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::ComputeV1::Metadata] - attr_accessor :metadata - - # An array of network access configurations for this interface. This specifies - # how this interface is configured to interact with other network services, such - # as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only supported - # access configuration. If you do not specify any access configurations, the - # instances that are created from this template will have no external internet - # access. - # Corresponds to the JSON property `networkInterfaces` - # @return [Array] - attr_accessor :network_interfaces - - # Sets the scheduling options for an Instance. - # Corresponds to the JSON property `scheduling` - # @return [Google::Apis::ComputeV1::Scheduling] - attr_accessor :scheduling - - # A list of service accounts with specified scopes. Access tokens for these - # service accounts are available to the instances that are created from this - # template. Use metadata queries to obtain the access tokens for these instances. - # Corresponds to the JSON property `serviceAccounts` - # @return [Array] - attr_accessor :service_accounts - - # A set of instance tags. - # Corresponds to the JSON property `tags` - # @return [Google::Apis::ComputeV1::Tags] - attr_accessor :tags - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @can_ip_forward = args[:can_ip_forward] unless args[:can_ip_forward].nil? - @description = args[:description] unless args[:description].nil? - @disks = args[:disks] unless args[:disks].nil? - @machine_type = args[:machine_type] unless args[:machine_type].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @network_interfaces = args[:network_interfaces] unless args[:network_interfaces].nil? - @scheduling = args[:scheduling] unless args[:scheduling].nil? - @service_accounts = args[:service_accounts] unless args[:service_accounts].nil? - @tags = args[:tags] unless args[:tags].nil? - end - end - - # - class InstanceReference - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instance = args[:instance] unless args[:instance].nil? - end - end - - # An Instance Template resource. - class InstanceTemplate - include Google::Apis::Core::Hashable - - # [Output Only] The creation timestamp for this instance template in RFC3339 - # text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional text description for the instance template. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] A unique identifier for this instance template. The server - # defines this identifier. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The resource type, which is always compute#instanceTemplate for - # instance templates. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the instance template. The name must be 1-63 characters long, and - # comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # - # Corresponds to the JSON property `properties` - # @return [Google::Apis::ComputeV1::InstanceProperties] - attr_accessor :properties - - # [Output Only] The URL for this instance template. The server defines this URL. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] 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? - @properties = args[:properties] unless args[:properties].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A list of instance templates. - class InstanceTemplateList - include Google::Apis::Core::Hashable - - # [Output Only] A unique identifier for this instance template. The server - # defines this identifier. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of InstanceTemplate resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] The resource type, which is always compute# - # instanceTemplatesListResponse for instance template lists. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token that is used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] The URL for this instance template list. The server defines this - # URL. - # 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 InstancesScopedList - include Google::Apis::Core::Hashable - - # [Output Only] List of instances contained in this scope. - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - # [Output Only] Informational warning which replaces the list of instances when - # the list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::InstancesScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instances = args[:instances] unless args[:instances].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # [Output Only] Informational warning which replaces the list of instances when - # the list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # A license resource. - class License - include Google::Apis::Core::Hashable - - # If true, the customer will be charged license fee for running software that - # contains this license on an instance. - # Corresponds to the JSON property `chargesUseFee` - # @return [Boolean] - attr_accessor :charges_use_fee - alias_method :charges_use_fee?, :charges_use_fee - - # [Output Only] Type of resource. Always compute#license for licenses. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource. The name must be 1-63 characters long, and comply with - # RCF1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @charges_use_fee = args[:charges_use_fee] unless args[:charges_use_fee].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? - end - end - - # A Machine Type resource. - class MachineType - include Google::Apis::Core::Hashable - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # Deprecation status for a public resource. - # Corresponds to the JSON property `deprecated` - # @return [Google::Apis::ComputeV1::DeprecationStatus] - attr_accessor :deprecated - - # [Output Only] An optional textual description of the resource. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] The tumber of CPUs exposed to the instance. - # Corresponds to the JSON property `guestCpus` - # @return [Fixnum] - attr_accessor :guest_cpus - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Deprecated] This property is deprecated and will never be populated with any - # relevant values. - # Corresponds to the JSON property `imageSpaceGb` - # @return [Fixnum] - attr_accessor :image_space_gb - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Maximum persistent disks allowed. - # Corresponds to the JSON property `maximumPersistentDisks` - # @return [Fixnum] - attr_accessor :maximum_persistent_disks - - # [Output Only] Maximum total persistent disks size (GB) allowed. - # Corresponds to the JSON property `maximumPersistentDisksSizeGb` - # @return [String] - attr_accessor :maximum_persistent_disks_size_gb - - # [Output Only] The amount of physical memory available to the instance, defined - # in MB. - # Corresponds to the JSON property `memoryMb` - # @return [Fixnum] - attr_accessor :memory_mb - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] List of extended scratch disks assigned to the instance. - # Corresponds to the JSON property `scratchDisks` - # @return [Array] - attr_accessor :scratch_disks - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The name of the zone where the machine type resides, such as us- - # central1-a. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @deprecated = args[:deprecated] unless args[:deprecated].nil? - @description = args[:description] unless args[:description].nil? - @guest_cpus = args[:guest_cpus] unless args[:guest_cpus].nil? - @id = args[:id] unless args[:id].nil? - @image_space_gb = args[:image_space_gb] unless args[:image_space_gb].nil? - @kind = args[:kind] unless args[:kind].nil? - @maximum_persistent_disks = args[:maximum_persistent_disks] unless args[:maximum_persistent_disks].nil? - @maximum_persistent_disks_size_gb = args[:maximum_persistent_disks_size_gb] unless args[:maximum_persistent_disks_size_gb].nil? - @memory_mb = args[:memory_mb] unless args[:memory_mb].nil? - @name = args[:name] unless args[:name].nil? - @scratch_disks = args[:scratch_disks] unless args[:scratch_disks].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @zone = args[:zone] unless args[:zone].nil? - end - - # - class ScratchDisk - include Google::Apis::Core::Hashable - - # Size of the scratch disk, defined in GB. - # Corresponds to the JSON property `diskGb` - # @return [Fixnum] - attr_accessor :disk_gb - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disk_gb = args[:disk_gb] unless args[:disk_gb].nil? - end - end - end - - # - class MachineTypeAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A map of scoped machine type lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#machineTypeAggregatedList for - # aggregated lists of machine types. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # Contains a list of Machine Type resources. - class MachineTypeList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Machine Type resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#machineTypeList for lists of - # machine types. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 MachineTypesScopedList - include Google::Apis::Core::Hashable - - # [Output Only] List of machine types contained in this scope. - # Corresponds to the JSON property `machineTypes` - # @return [Array] - attr_accessor :machine_types - - # [Output Only] An informational warning that appears when the machine types - # list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::MachineTypesScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @machine_types = args[:machine_types] unless args[:machine_types].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # [Output Only] An informational warning that appears when the machine types - # list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # A metadata key/value entry. - class Metadata - include Google::Apis::Core::Hashable - - # Specifies a fingerprint for this request, which is essentially a hash of the - # metadata's contents and used for optimistic locking. The fingerprint is - # initially generated by Compute Engine and changes after every request to - # modify or update metadata. You must always provide an up-to-date fingerprint - # hash in order to update or change metadata. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # Array of key/value pairs. The total size of all keys and values must be less - # than 512 KB. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of the resource. Always compute#metadata for 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) - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Item - include Google::Apis::Core::Hashable - - # Key for the metadata entry. Keys must conform to the following regexp: [a-zA- - # Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a - # URL in the metadata server. Additionally, to avoid ambiguity, keys must not - # conflict with any other metadata keys for the project. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # Value for the metadata entry. These are free-form strings, and only have - # meaning as interpreted by the image running in the instance. The only - # restriction placed on values is that their size must be less than or equal to - # 32768 bytes. - # 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 - - # A network resource. - class Network - include Google::Apis::Core::Hashable - - # The range of internal addresses that are legal on this network. This range is - # a CIDR specification, for example: 192.168.0.0/16. Provided by the client when - # the network is created. - # Corresponds to the JSON property `IPv4Range` - # @return [String] - attr_accessor :i_pv4_range - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A gateway address for default routing to other networks. This value is read - # only and is selected by the Google Compute Engine, typically as the first - # usable address in the IPv4Range. - # Corresponds to the JSON property `gatewayIPv4` - # @return [String] - attr_accessor :gateway_i_pv4 - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Type of the resource. Always compute#network for networks. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. Specifically, the - # name must be 1-63 characters long and match the regular expression [a-z]([-a- - # z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, - # and all following characters must be a dash, lowercase letter, or digit, - # except the last character, which cannot be a dash. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @i_pv4_range = args[:i_pv4_range] unless args[:i_pv4_range].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @gateway_i_pv4 = args[:gateway_i_pv4] unless args[:gateway_i_pv4].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? - end - end - - # A network interface resource attached to an instance. - class NetworkInterface - include Google::Apis::Core::Hashable - - # An array of configurations for this interface. Currently, ] - attr_accessor :access_configs - - # [Output Only] The name of the network interface, generated by the server. For - # network devices, these are eth0, eth1, etc. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL of the network resource for this instance. This is required for creating - # an instance but optional when creating a firewall rule. If not specified when - # creating a firewall rule, the default network is used: - # global/networks/default - # If you specify this property, you can specify the network as a full or partial - # URL. For example, the following are all valid URLs: - # - https://www.googleapis.com/compute/v1/projects/project/global/networks/ - # network - # - projects/project/global/networks/network - # - global/networks/default - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # [Output Only] An optional IPV4 internal network address assigned to the - # instance for this network interface. - # Corresponds to the JSON property `networkIP` - # @return [String] - attr_accessor :network_ip - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_configs = args[:access_configs] unless args[:access_configs].nil? - @name = args[:name] unless args[:name].nil? - @network = args[:network] unless args[:network].nil? - @network_ip = args[:network_ip] unless args[:network_ip].nil? - end - end - - # Contains a list of Network resources. - class NetworkList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Network resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#networkList for lists of - # networks. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource . - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # An operation resource, used to manage asynchronous API requests. - class Operation - include Google::Apis::Core::Hashable - - # [Output Only] An optional identifier specified by the client when the mutation - # was initiated. Must be unique for all operation resources in the project. - # Corresponds to the JSON property `clientOperationId` - # @return [String] - attr_accessor :client_operation_id - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # [Output Only] The time that this operation was completed. This is in RFC3339 - # text format. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # [Output Only] If errors are generated during processing of the operation, this - # field will be populated. - # Corresponds to the JSON property `error` - # @return [Google::Apis::ComputeV1::Operation::Error] - attr_accessor :error - - # [Output Only] If the operation fails, this field contains the HTTP error - # message that was returned, such as NOT FOUND. - # Corresponds to the JSON property `httpErrorMessage` - # @return [String] - attr_accessor :http_error_message - - # [Output Only] If the operation fails, this field contains the HTTP error - # message that was returned, such as 404. - # Corresponds to the JSON property `httpErrorStatusCode` - # @return [Fixnum] - attr_accessor :http_error_status_code - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The time that this operation was requested. This is in RFC3339 - # text format. - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Output Only] Type of the resource. Always compute#Operation for Operation - # resources. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Type of the operation, such as insert, update, and delete. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # [Output Only] An optional progress indicator that ranges from 0 to 100. There - # is no requirement that this be linear or support any granularity of operations. - # This should not be used to guess at when the operation will be complete. This - # number should monotonically increase as the operation progresses. - # Corresponds to the JSON property `progress` - # @return [Fixnum] - attr_accessor :progress - - # [Output Only] URL of the region where the operation resides. Only applicable - # for regional resources. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The time that this operation was started by the server. This is - # in RFC3339 text format. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # [Output Only] Status of the operation. Can be one of the following: PENDING, - # RUNNING, or DONE. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] An optional textual description of the current status of the - # operation. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # [Output Only] Unique target ID which identifies a particular incarnation of - # the target. - # Corresponds to the JSON property `targetId` - # @return [String] - attr_accessor :target_id - - # [Output Only] URL of the resource the operation is mutating. - # Corresponds to the JSON property `targetLink` - # @return [String] - attr_accessor :target_link - - # [Output Only] User who requested the operation, for example: user@example.com. - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - # [Output Only] If warning messages are generated during processing of the - # operation, this field will be populated. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - # [Output Only] URL of the zone where the operation 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) - @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 - - # [Output Only] If errors are generated during processing of the operation, this - # field will be populated. - class Error - include Google::Apis::Core::Hashable - - # [Output Only] The array of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - 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 - - # [Output Only] The error type identifier for this error. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Indicates the field in the request which caused the error. This - # property is optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output Only] An optional, human-readable error message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] 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 - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # - class OperationAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A map of scoped operation lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#operationAggregatedList for - # aggregated lists of operations. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # Contains a list of operation resources. - class OperationList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The operation resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#operations for Operations - # resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncate. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 OperationsScopedList - include Google::Apis::Core::Hashable - - # [Output Only] List of operations contained in this scope. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - # [Output Only] Informational warning which replaces the list of operations when - # the list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::OperationsScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operations = args[:operations] unless args[:operations].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # [Output Only] Informational warning which replaces the list of operations when - # the list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # A matcher for the path portion of the URL. The BackendService from the longest- - # matched rule will serve the URL. If no rule was matched, the default_service - # will be used. - class PathMatcher - include Google::Apis::Core::Hashable - - # The URL to the BackendService resource. This will be used if none of the ' - # pathRules' defined by this PathMatcher is met by the URL's path portion. - # Corresponds to the JSON property `defaultService` - # @return [String] - attr_accessor :default_service - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The name to which this PathMatcher is referred by the HostRule. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The list of path rules. - # Corresponds to the JSON property `pathRules` - # @return [Array] - attr_accessor :path_rules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default_service = args[:default_service] unless args[:default_service].nil? - @description = args[:description] unless args[:description].nil? - @name = args[:name] unless args[:name].nil? - @path_rules = args[:path_rules] unless args[:path_rules].nil? - end - end - - # A path-matching rule for a URL. If matched, will use the specified - # BackendService to handle the traffic arriving at this URL. - class PathRule - include Google::Apis::Core::Hashable - - # The list of path patterns to match. Each must start with / and the only place - # a * is allowed is at the end following a /. The string fed to the path matcher - # does not include any text after the first ? or #, and those chars are not - # allowed here. - # Corresponds to the JSON property `paths` - # @return [Array] - attr_accessor :paths - - # The URL of the BackendService resource if this rule is matched. - # Corresponds to the JSON property `service` - # @return [String] - attr_accessor :service - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @paths = args[:paths] unless args[:paths].nil? - @service = args[:service] unless args[:service].nil? - end - end - - # A Project resource. Projects can only be created in the Google Developers - # Console. Unless marked otherwise, values can only be modified in the console. - class Project - include Google::Apis::Core::Hashable - - # A metadata key/value entry. - # Corresponds to the JSON property `commonInstanceMetadata` - # @return [Google::Apis::ComputeV1::Metadata] - attr_accessor :common_instance_metadata - - # [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. - # 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 - - # [Output Only] Type of the resource. Always compute#project for projects. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Quotas assigned to this project. - # Corresponds to the JSON property `quotas` - # @return [Array] - attr_accessor :quotas - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The location in Cloud Storage and naming method of the daily usage report. - # Contains bucket_name and report_name prefix. - # Corresponds to the JSON property `usageExportLocation` - # @return [Google::Apis::ComputeV1::UsageExportLocation] - attr_accessor :usage_export_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @common_instance_metadata = args[:common_instance_metadata] unless args[:common_instance_metadata].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? - @quotas = args[:quotas] unless args[:quotas].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @usage_export_location = args[:usage_export_location] unless args[:usage_export_location].nil? - end - end - - # A quotas entry. - class Quota - include Google::Apis::Core::Hashable - - # [Output Only] Quota limit for this metric. - # Corresponds to the JSON property `limit` - # @return [Float] - attr_accessor :limit - - # [Output Only] Name of the quota metric. - # Corresponds to the JSON property `metric` - # @return [String] - attr_accessor :metric - - # [Output Only] Current usage of this metric. - # Corresponds to the JSON property `usage` - # @return [Float] - attr_accessor :usage - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @limit = args[:limit] unless args[:limit].nil? - @metric = args[:metric] unless args[:metric].nil? - @usage = args[:usage] unless args[:usage].nil? - end - end - - # Region resource. - class Region - include Google::Apis::Core::Hashable - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # Deprecation status for a public resource. - # Corresponds to the JSON property `deprecated` - # @return [Google::Apis::ComputeV1::DeprecationStatus] - attr_accessor :deprecated - - # [Output Only] Textual description of the resource. - # 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 - - # [Output Only] Type of the resource. Always compute#region for regions. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Quotas assigned to this region. - # Corresponds to the JSON property `quotas` - # @return [Array] - attr_accessor :quotas - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] Status of the region, either UP or DOWN. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] A list of zones available in this region, in the form of - # resource URLs. - # Corresponds to the JSON property `zones` - # @return [Array] - attr_accessor :zones - - 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? - @name = args[:name] unless args[:name].nil? - @quotas = args[:quotas] unless args[:quotas].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @zones = args[:zones] unless args[:zones].nil? - end - end - - # Contains a list of region resources. - class RegionList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Region resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#regionList for lists of regions. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 ResourceGroupReference - include Google::Apis::Core::Hashable - - # A URI referencing one of the resource views listed in the backend service. - # Corresponds to the JSON property `group` - # @return [String] - attr_accessor :group - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @group = args[:group] unless args[:group].nil? - end - end - - # The route resource. A Route is a rule that specifies how certain packets - # should be handled by the virtual network. Routes are associated with VMs by - # tag and the set of Routes for a particular VM is called its routing table. For - # each packet leaving a VM, the system searches that VM's routing table for a - # single best matching Route. Routes match packets by destination IP address, - # preferring smaller or more specific ranges over larger ones. If there is a tie, - # the system selects the Route with the smallest priority value. If there is - # still a tie, it uses the layer three and four packet headers to select just - # one of the remaining matching Routes. The packet is then forwarded as - # specified by the next_hop field of the winning Route -- either to another VM - # destination, a VM gateway or a GCE operated gateway. Packets that do not match - # any Route in the sending VM's routing table will be dropped. - class Route - include Google::Apis::Core::Hashable - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Which packets does this route apply to? - # Corresponds to the JSON property `destRange` - # @return [String] - attr_accessor :dest_range - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL of the network to which this route is applied; provided by the client when - # the route is created. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # The URL to a gateway that should handle matching packets. - # Corresponds to the JSON property `nextHopGateway` - # @return [String] - attr_accessor :next_hop_gateway - - # The URL to an instance that should handle matching packets. - # Corresponds to the JSON property `nextHopInstance` - # @return [String] - attr_accessor :next_hop_instance - - # The network IP address of an instance that should handle matching packets. - # Corresponds to the JSON property `nextHopIp` - # @return [String] - attr_accessor :next_hop_ip - - # The URL of the local network if it should handle matching packets. - # Corresponds to the JSON property `nextHopNetwork` - # @return [String] - attr_accessor :next_hop_network - - # The URL to a VpnTunnel that should handle matching packets. - # Corresponds to the JSON property `nextHopVpnTunnel` - # @return [String] - attr_accessor :next_hop_vpn_tunnel - - # Breaks ties between Routes of equal specificity. Routes with smaller values - # win when tied with routes with larger values. Default value is 1000. A valid - # range is between 0 and 65535. - # Corresponds to the JSON property `priority` - # @return [Fixnum] - attr_accessor :priority - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # A list of instance tags to which this route applies. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # If potential misconfigurations are detected for this route, this field will be - # populated with warning messages. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @dest_range = args[:dest_range] unless args[:dest_range].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @network = args[:network] unless args[:network].nil? - @next_hop_gateway = args[:next_hop_gateway] unless args[:next_hop_gateway].nil? - @next_hop_instance = args[:next_hop_instance] unless args[:next_hop_instance].nil? - @next_hop_ip = args[:next_hop_ip] unless args[:next_hop_ip].nil? - @next_hop_network = args[:next_hop_network] unless args[:next_hop_network].nil? - @next_hop_vpn_tunnel = args[:next_hop_vpn_tunnel] unless args[:next_hop_vpn_tunnel].nil? - @priority = args[:priority] unless args[:priority].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @tags = args[:tags] unless args[:tags].nil? - @warnings = args[:warnings] unless args[:warnings].nil? - end - - # - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # Contains a list of route resources. - class RouteList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of Route resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # Sets the scheduling options for an Instance. - class Scheduling - include Google::Apis::Core::Hashable - - # Specifies whether the instance should be automatically restarted if it is - # terminated by Compute Engine (not terminated by a user). - # Corresponds to the JSON property `automaticRestart` - # @return [Boolean] - attr_accessor :automatic_restart - alias_method :automatic_restart?, :automatic_restart - - # Defines the maintenance behavior for this instance. The default behavior is - # MIGRATE. For more information, see Setting maintenance behavior. - # Corresponds to the JSON property `onHostMaintenance` - # @return [String] - attr_accessor :on_host_maintenance - - # Whether the Instance is preemptible. - # Corresponds to the JSON property `preemptible` - # @return [Boolean] - attr_accessor :preemptible - alias_method :preemptible?, :preemptible - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @automatic_restart = args[:automatic_restart] unless args[:automatic_restart].nil? - @on_host_maintenance = args[:on_host_maintenance] unless args[:on_host_maintenance].nil? - @preemptible = args[:preemptible] unless args[:preemptible].nil? - end - end - - # An instance's serial console output. - class SerialPortOutput - include Google::Apis::Core::Hashable - - # [Output Only] The contents of the console output. - # Corresponds to the JSON property `contents` - # @return [String] - attr_accessor :contents - - # [Output Only] Type of the resource. Always compute#serialPortOutput for serial - # port output. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contents = args[:contents] unless args[:contents].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A 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] - 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 - - # A persistent disk snapshot resource. - class Snapshot - include Google::Apis::Core::Hashable - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Size of the persistent disk snapshot, specified in GB (output only). - # Corresponds to the JSON property `diskSizeGb` - # @return [String] - attr_accessor :disk_size_gb - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Public visible licenses. - # Corresponds to the JSON property `licenses` - # @return [Array] - attr_accessor :licenses - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The source disk used to create this snapshot. - # Corresponds to the JSON property `sourceDisk` - # @return [String] - attr_accessor :source_disk - - # The 'id' value of the disk used to create this snapshot. This value may be - # used to determine whether the snapshot was taken from the current or a - # previous instance of a given disk name. - # Corresponds to the JSON property `sourceDiskId` - # @return [String] - attr_accessor :source_disk_id - - # The status of the persistent disk snapshot (output only). - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # A size of the the storage used by the snapshot. As snapshots share storage - # this number is expected to change with snapshot creation/deletion. - # Corresponds to the JSON property `storageBytes` - # @return [String] - attr_accessor :storage_bytes - - # An indicator whether storageBytes is in a stable state, or it is being - # adjusted as a result of shared storage reallocation. - # Corresponds to the JSON property `storageBytesStatus` - # @return [String] - attr_accessor :storage_bytes_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? - @description = args[:description] unless args[:description].nil? - @disk_size_gb = args[:disk_size_gb] unless args[:disk_size_gb].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @licenses = args[:licenses] unless args[:licenses].nil? - @name = args[:name] unless args[:name].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @source_disk = args[:source_disk] unless args[:source_disk].nil? - @source_disk_id = args[:source_disk_id] unless args[:source_disk_id].nil? - @status = args[:status] unless args[:status].nil? - @storage_bytes = args[:storage_bytes] unless args[:storage_bytes].nil? - @storage_bytes_status = args[:storage_bytes_status] unless args[:storage_bytes_status].nil? - end - end - - # Contains a list of persistent disk snapshot resources. - class SnapshotList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of Snapshot resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # A set of instance tags. - class Tags - include Google::Apis::Core::Hashable - - # Specifies a fingerprint for this request, which is essentially a hash of the - # metadata's contents and used for optimistic locking. The fingerprint is - # initially generated by Compute Engine and changes after every request to - # modify or update metadata. You must always provide an up-to-date fingerprint - # hash in order to update or change metadata. - # To see the latest fingerprint, make get() request to the instance. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # An array of tags. Each tag must be 1-63 characters long, and comply with - # RFC1035. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @items = args[:items] unless args[:items].nil? - end - end - - # A TargetHttpProxy resource. This resource defines an HTTP proxy. - class TargetHttpProxy - include Google::Apis::Core::Hashable - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # URL to the UrlMap resource that defines the mapping from URL to the - # BackendService. - # Corresponds to the JSON property `urlMap` - # @return [String] - attr_accessor :url_map - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @url_map = args[:url_map] unless args[:url_map].nil? - end - end - - # Contains a list of TargetHttpProxy resources. - class TargetHttpProxyList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of TargetHttpProxy resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # A TargetInstance resource. This resource defines an endpoint VM that - # terminates traffic of certain protocols. - class TargetInstance - include Google::Apis::Core::Hashable - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The URL to the instance that terminates the relevant traffic. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # NAT option controlling how IPs are NAT'ed to the VM. Currently only NO_NAT ( - # default value) is supported. - # Corresponds to the JSON property `natPolicy` - # @return [String] - attr_accessor :nat_policy - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # URL of the zone where the target instance resides (output only). - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @instance = args[:instance] unless args[:instance].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @nat_policy = args[:nat_policy] unless args[:nat_policy].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @zone = args[:zone] unless args[:zone].nil? - end - end - - # - class TargetInstanceAggregatedList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A map of scoped target instance lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # Contains a list of TargetInstance resources. - class TargetInstanceList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of TargetInstance resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # - class TargetInstancesScopedList - include Google::Apis::Core::Hashable - - # List of target instances contained in this scope. - # Corresponds to the JSON property `targetInstances` - # @return [Array] - attr_accessor :target_instances - - # Informational warning which replaces the list of addresses when the list is - # empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::TargetInstancesScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @target_instances = args[:target_instances] unless args[:target_instances].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # Informational warning which replaces the list of addresses when the list is - # empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # A TargetPool resource. This resource defines a pool of VMs, associated - # HttpHealthCheck resources, and the fallback TargetPool. - class TargetPool - include Google::Apis::Core::Hashable - - # This field is applicable only when the containing target pool is serving a - # forwarding rule as the primary pool, and its 'failoverRatio' field is properly - # set to a value between [0, 1]. - # 'backupPool' and 'failoverRatio' together define the fallback behavior of the - # primary target pool: if the ratio of the healthy VMs in the primary pool is at - # or below 'failoverRatio', traffic arriving at the load-balanced IP will be - # directed to the backup pool. - # In case where 'failoverRatio' and 'backupPool' are not set, or all the VMs in - # the backup pool are unhealthy, the traffic will be directed back to the - # primary pool in the "force" mode, where traffic will be spread to the healthy - # VMs with the best effort, or to all VMs when no VM is healthy. - # Corresponds to the JSON property `backupPool` - # @return [String] - attr_accessor :backup_pool - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # This field is applicable only when the containing target pool is serving a - # forwarding rule as the primary pool (i.e., not as a backup pool to some other - # target pool). The value of the field must be in [0, 1]. - # If set, 'backupPool' must also be set. They together define the fallback - # behavior of the primary target pool: if the ratio of the healthy VMs in the - # primary pool is at or below this number, traffic arriving at the load-balanced - # IP will be directed to the backup pool. - # In case where 'failoverRatio' is not set or all the VMs in the backup pool are - # unhealthy, the traffic will be directed back to the primary pool in the "force" - # mode, where traffic will be spread to the healthy VMs with the best effort, - # or to all VMs when no VM is healthy. - # Corresponds to the JSON property `failoverRatio` - # @return [Float] - attr_accessor :failover_ratio - - # A list of URLs to the HttpHealthCheck resource. A member VM in this pool is - # considered healthy if and only if all specified health checks pass. An empty - # list means all member VMs will be considered healthy at all times. - # Corresponds to the JSON property `healthChecks` - # @return [Array] - attr_accessor :health_checks - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of resource URLs to the member VMs serving this pool. They must live in - # zones contained in the same region as this pool. - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL of the region where the target pool resides (output only). - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Sesssion affinity option, must be one of the following values: 'NONE': - # Connections from the same client IP may go to any VM in the pool; 'CLIENT_IP': - # Connections from the same client IP will go to the same VM in the pool while - # that VM remains healthy. 'CLIENT_IP_PROTO': Connections from the same client - # IP with the same IP protocol will go to the same VM in the pool while that VM - # remains healthy. - # Corresponds to the JSON property `sessionAffinity` - # @return [String] - attr_accessor :session_affinity - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @backup_pool = args[:backup_pool] unless args[:backup_pool].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @failover_ratio = args[:failover_ratio] unless args[:failover_ratio].nil? - @health_checks = args[:health_checks] unless args[:health_checks].nil? - @id = args[:id] unless args[:id].nil? - @instances = args[:instances] unless args[:instances].nil? - @kind = args[:kind] unless args[:kind].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? - @session_affinity = args[:session_affinity] unless args[:session_affinity].nil? - end - end - - # - class TargetPoolAggregatedList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A map of scoped target pool lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # - class TargetPoolInstanceHealth - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `healthStatus` - # @return [Array] - attr_accessor :health_status - - # Type of resource. - # 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) - @health_status = args[:health_status] unless args[:health_status].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Contains a list of TargetPool resources. - class TargetPoolList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of TargetPool resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # - class AddTargetPoolsHealthCheckRequest - include Google::Apis::Core::Hashable - - # Health check URLs to be added to targetPool. - # Corresponds to the JSON property `healthChecks` - # @return [Array] - attr_accessor :health_checks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @health_checks = args[:health_checks] unless args[:health_checks].nil? - end - end - - # - class AddTargetPoolsInstanceRequest - include Google::Apis::Core::Hashable - - # URLs of the instances to be added to targetPool. - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instances = args[:instances] unless args[:instances].nil? - end - end - - # - class RemoveTargetPoolsHealthCheckRequest - include Google::Apis::Core::Hashable - - # Health check URLs to be removed from targetPool. - # Corresponds to the JSON property `healthChecks` - # @return [Array] - attr_accessor :health_checks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @health_checks = args[:health_checks] unless args[:health_checks].nil? - end - end - - # - class RemoveTargetPoolsInstanceRequest - include Google::Apis::Core::Hashable - - # URLs of the instances to be removed from targetPool. - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instances = args[:instances] unless args[:instances].nil? - end - end - - # - class TargetPoolsScopedList - include Google::Apis::Core::Hashable - - # List of target pools contained in this scope. - # Corresponds to the JSON property `targetPools` - # @return [Array] - attr_accessor :target_pools - - # Informational warning which replaces the list of addresses when the list is - # empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::TargetPoolsScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @target_pools = args[:target_pools] unless args[:target_pools].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # Informational warning which replaces the list of addresses when the list is - # empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # - class TargetReference - include Google::Apis::Core::Hashable - - # - # 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) - @target = args[:target] unless args[:target].nil? - end - end - - # - class TargetVpnGateway - include Google::Apis::Core::Hashable - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource. Provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules - # are created using compute.forwardingRules.insert and associated to a VPN - # gateway. - # Corresponds to the JSON property `forwardingRules` - # @return [Array] - attr_accessor :forwarding_rules - - # [Output Only] Unique identifier for the resource. Defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Type of resource. Always compute#targetVpnGateway for target VPN - # gateways. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource. Provided by the client when the resource is created. The - # name must be 1-63 characters long and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL of the network to which this VPN gateway is attached. Provided by the - # client when the VPN gateway is created. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # [Output Only] URL of the region where the target VPN gateway resides. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server-defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The status of the VPN gateway. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created - # using compute.vpntunnels.insert and associated to a VPN gateway. - # Corresponds to the JSON property `tunnels` - # @return [Array] - attr_accessor :tunnels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @forwarding_rules = args[:forwarding_rules] unless args[:forwarding_rules].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @network = args[:network] unless args[:network].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? - @tunnels = args[:tunnels] unless args[:tunnels].nil? - end - end - - # - class TargetVpnGatewayAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource. Defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A map of scoped target vpn gateway lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#targetVpnGateway for target VPN - # gateways. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server-defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 - - # Contains a list of TargetVpnGateway resources. - class TargetVpnGatewayList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource. Defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of TargetVpnGateway resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#targetVpnGateway for target VPN - # gateways. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server-defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 TargetVpnGatewaysScopedList - include Google::Apis::Core::Hashable - - # [Output Only] List of target vpn gateways contained in this scope. - # Corresponds to the JSON property `targetVpnGateways` - # @return [Array] - attr_accessor :target_vpn_gateways - - # [Output Only] Informational warning which replaces the list of addresses when - # the list is empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::TargetVpnGatewaysScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @target_vpn_gateways = args[:target_vpn_gateways] unless args[:target_vpn_gateways].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # [Output Only] Informational warning which replaces the list of addresses when - # the list is empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # - class TestFailure - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `actualService` - # @return [String] - attr_accessor :actual_service - - # - # Corresponds to the JSON property `expectedService` - # @return [String] - attr_accessor :expected_service - - # - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @actual_service = args[:actual_service] unless args[:actual_service].nil? - @expected_service = args[:expected_service] unless args[:expected_service].nil? - @host = args[:host] unless args[:host].nil? - @path = args[:path] unless args[:path].nil? - end - end - - # A UrlMap resource. This resource defines the mapping from URL to the - # BackendService resource, based on the "longest-match" of the URL's host and - # path. - class UrlMap - include Google::Apis::Core::Hashable - - # Creation timestamp in RFC3339 text format (output only). - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # The URL of the BackendService resource if none of the hostRules match. - # Corresponds to the JSON property `defaultService` - # @return [String] - attr_accessor :default_service - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Fingerprint of this resource. A hash of the contents stored in this object. - # This field is used in optimistic locking. This field will be ignored when - # inserting a UrlMap. An up-to-date fingerprint must be provided in order to - # update the UrlMap. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # The list of HostRules to use against the URL. - # Corresponds to the JSON property `hostRules` - # @return [Array] - attr_accessor :host_rules - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource; provided by the client when the resource is created. The - # name must be 1-63 characters long, and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The list of named PathMatchers to use against the URL. - # Corresponds to the JSON property `pathMatchers` - # @return [Array] - attr_accessor :path_matchers - - # Server defined URL for the resource (output only). - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The list of expected URL mappings. Request to update this UrlMap will succeed - # only all of the test cases pass. - # Corresponds to the JSON property `tests` - # @return [Array] - attr_accessor :tests - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @default_service = args[:default_service] unless args[:default_service].nil? - @description = args[:description] unless args[:description].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @host_rules = args[:host_rules] unless args[:host_rules].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @path_matchers = args[:path_matchers] unless args[:path_matchers].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @tests = args[:tests] unless args[:tests].nil? - end - end - - # Contains a list of UrlMap resources. - class UrlMapList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of UrlMap resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # - class UrlMapReference - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `urlMap` - # @return [String] - attr_accessor :url_map - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @url_map = args[:url_map] unless args[:url_map].nil? - end - end - - # Message for the expected URL mappings. - class UrlMapTest - include Google::Apis::Core::Hashable - - # Description of this test case. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Host portion of the URL. - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # Path portion of the URL. - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - # Expected BackendService resource the given URL should be mapped to. - # Corresponds to the JSON property `service` - # @return [String] - attr_accessor :service - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @host = args[:host] unless args[:host].nil? - @path = args[:path] unless args[:path].nil? - @service = args[:service] unless args[:service].nil? - end - end - - # Message representing the validation result for a UrlMap. - class UrlMapValidationResult - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `loadErrors` - # @return [Array] - attr_accessor :load_errors - - # Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' - # indicates the reasons. - # Corresponds to the JSON property `loadSucceeded` - # @return [Boolean] - attr_accessor :load_succeeded - alias_method :load_succeeded?, :load_succeeded - - # - # Corresponds to the JSON property `testFailures` - # @return [Array] - attr_accessor :test_failures - - # If successfully loaded, this field indicates whether the test passed. If false, - # 'testFailures's indicate the reason of failure. - # Corresponds to the JSON property `testPassed` - # @return [Boolean] - attr_accessor :test_passed - alias_method :test_passed?, :test_passed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @load_errors = args[:load_errors] unless args[:load_errors].nil? - @load_succeeded = args[:load_succeeded] unless args[:load_succeeded].nil? - @test_failures = args[:test_failures] unless args[:test_failures].nil? - @test_passed = args[:test_passed] unless args[:test_passed].nil? - end - end - - # - class ValidateUrlMapsRequest - include Google::Apis::Core::Hashable - - # A UrlMap resource. This resource defines the mapping from URL to the - # BackendService resource, based on the "longest-match" of the URL's host and - # path. - # Corresponds to the JSON property `resource` - # @return [Google::Apis::ComputeV1::UrlMap] - attr_accessor :resource - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource = args[:resource] unless args[:resource].nil? - end - end - - # - class ValidateUrlMapsResponse - include Google::Apis::Core::Hashable - - # Message representing the validation result for a UrlMap. - # Corresponds to the JSON property `result` - # @return [Google::Apis::ComputeV1::UrlMapValidationResult] - attr_accessor :result - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @result = args[:result] unless args[:result].nil? - end - end - - # The location in Cloud Storage and naming method of the daily usage report. - # Contains bucket_name and report_name prefix. - class UsageExportLocation - include Google::Apis::Core::Hashable - - # The name of an existing bucket in Cloud Storage where the usage report object - # is stored. The Google Service Account is granted write access to this bucket. - # This is just the bucket name, with no gs:// or https://storage.googleapis.com/ - # in front of it. - # Corresponds to the JSON property `bucketName` - # @return [String] - attr_accessor :bucket_name - - # An optional prefix for the name of the usage report object stored in - # bucketName. If not supplied, defaults to usage. The report is stored as a CSV - # file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of - # the usage according to Pacific Time. If you supply a prefix, it should conform - # to Cloud Storage object naming conventions. - # Corresponds to the JSON property `reportNamePrefix` - # @return [String] - attr_accessor :report_name_prefix - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket_name = args[:bucket_name] unless args[:bucket_name].nil? - @report_name_prefix = args[:report_name_prefix] unless args[:report_name_prefix].nil? - end - end - - # - class VpnTunnel - include Google::Apis::Core::Hashable - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource. Provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] Detailed status message for the VPN tunnel. - # Corresponds to the JSON property `detailedStatus` - # @return [String] - attr_accessor :detailed_status - - # [Output Only] Unique identifier for the resource. Defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # IKE networks to use when establishing the VPN tunnel with peer VPN gateway. - # The value should be a CIDR formatted string, for example: 192.168.0.0/16. The - # ranges should be disjoint. - # Corresponds to the JSON property `ikeNetworks` - # @return [Array] - attr_accessor :ike_networks - - # IKE protocol version to use when establishing the VPN tunnel with peer VPN - # gateway. Acceptable IKE versions are 1 or 2. Default version is 2. - # Corresponds to the JSON property `ikeVersion` - # @return [Fixnum] - attr_accessor :ike_version - - # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the resource. Provided by the client when the resource is created. The - # name must be 1-63 characters long and comply with RFC1035. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # IP address of the peer VPN gateway. - # Corresponds to the JSON property `peerIp` - # @return [String] - attr_accessor :peer_ip - - # [Output Only] URL of the region where the VPN tunnel resides. - # 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 - - # Shared secret used to set the secure session between the GCE VPN gateway and - # the peer VPN gateway. - # Corresponds to the JSON property `sharedSecret` - # @return [String] - attr_accessor :shared_secret - - # Hash of the shared secret. - # Corresponds to the JSON property `sharedSecretHash` - # @return [String] - attr_accessor :shared_secret_hash - - # [Output Only] The status of the VPN tunnel. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # URL of the VPN gateway to which this VPN tunnel is associated. Provided by the - # client when the VPN tunnel is created. - # Corresponds to the JSON property `targetVpnGateway` - # @return [String] - attr_accessor :target_vpn_gateway - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @detailed_status = args[:detailed_status] unless args[:detailed_status].nil? - @id = args[:id] unless args[:id].nil? - @ike_networks = args[:ike_networks] unless args[:ike_networks].nil? - @ike_version = args[:ike_version] unless args[:ike_version].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @peer_ip = args[:peer_ip] unless args[:peer_ip].nil? - @region = args[:region] unless args[:region].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @shared_secret = args[:shared_secret] unless args[:shared_secret].nil? - @shared_secret_hash = args[:shared_secret_hash] unless args[:shared_secret_hash].nil? - @status = args[:status] unless args[:status].nil? - @target_vpn_gateway = args[:target_vpn_gateway] unless args[:target_vpn_gateway].nil? - end - end - - # - class VpnTunnelAggregatedList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A map of scoped vpn tunnel lists. - # Corresponds to the JSON property `items` - # @return [Hash] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server defined URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] 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 - - # Contains a list of VpnTunnel resources. - class VpnTunnelList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of VpnTunnel resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Server-defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 VpnTunnelsScopedList - include Google::Apis::Core::Hashable - - # List of vpn tunnels contained in this scope. - # Corresponds to the JSON property `vpnTunnels` - # @return [Array] - attr_accessor :vpn_tunnels - - # Informational warning which replaces the list of addresses when the list is - # empty. - # Corresponds to the JSON property `warning` - # @return [Google::Apis::ComputeV1::VpnTunnelsScopedList::Warning] - attr_accessor :warning - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @vpn_tunnels = args[:vpn_tunnels] unless args[:vpn_tunnels].nil? - @warning = args[:warning] unless args[:warning].nil? - end - - # Informational warning which replaces the list of addresses when the list is - # empty. - class Warning - include Google::Apis::Core::Hashable - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # A Zone resource. - class Zone - include Google::Apis::Core::Hashable - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # Deprecation status for a public resource. - # Corresponds to the JSON property `deprecated` - # @return [Google::Apis::ComputeV1::DeprecationStatus] - attr_accessor :deprecated - - # [Output Only] Textual description of the resource. - # 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 - - # [Output Only] Type of the resource. Always kind#zone for zones. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Any scheduled maintenance windows for this zone. When the zone - # is in a maintenance window, all resources which reside in the zone will be - # unavailable. For more information, see Maintenance Windows - # Corresponds to the JSON property `maintenanceWindows` - # @return [Array] - attr_accessor :maintenance_windows - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Full URL reference to the region which hosts the zone. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] Status of the zone, either UP or DOWN. - # 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 - - # [Output Only] Starting time of the maintenance window, in RFC3339 format. - # Corresponds to the JSON property `beginTime` - # @return [String] - attr_accessor :begin_time - - # [Output Only] Textual description of the maintenance window. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] Ending time of the maintenance window, in RFC3339 format. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # [Output Only] Name of the maintenance window. - # 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 - - # Contains a list of zone resources. - class ZoneList - include Google::Apis::Core::Hashable - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] A list of Zone resources. - # Corresponds to the JSON property `items` - # @return [Array] - 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 - - # 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 diff --git a/generated/google/apis/compute_v1/representations.rb b/generated/google/apis/compute_v1/representations.rb deleted file mode 100644 index dd74d8457..000000000 --- a/generated/google/apis/compute_v1/representations.rb +++ /dev/null @@ -1,2209 +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 ComputeV1 - - class AccessConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Address - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AddressAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AddressList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AddressesScopedList - 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 - - class AttachedDisk - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AttachedDiskInitializeParams - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Backend - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BackendService - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BackendServiceGroupHealth - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BackendServiceList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeprecationStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Disk - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DiskAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DiskList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MoveDiskRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DiskType - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DiskTypeAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DiskTypeList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DiskTypesScopedList - 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 - - class DisksScopedList - 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 - - class Firewall - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Allowed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class FirewallList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ForwardingRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ForwardingRuleAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ForwardingRuleList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ForwardingRulesScopedList - 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 - - class HealthCheckReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HealthStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HostRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HttpHealthCheck - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HttpHealthCheckList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - - class RawDisk - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ImageList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Instance - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MoveInstanceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceTemplate - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceTemplateList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstancesScopedList - 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 - - class License - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MachineType - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ScratchDisk - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class MachineTypeAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MachineTypeList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MachineTypesScopedList - 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 - - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Item - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Network - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NetworkInterface - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NetworkList - 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 OperationAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OperationList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OperationsScopedList - 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 - - class PathMatcher - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PathRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Project - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Quota - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Region - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RegionList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ResourceGroupReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Route - 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 - - class RouteList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Scheduling - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SerialPortOutput - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ServiceAccount - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Snapshot - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SnapshotList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Tags - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetHttpProxy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetHttpProxyList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetInstance - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetInstanceAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetInstanceList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetInstancesScopedList - 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 - - class TargetPool - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetPoolAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetPoolInstanceHealth - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetPoolList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AddTargetPoolsHealthCheckRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AddTargetPoolsInstanceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RemoveTargetPoolsHealthCheckRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RemoveTargetPoolsInstanceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetPoolsScopedList - 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 - - class TargetReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetVpnGateway - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetVpnGatewayAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetVpnGatewayList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetVpnGatewaysScopedList - 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 - - class TestFailure - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlMap - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlMapList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlMapReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlMapTest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlMapValidationResult - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ValidateUrlMapsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ValidateUrlMapsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UsageExportLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VpnTunnel - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VpnTunnelAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VpnTunnelList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VpnTunnelsScopedList - 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 - - 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 AccessConfig - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :name, as: 'name' - property :nat_ip, as: 'natIP' - property :type, as: 'type' - end - end - - # @private - class Address - class Representation < Google::Apis::Core::JsonRepresentation - property :address, as: 'address' - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :region, as: 'region' - property :self_link, as: 'selfLink' - property :status, as: 'status' - collection :users, as: 'users' - end - end - - # @private - class AddressAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::AddressesScopedList, decorator: Google::Apis::ComputeV1::AddressesScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class AddressList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Address, decorator: Google::Apis::ComputeV1::Address::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class AddressesScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :addresses, as: 'addresses', class: Google::Apis::ComputeV1::Address, decorator: Google::Apis::ComputeV1::Address::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::AddressesScopedList::Warning, decorator: Google::Apis::ComputeV1::AddressesScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::AddressesScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::AddressesScopedList::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 AttachedDisk - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_delete, as: 'autoDelete' - property :boot, as: 'boot' - property :device_name, as: 'deviceName' - property :index, as: 'index' - property :initialize_params, as: 'initializeParams', class: Google::Apis::ComputeV1::AttachedDiskInitializeParams, decorator: Google::Apis::ComputeV1::AttachedDiskInitializeParams::Representation - - property :interface, as: 'interface' - property :kind, as: 'kind' - collection :licenses, as: 'licenses' - property :mode, as: 'mode' - property :source, as: 'source' - property :type, as: 'type' - end - end - - # @private - class AttachedDiskInitializeParams - class Representation < Google::Apis::Core::JsonRepresentation - property :disk_name, as: 'diskName' - property :disk_size_gb, as: 'diskSizeGb' - property :disk_type, as: 'diskType' - property :source_image, as: 'sourceImage' - end - end - - # @private - class Backend - class Representation < Google::Apis::Core::JsonRepresentation - property :balancing_mode, as: 'balancingMode' - property :capacity_scaler, as: 'capacityScaler' - property :description, as: 'description' - property :group, as: 'group' - property :max_rate, as: 'maxRate' - property :max_rate_per_instance, as: 'maxRatePerInstance' - property :max_utilization, as: 'maxUtilization' - end - end - - # @private - class BackendService - class Representation < Google::Apis::Core::JsonRepresentation - collection :backends, as: 'backends', class: Google::Apis::ComputeV1::Backend, decorator: Google::Apis::ComputeV1::Backend::Representation - - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :fingerprint, :base64 => true, as: 'fingerprint' - collection :health_checks, as: 'healthChecks' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :port, as: 'port' - property :port_name, as: 'portName' - property :protocol, as: 'protocol' - property :self_link, as: 'selfLink' - property :timeout_sec, as: 'timeoutSec' - end - end - - # @private - class BackendServiceGroupHealth - class Representation < Google::Apis::Core::JsonRepresentation - collection :health_status, as: 'healthStatus', class: Google::Apis::ComputeV1::HealthStatus, decorator: Google::Apis::ComputeV1::HealthStatus::Representation - - property :kind, as: 'kind' - end - end - - # @private - class BackendServiceList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::BackendService, decorator: Google::Apis::ComputeV1::BackendService::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - 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 Disk - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :last_attach_timestamp, as: 'lastAttachTimestamp' - property :last_detach_timestamp, as: 'lastDetachTimestamp' - collection :licenses, as: 'licenses' - property :name, as: 'name' - property :options, as: 'options' - property :self_link, as: 'selfLink' - property :size_gb, as: 'sizeGb' - property :source_image, as: 'sourceImage' - property :source_image_id, as: 'sourceImageId' - property :source_snapshot, as: 'sourceSnapshot' - property :source_snapshot_id, as: 'sourceSnapshotId' - property :status, as: 'status' - property :type, as: 'type' - collection :users, as: 'users' - property :zone, as: 'zone' - end - end - - # @private - class DiskAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::DisksScopedList, decorator: Google::Apis::ComputeV1::DisksScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class DiskList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Disk, decorator: Google::Apis::ComputeV1::Disk::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class MoveDiskRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_zone, as: 'destinationZone' - property :target_disk, as: 'targetDisk' - end - end - - # @private - class DiskType - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :default_disk_size_gb, as: 'defaultDiskSizeGb' - property :deprecated, as: 'deprecated', class: Google::Apis::ComputeV1::DeprecationStatus, decorator: Google::Apis::ComputeV1::DeprecationStatus::Representation - - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :self_link, as: 'selfLink' - property :valid_disk_size, as: 'validDiskSize' - property :zone, as: 'zone' - end - end - - # @private - class DiskTypeAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::DiskTypesScopedList, decorator: Google::Apis::ComputeV1::DiskTypesScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class DiskTypeList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::DiskType, decorator: Google::Apis::ComputeV1::DiskType::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class DiskTypesScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :disk_types, as: 'diskTypes', class: Google::Apis::ComputeV1::DiskType, decorator: Google::Apis::ComputeV1::DiskType::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::DiskTypesScopedList::Warning, decorator: Google::Apis::ComputeV1::DiskTypesScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::DiskTypesScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::DiskTypesScopedList::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 DisksScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :disks, as: 'disks', class: Google::Apis::ComputeV1::Disk, decorator: Google::Apis::ComputeV1::Disk::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::DisksScopedList::Warning, decorator: Google::Apis::ComputeV1::DisksScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::DisksScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::DisksScopedList::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 Firewall - class Representation < Google::Apis::Core::JsonRepresentation - collection :allowed, as: 'allowed', class: Google::Apis::ComputeV1::Firewall::Allowed, decorator: Google::Apis::ComputeV1::Firewall::Allowed::Representation - - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :network, as: 'network' - property :self_link, as: 'selfLink' - collection :source_ranges, as: 'sourceRanges' - collection :source_tags, as: 'sourceTags' - collection :target_tags, as: 'targetTags' - end - - # @private - class Allowed - class Representation < Google::Apis::Core::JsonRepresentation - property :ip_protocol, as: 'IPProtocol' - collection :ports, as: 'ports' - end - end - end - - # @private - class FirewallList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Firewall, decorator: Google::Apis::ComputeV1::Firewall::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ForwardingRule - class Representation < Google::Apis::Core::JsonRepresentation - property :ip_address, as: 'IPAddress' - property :ip_protocol, as: 'IPProtocol' - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :port_range, as: 'portRange' - property :region, as: 'region' - property :self_link, as: 'selfLink' - property :target, as: 'target' - end - end - - # @private - class ForwardingRuleAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::ForwardingRulesScopedList, decorator: Google::Apis::ComputeV1::ForwardingRulesScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ForwardingRuleList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::ForwardingRule, decorator: Google::Apis::ComputeV1::ForwardingRule::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ForwardingRulesScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :forwarding_rules, as: 'forwardingRules', class: Google::Apis::ComputeV1::ForwardingRule, decorator: Google::Apis::ComputeV1::ForwardingRule::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::ForwardingRulesScopedList::Warning, decorator: Google::Apis::ComputeV1::ForwardingRulesScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::ForwardingRulesScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::ForwardingRulesScopedList::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 HealthCheckReference - class Representation < Google::Apis::Core::JsonRepresentation - property :health_check, as: 'healthCheck' - end - end - - # @private - class HealthStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :health_state, as: 'healthState' - property :instance, as: 'instance' - property :ip_address, as: 'ipAddress' - property :port, as: 'port' - end - end - - # @private - class HostRule - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - collection :hosts, as: 'hosts' - property :path_matcher, as: 'pathMatcher' - end - end - - # @private - class HttpHealthCheck - class Representation < Google::Apis::Core::JsonRepresentation - property :check_interval_sec, as: 'checkIntervalSec' - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :healthy_threshold, as: 'healthyThreshold' - property :host, as: 'host' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :port, as: 'port' - property :request_path, as: 'requestPath' - property :self_link, as: 'selfLink' - property :timeout_sec, as: 'timeoutSec' - property :unhealthy_threshold, as: 'unhealthyThreshold' - end - end - - # @private - class HttpHealthCheckList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::HttpHealthCheck, decorator: Google::Apis::ComputeV1::HttpHealthCheck::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :archive_size_bytes, as: 'archiveSizeBytes' - property :creation_timestamp, as: 'creationTimestamp' - property :deprecated, as: 'deprecated', class: Google::Apis::ComputeV1::DeprecationStatus, decorator: Google::Apis::ComputeV1::DeprecationStatus::Representation - - property :description, as: 'description' - property :disk_size_gb, as: 'diskSizeGb' - property :id, as: 'id' - property :kind, as: 'kind' - collection :licenses, as: 'licenses' - property :name, as: 'name' - property :raw_disk, as: 'rawDisk', class: Google::Apis::ComputeV1::Image::RawDisk, decorator: Google::Apis::ComputeV1::Image::RawDisk::Representation - - property :self_link, as: 'selfLink' - property :source_disk, as: 'sourceDisk' - property :source_disk_id, as: 'sourceDiskId' - property :source_type, as: 'sourceType' - property :status, as: 'status' - end - - # @private - class RawDisk - class Representation < Google::Apis::Core::JsonRepresentation - property :container_type, as: 'containerType' - property :sha1_checksum, as: 'sha1Checksum' - property :source, as: 'source' - end - end - end - - # @private - class ImageList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Image, decorator: Google::Apis::ComputeV1::Image::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class Instance - class Representation < Google::Apis::Core::JsonRepresentation - property :can_ip_forward, as: 'canIpForward' - property :cpu_platform, as: 'cpuPlatform' - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - collection :disks, as: 'disks', class: Google::Apis::ComputeV1::AttachedDisk, decorator: Google::Apis::ComputeV1::AttachedDisk::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :machine_type, as: 'machineType' - property :metadata, as: 'metadata', class: Google::Apis::ComputeV1::Metadata, decorator: Google::Apis::ComputeV1::Metadata::Representation - - property :name, as: 'name' - collection :network_interfaces, as: 'networkInterfaces', class: Google::Apis::ComputeV1::NetworkInterface, decorator: Google::Apis::ComputeV1::NetworkInterface::Representation - - property :scheduling, as: 'scheduling', class: Google::Apis::ComputeV1::Scheduling, decorator: Google::Apis::ComputeV1::Scheduling::Representation - - property :self_link, as: 'selfLink' - collection :service_accounts, as: 'serviceAccounts', class: Google::Apis::ComputeV1::ServiceAccount, decorator: Google::Apis::ComputeV1::ServiceAccount::Representation - - property :status, as: 'status' - property :status_message, as: 'statusMessage' - property :tags, as: 'tags', class: Google::Apis::ComputeV1::Tags, decorator: Google::Apis::ComputeV1::Tags::Representation - - property :zone, as: 'zone' - end - end - - # @private - class InstanceAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::InstancesScopedList, decorator: Google::Apis::ComputeV1::InstancesScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class InstanceList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Instance, decorator: Google::Apis::ComputeV1::Instance::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class MoveInstanceRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_zone, as: 'destinationZone' - property :target_instance, as: 'targetInstance' - end - end - - # @private - class InstanceProperties - class Representation < Google::Apis::Core::JsonRepresentation - property :can_ip_forward, as: 'canIpForward' - property :description, as: 'description' - collection :disks, as: 'disks', class: Google::Apis::ComputeV1::AttachedDisk, decorator: Google::Apis::ComputeV1::AttachedDisk::Representation - - property :machine_type, as: 'machineType' - property :metadata, as: 'metadata', class: Google::Apis::ComputeV1::Metadata, decorator: Google::Apis::ComputeV1::Metadata::Representation - - collection :network_interfaces, as: 'networkInterfaces', class: Google::Apis::ComputeV1::NetworkInterface, decorator: Google::Apis::ComputeV1::NetworkInterface::Representation - - property :scheduling, as: 'scheduling', class: Google::Apis::ComputeV1::Scheduling, decorator: Google::Apis::ComputeV1::Scheduling::Representation - - collection :service_accounts, as: 'serviceAccounts', class: Google::Apis::ComputeV1::ServiceAccount, decorator: Google::Apis::ComputeV1::ServiceAccount::Representation - - property :tags, as: 'tags', class: Google::Apis::ComputeV1::Tags, decorator: Google::Apis::ComputeV1::Tags::Representation - - end - end - - # @private - class InstanceReference - class Representation < Google::Apis::Core::JsonRepresentation - property :instance, as: 'instance' - end - end - - # @private - class InstanceTemplate - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :properties, as: 'properties', class: Google::Apis::ComputeV1::InstanceProperties, decorator: Google::Apis::ComputeV1::InstanceProperties::Representation - - property :self_link, as: 'selfLink' - end - end - - # @private - class InstanceTemplateList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::InstanceTemplate, decorator: Google::Apis::ComputeV1::InstanceTemplate::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class InstancesScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :instances, as: 'instances', class: Google::Apis::ComputeV1::Instance, decorator: Google::Apis::ComputeV1::Instance::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::InstancesScopedList::Warning, decorator: Google::Apis::ComputeV1::InstancesScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::InstancesScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::InstancesScopedList::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 License - class Representation < Google::Apis::Core::JsonRepresentation - property :charges_use_fee, as: 'chargesUseFee' - property :kind, as: 'kind' - property :name, as: 'name' - property :self_link, as: 'selfLink' - end - end - - # @private - class MachineType - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :deprecated, as: 'deprecated', class: Google::Apis::ComputeV1::DeprecationStatus, decorator: Google::Apis::ComputeV1::DeprecationStatus::Representation - - property :description, as: 'description' - property :guest_cpus, as: 'guestCpus' - property :id, as: 'id' - property :image_space_gb, as: 'imageSpaceGb' - property :kind, as: 'kind' - property :maximum_persistent_disks, as: 'maximumPersistentDisks' - property :maximum_persistent_disks_size_gb, as: 'maximumPersistentDisksSizeGb' - property :memory_mb, as: 'memoryMb' - property :name, as: 'name' - collection :scratch_disks, as: 'scratchDisks', class: Google::Apis::ComputeV1::MachineType::ScratchDisk, decorator: Google::Apis::ComputeV1::MachineType::ScratchDisk::Representation - - property :self_link, as: 'selfLink' - property :zone, as: 'zone' - end - - # @private - class ScratchDisk - class Representation < Google::Apis::Core::JsonRepresentation - property :disk_gb, as: 'diskGb' - end - end - end - - # @private - class MachineTypeAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::MachineTypesScopedList, decorator: Google::Apis::ComputeV1::MachineTypesScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class MachineTypeList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::MachineType, decorator: Google::Apis::ComputeV1::MachineType::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class MachineTypesScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :machine_types, as: 'machineTypes', class: Google::Apis::ComputeV1::MachineType, decorator: Google::Apis::ComputeV1::MachineType::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::MachineTypesScopedList::Warning, decorator: Google::Apis::ComputeV1::MachineTypesScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::MachineTypesScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::MachineTypesScopedList::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 Metadata - class Representation < Google::Apis::Core::JsonRepresentation - property :fingerprint, :base64 => true, as: 'fingerprint' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Metadata::Item, decorator: Google::Apis::ComputeV1::Metadata::Item::Representation - - property :kind, as: 'kind' - end - - # @private - class Item - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :value, as: 'value' - end - end - end - - # @private - class Network - class Representation < Google::Apis::Core::JsonRepresentation - property :i_pv4_range, as: 'IPv4Range' - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :gateway_i_pv4, as: 'gatewayIPv4' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :self_link, as: 'selfLink' - end - end - - # @private - class NetworkInterface - class Representation < Google::Apis::Core::JsonRepresentation - collection :access_configs, as: 'accessConfigs', class: Google::Apis::ComputeV1::AccessConfig, decorator: Google::Apis::ComputeV1::AccessConfig::Representation - - property :name, as: 'name' - property :network, as: 'network' - property :network_ip, as: 'networkIP' - end - end - - # @private - class NetworkList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Network, decorator: Google::Apis::ComputeV1::Network::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - 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::ComputeV1::Operation::Error, decorator: Google::Apis::ComputeV1::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::ComputeV1::Operation::Warning, decorator: Google::Apis::ComputeV1::Operation::Warning::Representation - - property :zone, as: 'zone' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::ComputeV1::Operation::Error::Error, decorator: Google::Apis::ComputeV1::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::ComputeV1::Operation::Warning::Datum, decorator: Google::Apis::ComputeV1::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 OperationAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::OperationsScopedList, decorator: Google::Apis::ComputeV1::OperationsScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class OperationList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Operation, decorator: Google::Apis::ComputeV1::Operation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class OperationsScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :operations, as: 'operations', class: Google::Apis::ComputeV1::Operation, decorator: Google::Apis::ComputeV1::Operation::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::OperationsScopedList::Warning, decorator: Google::Apis::ComputeV1::OperationsScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::OperationsScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::OperationsScopedList::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 PathMatcher - class Representation < Google::Apis::Core::JsonRepresentation - property :default_service, as: 'defaultService' - property :description, as: 'description' - property :name, as: 'name' - collection :path_rules, as: 'pathRules', class: Google::Apis::ComputeV1::PathRule, decorator: Google::Apis::ComputeV1::PathRule::Representation - - end - end - - # @private - class PathRule - class Representation < Google::Apis::Core::JsonRepresentation - collection :paths, as: 'paths' - property :service, as: 'service' - end - end - - # @private - class Project - class Representation < Google::Apis::Core::JsonRepresentation - property :common_instance_metadata, as: 'commonInstanceMetadata', class: Google::Apis::ComputeV1::Metadata, decorator: Google::Apis::ComputeV1::Metadata::Representation - - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - collection :quotas, as: 'quotas', class: Google::Apis::ComputeV1::Quota, decorator: Google::Apis::ComputeV1::Quota::Representation - - property :self_link, as: 'selfLink' - property :usage_export_location, as: 'usageExportLocation', class: Google::Apis::ComputeV1::UsageExportLocation, decorator: Google::Apis::ComputeV1::UsageExportLocation::Representation - - end - end - - # @private - class Quota - class Representation < Google::Apis::Core::JsonRepresentation - property :limit, as: 'limit' - property :metric, as: 'metric' - property :usage, as: 'usage' - end - end - - # @private - class Region - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :deprecated, as: 'deprecated', class: Google::Apis::ComputeV1::DeprecationStatus, decorator: Google::Apis::ComputeV1::DeprecationStatus::Representation - - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - collection :quotas, as: 'quotas', class: Google::Apis::ComputeV1::Quota, decorator: Google::Apis::ComputeV1::Quota::Representation - - property :self_link, as: 'selfLink' - property :status, as: 'status' - collection :zones, as: 'zones' - end - end - - # @private - class RegionList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Region, decorator: Google::Apis::ComputeV1::Region::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ResourceGroupReference - class Representation < Google::Apis::Core::JsonRepresentation - property :group, as: 'group' - end - end - - # @private - class Route - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :dest_range, as: 'destRange' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :network, as: 'network' - property :next_hop_gateway, as: 'nextHopGateway' - property :next_hop_instance, as: 'nextHopInstance' - property :next_hop_ip, as: 'nextHopIp' - property :next_hop_network, as: 'nextHopNetwork' - property :next_hop_vpn_tunnel, as: 'nextHopVpnTunnel' - property :priority, as: 'priority' - property :self_link, as: 'selfLink' - collection :tags, as: 'tags' - collection :warnings, as: 'warnings', class: Google::Apis::ComputeV1::Route::Warning, decorator: Google::Apis::ComputeV1::Route::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::Route::Warning::Datum, decorator: Google::Apis::ComputeV1::Route::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 RouteList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Route, decorator: Google::Apis::ComputeV1::Route::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class Scheduling - class Representation < Google::Apis::Core::JsonRepresentation - property :automatic_restart, as: 'automaticRestart' - property :on_host_maintenance, as: 'onHostMaintenance' - property :preemptible, as: 'preemptible' - end - end - - # @private - class SerialPortOutput - class Representation < Google::Apis::Core::JsonRepresentation - property :contents, as: 'contents' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - end - end - - # @private - class ServiceAccount - class Representation < Google::Apis::Core::JsonRepresentation - property :email, as: 'email' - collection :scopes, as: 'scopes' - end - end - - # @private - class Snapshot - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :disk_size_gb, as: 'diskSizeGb' - property :id, as: 'id' - property :kind, as: 'kind' - collection :licenses, as: 'licenses' - property :name, as: 'name' - property :self_link, as: 'selfLink' - property :source_disk, as: 'sourceDisk' - property :source_disk_id, as: 'sourceDiskId' - property :status, as: 'status' - property :storage_bytes, as: 'storageBytes' - property :storage_bytes_status, as: 'storageBytesStatus' - end - end - - # @private - class SnapshotList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::Snapshot, decorator: Google::Apis::ComputeV1::Snapshot::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class Tags - class Representation < Google::Apis::Core::JsonRepresentation - property :fingerprint, :base64 => true, as: 'fingerprint' - collection :items, as: 'items' - end - end - - # @private - class TargetHttpProxy - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :self_link, as: 'selfLink' - property :url_map, as: 'urlMap' - end - end - - # @private - class TargetHttpProxyList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::TargetHttpProxy, decorator: Google::Apis::ComputeV1::TargetHttpProxy::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class TargetInstance - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :id, as: 'id' - property :instance, as: 'instance' - property :kind, as: 'kind' - property :name, as: 'name' - property :nat_policy, as: 'natPolicy' - property :self_link, as: 'selfLink' - property :zone, as: 'zone' - end - end - - # @private - class TargetInstanceAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::TargetInstancesScopedList, decorator: Google::Apis::ComputeV1::TargetInstancesScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class TargetInstanceList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::TargetInstance, decorator: Google::Apis::ComputeV1::TargetInstance::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class TargetInstancesScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :target_instances, as: 'targetInstances', class: Google::Apis::ComputeV1::TargetInstance, decorator: Google::Apis::ComputeV1::TargetInstance::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::TargetInstancesScopedList::Warning, decorator: Google::Apis::ComputeV1::TargetInstancesScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::TargetInstancesScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::TargetInstancesScopedList::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 TargetPool - class Representation < Google::Apis::Core::JsonRepresentation - property :backup_pool, as: 'backupPool' - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :failover_ratio, as: 'failoverRatio' - collection :health_checks, as: 'healthChecks' - property :id, as: 'id' - collection :instances, as: 'instances' - property :kind, as: 'kind' - property :name, as: 'name' - property :region, as: 'region' - property :self_link, as: 'selfLink' - property :session_affinity, as: 'sessionAffinity' - end - end - - # @private - class TargetPoolAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::TargetPoolsScopedList, decorator: Google::Apis::ComputeV1::TargetPoolsScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class TargetPoolInstanceHealth - class Representation < Google::Apis::Core::JsonRepresentation - collection :health_status, as: 'healthStatus', class: Google::Apis::ComputeV1::HealthStatus, decorator: Google::Apis::ComputeV1::HealthStatus::Representation - - property :kind, as: 'kind' - end - end - - # @private - class TargetPoolList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::TargetPool, decorator: Google::Apis::ComputeV1::TargetPool::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class AddTargetPoolsHealthCheckRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :health_checks, as: 'healthChecks', class: Google::Apis::ComputeV1::HealthCheckReference, decorator: Google::Apis::ComputeV1::HealthCheckReference::Representation - - end - end - - # @private - class AddTargetPoolsInstanceRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :instances, as: 'instances', class: Google::Apis::ComputeV1::InstanceReference, decorator: Google::Apis::ComputeV1::InstanceReference::Representation - - end - end - - # @private - class RemoveTargetPoolsHealthCheckRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :health_checks, as: 'healthChecks', class: Google::Apis::ComputeV1::HealthCheckReference, decorator: Google::Apis::ComputeV1::HealthCheckReference::Representation - - end - end - - # @private - class RemoveTargetPoolsInstanceRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :instances, as: 'instances', class: Google::Apis::ComputeV1::InstanceReference, decorator: Google::Apis::ComputeV1::InstanceReference::Representation - - end - end - - # @private - class TargetPoolsScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :target_pools, as: 'targetPools', class: Google::Apis::ComputeV1::TargetPool, decorator: Google::Apis::ComputeV1::TargetPool::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::TargetPoolsScopedList::Warning, decorator: Google::Apis::ComputeV1::TargetPoolsScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::TargetPoolsScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::TargetPoolsScopedList::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 TargetReference - class Representation < Google::Apis::Core::JsonRepresentation - property :target, as: 'target' - end - end - - # @private - class TargetVpnGateway - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - collection :forwarding_rules, as: 'forwardingRules' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :network, as: 'network' - property :region, as: 'region' - property :self_link, as: 'selfLink' - property :status, as: 'status' - collection :tunnels, as: 'tunnels' - end - end - - # @private - class TargetVpnGatewayAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::TargetVpnGatewaysScopedList, decorator: Google::Apis::ComputeV1::TargetVpnGatewaysScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class TargetVpnGatewayList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::TargetVpnGateway, decorator: Google::Apis::ComputeV1::TargetVpnGateway::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class TargetVpnGatewaysScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :target_vpn_gateways, as: 'targetVpnGateways', class: Google::Apis::ComputeV1::TargetVpnGateway, decorator: Google::Apis::ComputeV1::TargetVpnGateway::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::TargetVpnGatewaysScopedList::Warning, decorator: Google::Apis::ComputeV1::TargetVpnGatewaysScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::TargetVpnGatewaysScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::TargetVpnGatewaysScopedList::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 TestFailure - class Representation < Google::Apis::Core::JsonRepresentation - property :actual_service, as: 'actualService' - property :expected_service, as: 'expectedService' - property :host, as: 'host' - property :path, as: 'path' - end - end - - # @private - class UrlMap - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :default_service, as: 'defaultService' - property :description, as: 'description' - property :fingerprint, :base64 => true, as: 'fingerprint' - collection :host_rules, as: 'hostRules', class: Google::Apis::ComputeV1::HostRule, decorator: Google::Apis::ComputeV1::HostRule::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - collection :path_matchers, as: 'pathMatchers', class: Google::Apis::ComputeV1::PathMatcher, decorator: Google::Apis::ComputeV1::PathMatcher::Representation - - property :self_link, as: 'selfLink' - collection :tests, as: 'tests', class: Google::Apis::ComputeV1::UrlMapTest, decorator: Google::Apis::ComputeV1::UrlMapTest::Representation - - end - end - - # @private - class UrlMapList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::UrlMap, decorator: Google::Apis::ComputeV1::UrlMap::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class UrlMapReference - class Representation < Google::Apis::Core::JsonRepresentation - property :url_map, as: 'urlMap' - end - end - - # @private - class UrlMapTest - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :host, as: 'host' - property :path, as: 'path' - property :service, as: 'service' - end - end - - # @private - class UrlMapValidationResult - class Representation < Google::Apis::Core::JsonRepresentation - collection :load_errors, as: 'loadErrors' - property :load_succeeded, as: 'loadSucceeded' - collection :test_failures, as: 'testFailures', class: Google::Apis::ComputeV1::TestFailure, decorator: Google::Apis::ComputeV1::TestFailure::Representation - - property :test_passed, as: 'testPassed' - end - end - - # @private - class ValidateUrlMapsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :resource, as: 'resource', class: Google::Apis::ComputeV1::UrlMap, decorator: Google::Apis::ComputeV1::UrlMap::Representation - - end - end - - # @private - class ValidateUrlMapsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :result, as: 'result', class: Google::Apis::ComputeV1::UrlMapValidationResult, decorator: Google::Apis::ComputeV1::UrlMapValidationResult::Representation - - end - end - - # @private - class UsageExportLocation - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket_name, as: 'bucketName' - property :report_name_prefix, as: 'reportNamePrefix' - end - end - - # @private - class VpnTunnel - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :detailed_status, as: 'detailedStatus' - property :id, as: 'id' - collection :ike_networks, as: 'ikeNetworks' - property :ike_version, as: 'ikeVersion' - property :kind, as: 'kind' - property :name, as: 'name' - property :peer_ip, as: 'peerIp' - property :region, as: 'region' - property :self_link, as: 'selfLink' - property :shared_secret, as: 'sharedSecret' - property :shared_secret_hash, as: 'sharedSecretHash' - property :status, as: 'status' - property :target_vpn_gateway, as: 'targetVpnGateway' - end - end - - # @private - class VpnTunnelAggregatedList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - hash :items, as: 'items', class: Google::Apis::ComputeV1::VpnTunnelsScopedList, decorator: Google::Apis::ComputeV1::VpnTunnelsScopedList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class VpnTunnelList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ComputeV1::VpnTunnel, decorator: Google::Apis::ComputeV1::VpnTunnel::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class VpnTunnelsScopedList - class Representation < Google::Apis::Core::JsonRepresentation - collection :vpn_tunnels, as: 'vpnTunnels', class: Google::Apis::ComputeV1::VpnTunnel, decorator: Google::Apis::ComputeV1::VpnTunnel::Representation - - property :warning, as: 'warning', class: Google::Apis::ComputeV1::VpnTunnelsScopedList::Warning, decorator: Google::Apis::ComputeV1::VpnTunnelsScopedList::Warning::Representation - - end - - # @private - class Warning - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :data, as: 'data', class: Google::Apis::ComputeV1::VpnTunnelsScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::VpnTunnelsScopedList::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 Zone - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :deprecated, as: 'deprecated', class: Google::Apis::ComputeV1::DeprecationStatus, decorator: Google::Apis::ComputeV1::DeprecationStatus::Representation - - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - collection :maintenance_windows, as: 'maintenanceWindows', class: Google::Apis::ComputeV1::Zone::MaintenanceWindow, decorator: Google::Apis::ComputeV1::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::ComputeV1::Zone, decorator: Google::Apis::ComputeV1::Zone::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - end - end -end diff --git a/generated/google/apis/compute_v1/service.rb b/generated/google/apis/compute_v1/service.rb deleted file mode 100644 index 069ecbcbb..000000000 --- a/generated/google/apis/compute_v1/service.rb +++ /dev/null @@ -1,6352 +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 ComputeV1 - # Compute Engine API - # - # API for the Google Compute Engine service. - # - # @example - # require 'google/apis/compute_v1' - # - # Compute = Google::Apis::ComputeV1 # Alias the module - # service = Compute::ComputeService.new - # - # @see https://developers.google.com/compute/docs/reference/latest/ - class ComputeService < 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/', 'compute/v1/projects/') - end - - # Retrieves the list of addresses grouped by scope. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::AddressAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::AddressAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_addresses(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/addresses' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::AddressAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::AddressAggregatedList - 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 - - # Deletes the specified address resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] address - # Name of the address resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_address(project, region, address, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/addresses/{address}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['address'] = address unless address.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified address resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] address - # Name of the address resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Address] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Address] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_address(project, region, address, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/addresses/{address}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Address::Representation - command.response_class = Google::Apis::ComputeV1::Address - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['address'] = address unless address.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 an address resource in the specified project using the data included - # in the request. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [Google::Apis::ComputeV1::Address] address_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_address(project, region, address_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/addresses' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Address::Representation - command.request_object = address_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 address resources contained within the specified region. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::AddressList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::AddressList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_addresses(project, region, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/addresses' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::AddressList::Representation - command.response_class = Google::Apis::ComputeV1::AddressList - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 - - # Deletes the specified BackendService resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] backend_service - # Name of the BackendService resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_backend_service(project, backend_service, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/backendServices/{backendService}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['backendService'] = backend_service unless backend_service.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified BackendService resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] backend_service - # Name of the BackendService resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::BackendService] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::BackendService] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_backend_service(project, backend_service, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/backendServices/{backendService}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::BackendService::Representation - command.response_class = Google::Apis::ComputeV1::BackendService - command.params['project'] = project unless project.nil? - command.params['backendService'] = backend_service unless backend_service.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 most recent health check results for this BackendService. - # @param [String] project - # @param [String] backend_service - # Name of the BackendService resource to which the queried instance belongs. - # @param [Google::Apis::ComputeV1::ResourceGroupReference] resource_group_reference_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::BackendServiceGroupHealth] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::BackendServiceGroupHealth] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_backend_service_health(project, backend_service, resource_group_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/backendServices/{backendService}/getHealth' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::ResourceGroupReference::Representation - command.request_object = resource_group_reference_object - command.response_representation = Google::Apis::ComputeV1::BackendServiceGroupHealth::Representation - command.response_class = Google::Apis::ComputeV1::BackendServiceGroupHealth - command.params['project'] = project unless project.nil? - command.params['backendService'] = backend_service unless backend_service.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 BackendService resource in the specified project using the data - # included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [Google::Apis::ComputeV1::BackendService] backend_service_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_backend_service(project, backend_service_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/backendServices' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::BackendService::Representation - command.request_object = backend_service_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of BackendService resources available to the specified - # project. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::BackendServiceList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::BackendServiceList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_backend_services(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/backendServices' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::BackendServiceList::Representation - command.response_class = Google::Apis::ComputeV1::BackendServiceList - 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 - - # Update the entire content of the BackendService resource. This method supports - # patch semantics. - # @param [String] project - # Name of the project scoping this request. - # @param [String] backend_service - # Name of the BackendService resource to update. - # @param [Google::Apis::ComputeV1::BackendService] backend_service_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_backend_service(project, backend_service, backend_service_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/backendServices/{backendService}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ComputeV1::BackendService::Representation - command.request_object = backend_service_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['backendService'] = backend_service unless backend_service.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 BackendService resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] backend_service - # Name of the BackendService resource to update. - # @param [Google::Apis::ComputeV1::BackendService] backend_service_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_backend_service(project, backend_service, backend_service_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/backendServices/{backendService}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ComputeV1::BackendService::Representation - command.request_object = backend_service_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['backendService'] = backend_service unless backend_service.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 disk type resources grouped by scope. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::DiskTypeAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::DiskTypeAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_disk_types(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/diskTypes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::DiskTypeAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::DiskTypeAggregatedList - 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 - - # Returns the specified disk type resource. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] disk_type - # Name of the disk type resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::DiskType] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::DiskType] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_disk_type(project, zone, disk_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/diskTypes/{diskType}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::DiskType::Representation - command.response_class = Google::Apis::ComputeV1::DiskType - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['diskType'] = disk_type unless disk_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of disk type resources available to the specified project. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::DiskTypeList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::DiskTypeList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_disk_types(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}/diskTypes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::DiskTypeList::Representation - command.response_class = Google::Apis::ComputeV1::DiskTypeList - 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 - - # Retrieves the list of disks grouped by scope. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::DiskAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::DiskAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_disk(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/disks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::DiskAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::DiskAggregatedList - 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 - - # Creates a snapshot of this disk. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] disk - # Name of the persistent disk to snapshot. - # @param [Google::Apis::ComputeV1::Snapshot] snapshot_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_disk_snapshot(project, zone, disk, snapshot_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/disks/{disk}/createSnapshot' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Snapshot::Representation - command.request_object = snapshot_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['disk'] = disk unless disk.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 persistent disk. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] disk - # Name of the persistent disk to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_disk(project, zone, disk, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/disks/{disk}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['disk'] = disk unless disk.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a specified persistent disk. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] disk - # Name of the persistent disk to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Disk] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Disk] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_disk(project, zone, disk, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/disks/{disk}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Disk::Representation - command.response_class = Google::Apis::ComputeV1::Disk - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['disk'] = disk unless disk.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 persistent disk in the specified project using the data included in - # the request. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [Google::Apis::ComputeV1::Disk] disk_object - # @param [String] source_image - # Optional. Source image to restore onto a disk. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_disk(project, zone, disk_object = nil, source_image: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/disks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Disk::Representation - command.request_object = disk_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.query['sourceImage'] = source_image unless source_image.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 persistent disks contained within the specified zone. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::DiskList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::DiskList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_disks(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}/disks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::DiskList::Representation - command.response_class = Google::Apis::ComputeV1::DiskList - 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 - - # Deletes the specified firewall resource. - # @param [String] project - # Project ID for this request. - # @param [String] firewall - # Name of the firewall resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_firewall(project, firewall, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/firewalls/{firewall}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['firewall'] = firewall unless firewall.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified firewall resource. - # @param [String] project - # Project ID for this request. - # @param [String] firewall - # Name of the firewall resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Firewall] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Firewall] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_firewall(project, firewall, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/firewalls/{firewall}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Firewall::Representation - command.response_class = Google::Apis::ComputeV1::Firewall - command.params['project'] = project unless project.nil? - command.params['firewall'] = firewall unless firewall.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 firewall resource in the specified project using the data included - # in the request. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::Firewall] firewall_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_firewall(project, firewall_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/firewalls' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Firewall::Representation - command.request_object = firewall_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of firewall resources available to the specified project. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::FirewallList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::FirewallList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_firewalls(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/firewalls' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::FirewallList::Representation - command.response_class = Google::Apis::ComputeV1::FirewallList - 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 - - # Updates the specified firewall resource with the data included in the request. - # This method supports patch semantics. - # @param [String] project - # Project ID for this request. - # @param [String] firewall - # Name of the firewall resource to update. - # @param [Google::Apis::ComputeV1::Firewall] firewall_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_firewall(project, firewall, firewall_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/firewalls/{firewall}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ComputeV1::Firewall::Representation - command.request_object = firewall_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['firewall'] = firewall unless firewall.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the specified firewall resource with the data included in the request. - # @param [String] project - # Project ID for this request. - # @param [String] firewall - # Name of the firewall resource to update. - # @param [Google::Apis::ComputeV1::Firewall] firewall_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_firewall(project, firewall, firewall_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/firewalls/{firewall}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ComputeV1::Firewall::Representation - command.request_object = firewall_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['firewall'] = firewall unless firewall.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 forwarding rules grouped by scope. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::ForwardingRuleAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::ForwardingRuleAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_forwarding_rules(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/forwardingRules' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::ForwardingRuleAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::ForwardingRuleAggregatedList - 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 - - # Deletes the specified ForwardingRule resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] forwarding_rule - # Name of the ForwardingRule resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_forwarding_rule(project, region, forwarding_rule, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/forwardingRules/{forwardingRule}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified ForwardingRule resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] forwarding_rule - # Name of the ForwardingRule resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::ForwardingRule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::ForwardingRule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_forwarding_rule(project, region, forwarding_rule, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/forwardingRules/{forwardingRule}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::ForwardingRule::Representation - command.response_class = Google::Apis::ComputeV1::ForwardingRule - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.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 ForwardingRule resource in the specified project and region using - # the data included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [Google::Apis::ComputeV1::ForwardingRule] forwarding_rule_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_forwarding_rule(project, region, forwarding_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/forwardingRules' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::ForwardingRule::Representation - command.request_object = forwarding_rule_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 ForwardingRule resources available to the specified - # project and region. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::ForwardingRuleList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::ForwardingRuleList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_forwarding_rules(project, region, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/forwardingRules' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::ForwardingRuleList::Representation - command.response_class = Google::Apis::ComputeV1::ForwardingRuleList - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 - - # Changes target url for forwarding rule. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] forwarding_rule - # Name of the ForwardingRule resource in which target is to be set. - # @param [Google::Apis::ComputeV1::TargetReference] target_reference_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_forwarding_rule_target(project, region, forwarding_rule, target_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::TargetReference::Representation - command.request_object = target_reference_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.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 address resource. - # @param [String] project - # Project ID for this request. - # @param [String] address - # Name of the address resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_global_address(project, address, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/addresses/{address}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['address'] = address unless address.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified address resource. - # @param [String] project - # Project ID for this request. - # @param [String] address - # Name of the address resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Address] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Address] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_global_address(project, address, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/addresses/{address}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Address::Representation - command.response_class = Google::Apis::ComputeV1::Address - command.params['project'] = project unless project.nil? - command.params['address'] = address unless address.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 an address resource in the specified project using the data included - # in the request. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::Address] address_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_global_address(project, address_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/addresses' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Address::Representation - command.request_object = address_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of global address resources. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::AddressList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::AddressList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_global_addresses(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/addresses' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::AddressList::Representation - command.response_class = Google::Apis::ComputeV1::AddressList - 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 - - # Deletes the specified ForwardingRule resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] forwarding_rule - # Name of the ForwardingRule resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_global_forwarding_rule(project, forwarding_rule, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/forwardingRules/{forwardingRule}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified ForwardingRule resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] forwarding_rule - # Name of the ForwardingRule resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::ForwardingRule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::ForwardingRule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_global_forwarding_rule(project, forwarding_rule, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/forwardingRules/{forwardingRule}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::ForwardingRule::Representation - command.response_class = Google::Apis::ComputeV1::ForwardingRule - command.params['project'] = project unless project.nil? - command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.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 ForwardingRule resource in the specified project and region using - # the data included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [Google::Apis::ComputeV1::ForwardingRule] forwarding_rule_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_global_forwarding_rule(project, forwarding_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/forwardingRules' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::ForwardingRule::Representation - command.request_object = forwarding_rule_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of ForwardingRule resources available to the specified - # project. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::ForwardingRuleList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::ForwardingRuleList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_global_forwarding_rules(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/forwardingRules' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::ForwardingRuleList::Representation - command.response_class = Google::Apis::ComputeV1::ForwardingRuleList - 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 - - # Changes target url for forwarding rule. - # @param [String] project - # Name of the project scoping this request. - # @param [String] forwarding_rule - # Name of the ForwardingRule resource in which target is to be set. - # @param [Google::Apis::ComputeV1::TargetReference] target_reference_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_global_forwarding_rule_target(project, forwarding_rule, target_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/forwardingRules/{forwardingRule}/setTarget' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::TargetReference::Representation - command.request_object = target_reference_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['forwardingRule'] = forwarding_rule unless forwarding_rule.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of all operations grouped by scope. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::OperationAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::OperationAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_global_operation(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/operations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::OperationAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::OperationAggregatedList - 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 - - # Deletes the specified operation resource. - # @param [String] project - # Project ID for this request. - # @param [String] operation - # Name of the operation resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_global_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/operations/{operation}' - command = make_simple_command(:delete, path, options) - command.params['project'] = project unless project.nil? - command.params['operation'] = operation unless operation.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the specified operation resource. - # @param [String] project - # Project ID for this request. - # @param [String] operation - # Name of the operation resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_global_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/operations/{operation}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['operation'] = operation unless operation.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of operation resources contained within the specified - # project. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::OperationList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::OperationList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_global_operations(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/operations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::OperationList::Representation - command.response_class = Google::Apis::ComputeV1::OperationList - command.params['project'] = project unless project.nil? - command.query['filter'] = filter unless filter.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['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 - - # Deletes the specified HttpHealthCheck resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] http_health_check - # Name of the HttpHealthCheck resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_http_health_check(project, http_health_check, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/httpHealthChecks/{httpHealthCheck}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['httpHealthCheck'] = http_health_check unless http_health_check.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified HttpHealthCheck resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] http_health_check - # Name of the HttpHealthCheck resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::HttpHealthCheck] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::HttpHealthCheck] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_http_health_check(project, http_health_check, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/httpHealthChecks/{httpHealthCheck}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::HttpHealthCheck::Representation - command.response_class = Google::Apis::ComputeV1::HttpHealthCheck - command.params['project'] = project unless project.nil? - command.params['httpHealthCheck'] = http_health_check unless http_health_check.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 HttpHealthCheck resource in the specified project using the data - # included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [Google::Apis::ComputeV1::HttpHealthCheck] http_health_check_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_http_health_check(project, http_health_check_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/httpHealthChecks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::HttpHealthCheck::Representation - command.request_object = http_health_check_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of HttpHealthCheck resources available to the specified - # project. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::HttpHealthCheckList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::HttpHealthCheckList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_http_health_checks(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/httpHealthChecks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::HttpHealthCheckList::Representation - command.response_class = Google::Apis::ComputeV1::HttpHealthCheckList - 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 - - # Updates a HttpHealthCheck resource in the specified project using the data - # included in the request. This method supports patch semantics. - # @param [String] project - # Name of the project scoping this request. - # @param [String] http_health_check - # Name of the HttpHealthCheck resource to update. - # @param [Google::Apis::ComputeV1::HttpHealthCheck] http_health_check_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_http_health_check(project, http_health_check, http_health_check_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/httpHealthChecks/{httpHealthCheck}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ComputeV1::HttpHealthCheck::Representation - command.request_object = http_health_check_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['httpHealthCheck'] = http_health_check unless http_health_check.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 HttpHealthCheck resource in the specified project using the data - # included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [String] http_health_check - # Name of the HttpHealthCheck resource to update. - # @param [Google::Apis::ComputeV1::HttpHealthCheck] http_health_check_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_http_health_check(project, http_health_check, http_health_check_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/httpHealthChecks/{httpHealthCheck}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ComputeV1::HttpHealthCheck::Representation - command.request_object = http_health_check_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['httpHealthCheck'] = http_health_check unless http_health_check.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 image resource. - # @param [String] project - # Project ID for this request. - # @param [String] image - # Name of the image resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_image(project, image, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/images/{image}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['image'] = image unless image.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets the deprecation status of an image. - # If an empty request body is given, clears the deprecation status instead. - # @param [String] project - # Project ID for this request. - # @param [String] image - # Image name. - # @param [Google::Apis::ComputeV1::DeprecationStatus] deprecation_status_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def deprecate_image(project, image, deprecation_status_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/images/{image}/deprecate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::DeprecationStatus::Representation - command.request_object = deprecation_status_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['image'] = image unless image.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified image resource. - # @param [String] project - # Project ID for this request. - # @param [String] image - # Name of the image resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Image] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Image] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_image(project, image, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/images/{image}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Image::Representation - command.response_class = Google::Apis::ComputeV1::Image - command.params['project'] = project unless project.nil? - command.params['image'] = image unless image.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 an image resource in the specified project using the data included in - # the request. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::Image] image_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_image(project, image_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/images' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Image::Representation - command.request_object = image_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of image resources available to the specified project. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::ImageList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::ImageList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_images(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/images' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::ImageList::Representation - command.response_class = Google::Apis::ComputeV1::ImageList - 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 - - # Deletes the specified instance template. - # @param [String] project - # The project ID for this request. - # @param [String] instance_template - # The name of the instance template to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_instance_template(project, instance_template, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/instanceTemplates/{instanceTemplate}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['instanceTemplate'] = instance_template unless instance_template.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified instance template resource. - # @param [String] project - # The project ID for this request. - # @param [String] instance_template - # The name of the instance template. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::InstanceTemplate] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::InstanceTemplate] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instance_template(project, instance_template, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/instanceTemplates/{instanceTemplate}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::InstanceTemplate::Representation - command.response_class = Google::Apis::ComputeV1::InstanceTemplate - command.params['project'] = project unless project.nil? - command.params['instanceTemplate'] = instance_template unless instance_template.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 an instance template in the specified project using the data that is - # included in the request. - # @param [String] project - # The project ID for this request. - # @param [Google::Apis::ComputeV1::InstanceTemplate] instance_template_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_instance_template(project, instance_template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/instanceTemplates' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::InstanceTemplate::Representation - command.request_object = instance_template_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of instance templates that are contained within the specified - # project and zone. - # @param [String] project - # The project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::InstanceTemplateList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::InstanceTemplateList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instance_templates(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/instanceTemplates' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::InstanceTemplateList::Representation - command.response_class = Google::Apis::ComputeV1::InstanceTemplateList - 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 - - # Adds an access config to an instance's network interface. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # The instance name for this request. - # @param [Google::Apis::ComputeV1::AccessConfig] access_config_object - # @param [String] network_interface - # The name of the network interface to add to this instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_instance_access_config(project, zone, instance, access_config_object = nil, network_interface: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/addAccessConfig' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::AccessConfig::Representation - command.request_object = access_config_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['networkInterface'] = network_interface unless network_interface.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 - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::InstanceAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::InstanceAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/instances' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::InstanceAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::InstanceAggregatedList - 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 - - # Attaches a Disk resource to an instance. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Instance name. - # @param [Google::Apis::ComputeV1::AttachedDisk] attached_disk_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def attach_disk(project, zone, instance, attached_disk_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/attachDisk' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::AttachedDisk::Representation - command.request_object = attached_disk_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the specified Instance resource. For more information, see Shutting - # down an instance. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Name of the instance resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_instance(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an access config from an instance's network interface. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # The instance name for this request. - # @param [String] access_config - # The name of the access config to delete. - # @param [String] network_interface - # The name of the network interface. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_instance_access_config(project, zone, instance, access_config: nil, network_interface: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/deleteAccessConfig' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['accessConfig'] = access_config unless access_config.nil? - command.query['networkInterface'] = network_interface unless network_interface.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 - - # Detaches a disk from an instance. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Instance name. - # @param [String] device_name - # Disk device name to detach. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def detach_disk(project, zone, instance, device_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/detachDisk' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['deviceName'] = device_name unless device_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified instance resource. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the The name of the zone for this request.. - # @param [String] instance - # Name of the instance resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Instance] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Instance] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_instance(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Instance::Representation - command.response_class = Google::Apis::ComputeV1::Instance - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified instance's serial port output. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Name of the instance scoping this request. - # @param [Fixnum] port - # Which COM port to retrieve data from. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::SerialPortOutput] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::SerialPortOutput] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instance_serial_port_output(project, zone, instance, port: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/serialPort' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::SerialPortOutput::Representation - command.response_class = Google::Apis::ComputeV1::SerialPortOutput - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['port'] = port unless port.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 an instance resource in the specified project using the data included - # in the request. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [Google::Apis::ComputeV1::Instance] instance_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_instance(project, zone, instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Instance::Representation - command.request_object = instance_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['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 - - # Retrieves the list of instance resources contained within the specified zone. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::InstanceList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::InstanceList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instances(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}/instances' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::InstanceList::Representation - command.response_class = Google::Apis::ComputeV1::InstanceList - 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 - - # Performs a hard reset on the instance. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Name of the instance scoping this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reset_instance(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/reset' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets the auto-delete flag for a disk attached to an instance. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # The instance name. - # @param [Boolean] auto_delete - # Whether to auto-delete the disk when the instance is deleted. - # @param [String] device_name - # The device name of the disk to modify. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_disk_auto_delete(project, zone, instance, auto_delete: nil, device_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['autoDelete'] = auto_delete unless auto_delete.nil? - command.query['deviceName'] = device_name unless device_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets metadata for the specified instance to the data included in the request. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Name of the instance scoping this request. - # @param [Google::Apis::ComputeV1::Metadata] metadata_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_instance_metadata(project, zone, instance, metadata_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/setMetadata' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Metadata::Representation - command.request_object = metadata_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets an instance's scheduling options. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Instance name. - # @param [Google::Apis::ComputeV1::Scheduling] scheduling_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_instance_scheduling(project, zone, instance, scheduling_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/setScheduling' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Scheduling::Representation - command.request_object = scheduling_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets tags for the specified instance to the data included in the request. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Name of the instance scoping this request. - # @param [Google::Apis::ComputeV1::Tags] tags_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_instance_tags(project, zone, instance, tags_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/setTags' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Tags::Representation - command.request_object = tags_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # This method starts an instance that was stopped using the using the instances() - # .stop method. For more information, see Restart an instance. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Name of the instance resource to start. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def start_instance(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/start' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # This method stops a running instance, shutting it down cleanly, and allows you - # to restart the instance at a later time. Stopped instances do not incur per- - # minute, virtual machine usage charges while they are stopped, but any - # resources that the virtual machine is using, such as persistent disks and - # static IP addresses,will continue to be charged until they are deleted. For - # more information, see Stopping an instance. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] instance - # Name of the instance resource to stop. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def stop_instance(project, zone, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instances/{instance}/stop' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified license resource. - # @param [String] project - # Project ID for this request. - # @param [String] license - # Name of the license resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::License] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::License] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_license(project, license, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/licenses/{license}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::License::Representation - command.response_class = Google::Apis::ComputeV1::License - command.params['project'] = project unless project.nil? - command.params['license'] = license unless license.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 machine type resources grouped by scope. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::MachineTypeAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::MachineTypeAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_machine_types(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/machineTypes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::MachineTypeAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::MachineTypeAggregatedList - 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 - - # Returns the specified machine type resource. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] machine_type - # Name of the machine type resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::MachineType] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::MachineType] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_machine_type(project, zone, machine_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/machineTypes/{machineType}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::MachineType::Representation - command.response_class = Google::Apis::ComputeV1::MachineType - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['machineType'] = machine_type unless machine_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of machine type resources available to the specified - # project. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # The name of the zone for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::MachineTypeList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::MachineTypeList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_machine_types(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}/machineTypes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::MachineTypeList::Representation - command.response_class = Google::Apis::ComputeV1::MachineTypeList - 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 - - # Deletes the specified network resource. - # @param [String] project - # Project ID for this request. - # @param [String] network - # Name of the network resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_network(project, network, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/networks/{network}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['network'] = network unless network.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified network resource. - # @param [String] project - # Project ID for this request. - # @param [String] network - # Name of the network resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Network] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Network] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_network(project, network, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/networks/{network}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Network::Representation - command.response_class = Google::Apis::ComputeV1::Network - command.params['project'] = project unless project.nil? - command.params['network'] = network unless network.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 network resource in the specified project using the data included in - # the request. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::Network] network_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_network(project, network_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/networks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Network::Representation - command.request_object = network_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of network resources available to the specified project. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::NetworkList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::NetworkList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_networks(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/networks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::NetworkList::Representation - command.response_class = Google::Apis::ComputeV1::NetworkList - 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 - - # Returns the specified project resource. - # @param [String] project - # Project ID for this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::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, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Project::Representation - command.response_class = Google::Apis::ComputeV1::Project - 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 - - # Moves a persistent disk from one zone to another. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::MoveDiskRequest] move_disk_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::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def move_disk(project, move_disk_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/moveDisk' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::MoveDiskRequest::Representation - command.request_object = move_disk_request_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Moves an instance and its attached persistent disks from one zone to another. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::MoveInstanceRequest] move_instance_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def move_instance(project, move_instance_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/moveInstance' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::MoveInstanceRequest::Representation - command.request_object = move_instance_request_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets metadata common to all instances within the specified project using the - # data included in the request. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::Metadata] metadata_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_common_instance_metadata(project, metadata_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/setCommonInstanceMetadata' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Metadata::Representation - command.request_object = metadata_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Enables the usage export feature and sets the usage export bucket where - # reports are stored. If you provide an empty request body using this method, - # the usage export feature will be disabled. - # @param [String] project - # Project ID for this request. - # @param [Google::Apis::ComputeV1::UsageExportLocation] usage_export_location_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_usage_export_bucket(project, usage_export_location_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/setUsageExportBucket' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::UsageExportLocation::Representation - command.request_object = usage_export_location_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the specified region-specific operation resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] operation - # Name of the operation resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_region_operation(project, region, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/operations/{operation}' - command = make_simple_command(:delete, path, options) - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 region-specific operation resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # Name of the zone scoping this request. - # @param [String] operation - # Name of the operation resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_region_operation(project, region, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/operations/{operation}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 - # region. - # @param [String] project - # Project ID for this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::OperationList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::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_region_operations(project, region, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/operations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::OperationList::Representation - command.response_class = Google::Apis::ComputeV1::OperationList - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 - - # Returns the specified region resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # Name of the region resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Region] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Region] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_region(project, region, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Region::Representation - command.response_class = Google::Apis::ComputeV1::Region - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 region resources available to the specified project. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::RegionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::RegionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_regions(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::RegionList::Representation - command.response_class = Google::Apis::ComputeV1::RegionList - 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 - - # Deletes the specified route resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] route - # Name of the route resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_route(project, route, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/routes/{route}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['route'] = route unless route.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified route resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] route - # Name of the route resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Route] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Route] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_route(project, route, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/routes/{route}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Route::Representation - command.response_class = Google::Apis::ComputeV1::Route - command.params['project'] = project unless project.nil? - command.params['route'] = route unless route.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 route resource in the specified project using the data included in - # the request. - # @param [String] project - # Name of the project scoping this request. - # @param [Google::Apis::ComputeV1::Route] route_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_route(project, route_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/routes' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::Route::Representation - command.request_object = route_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of route resources available to the specified project. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::RouteList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::RouteList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_routes(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/routes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::RouteList::Representation - command.response_class = Google::Apis::ComputeV1::RouteList - 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 - - # Deletes the specified persistent disk snapshot resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] snapshot - # Name of the persistent disk snapshot resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_snapshot(project, snapshot, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/snapshots/{snapshot}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['snapshot'] = snapshot unless snapshot.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified persistent disk snapshot resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] snapshot - # Name of the persistent disk snapshot resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Snapshot] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Snapshot] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_snapshot(project, snapshot, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/snapshots/{snapshot}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Snapshot::Representation - command.response_class = Google::Apis::ComputeV1::Snapshot - command.params['project'] = project unless project.nil? - command.params['snapshot'] = snapshot unless snapshot.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 persistent disk snapshot resources contained within the - # specified project. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::SnapshotList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::SnapshotList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_snapshots(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/snapshots' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::SnapshotList::Representation - command.response_class = Google::Apis::ComputeV1::SnapshotList - 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 - - # Deletes the specified TargetHttpProxy resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] target_http_proxy - # Name of the TargetHttpProxy resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_target_http_proxy(project, target_http_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/targetHttpProxies/{targetHttpProxy}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified TargetHttpProxy resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] target_http_proxy - # Name of the TargetHttpProxy resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetHttpProxy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetHttpProxy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_http_proxy(project, target_http_proxy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/targetHttpProxies/{targetHttpProxy}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetHttpProxy::Representation - command.response_class = Google::Apis::ComputeV1::TargetHttpProxy - command.params['project'] = project unless project.nil? - command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.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 TargetHttpProxy resource in the specified project using the data - # included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [Google::Apis::ComputeV1::TargetHttpProxy] target_http_proxy_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_target_http_proxy(project, target_http_proxy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/targetHttpProxies' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::TargetHttpProxy::Representation - command.request_object = target_http_proxy_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of TargetHttpProxy resources available to the specified - # project. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetHttpProxyList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetHttpProxyList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_http_proxies(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/targetHttpProxies' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetHttpProxyList::Representation - command.response_class = Google::Apis::ComputeV1::TargetHttpProxyList - 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 - - # Changes the URL map for TargetHttpProxy. - # @param [String] project - # Name of the project scoping this request. - # @param [String] target_http_proxy - # Name of the TargetHttpProxy resource whose URL map is to be set. - # @param [Google::Apis::ComputeV1::UrlMapReference] url_map_reference_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_target_http_proxy_url_map(project, target_http_proxy, url_map_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::UrlMapReference::Representation - command.request_object = url_map_reference_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['targetHttpProxy'] = target_http_proxy unless target_http_proxy.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 target instances grouped by scope. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetInstanceAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetInstanceAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_target_instance(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/targetInstances' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetInstanceAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::TargetInstanceAggregatedList - 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 - - # Deletes the specified TargetInstance resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] target_instance - # Name of the TargetInstance resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_target_instance(project, zone, target_instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/targetInstances/{targetInstance}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['targetInstance'] = target_instance unless target_instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified TargetInstance resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] target_instance - # Name of the TargetInstance resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetInstance] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetInstance] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_instance(project, zone, target_instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/targetInstances/{targetInstance}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetInstance::Representation - command.response_class = Google::Apis::ComputeV1::TargetInstance - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['targetInstance'] = target_instance unless target_instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a TargetInstance resource in the specified project and zone using the - # data included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [Google::Apis::ComputeV1::TargetInstance] target_instance_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_target_instance(project, zone, target_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/targetInstances' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::TargetInstance::Representation - command.request_object = target_instance_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['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 - - # Retrieves the list of TargetInstance resources available to the specified - # project and zone. - # @param [String] project - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetInstanceList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetInstanceList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_instances(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}/targetInstances' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetInstanceList::Representation - command.response_class = Google::Apis::ComputeV1::TargetInstanceList - 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 - - # Adds health check URL to targetPool. - # @param [String] project - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource to which health_check_url is to be added. - # @param [Google::Apis::ComputeV1::AddTargetPoolsHealthCheckRequest] add_target_pools_health_check_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::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_target_pool_health_check(project, region, target_pool, add_target_pools_health_check_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::AddTargetPoolsHealthCheckRequest::Representation - command.request_object = add_target_pools_health_check_request_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.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 instance url to targetPool. - # @param [String] project - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource to which instance_url is to be added. - # @param [Google::Apis::ComputeV1::AddTargetPoolsInstanceRequest] add_target_pools_instance_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_target_pool_instance(project, region, target_pool, add_target_pools_instance_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}/addInstance' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::AddTargetPoolsInstanceRequest::Representation - command.request_object = add_target_pools_instance_request_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.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 target pools grouped by scope. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetPoolAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetPoolAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_target_pools(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/targetPools' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetPoolAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::TargetPoolAggregatedList - 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 - - # Deletes the specified TargetPool resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_target_pool(project, region, target_pool, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified TargetPool resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetPool] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetPool] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_pool(project, region, target_pool, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetPool::Representation - command.response_class = Google::Apis::ComputeV1::TargetPool - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.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 most recent health check results for each IP for the given instance - # that is referenced by given TargetPool. - # @param [String] project - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource to which the queried instance belongs. - # @param [Google::Apis::ComputeV1::InstanceReference] instance_reference_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetPoolInstanceHealth] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetPoolInstanceHealth] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_pool_health(project, region, target_pool, instance_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}/getHealth' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::InstanceReference::Representation - command.request_object = instance_reference_object - command.response_representation = Google::Apis::ComputeV1::TargetPoolInstanceHealth::Representation - command.response_class = Google::Apis::ComputeV1::TargetPoolInstanceHealth - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.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 TargetPool resource in the specified project and region using the - # data included in the request. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [Google::Apis::ComputeV1::TargetPool] target_pool_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_target_pool(project, region, target_pool_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::TargetPool::Representation - command.request_object = target_pool_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 TargetPool resources available to the specified project - # and region. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetPoolList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetPoolList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_pools(project, region, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetPoolList::Representation - command.response_class = Google::Apis::ComputeV1::TargetPoolList - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 - - # Removes health check URL from targetPool. - # @param [String] project - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource to which health_check_url is to be removed. - # @param [Google::Apis::ComputeV1::RemoveTargetPoolsHealthCheckRequest] remove_target_pools_health_check_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::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def remove_target_pool_health_check(project, region, target_pool, remove_target_pools_health_check_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::RemoveTargetPoolsHealthCheckRequest::Representation - command.request_object = remove_target_pools_health_check_request_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes instance URL from targetPool. - # @param [String] project - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource to which instance_url is to be removed. - # @param [Google::Apis::ComputeV1::RemoveTargetPoolsInstanceRequest] remove_target_pools_instance_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def remove_target_pool_instance(project, region, target_pool, remove_target_pools_instance_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}/removeInstance' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::RemoveTargetPoolsInstanceRequest::Representation - command.request_object = remove_target_pools_instance_request_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Changes backup pool configurations. - # @param [String] project - # Name of the project scoping this request. - # @param [String] region - # Name of the region scoping this request. - # @param [String] target_pool - # Name of the TargetPool resource for which the backup is to be set. - # @param [Google::Apis::ComputeV1::TargetReference] target_reference_object - # @param [Float] failover_ratio - # New failoverRatio value for the containing target pool. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_target_pool_backup(project, region, target_pool, target_reference_object = nil, failover_ratio: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetPools/{targetPool}/setBackup' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::TargetReference::Representation - command.request_object = target_reference_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetPool'] = target_pool unless target_pool.nil? - command.query['failoverRatio'] = failover_ratio unless failover_ratio.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 target VPN gateways grouped by scope. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetVpnGatewayAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetVpnGatewayAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_target_vpn_gateways(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/targetVpnGateways' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetVpnGatewayAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::TargetVpnGatewayAggregatedList - 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 - - # Deletes the specified TargetVpnGateway resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] target_vpn_gateway - # Name of the TargetVpnGateway resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_target_vpn_gateway(project, region, target_vpn_gateway, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetVpnGateway'] = target_vpn_gateway unless target_vpn_gateway.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified TargetVpnGateway resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] target_vpn_gateway - # Name of the TargetVpnGateway resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetVpnGateway] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetVpnGateway] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_vpn_gateway(project, region, target_vpn_gateway, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetVpnGateway::Representation - command.response_class = Google::Apis::ComputeV1::TargetVpnGateway - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['targetVpnGateway'] = target_vpn_gateway unless target_vpn_gateway.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 TargetVpnGateway resource in the specified project and region using - # the data included in the request. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [Google::Apis::ComputeV1::TargetVpnGateway] target_vpn_gateway_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_target_vpn_gateway(project, region, target_vpn_gateway_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetVpnGateways' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::TargetVpnGateway::Representation - command.request_object = target_vpn_gateway_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 TargetVpnGateway resources available to the specified - # project and region. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::TargetVpnGatewayList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::TargetVpnGatewayList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_target_vpn_gateways(project, region, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/targetVpnGateways' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::TargetVpnGatewayList::Representation - command.response_class = Google::Apis::ComputeV1::TargetVpnGatewayList - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 - - # Deletes the specified UrlMap resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] url_map - # Name of the UrlMap resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_url_map(project, url_map, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/urlMaps/{urlMap}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['urlMap'] = url_map unless url_map.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified UrlMap resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] url_map - # Name of the UrlMap resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::UrlMap] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::UrlMap] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_url_map(project, url_map, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/urlMaps/{urlMap}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::UrlMap::Representation - command.response_class = Google::Apis::ComputeV1::UrlMap - command.params['project'] = project unless project.nil? - command.params['urlMap'] = url_map unless url_map.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 UrlMap resource in the specified project using the data included in - # the request. - # @param [String] project - # Name of the project scoping this request. - # @param [Google::Apis::ComputeV1::UrlMap] url_map_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_url_map(project, url_map_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/urlMaps' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::UrlMap::Representation - command.request_object = url_map_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of UrlMap resources available to the specified project. - # @param [String] project - # Name of the project scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::UrlMapList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::UrlMapList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_url_maps(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/urlMaps' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::UrlMapList::Representation - command.response_class = Google::Apis::ComputeV1::UrlMapList - 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 - - # Update the entire content of the UrlMap resource. This method supports patch - # semantics. - # @param [String] project - # Name of the project scoping this request. - # @param [String] url_map - # Name of the UrlMap resource to update. - # @param [Google::Apis::ComputeV1::UrlMap] url_map_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_url_map(project, url_map, url_map_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/urlMaps/{urlMap}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ComputeV1::UrlMap::Representation - command.request_object = url_map_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['urlMap'] = url_map unless url_map.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 UrlMap resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] url_map - # Name of the UrlMap resource to update. - # @param [Google::Apis::ComputeV1::UrlMap] url_map_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_url_map(project, url_map, url_map_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/urlMaps/{urlMap}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ComputeV1::UrlMap::Representation - command.request_object = url_map_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['urlMap'] = url_map unless url_map.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 - - # Run static validation for the UrlMap. In particular, the tests of the provided - # UrlMap will be run. Calling this method does NOT create the UrlMap. - # @param [String] project - # Name of the project scoping this request. - # @param [String] url_map - # Name of the UrlMap resource to be validated as. - # @param [Google::Apis::ComputeV1::ValidateUrlMapsRequest] validate_url_maps_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::ComputeV1::ValidateUrlMapsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::ValidateUrlMapsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def validate_url_map(project, url_map, validate_url_maps_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/urlMaps/{urlMap}/validate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::ValidateUrlMapsRequest::Representation - command.request_object = validate_url_maps_request_object - command.response_representation = Google::Apis::ComputeV1::ValidateUrlMapsResponse::Representation - command.response_class = Google::Apis::ComputeV1::ValidateUrlMapsResponse - command.params['project'] = project unless project.nil? - command.params['urlMap'] = url_map unless url_map.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 VPN tunnels grouped by scope. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::VpnTunnelAggregatedList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::VpnTunnelAggregatedList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_aggregated_vpn_tunnel(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/aggregated/vpnTunnels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::VpnTunnelAggregatedList::Representation - command.response_class = Google::Apis::ComputeV1::VpnTunnelAggregatedList - 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 - - # Deletes the specified VpnTunnel resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] vpn_tunnel - # Name of the VpnTunnel resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_vpn_tunnel(project, region, vpn_tunnel, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/vpnTunnels/{vpnTunnel}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['vpnTunnel'] = vpn_tunnel unless vpn_tunnel.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified VpnTunnel resource. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] vpn_tunnel - # Name of the VpnTunnel resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::VpnTunnel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::VpnTunnel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_vpn_tunnel(project, region, vpn_tunnel, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/vpnTunnels/{vpnTunnel}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::VpnTunnel::Representation - command.response_class = Google::Apis::ComputeV1::VpnTunnel - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.nil? - command.params['vpnTunnel'] = vpn_tunnel unless vpn_tunnel.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 VpnTunnel resource in the specified project and region using the - # data included in the request. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [Google::Apis::ComputeV1::VpnTunnel] vpn_tunnel_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_vpn_tunnel(project, region, vpn_tunnel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/vpnTunnels' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ComputeV1::VpnTunnel::Representation - command.request_object = vpn_tunnel_object - command.response_representation = Google::Apis::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::Operation - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 VpnTunnel resources contained in the specified project - # and region. - # @param [String] project - # Project ID for this request. - # @param [String] region - # The name of the region for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::VpnTunnelList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::VpnTunnelList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_vpn_tunnels(project, region, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/regions/{region}/vpnTunnels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::VpnTunnelList::Representation - command.response_class = Google::Apis::ComputeV1::VpnTunnelList - command.params['project'] = project unless project.nil? - command.params['region'] = region unless region.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 - - # Deletes the specified zone-specific operation resource. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] operation - # Name of the operation resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_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 - # Project ID for this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] operation - # Name of the operation resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def 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::ComputeV1::Operation::Representation - command.response_class = Google::Apis::ComputeV1::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 - # Project ID for this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::OperationList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::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::ComputeV1::OperationList::Representation - command.response_class = Google::Apis::ComputeV1::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 - - # Returns the specified zone resource. - # @param [String] project - # Project ID for this request. - # @param [String] zone - # Name of the zone resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::Zone] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::Zone] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(project, zone, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ComputeV1::Zone::Representation - command.response_class = Google::Apis::ComputeV1::Zone - 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 - - # Retrieves the list of zone resources available to the specified project. - # @param [String] project - # Project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ComputeV1::ZoneList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ComputeV1::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::ComputeV1::ZoneList::Representation - command.response_class = Google::Apis::ComputeV1::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 diff --git a/generated/google/apis/container_v1beta1.rb b/generated/google/apis/container_v1beta1.rb deleted file mode 100644 index 8b54217c6..000000000 --- a/generated/google/apis/container_v1beta1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/container_v1beta1/classes.rb b/generated/google/apis/container_v1beta1/classes.rb deleted file mode 100644 index 2af32b048..000000000 --- a/generated/google/apis/container_v1beta1/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - 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] - 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] - 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] - 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 diff --git a/generated/google/apis/container_v1beta1/representations.rb b/generated/google/apis/container_v1beta1/representations.rb deleted file mode 100644 index 1b2e3cee9..000000000 --- a/generated/google/apis/container_v1beta1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/container_v1beta1/service.rb b/generated/google/apis/container_v1beta1/service.rb deleted file mode 100644 index 0b32e3c92..000000000 --- a/generated/google/apis/container_v1beta1/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/content_v2.rb b/generated/google/apis/content_v2.rb deleted file mode 100644 index a6b0e9fbd..000000000 --- a/generated/google/apis/content_v2.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/content_v2/classes.rb b/generated/google/apis/content_v2/classes.rb deleted file mode 100644 index 0c0fbfebb..000000000 --- a/generated/google/apis/content_v2/classes.rb +++ /dev/null @@ -1,3780 +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 ContentV2 - - # Account data. - class Account - include Google::Apis::Core::Hashable - - # Indicates whether the merchant sells adult content. - # Corresponds to the JSON property `adultContent` - # @return [Boolean] - attr_accessor :adult_content - alias_method :adult_content?, :adult_content - - # List of linked AdWords accounts, active or pending approval. To create a new - # link request, add a new link with status active to the list. It will remain is - # state pending until approved or rejected in the AdWords interface. To delete - # an active link or to cancel a link request, remove it from the list. - # Corresponds to the JSON property `adwordsLinks` - # @return [Array] - attr_accessor :adwords_links - - # Merchant Center account ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "content# - # account". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Display name for the account. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL for individual seller reviews, i.e., reviews for each child account. - # Corresponds to the JSON property `reviewsUrl` - # @return [String] - attr_accessor :reviews_url - - # Client-specific, locally-unique, internal ID for the child account. - # Corresponds to the JSON property `sellerId` - # @return [String] - attr_accessor :seller_id - - # Users with access to the account. Every account (except for subaccounts) must - # have at least one admin user. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - # The merchant's 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) - @adult_content = args[:adult_content] unless args[:adult_content].nil? - @adwords_links = args[:adwords_links] unless args[:adwords_links].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @reviews_url = args[:reviews_url] unless args[:reviews_url].nil? - @seller_id = args[:seller_id] unless args[:seller_id].nil? - @users = args[:users] unless args[:users].nil? - @website_url = args[:website_url] unless args[:website_url].nil? - end - end - - # - class AccountAdwordsLink - include Google::Apis::Core::Hashable - - # Customer ID of the AdWords account. - # Corresponds to the JSON property `adwordsId` - # @return [String] - attr_accessor :adwords_id - - # Status of the link between this Merchant Center account and the AdWords - # account. Upon retrieval, it represents the actual status of the link and can - # be either active if it was approved in Google AdWords or pending if it's - # pending approval. Upon insertion, it represents the intended status of the - # link. Re-uploading a link with status active when it's still pending or with - # status pending when it's already active will have no effect: the status will - # remain unchanged. Re-uploading a link with deprecated status inactive is - # equivalent to not submitting the link at all and will delete the link if it - # was active or cancel the link request if it was pending. - # 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) - @adwords_id = args[:adwords_id] unless args[:adwords_id].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class AccountIdentifier - include Google::Apis::Core::Hashable - - # The aggregator ID, set for aggregators and subaccounts (in that case, it - # represents the aggregator of the subaccount). - # Corresponds to the JSON property `aggregatorId` - # @return [String] - attr_accessor :aggregator_id - - # The merchant account ID, set for individual accounts and subaccounts. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aggregator_id = args[:aggregator_id] unless args[:aggregator_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - end - end - - # The shipping settings of a merchant account. - class AccountShipping - include Google::Apis::Core::Hashable - - # The ID of the account to which these account shipping settings belong. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Carrier-based shipping calculations. - # Corresponds to the JSON property `carrierRates` - # @return [Array] - attr_accessor :carrier_rates - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountShipping". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Location groups for shipping. - # Corresponds to the JSON property `locationGroups` - # @return [Array] - attr_accessor :location_groups - - # Rate tables definitions. - # Corresponds to the JSON property `rateTables` - # @return [Array] - attr_accessor :rate_tables - - # Shipping services describing shipping fees calculation. - # Corresponds to the JSON property `services` - # @return [Array] - attr_accessor :services - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @carrier_rates = args[:carrier_rates] unless args[:carrier_rates].nil? - @kind = args[:kind] unless args[:kind].nil? - @location_groups = args[:location_groups] unless args[:location_groups].nil? - @rate_tables = args[:rate_tables] unless args[:rate_tables].nil? - @services = args[:services] unless args[:services].nil? - end - end - - # A carrier-calculated shipping rate. - class AccountShippingCarrierRate - include Google::Apis::Core::Hashable - - # The carrier that is responsible for the shipping, such as "UPS", "FedEx", or " - # USPS". - # Corresponds to the JSON property `carrier` - # @return [String] - attr_accessor :carrier - - # The carrier service, such as "Ground" or "2Day". - # Corresponds to the JSON property `carrierService` - # @return [String] - attr_accessor :carrier_service - - # Additive shipping rate modifier. - # Corresponds to the JSON property `modifierFlatRate` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :modifier_flat_rate - - # Multiplicative shipping rate modifier in percent. Represented as a floating - # point number without the percentage character. - # Corresponds to the JSON property `modifierPercent` - # @return [String] - attr_accessor :modifier_percent - - # The name of the carrier rate. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Sale country for which this carrier rate is valid, represented as an ISO 3166- - # 1 Alpha-2 code. - # Corresponds to the JSON property `saleCountry` - # @return [String] - attr_accessor :sale_country - - # Shipping origin represented as a postal code. - # Corresponds to the JSON property `shippingOrigin` - # @return [String] - attr_accessor :shipping_origin - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @carrier = args[:carrier] unless args[:carrier].nil? - @carrier_service = args[:carrier_service] unless args[:carrier_service].nil? - @modifier_flat_rate = args[:modifier_flat_rate] unless args[:modifier_flat_rate].nil? - @modifier_percent = args[:modifier_percent] unless args[:modifier_percent].nil? - @name = args[:name] unless args[:name].nil? - @sale_country = args[:sale_country] unless args[:sale_country].nil? - @shipping_origin = args[:shipping_origin] unless args[:shipping_origin].nil? - end - end - - # - class AccountShippingCondition - include Google::Apis::Core::Hashable - - # Delivery location in terms of a location group name. A location group with - # this name must be specified among location groups. - # Corresponds to the JSON property `deliveryLocationGroup` - # @return [String] - attr_accessor :delivery_location_group - - # Delivery location in terms of a location ID. Can be used to represent - # administrative areas, smaller country subdivisions, or cities. - # Corresponds to the JSON property `deliveryLocationId` - # @return [String] - attr_accessor :delivery_location_id - - # Delivery location in terms of a postal code. - # Corresponds to the JSON property `deliveryPostalCode` - # @return [String] - attr_accessor :delivery_postal_code - - # A postal code range, that can be either: - # - A range of postal codes (e.g., start=12340, end=12359) - # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes - # must be of the same length (e.g., start=12* end=2* is invalid). - # Corresponds to the JSON property `deliveryPostalCodeRange` - # @return [Google::Apis::ContentV2::AccountShippingPostalCodeRange] - attr_accessor :delivery_postal_code_range - - # Maximum shipping price. Forms an interval between the maximum of smaller - # prices (exclusive) and this price (inclusive). - # Corresponds to the JSON property `priceMax` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :price_max - - # Shipping label of the product. The products with the label are matched. - # Corresponds to the JSON property `shippingLabel` - # @return [String] - attr_accessor :shipping_label - - # Maximum shipping weight. Forms an interval between the maximum of smaller - # weight (exclusive) and this weight (inclusive). - # Corresponds to the JSON property `weightMax` - # @return [Google::Apis::ContentV2::Weight] - attr_accessor :weight_max - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @delivery_location_group = args[:delivery_location_group] unless args[:delivery_location_group].nil? - @delivery_location_id = args[:delivery_location_id] unless args[:delivery_location_id].nil? - @delivery_postal_code = args[:delivery_postal_code] unless args[:delivery_postal_code].nil? - @delivery_postal_code_range = args[:delivery_postal_code_range] unless args[:delivery_postal_code_range].nil? - @price_max = args[:price_max] unless args[:price_max].nil? - @shipping_label = args[:shipping_label] unless args[:shipping_label].nil? - @weight_max = args[:weight_max] unless args[:weight_max].nil? - end - end - - # A user-defined locations group in a given country. All the locations of the - # group must be of the same type. - class AccountShippingLocationGroup - include Google::Apis::Core::Hashable - - # The country in which this location group is, represented as ISO 3166-1 Alpha-2 - # code. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # A location ID (also called criteria ID) representing administrative areas, - # smaller country subdivisions (counties), or cities. - # Corresponds to the JSON property `locationIds` - # @return [Array] - attr_accessor :location_ids - - # The name of the location group. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A postal code range representing a city or a set of cities. - # Corresponds to the JSON property `postalCodeRanges` - # @return [Array] - attr_accessor :postal_code_ranges - - # A postal code representing a city or a set of cities. - # - A single postal code (e.g., 12345) - # - A postal code prefix followed by a star (e.g., 1234*) - # Corresponds to the JSON property `postalCodes` - # @return [Array] - attr_accessor :postal_codes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @location_ids = args[:location_ids] unless args[:location_ids].nil? - @name = args[:name] unless args[:name].nil? - @postal_code_ranges = args[:postal_code_ranges] unless args[:postal_code_ranges].nil? - @postal_codes = args[:postal_codes] unless args[:postal_codes].nil? - end - end - - # A postal code range, that can be either: - # - A range of postal codes (e.g., start=12340, end=12359) - # - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes - # must be of the same length (e.g., start=12* end=2* is invalid). - class AccountShippingPostalCodeRange - include Google::Apis::Core::Hashable - - # The last (inclusive) postal code or prefix of the range. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The first (inclusive) postal code or prefix of the range. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # A single or bi-dimensional table of shipping rates. Each dimension is defined - # in terms of consecutive price/weight ranges, delivery locations, or shipping - # labels. - class AccountShippingRateTable - include Google::Apis::Core::Hashable - - # One-dimensional table cells define one condition along the same dimension. Bi- - # dimensional table cells use two dimensions with respectively M and N distinct - # values and must contain exactly M * N cells with distinct conditions (for each - # possible value pairs). - # Corresponds to the JSON property `content` - # @return [Array] - attr_accessor :content - - # The name of the rate table. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Sale country for which this table is valid, represented as an ISO 3166-1 Alpha- - # 2 code. - # Corresponds to the JSON property `saleCountry` - # @return [String] - attr_accessor :sale_country - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content = args[:content] unless args[:content].nil? - @name = args[:name] unless args[:name].nil? - @sale_country = args[:sale_country] unless args[:sale_country].nil? - end - end - - # - class AccountShippingRateTableCell - include Google::Apis::Core::Hashable - - # Conditions for which the cell is valid. All cells in a table must use the same - # dimension or pair of dimensions among price, weight, shipping label or - # delivery location. If no condition is specified, the cell acts as a catch-all - # and matches all the elements that are not matched by other cells in this - # dimension. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::ContentV2::AccountShippingCondition] - attr_accessor :condition - - # The rate applicable if the cell conditions are matched. - # Corresponds to the JSON property `rate` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :rate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] unless args[:condition].nil? - @rate = args[:rate] unless args[:rate].nil? - end - end - - # Shipping services provided in a country. - class AccountShippingShippingService - include Google::Apis::Core::Hashable - - # Whether the shipping service is available. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Shipping cost calculation method. Exactly one of the field is set. - # Corresponds to the JSON property `calculationMethod` - # @return [Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod] - attr_accessor :calculation_method - - # Building block of the cost calculation decision tree. - # - The tree root should have no condition and no calculation method. - # - All the children must have a condition on the same dimension. The first - # child matching a condition is entered, therefore, price and weight conditions - # form contiguous intervals. - # - The last child of an element must have no condition and matches all elements - # not previously matched. - # - Children and calculation method are mutually exclusive, and exactly one of - # them must be defined; the root must only have children. - # Corresponds to the JSON property `costRuleTree` - # @return [Google::Apis::ContentV2::AccountShippingShippingServiceCostRule] - attr_accessor :cost_rule_tree - - # The name of this shipping service. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Sale country for which this service can be used, represented as an ISO 3166-1 - # Alpha-2 code. - # Corresponds to the JSON property `saleCountry` - # @return [String] - attr_accessor :sale_country - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active = args[:active] unless args[:active].nil? - @calculation_method = args[:calculation_method] unless args[:calculation_method].nil? - @cost_rule_tree = args[:cost_rule_tree] unless args[:cost_rule_tree].nil? - @name = args[:name] unless args[:name].nil? - @sale_country = args[:sale_country] unless args[:sale_country].nil? - end - end - - # Shipping cost calculation method. Exactly one of the field is set. - class AccountShippingShippingServiceCalculationMethod - include Google::Apis::Core::Hashable - - # Name of the carrier rate to use for the calculation. - # Corresponds to the JSON property `carrierRate` - # @return [String] - attr_accessor :carrier_rate - - # Delivery is excluded. Valid only within cost rules tree. - # Corresponds to the JSON property `excluded` - # @return [Boolean] - attr_accessor :excluded - alias_method :excluded?, :excluded - - # Fixed price shipping, represented as a floating point number associated with a - # currency. - # Corresponds to the JSON property `flatRate` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :flat_rate - - # Percentage of the price, represented as a floating point number without the - # percentage character. - # Corresponds to the JSON property `percentageRate` - # @return [String] - attr_accessor :percentage_rate - - # Name of the rate table to use for the calculation. - # Corresponds to the JSON property `rateTable` - # @return [String] - attr_accessor :rate_table - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @carrier_rate = args[:carrier_rate] unless args[:carrier_rate].nil? - @excluded = args[:excluded] unless args[:excluded].nil? - @flat_rate = args[:flat_rate] unless args[:flat_rate].nil? - @percentage_rate = args[:percentage_rate] unless args[:percentage_rate].nil? - @rate_table = args[:rate_table] unless args[:rate_table].nil? - end - end - - # Building block of the cost calculation decision tree. - # - The tree root should have no condition and no calculation method. - # - All the children must have a condition on the same dimension. The first - # child matching a condition is entered, therefore, price and weight conditions - # form contiguous intervals. - # - The last child of an element must have no condition and matches all elements - # not previously matched. - # - Children and calculation method are mutually exclusive, and exactly one of - # them must be defined; the root must only have children. - class AccountShippingShippingServiceCostRule - include Google::Apis::Core::Hashable - - # Shipping cost calculation method. Exactly one of the field is set. - # Corresponds to the JSON property `calculationMethod` - # @return [Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod] - attr_accessor :calculation_method - - # Subsequent rules to be applied, only for inner nodes. The last child must not - # specify a condition and acts as a catch-all. - # Corresponds to the JSON property `children` - # @return [Array] - attr_accessor :children - - # Condition for this rule to be applicable. If no condition is specified, the - # rule acts as a catch-all. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::ContentV2::AccountShippingCondition] - attr_accessor :condition - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @calculation_method = args[:calculation_method] unless args[:calculation_method].nil? - @children = args[:children] unless args[:children].nil? - @condition = args[:condition] unless args[:condition].nil? - end - end - - # The status of an account, i.e., information about its products, which is - # computed offline and not returned immediately at insertion time. - class AccountStatus - include Google::Apis::Core::Hashable - - # The ID of the account for which the status is reported. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # A list of data quality issues. - # Corresponds to the JSON property `dataQualityIssues` - # @return [Array] - attr_accessor :data_quality_issues - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountStatus". - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @data_quality_issues = args[:data_quality_issues] unless args[:data_quality_issues].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class AccountStatusDataQualityIssue - include Google::Apis::Core::Hashable - - # Country for which this issue is reported. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # Actual value displayed on the landing page. - # Corresponds to the JSON property `displayedValue` - # @return [String] - attr_accessor :displayed_value - - # Example items featuring the issue. - # Corresponds to the JSON property `exampleItems` - # @return [Array] - attr_accessor :example_items - - # Issue identifier. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Last time the account was checked for this issue. - # Corresponds to the JSON property `lastChecked` - # @return [String] - attr_accessor :last_checked - - # Number of items in the account found to have the said issue. - # Corresponds to the JSON property `numItems` - # @return [Fixnum] - attr_accessor :num_items - - # Severity of the problem. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # Submitted value that causes the issue. - # Corresponds to the JSON property `submittedValue` - # @return [String] - attr_accessor :submitted_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @displayed_value = args[:displayed_value] unless args[:displayed_value].nil? - @example_items = args[:example_items] unless args[:example_items].nil? - @id = args[:id] unless args[:id].nil? - @last_checked = args[:last_checked] unless args[:last_checked].nil? - @num_items = args[:num_items] unless args[:num_items].nil? - @severity = args[:severity] unless args[:severity].nil? - @submitted_value = args[:submitted_value] unless args[:submitted_value].nil? - end - end - - # An example of an item that has poor data quality. An item value on the landing - # page differs from what is submitted, or conflicts with a policy. - class AccountStatusExampleItem - include Google::Apis::Core::Hashable - - # Unique item ID as specified in the uploaded product data. - # Corresponds to the JSON property `itemId` - # @return [String] - attr_accessor :item_id - - # Landing page of the item. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # The item value that was submitted. - # Corresponds to the JSON property `submittedValue` - # @return [String] - attr_accessor :submitted_value - - # Title of the item. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The actual value on the landing page. - # Corresponds to the JSON property `valueOnLandingPage` - # @return [String] - attr_accessor :value_on_landing_page - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @item_id = args[:item_id] unless args[:item_id].nil? - @link = args[:link] unless args[:link].nil? - @submitted_value = args[:submitted_value] unless args[:submitted_value].nil? - @title = args[:title] unless args[:title].nil? - @value_on_landing_page = args[:value_on_landing_page] unless args[:value_on_landing_page].nil? - end - end - - # The tax settings of a merchant account. - class AccountTax - include Google::Apis::Core::Hashable - - # The ID of the account to which these account tax settings belong. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountTax". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Tax rules. Updating the tax rules will enable US taxes (not reversible). - # Defining no rules is equivalent to not charging tax at all. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @rules = args[:rules] unless args[:rules].nil? - end - end - - # Tax calculation rule to apply in a state or province (USA only). - class AccountTaxTaxRule - include Google::Apis::Core::Hashable - - # Country code in which tax is applicable. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # State (or province) is which the tax is applicable, described by its location - # id (also called criteria id). - # Corresponds to the JSON property `locationId` - # @return [String] - attr_accessor :location_id - - # Explicit tax rate in percent, represented as a floating point number without - # the percentage character. Must not be negative. - # Corresponds to the JSON property `ratePercent` - # @return [String] - attr_accessor :rate_percent - - # If true, shipping charges are also taxed. - # Corresponds to the JSON property `shippingTaxed` - # @return [Boolean] - attr_accessor :shipping_taxed - alias_method :shipping_taxed?, :shipping_taxed - - # Whether the tax rate is taken from a global tax table or specified explicitly. - # Corresponds to the JSON property `useGlobalRate` - # @return [Boolean] - attr_accessor :use_global_rate - alias_method :use_global_rate?, :use_global_rate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @location_id = args[:location_id] unless args[:location_id].nil? - @rate_percent = args[:rate_percent] unless args[:rate_percent].nil? - @shipping_taxed = args[:shipping_taxed] unless args[:shipping_taxed].nil? - @use_global_rate = args[:use_global_rate] unless args[:use_global_rate].nil? - end - end - - # - class AccountUser - include Google::Apis::Core::Hashable - - # Whether user is an admin. - # Corresponds to the JSON property `admin` - # @return [Boolean] - attr_accessor :admin - alias_method :admin?, :admin - - # User's email address. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @admin = args[:admin] unless args[:admin].nil? - @email_address = args[:email_address] unless args[:email_address].nil? - end - end - - # - class AccountsAuthInfoResponse - include Google::Apis::Core::Hashable - - # The account identifiers corresponding to the authenticated user. - # - For an individual account: only the merchant ID is defined - # - For an aggregator: only the aggregator ID is defined - # - For a subaccount of an MCA: both the merchant ID and the aggregator ID are - # defined. - # Corresponds to the JSON property `accountIdentifiers` - # @return [Array] - attr_accessor :account_identifiers - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountsAuthInfoResponse". - # 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) - @account_identifiers = args[:account_identifiers] unless args[:account_identifiers].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class BatchAccountsRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch accounts request. - class AccountsBatchRequestEntry - include Google::Apis::Core::Hashable - - # Account data. - # Corresponds to the JSON property `account` - # @return [Google::Apis::ContentV2::Account] - attr_accessor :account - - # The ID of the account to get or delete. Only defined if the method is get or - # delete. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account = args[:account] unless args[:account].nil? - @account_id = args[:account_id] unless args[:account_id].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - end - end - - # - class BatchAccountsResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountsCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch accounts response. - class AccountsBatchResponseEntry - include Google::Apis::Core::Hashable - - # Account data. - # Corresponds to the JSON property `account` - # @return [Google::Apis::ContentV2::Account] - attr_accessor :account - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountsCustomBatchResponseEntry". - # 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) - @account = args[:account] unless args[:account].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class ListAccountsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of accounts. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class BatchAccountShippingRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch accountshipping request. - class AccountShippingBatchRequestEntry - include Google::Apis::Core::Hashable - - # The ID of the account for which to get/update account shipping settings. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The shipping settings of a merchant account. - # Corresponds to the JSON property `accountShipping` - # @return [Google::Apis::ContentV2::AccountShipping] - attr_accessor :account_shipping - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @account_shipping = args[:account_shipping] unless args[:account_shipping].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - end - end - - # - class BatchAccountShippingResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountshippingCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch accountshipping response. - class AccountShippingBatchResponseEntry - include Google::Apis::Core::Hashable - - # The shipping settings of a merchant account. - # Corresponds to the JSON property `accountShipping` - # @return [Google::Apis::ContentV2::AccountShipping] - attr_accessor :account_shipping - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountshippingCustomBatchResponseEntry". - # 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) - @account_shipping = args[:account_shipping] unless args[:account_shipping].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class ListAccountShippingResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountshippingListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of account shipping settings. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class BatchAccountStatusesRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch accountstatuses request. - class AccountStatusesBatchRequestEntry - include Google::Apis::Core::Hashable - - # The ID of the (sub-)account whose status to get. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # The method (get). - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - end - end - - # - class BatchAccountStatusesResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountstatusesCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch accountstatuses response. - class AccountStatusesBatchResponseEntry - include Google::Apis::Core::Hashable - - # The status of an account, i.e., information about its products, which is - # computed offline and not returned immediately at insertion time. - # Corresponds to the JSON property `accountStatus` - # @return [Google::Apis::ContentV2::AccountStatus] - attr_accessor :account_status - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_status = args[:account_status] unless args[:account_status].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @errors = args[:errors] unless args[:errors].nil? - end - end - - # - class ListAccountStatusesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accountstatusesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of account statuses. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class BatchAccountTaxRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch accounttax request. - class AccountTaxBatchRequestEntry - include Google::Apis::Core::Hashable - - # The ID of the account for which to get/update account tax settings. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The tax settings of a merchant account. - # Corresponds to the JSON property `accountTax` - # @return [Google::Apis::ContentV2::AccountTax] - attr_accessor :account_tax - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @account_tax = args[:account_tax] unless args[:account_tax].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - end - end - - # - class BatchAccountTaxResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accounttaxCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch accounttax response. - class AccountTaxBatchResponseEntry - include Google::Apis::Core::Hashable - - # The tax settings of a merchant account. - # Corresponds to the JSON property `accountTax` - # @return [Google::Apis::ContentV2::AccountTax] - attr_accessor :account_tax - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accounttaxCustomBatchResponseEntry". - # 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) - @account_tax = args[:account_tax] unless args[:account_tax].nil? - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class ListAccountTaxResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # accounttaxListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of account tax settings. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # Datafeed data. - class Datafeed - include Google::Apis::Core::Hashable - - # The two-letter ISO 639-1 language in which the attributes are defined in the - # data feed. - # Corresponds to the JSON property `attributeLanguage` - # @return [String] - attr_accessor :attribute_language - - # The two-letter ISO 639-1 language of the items in the feed. - # Corresponds to the JSON property `contentLanguage` - # @return [String] - attr_accessor :content_language - - # The type of data feed. - # Corresponds to the JSON property `contentType` - # @return [String] - attr_accessor :content_type - - # The required fields vary based on the frequency of fetching. For a monthly - # fetch schedule, day_of_month and hour are required. For a weekly fetch - # schedule, weekday and hour are required. For a daily fetch schedule, only hour - # is required. - # Corresponds to the JSON property `fetchSchedule` - # @return [Google::Apis::ContentV2::DatafeedFetchSchedule] - attr_accessor :fetch_schedule - - # The filename of the feed. All feeds must have a unique file name. - # Corresponds to the JSON property `fileName` - # @return [String] - attr_accessor :file_name - - # Format of the feed file. - # Corresponds to the JSON property `format` - # @return [Google::Apis::ContentV2::DatafeedFormat] - attr_accessor :format - - # The ID of the data feed. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The list of intended destinations (corresponds to checked check boxes in - # Merchant Center). - # Corresponds to the JSON property `intendedDestinations` - # @return [Array] - attr_accessor :intended_destinations - - # Identifies what kind of resource this is. Value: the fixed string "content# - # datafeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A descriptive name of the data feed. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The two-letter ISO 3166 country where the items in the feed will be included - # in the search index. - # Corresponds to the JSON property `targetCountry` - # @return [String] - attr_accessor :target_country - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attribute_language = args[:attribute_language] unless args[:attribute_language].nil? - @content_language = args[:content_language] unless args[:content_language].nil? - @content_type = args[:content_type] unless args[:content_type].nil? - @fetch_schedule = args[:fetch_schedule] unless args[:fetch_schedule].nil? - @file_name = args[:file_name] unless args[:file_name].nil? - @format = args[:format] unless args[:format].nil? - @id = args[:id] unless args[:id].nil? - @intended_destinations = args[:intended_destinations] unless args[:intended_destinations].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @target_country = args[:target_country] unless args[:target_country].nil? - end - end - - # The required fields vary based on the frequency of fetching. For a monthly - # fetch schedule, day_of_month and hour are required. For a weekly fetch - # schedule, weekday and hour are required. For a daily fetch schedule, only hour - # is required. - class DatafeedFetchSchedule - include Google::Apis::Core::Hashable - - # The day of the month the feed file should be fetched (1-31). - # Corresponds to the JSON property `dayOfMonth` - # @return [Fixnum] - attr_accessor :day_of_month - - # The URL where the feed file can be fetched. Google Merchant Center will - # support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP - # protocols, so the value will need to be a valid link using one of those four - # protocols. - # Corresponds to the JSON property `fetchUrl` - # @return [String] - attr_accessor :fetch_url - - # The hour of the day the feed file should be fetched (0-24). - # Corresponds to the JSON property `hour` - # @return [Fixnum] - attr_accessor :hour - - # An optional password for fetch_url. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - # An optional user name for fetch_url. - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - # The day of the week the feed file should be fetched. - # Corresponds to the JSON property `weekday` - # @return [String] - attr_accessor :weekday - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @day_of_month = args[:day_of_month] unless args[:day_of_month].nil? - @fetch_url = args[:fetch_url] unless args[:fetch_url].nil? - @hour = args[:hour] unless args[:hour].nil? - @password = args[:password] unless args[:password].nil? - @time_zone = args[:time_zone] unless args[:time_zone].nil? - @username = args[:username] unless args[:username].nil? - @weekday = args[:weekday] unless args[:weekday].nil? - end - end - - # - class DatafeedFormat - include Google::Apis::Core::Hashable - - # Delimiter for the separation of values in a delimiter-separated values feed. - # If not specified, the delimiter will be auto-detected. Ignored for non-DSV - # data feeds. - # Corresponds to the JSON property `columnDelimiter` - # @return [String] - attr_accessor :column_delimiter - - # Character encoding scheme of the data feed. If not specified, the encoding - # will be auto-detected. - # Corresponds to the JSON property `fileEncoding` - # @return [String] - attr_accessor :file_encoding - - # Specifies how double quotes are interpreted. If not specified, the mode will - # be auto-detected. Ignored for non-DSV data feeds. - # Corresponds to the JSON property `quotingMode` - # @return [String] - attr_accessor :quoting_mode - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_delimiter = args[:column_delimiter] unless args[:column_delimiter].nil? - @file_encoding = args[:file_encoding] unless args[:file_encoding].nil? - @quoting_mode = args[:quoting_mode] unless args[:quoting_mode].nil? - end - end - - # The status of a datafeed, i.e., the result of the last retrieval of the - # datafeed computed asynchronously when the feed processing is finished. - class DatafeedStatus - include Google::Apis::Core::Hashable - - # The ID of the feed for which the status is reported. - # Corresponds to the JSON property `datafeedId` - # @return [String] - attr_accessor :datafeed_id - - # The list of errors occurring in the feed. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # The number of items in the feed that were processed. - # Corresponds to the JSON property `itemsTotal` - # @return [String] - attr_accessor :items_total - - # The number of items in the feed that were valid. - # Corresponds to the JSON property `itemsValid` - # @return [String] - attr_accessor :items_valid - - # Identifies what kind of resource this is. Value: the fixed string "content# - # datafeedStatus". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The last date at which the feed was uploaded. - # Corresponds to the JSON property `lastUploadDate` - # @return [String] - attr_accessor :last_upload_date - - # The processing status of the feed. - # Corresponds to the JSON property `processingStatus` - # @return [String] - attr_accessor :processing_status - - # The list of errors occurring in the feed. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @datafeed_id = args[:datafeed_id] unless args[:datafeed_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @items_total = args[:items_total] unless args[:items_total].nil? - @items_valid = args[:items_valid] unless args[:items_valid].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_upload_date = args[:last_upload_date] unless args[:last_upload_date].nil? - @processing_status = args[:processing_status] unless args[:processing_status].nil? - @warnings = args[:warnings] unless args[:warnings].nil? - end - end - - # An error occurring in the feed, like "invalid price". - class DatafeedStatusError - include Google::Apis::Core::Hashable - - # The code of the error, e.g., "validation/invalid_value". - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # The number of occurrences of the error in the feed. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # A list of example occurrences of the error, grouped by product. - # Corresponds to the JSON property `examples` - # @return [Array] - attr_accessor :examples - - # The error message, e.g., "Invalid price". - # 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? - @count = args[:count] unless args[:count].nil? - @examples = args[:examples] unless args[:examples].nil? - @message = args[:message] unless args[:message].nil? - end - end - - # An example occurrence for a particular error. - class DatafeedStatusExample - include Google::Apis::Core::Hashable - - # The ID of the example item. - # Corresponds to the JSON property `itemId` - # @return [String] - attr_accessor :item_id - - # Line number in the data feed where the example is found. - # Corresponds to the JSON property `lineNumber` - # @return [String] - attr_accessor :line_number - - # The problematic 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) - @item_id = args[:item_id] unless args[:item_id].nil? - @line_number = args[:line_number] unless args[:line_number].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class BatchDatafeedsRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch datafeeds request. - class DatafeedsBatchRequestEntry - include Google::Apis::Core::Hashable - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # Datafeed data. - # Corresponds to the JSON property `datafeed` - # @return [Google::Apis::ContentV2::Datafeed] - attr_accessor :datafeed - - # The ID of the data feed to get or delete. - # Corresponds to the JSON property `datafeedId` - # @return [String] - attr_accessor :datafeed_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @datafeed = args[:datafeed] unless args[:datafeed].nil? - @datafeed_id = args[:datafeed_id] unless args[:datafeed_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - end - end - - # - class BatchDatafeedsResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # datafeedsCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch datafeeds response. - class DatafeedsBatchResponseEntry - include Google::Apis::Core::Hashable - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # Datafeed data. - # Corresponds to the JSON property `datafeed` - # @return [Google::Apis::ContentV2::Datafeed] - attr_accessor :datafeed - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @datafeed = args[:datafeed] unless args[:datafeed].nil? - @errors = args[:errors] unless args[:errors].nil? - end - end - - # - class ListDatafeedsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # datafeedsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of datafeeds. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class BatchDatafeedStatusesRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch datafeedstatuses request. - class DatafeedStatusesBatchRequestEntry - include Google::Apis::Core::Hashable - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The ID of the data feed to get or delete. - # Corresponds to the JSON property `datafeedId` - # @return [String] - attr_accessor :datafeed_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @datafeed_id = args[:datafeed_id] unless args[:datafeed_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - end - end - - # - class BatchDatafeedStatusesResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # datafeedstatusesCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch datafeedstatuses response. - class DatafeedStatusesBatchResponseEntry - include Google::Apis::Core::Hashable - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The status of a datafeed, i.e., the result of the last retrieval of the - # datafeed computed asynchronously when the feed processing is finished. - # Corresponds to the JSON property `datafeedStatus` - # @return [Google::Apis::ContentV2::DatafeedStatus] - attr_accessor :datafeed_status - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @datafeed_status = args[:datafeed_status] unless args[:datafeed_status].nil? - @errors = args[:errors] unless args[:errors].nil? - end - end - - # - class ListDatafeedStatusesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # datafeedstatusesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of datafeed statuses. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # An error returned by the API. - class Error - include Google::Apis::Core::Hashable - - # The domain of the error. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # A description of the error. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # The error code. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @domain = args[:domain] unless args[:domain].nil? - @message = args[:message] unless args[:message].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - - # A list of errors returned by a failed batch entry. - class Errors - include Google::Apis::Core::Hashable - - # The HTTP status of the first error in errors. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A list of errors. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # The message of the first error in errors. - # 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? - @errors = args[:errors] unless args[:errors].nil? - @message = args[:message] unless args[:message].nil? - end - end - - # - class Inventory - include Google::Apis::Core::Hashable - - # The availability of the product. - # Corresponds to the JSON property `availability` - # @return [String] - attr_accessor :availability - - # Identifies what kind of resource this is. Value: the fixed string "content# - # inventory". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The price of the product. - # Corresponds to the JSON property `price` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :price - - # The quantity of the product. Must be equal to or greater than zero. Supported - # only for local products. - # Corresponds to the JSON property `quantity` - # @return [Fixnum] - attr_accessor :quantity - - # The sale price of the product. Mandatory if sale_price_effective_date is - # defined. - # Corresponds to the JSON property `salePrice` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :sale_price - - # A date range represented by a pair of ISO 8601 dates separated by a space, - # comma, or slash. Both dates might be specified as 'null' if undecided. - # Corresponds to the JSON property `salePriceEffectiveDate` - # @return [String] - attr_accessor :sale_price_effective_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @availability = args[:availability] unless args[:availability].nil? - @kind = args[:kind] unless args[:kind].nil? - @price = args[:price] unless args[:price].nil? - @quantity = args[:quantity] unless args[:quantity].nil? - @sale_price = args[:sale_price] unless args[:sale_price].nil? - @sale_price_effective_date = args[:sale_price_effective_date] unless args[:sale_price_effective_date].nil? - end - end - - # - class BatchInventoryRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch inventory request. - class InventoryBatchRequestEntry - include Google::Apis::Core::Hashable - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # Price and availability of the product. - # Corresponds to the JSON property `inventory` - # @return [Google::Apis::ContentV2::Inventory] - attr_accessor :inventory - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # The ID of the product for which to update price and availability. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # The code of the store for which to update price and availability. Use online - # to update price and availability of an online product. - # Corresponds to the JSON property `storeCode` - # @return [String] - attr_accessor :store_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @inventory = args[:inventory] unless args[:inventory].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @store_code = args[:store_code] unless args[:store_code].nil? - end - end - - # - class BatchInventoryResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # inventoryCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch inventory response. - class InventoryBatchResponseEntry - include Google::Apis::Core::Hashable - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - # Identifies what kind of resource this is. Value: the fixed string "content# - # inventoryCustomBatchResponseEntry". - # 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) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class SetInventoryRequest - include Google::Apis::Core::Hashable - - # The availability of the product. - # Corresponds to the JSON property `availability` - # @return [String] - attr_accessor :availability - - # The price of the product. - # Corresponds to the JSON property `price` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :price - - # The quantity of the product. Must be equal to or greater than zero. Supported - # only for local products. - # Corresponds to the JSON property `quantity` - # @return [Fixnum] - attr_accessor :quantity - - # The sale price of the product. Mandatory if sale_price_effective_date is - # defined. - # Corresponds to the JSON property `salePrice` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :sale_price - - # A date range represented by a pair of ISO 8601 dates separated by a space, - # comma, or slash. Both dates might be specified as 'null' if undecided. - # Corresponds to the JSON property `salePriceEffectiveDate` - # @return [String] - attr_accessor :sale_price_effective_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @availability = args[:availability] unless args[:availability].nil? - @price = args[:price] unless args[:price].nil? - @quantity = args[:quantity] unless args[:quantity].nil? - @sale_price = args[:sale_price] unless args[:sale_price].nil? - @sale_price_effective_date = args[:sale_price_effective_date] unless args[:sale_price_effective_date].nil? - end - end - - # - class SetInventoryResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # inventorySetResponse". - # 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 - - # - class LoyaltyPoints - include Google::Apis::Core::Hashable - - # Name of loyalty points program. It is recommended to limit the name to 12 full- - # width characters or 24 Roman characters. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The retailer's loyalty points in absolute value. - # Corresponds to the JSON property `pointsValue` - # @return [String] - attr_accessor :points_value - - # The ratio of a point when converted to currency. Google assumes currency based - # on Merchant Center settings. If ratio is left out, it defaults to 1.0. - # Corresponds to the JSON property `ratio` - # @return [Float] - attr_accessor :ratio - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @points_value = args[:points_value] unless args[:points_value].nil? - @ratio = args[:ratio] unless args[:ratio].nil? - end - end - - # - class Price - include Google::Apis::Core::Hashable - - # The currency of the price. - # Corresponds to the JSON property `currency` - # @return [String] - attr_accessor :currency - - # The price represented as a number. - # 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) - @currency = args[:currency] unless args[:currency].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Product data. - class Product - include Google::Apis::Core::Hashable - - # Additional URLs of images of the item. - # Corresponds to the JSON property `additionalImageLinks` - # @return [Array] - attr_accessor :additional_image_links - - # Set to true if the item is targeted towards adults. - # Corresponds to the JSON property `adult` - # @return [Boolean] - attr_accessor :adult - alias_method :adult?, :adult - - # Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. - # Corresponds to the JSON property `adwordsGrouping` - # @return [String] - attr_accessor :adwords_grouping - - # Similar to adwords_grouping, but only works on CPC. - # Corresponds to the JSON property `adwordsLabels` - # @return [Array] - attr_accessor :adwords_labels - - # Allows advertisers to override the item URL when the product is shown within - # the context of Product Ads. - # Corresponds to the JSON property `adwordsRedirect` - # @return [String] - attr_accessor :adwords_redirect - - # Target age group of the item. - # Corresponds to the JSON property `ageGroup` - # @return [String] - attr_accessor :age_group - - # Specifies the intended aspects for the product. - # Corresponds to the JSON property `aspects` - # @return [Array] - attr_accessor :aspects - - # Availability status of the item. - # Corresponds to the JSON property `availability` - # @return [String] - attr_accessor :availability - - # The day a pre-ordered product becomes available for delivery, in ISO 8601 - # format. - # Corresponds to the JSON property `availabilityDate` - # @return [String] - attr_accessor :availability_date - - # Brand of the item. - # Corresponds to the JSON property `brand` - # @return [String] - attr_accessor :brand - - # The item's channel (online or local). - # Corresponds to the JSON property `channel` - # @return [String] - attr_accessor :channel - - # Color of the item. - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # Condition or state of the item. - # Corresponds to the JSON property `condition` - # @return [String] - attr_accessor :condition - - # The two-letter ISO 639-1 language code for the item. - # Corresponds to the JSON property `contentLanguage` - # @return [String] - attr_accessor :content_language - - # A list of custom (merchant-provided) attributes. It can also be used for - # submitting any attribute of the feed specification in its generic form (e.g., ` - # "name": "size type", "type": "text", "value": "regular" `). This is useful - # for submitting attributes not explicitly exposed by the API. - # Corresponds to the JSON property `customAttributes` - # @return [Array] - attr_accessor :custom_attributes - - # A list of custom (merchant-provided) custom attribute groups. - # Corresponds to the JSON property `customGroups` - # @return [Array] - attr_accessor :custom_groups - - # Custom label 0 for custom grouping of items in a Shopping campaign. - # Corresponds to the JSON property `customLabel0` - # @return [String] - attr_accessor :custom_label0 - - # Custom label 1 for custom grouping of items in a Shopping campaign. - # Corresponds to the JSON property `customLabel1` - # @return [String] - attr_accessor :custom_label1 - - # Custom label 2 for custom grouping of items in a Shopping campaign. - # Corresponds to the JSON property `customLabel2` - # @return [String] - attr_accessor :custom_label2 - - # Custom label 3 for custom grouping of items in a Shopping campaign. - # Corresponds to the JSON property `customLabel3` - # @return [String] - attr_accessor :custom_label3 - - # Custom label 4 for custom grouping of items in a Shopping campaign. - # Corresponds to the JSON property `customLabel4` - # @return [String] - attr_accessor :custom_label4 - - # Description of the item. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Specifies the intended destinations for the product. - # Corresponds to the JSON property `destinations` - # @return [Array] - attr_accessor :destinations - - # An identifier for an item for dynamic remarketing campaigns. - # Corresponds to the JSON property `displayAdsId` - # @return [String] - attr_accessor :display_ads_id - - # URL directly to your item's landing page for dynamic remarketing campaigns. - # Corresponds to the JSON property `displayAdsLink` - # @return [String] - attr_accessor :display_ads_link - - # Advertiser-specified recommendations. - # Corresponds to the JSON property `displayAdsSimilarIds` - # @return [Array] - attr_accessor :display_ads_similar_ids - - # Title of an item for dynamic remarketing campaigns. - # Corresponds to the JSON property `displayAdsTitle` - # @return [String] - attr_accessor :display_ads_title - - # Offer margin for dynamic remarketing campaigns. - # Corresponds to the JSON property `displayAdsValue` - # @return [Float] - attr_accessor :display_ads_value - - # The energy efficiency class as defined in EU directive 2010/30/EU. - # Corresponds to the JSON property `energyEfficiencyClass` - # @return [String] - attr_accessor :energy_efficiency_class - - # Date on which the item should expire, as specified upon insertion, in ISO 8601 - # format. The actual expiration date in Google Shopping is exposed in - # productstatuses as googleExpirationDate and might be earlier if expirationDate - # is too far in the future. - # Corresponds to the JSON property `expirationDate` - # @return [String] - attr_accessor :expiration_date - - # Target gender of the item. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # Google's category of the item (see Google product taxonomy). - # Corresponds to the JSON property `googleProductCategory` - # @return [String] - attr_accessor :google_product_category - - # Global Trade Item Number (GTIN) of the item. - # Corresponds to the JSON property `gtin` - # @return [String] - attr_accessor :gtin - - # The REST id of the product. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # False when the item does not have unique product identifiers appropriate to - # its category, such as GTIN, MPN, and brand. Required according to the Unique - # Product Identifier Rules for all target countries except for Canada. - # Corresponds to the JSON property `identifierExists` - # @return [Boolean] - attr_accessor :identifier_exists - alias_method :identifier_exists?, :identifier_exists - - # URL of an image of the item. - # Corresponds to the JSON property `imageLink` - # @return [String] - attr_accessor :image_link - - # Number and amount of installments to pay for an item. Brazil only. - # Corresponds to the JSON property `installment` - # @return [Google::Apis::ContentV2::ProductInstallment] - attr_accessor :installment - - # Whether the item is a merchant-defined bundle. A bundle is a custom grouping - # of different products sold by a merchant for a single price. - # Corresponds to the JSON property `isBundle` - # @return [Boolean] - attr_accessor :is_bundle - alias_method :is_bundle?, :is_bundle - - # Shared identifier for all variants of the same product. - # Corresponds to the JSON property `itemGroupId` - # @return [String] - attr_accessor :item_group_id - - # Identifies what kind of resource this is. Value: the fixed string "content# - # product". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # URL directly linking to your item's page on your website. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # Loyalty points that users receive after purchasing the item. Japan only. - # Corresponds to the JSON property `loyaltyPoints` - # @return [Google::Apis::ContentV2::LoyaltyPoints] - attr_accessor :loyalty_points - - # The material of which the item is made. - # Corresponds to the JSON property `material` - # @return [String] - attr_accessor :material - - # Link to a mobile-optimized version of the landing page. - # Corresponds to the JSON property `mobileLink` - # @return [String] - attr_accessor :mobile_link - - # Manufacturer Part Number (MPN) of the item. - # Corresponds to the JSON property `mpn` - # @return [String] - attr_accessor :mpn - - # The number of identical products in a merchant-defined multipack. - # Corresponds to the JSON property `multipack` - # @return [String] - attr_accessor :multipack - - # An identifier of the item. - # Corresponds to the JSON property `offerId` - # @return [String] - attr_accessor :offer_id - - # Whether an item is available for purchase only online. - # Corresponds to the JSON property `onlineOnly` - # @return [Boolean] - attr_accessor :online_only - alias_method :online_only?, :online_only - - # The item's pattern (e.g. polka dots). - # Corresponds to the JSON property `pattern` - # @return [String] - attr_accessor :pattern - - # Price of the item. - # Corresponds to the JSON property `price` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :price - - # Your category of the item (formatted as in product feeds specification). - # Corresponds to the JSON property `productType` - # @return [String] - attr_accessor :product_type - - # Advertised sale price of the item. - # Corresponds to the JSON property `salePrice` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :sale_price - - # Date range during which the item is on sale (see product feed specifications). - # Corresponds to the JSON property `salePriceEffectiveDate` - # @return [String] - attr_accessor :sale_price_effective_date - - # Shipping rules. - # Corresponds to the JSON property `shipping` - # @return [Array] - attr_accessor :shipping - - # Height of the item for shipping. - # Corresponds to the JSON property `shippingHeight` - # @return [Google::Apis::ContentV2::ProductShippingDimension] - attr_accessor :shipping_height - - # The shipping label of the product, used to group product in account-level - # shipping rules. - # Corresponds to the JSON property `shippingLabel` - # @return [String] - attr_accessor :shipping_label - - # Length of the item for shipping. - # Corresponds to the JSON property `shippingLength` - # @return [Google::Apis::ContentV2::ProductShippingDimension] - attr_accessor :shipping_length - - # Weight of the item for shipping. - # Corresponds to the JSON property `shippingWeight` - # @return [Google::Apis::ContentV2::ProductShippingWeight] - attr_accessor :shipping_weight - - # Width of the item for shipping. - # Corresponds to the JSON property `shippingWidth` - # @return [Google::Apis::ContentV2::ProductShippingDimension] - attr_accessor :shipping_width - - # System in which the size is specified. Recommended for apparel items. - # Corresponds to the JSON property `sizeSystem` - # @return [String] - attr_accessor :size_system - - # The cut of the item. Recommended for apparel items. - # Corresponds to the JSON property `sizeType` - # @return [String] - attr_accessor :size_type - - # Size of the item. - # Corresponds to the JSON property `sizes` - # @return [Array] - attr_accessor :sizes - - # The two-letter ISO 3166 country code for the item. - # Corresponds to the JSON property `targetCountry` - # @return [String] - attr_accessor :target_country - - # Tax information. - # Corresponds to the JSON property `taxes` - # @return [Array] - attr_accessor :taxes - - # Title of the item. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The preference of the denominator of the unit price. - # Corresponds to the JSON property `unitPricingBaseMeasure` - # @return [Google::Apis::ContentV2::ProductUnitPricingBaseMeasure] - attr_accessor :unit_pricing_base_measure - - # The measure and dimension of an item. - # Corresponds to the JSON property `unitPricingMeasure` - # @return [Google::Apis::ContentV2::ProductUnitPricingMeasure] - attr_accessor :unit_pricing_measure - - # The read-only list of intended destinations which passed validation. - # Corresponds to the JSON property `validatedDestinations` - # @return [Array] - attr_accessor :validated_destinations - - # Read-only warnings. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_image_links = args[:additional_image_links] unless args[:additional_image_links].nil? - @adult = args[:adult] unless args[:adult].nil? - @adwords_grouping = args[:adwords_grouping] unless args[:adwords_grouping].nil? - @adwords_labels = args[:adwords_labels] unless args[:adwords_labels].nil? - @adwords_redirect = args[:adwords_redirect] unless args[:adwords_redirect].nil? - @age_group = args[:age_group] unless args[:age_group].nil? - @aspects = args[:aspects] unless args[:aspects].nil? - @availability = args[:availability] unless args[:availability].nil? - @availability_date = args[:availability_date] unless args[:availability_date].nil? - @brand = args[:brand] unless args[:brand].nil? - @channel = args[:channel] unless args[:channel].nil? - @color = args[:color] unless args[:color].nil? - @condition = args[:condition] unless args[:condition].nil? - @content_language = args[:content_language] unless args[:content_language].nil? - @custom_attributes = args[:custom_attributes] unless args[:custom_attributes].nil? - @custom_groups = args[:custom_groups] unless args[:custom_groups].nil? - @custom_label0 = args[:custom_label0] unless args[:custom_label0].nil? - @custom_label1 = args[:custom_label1] unless args[:custom_label1].nil? - @custom_label2 = args[:custom_label2] unless args[:custom_label2].nil? - @custom_label3 = args[:custom_label3] unless args[:custom_label3].nil? - @custom_label4 = args[:custom_label4] unless args[:custom_label4].nil? - @description = args[:description] unless args[:description].nil? - @destinations = args[:destinations] unless args[:destinations].nil? - @display_ads_id = args[:display_ads_id] unless args[:display_ads_id].nil? - @display_ads_link = args[:display_ads_link] unless args[:display_ads_link].nil? - @display_ads_similar_ids = args[:display_ads_similar_ids] unless args[:display_ads_similar_ids].nil? - @display_ads_title = args[:display_ads_title] unless args[:display_ads_title].nil? - @display_ads_value = args[:display_ads_value] unless args[:display_ads_value].nil? - @energy_efficiency_class = args[:energy_efficiency_class] unless args[:energy_efficiency_class].nil? - @expiration_date = args[:expiration_date] unless args[:expiration_date].nil? - @gender = args[:gender] unless args[:gender].nil? - @google_product_category = args[:google_product_category] unless args[:google_product_category].nil? - @gtin = args[:gtin] unless args[:gtin].nil? - @id = args[:id] unless args[:id].nil? - @identifier_exists = args[:identifier_exists] unless args[:identifier_exists].nil? - @image_link = args[:image_link] unless args[:image_link].nil? - @installment = args[:installment] unless args[:installment].nil? - @is_bundle = args[:is_bundle] unless args[:is_bundle].nil? - @item_group_id = args[:item_group_id] unless args[:item_group_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @link = args[:link] unless args[:link].nil? - @loyalty_points = args[:loyalty_points] unless args[:loyalty_points].nil? - @material = args[:material] unless args[:material].nil? - @mobile_link = args[:mobile_link] unless args[:mobile_link].nil? - @mpn = args[:mpn] unless args[:mpn].nil? - @multipack = args[:multipack] unless args[:multipack].nil? - @offer_id = args[:offer_id] unless args[:offer_id].nil? - @online_only = args[:online_only] unless args[:online_only].nil? - @pattern = args[:pattern] unless args[:pattern].nil? - @price = args[:price] unless args[:price].nil? - @product_type = args[:product_type] unless args[:product_type].nil? - @sale_price = args[:sale_price] unless args[:sale_price].nil? - @sale_price_effective_date = args[:sale_price_effective_date] unless args[:sale_price_effective_date].nil? - @shipping = args[:shipping] unless args[:shipping].nil? - @shipping_height = args[:shipping_height] unless args[:shipping_height].nil? - @shipping_label = args[:shipping_label] unless args[:shipping_label].nil? - @shipping_length = args[:shipping_length] unless args[:shipping_length].nil? - @shipping_weight = args[:shipping_weight] unless args[:shipping_weight].nil? - @shipping_width = args[:shipping_width] unless args[:shipping_width].nil? - @size_system = args[:size_system] unless args[:size_system].nil? - @size_type = args[:size_type] unless args[:size_type].nil? - @sizes = args[:sizes] unless args[:sizes].nil? - @target_country = args[:target_country] unless args[:target_country].nil? - @taxes = args[:taxes] unless args[:taxes].nil? - @title = args[:title] unless args[:title].nil? - @unit_pricing_base_measure = args[:unit_pricing_base_measure] unless args[:unit_pricing_base_measure].nil? - @unit_pricing_measure = args[:unit_pricing_measure] unless args[:unit_pricing_measure].nil? - @validated_destinations = args[:validated_destinations] unless args[:validated_destinations].nil? - @warnings = args[:warnings] unless args[:warnings].nil? - end - end - - # - class ProductAspect - include Google::Apis::Core::Hashable - - # The name of the aspect. - # Corresponds to the JSON property `aspectName` - # @return [String] - attr_accessor :aspect_name - - # The name of the destination. Leave out to apply to all destinations. - # Corresponds to the JSON property `destinationName` - # @return [String] - attr_accessor :destination_name - - # Whether the aspect is required, excluded or should be validated. - # Corresponds to the JSON property `intention` - # @return [String] - attr_accessor :intention - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aspect_name = args[:aspect_name] unless args[:aspect_name].nil? - @destination_name = args[:destination_name] unless args[:destination_name].nil? - @intention = args[:intention] unless args[:intention].nil? - end - end - - # - class ProductCustomAttribute - include Google::Apis::Core::Hashable - - # The name of the attribute. Underscores will be replaced by spaces upon - # insertion. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of the attribute. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Free-form unit of the attribute. Unit can only be used for values of type INT - # or FLOAT. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The value of the attribute. - # 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) - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - @unit = args[:unit] unless args[:unit].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class ProductCustomGroup - include Google::Apis::Core::Hashable - - # The sub-attributes. - # Corresponds to the JSON property `attributes` - # @return [Array] - attr_accessor :attributes - - # The name of the group. Underscores will be replaced by spaces upon insertion. - # 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) - @attributes = args[:attributes] unless args[:attributes].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # - class ProductDestination - include Google::Apis::Core::Hashable - - # The name of the destination. - # Corresponds to the JSON property `destinationName` - # @return [String] - attr_accessor :destination_name - - # Whether the destination is required, excluded or should be validated. - # Corresponds to the JSON property `intention` - # @return [String] - attr_accessor :intention - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_name = args[:destination_name] unless args[:destination_name].nil? - @intention = args[:intention] unless args[:intention].nil? - end - end - - # - class ProductInstallment - include Google::Apis::Core::Hashable - - # The amount the buyer has to pay per month. - # Corresponds to the JSON property `amount` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :amount - - # The number of installments the buyer has to pay. - # Corresponds to the JSON property `months` - # @return [String] - attr_accessor :months - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @amount = args[:amount] unless args[:amount].nil? - @months = args[:months] unless args[:months].nil? - end - end - - # - class ProductShipping - include Google::Apis::Core::Hashable - - # The two-letter ISO 3166 country code for the country to which an item will - # ship. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # The location where the shipping is applicable, represented by a location group - # name. - # Corresponds to the JSON property `locationGroupName` - # @return [String] - attr_accessor :location_group_name - - # The numeric id of a location that the shipping rate applies to as defined in - # the AdWords API. - # Corresponds to the JSON property `locationId` - # @return [String] - attr_accessor :location_id - - # The postal code range that the shipping rate applies to, represented by a - # postal code, a postal code prefix followed by a * wildcard, a range between - # two postal codes or two postal code prefixes of equal length. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # Fixed shipping price, represented as a number. - # Corresponds to the JSON property `price` - # @return [Google::Apis::ContentV2::Price] - attr_accessor :price - - # The geographic region to which a shipping rate applies (e.g. zip code). - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # A free-form description of the service class or delivery speed. - # Corresponds to the JSON property `service` - # @return [String] - attr_accessor :service - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @location_group_name = args[:location_group_name] unless args[:location_group_name].nil? - @location_id = args[:location_id] unless args[:location_id].nil? - @postal_code = args[:postal_code] unless args[:postal_code].nil? - @price = args[:price] unless args[:price].nil? - @region = args[:region] unless args[:region].nil? - @service = args[:service] unless args[:service].nil? - end - end - - # - class ProductShippingDimension - include Google::Apis::Core::Hashable - - # The unit of value. - # Acceptable values are: - # - "cm" - # - "in" - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The dimension of the product used to calculate the shipping cost of the item. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @unit = args[:unit] unless args[:unit].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class ProductShippingWeight - include Google::Apis::Core::Hashable - - # The unit of value. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The weight of the product used to calculate the shipping cost of the item. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @unit = args[:unit] unless args[:unit].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # The status of a product, i.e., information about a product computed - # asynchronously by the data quality analysis. - class ProductStatus - include Google::Apis::Core::Hashable - - # Date on which the item has been created, in ISO 8601 format. - # Corresponds to the JSON property `creationDate` - # @return [String] - attr_accessor :creation_date - - # A list of data quality issues associated with the product. - # Corresponds to the JSON property `dataQualityIssues` - # @return [Array] - attr_accessor :data_quality_issues - - # The intended destinations for the product. - # Corresponds to the JSON property `destinationStatuses` - # @return [Array] - attr_accessor :destination_statuses - - # Date on which the item expires in Google Shopping, in ISO 8601 format. - # Corresponds to the JSON property `googleExpirationDate` - # @return [String] - attr_accessor :google_expiration_date - - # Identifies what kind of resource this is. Value: the fixed string "content# - # productStatus". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Date on which the item has been last updated, in ISO 8601 format. - # Corresponds to the JSON property `lastUpdateDate` - # @return [String] - attr_accessor :last_update_date - - # The link to the product. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # The id of the product for which status is reported. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # The title of the product. - # 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) - @creation_date = args[:creation_date] unless args[:creation_date].nil? - @data_quality_issues = args[:data_quality_issues] unless args[:data_quality_issues].nil? - @destination_statuses = args[:destination_statuses] unless args[:destination_statuses].nil? - @google_expiration_date = args[:google_expiration_date] unless args[:google_expiration_date].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_update_date = args[:last_update_date] unless args[:last_update_date].nil? - @link = args[:link] unless args[:link].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # - class ProductStatusDataQualityIssue - include Google::Apis::Core::Hashable - - # A more detailed error string. - # Corresponds to the JSON property `detail` - # @return [String] - attr_accessor :detail - - # The fetch status for landing_page_errors. - # Corresponds to the JSON property `fetchStatus` - # @return [String] - attr_accessor :fetch_status - - # The id of the data quality issue. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The attribute name that is relevant for the issue. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # The severity of the data quality issue. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # The time stamp of the data quality issue. - # Corresponds to the JSON property `timestamp` - # @return [String] - attr_accessor :timestamp - - # The value of that attribute that was found on the landing page - # Corresponds to the JSON property `valueOnLandingPage` - # @return [String] - attr_accessor :value_on_landing_page - - # The value the attribute had at time of evaluation. - # Corresponds to the JSON property `valueProvided` - # @return [String] - attr_accessor :value_provided - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @detail = args[:detail] unless args[:detail].nil? - @fetch_status = args[:fetch_status] unless args[:fetch_status].nil? - @id = args[:id] unless args[:id].nil? - @location = args[:location] unless args[:location].nil? - @severity = args[:severity] unless args[:severity].nil? - @timestamp = args[:timestamp] unless args[:timestamp].nil? - @value_on_landing_page = args[:value_on_landing_page] unless args[:value_on_landing_page].nil? - @value_provided = args[:value_provided] unless args[:value_provided].nil? - end - end - - # - class ProductStatusDestinationStatus - include Google::Apis::Core::Hashable - - # The destination's approval status. - # Corresponds to the JSON property `approvalStatus` - # @return [String] - attr_accessor :approval_status - - # The name of the destination - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # Whether the destination is required, excluded, selected by default or should - # be validated. - # Corresponds to the JSON property `intention` - # @return [String] - attr_accessor :intention - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @approval_status = args[:approval_status] unless args[:approval_status].nil? - @destination = args[:destination] unless args[:destination].nil? - @intention = args[:intention] unless args[:intention].nil? - end - end - - # - class ProductTax - include Google::Apis::Core::Hashable - - # The country within which the item is taxed, specified with a two-letter ISO - # 3166 country code. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # The numeric id of a location that the tax rate applies to as defined in the - # AdWords API. - # Corresponds to the JSON property `locationId` - # @return [String] - attr_accessor :location_id - - # The postal code range that the tax rate applies to, represented by a ZIP code, - # a ZIP code prefix using * wildcard, a range between two ZIP codes or two ZIP - # code prefixes of equal length. Examples: 94114, 94*, 94002-95460, 94*-95*. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # The percentage of tax rate that applies to the item price. - # Corresponds to the JSON property `rate` - # @return [Float] - attr_accessor :rate - - # The geographic region to which the tax rate applies. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # Set to true if tax is charged on shipping. - # Corresponds to the JSON property `taxShip` - # @return [Boolean] - attr_accessor :tax_ship - alias_method :tax_ship?, :tax_ship - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @location_id = args[:location_id] unless args[:location_id].nil? - @postal_code = args[:postal_code] unless args[:postal_code].nil? - @rate = args[:rate] unless args[:rate].nil? - @region = args[:region] unless args[:region].nil? - @tax_ship = args[:tax_ship] unless args[:tax_ship].nil? - end - end - - # - class ProductUnitPricingBaseMeasure - include Google::Apis::Core::Hashable - - # The unit of the denominator. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The denominator of the unit price. - # 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) - @unit = args[:unit] unless args[:unit].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class ProductUnitPricingMeasure - include Google::Apis::Core::Hashable - - # The unit of the measure. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The measure of an item. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @unit = args[:unit] unless args[:unit].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class BatchProductsRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch products request. - class ProductsBatchRequestEntry - include Google::Apis::Core::Hashable - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - # Product data. - # Corresponds to the JSON property `product` - # @return [Google::Apis::ContentV2::Product] - attr_accessor :product - - # The ID of the product to get or delete. Only defined if the method is get or - # delete. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - @product = args[:product] unless args[:product].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - end - end - - # - class BatchProductsResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # productsCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch products response. - class ProductsBatchResponseEntry - include Google::Apis::Core::Hashable - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - # Identifies what kind of resource this is. Value: the fixed string "content# - # productsCustomBatchResponseEntry". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Product data. - # Corresponds to the JSON property `product` - # @return [Google::Apis::ContentV2::Product] - attr_accessor :product - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @kind = args[:kind] unless args[:kind].nil? - @product = args[:product] unless args[:product].nil? - end - end - - # - class ListProductsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # productsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of products. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class BatchProductStatusesRequest - include Google::Apis::Core::Hashable - - # The request entries to be processed in the batch. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # A batch entry encoding a single non-batch productstatuses request. - class ProductStatusesBatchRequestEntry - include Google::Apis::Core::Hashable - - # An entry ID, unique within the batch request. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # The ID of the managing account. - # Corresponds to the JSON property `merchantId` - # @return [String] - attr_accessor :merchant_id - - # - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :request_method - - # The ID of the product whose status to get. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @merchant_id = args[:merchant_id] unless args[:merchant_id].nil? - @request_method = args[:request_method] unless args[:request_method].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - end - end - - # - class BatchProductStatusesResponse - include Google::Apis::Core::Hashable - - # The result of the execution of the batch requests. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Identifies what kind of resource this is. Value: the fixed string "content# - # productstatusesCustomBatchResponse". - # 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) - @entries = args[:entries] unless args[:entries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A batch entry encoding a single non-batch productstatuses response. - class ProductStatusesBatchResponseEntry - include Google::Apis::Core::Hashable - - # The ID of the request entry this entry responds to. - # Corresponds to the JSON property `batchId` - # @return [Fixnum] - attr_accessor :batch_id - - # A list of errors returned by a failed batch entry. - # Corresponds to the JSON property `errors` - # @return [Google::Apis::ContentV2::Errors] - attr_accessor :errors - - # Identifies what kind of resource this is. Value: the fixed string "content# - # productstatusesCustomBatchResponseEntry". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The status of a product, i.e., information about a product computed - # asynchronously by the data quality analysis. - # Corresponds to the JSON property `productStatus` - # @return [Google::Apis::ContentV2::ProductStatus] - attr_accessor :product_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_id = args[:batch_id] unless args[:batch_id].nil? - @errors = args[:errors] unless args[:errors].nil? - @kind = args[:kind] unless args[:kind].nil? - @product_status = args[:product_status] unless args[:product_status].nil? - end - end - - # - class ListProductStatusesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "content# - # productstatusesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token for the retrieval of the next page of products statuses. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - 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? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class Weight - include Google::Apis::Core::Hashable - - # The weight unit. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The weight represented as a number. - # 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) - @unit = args[:unit] unless args[:unit].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end -end diff --git a/generated/google/apis/content_v2/representations.rb b/generated/google/apis/content_v2/representations.rb deleted file mode 100644 index 88d11574d..000000000 --- a/generated/google/apis/content_v2/representations.rb +++ /dev/null @@ -1,1456 +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 ContentV2 - - class Account - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountAdwordsLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountIdentifier - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShipping - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingCarrierRate - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingLocationGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingPostalCodeRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingRateTable - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingRateTableCell - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingShippingService - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingShippingServiceCalculationMethod - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingShippingServiceCostRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountStatusDataQualityIssue - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountStatusExampleItem - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountTax - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountTaxTaxRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountUser - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountsAuthInfoResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountsBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountsBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountShippingRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountShippingResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountShippingBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountShippingResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountStatusesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountStatusesBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountStatusesBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountTaxRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountTaxBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAccountTaxResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountTaxBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountTaxResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Datafeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedFetchSchedule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedStatusError - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedStatusExample - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDatafeedsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedsBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDatafeedsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedsBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDatafeedsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDatafeedStatusesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedStatusesBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDatafeedStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatafeedStatusesBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDatafeedStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Error - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Errors - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Inventory - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchInventoryRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InventoryBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchInventoryResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InventoryBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SetInventoryRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SetInventoryResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LoyaltyPoints - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Price - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Product - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductAspect - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductCustomAttribute - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductCustomGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductDestination - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductInstallment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductShipping - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductShippingDimension - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductShippingWeight - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductStatusDataQualityIssue - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductStatusDestinationStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductTax - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductUnitPricingBaseMeasure - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductUnitPricingMeasure - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchProductsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductsBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchProductsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductsBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListProductsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchProductStatusesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductStatusesBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchProductStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProductStatusesBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListProductStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Weight - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Account - class Representation < Google::Apis::Core::JsonRepresentation - property :adult_content, as: 'adultContent' - collection :adwords_links, as: 'adwordsLinks', class: Google::Apis::ContentV2::AccountAdwordsLink, decorator: Google::Apis::ContentV2::AccountAdwordsLink::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :reviews_url, as: 'reviewsUrl' - property :seller_id, as: 'sellerId' - collection :users, as: 'users', class: Google::Apis::ContentV2::AccountUser, decorator: Google::Apis::ContentV2::AccountUser::Representation - - property :website_url, as: 'websiteUrl' - end - end - - # @private - class AccountAdwordsLink - class Representation < Google::Apis::Core::JsonRepresentation - property :adwords_id, as: 'adwordsId' - property :status, as: 'status' - end - end - - # @private - class AccountIdentifier - class Representation < Google::Apis::Core::JsonRepresentation - property :aggregator_id, as: 'aggregatorId' - property :merchant_id, as: 'merchantId' - end - end - - # @private - class AccountShipping - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :carrier_rates, as: 'carrierRates', class: Google::Apis::ContentV2::AccountShippingCarrierRate, decorator: Google::Apis::ContentV2::AccountShippingCarrierRate::Representation - - property :kind, as: 'kind' - collection :location_groups, as: 'locationGroups', class: Google::Apis::ContentV2::AccountShippingLocationGroup, decorator: Google::Apis::ContentV2::AccountShippingLocationGroup::Representation - - collection :rate_tables, as: 'rateTables', class: Google::Apis::ContentV2::AccountShippingRateTable, decorator: Google::Apis::ContentV2::AccountShippingRateTable::Representation - - collection :services, as: 'services', class: Google::Apis::ContentV2::AccountShippingShippingService, decorator: Google::Apis::ContentV2::AccountShippingShippingService::Representation - - end - end - - # @private - class AccountShippingCarrierRate - class Representation < Google::Apis::Core::JsonRepresentation - property :carrier, as: 'carrier' - property :carrier_service, as: 'carrierService' - property :modifier_flat_rate, as: 'modifierFlatRate', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :modifier_percent, as: 'modifierPercent' - property :name, as: 'name' - property :sale_country, as: 'saleCountry' - property :shipping_origin, as: 'shippingOrigin' - end - end - - # @private - class AccountShippingCondition - class Representation < Google::Apis::Core::JsonRepresentation - property :delivery_location_group, as: 'deliveryLocationGroup' - property :delivery_location_id, as: 'deliveryLocationId' - property :delivery_postal_code, as: 'deliveryPostalCode' - property :delivery_postal_code_range, as: 'deliveryPostalCodeRange', class: Google::Apis::ContentV2::AccountShippingPostalCodeRange, decorator: Google::Apis::ContentV2::AccountShippingPostalCodeRange::Representation - - property :price_max, as: 'priceMax', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :shipping_label, as: 'shippingLabel' - property :weight_max, as: 'weightMax', class: Google::Apis::ContentV2::Weight, decorator: Google::Apis::ContentV2::Weight::Representation - - end - end - - # @private - class AccountShippingLocationGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :country, as: 'country' - collection :location_ids, as: 'locationIds' - property :name, as: 'name' - collection :postal_code_ranges, as: 'postalCodeRanges', class: Google::Apis::ContentV2::AccountShippingPostalCodeRange, decorator: Google::Apis::ContentV2::AccountShippingPostalCodeRange::Representation - - collection :postal_codes, as: 'postalCodes' - end - end - - # @private - class AccountShippingPostalCodeRange - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end' - property :start, as: 'start' - end - end - - # @private - class AccountShippingRateTable - class Representation < Google::Apis::Core::JsonRepresentation - collection :content, as: 'content', class: Google::Apis::ContentV2::AccountShippingRateTableCell, decorator: Google::Apis::ContentV2::AccountShippingRateTableCell::Representation - - property :name, as: 'name' - property :sale_country, as: 'saleCountry' - end - end - - # @private - class AccountShippingRateTableCell - class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::ContentV2::AccountShippingCondition, decorator: Google::Apis::ContentV2::AccountShippingCondition::Representation - - property :rate, as: 'rate', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - end - end - - # @private - class AccountShippingShippingService - class Representation < Google::Apis::Core::JsonRepresentation - property :active, as: 'active' - property :calculation_method, as: 'calculationMethod', class: Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod, decorator: Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod::Representation - - property :cost_rule_tree, as: 'costRuleTree', class: Google::Apis::ContentV2::AccountShippingShippingServiceCostRule, decorator: Google::Apis::ContentV2::AccountShippingShippingServiceCostRule::Representation - - property :name, as: 'name' - property :sale_country, as: 'saleCountry' - end - end - - # @private - class AccountShippingShippingServiceCalculationMethod - class Representation < Google::Apis::Core::JsonRepresentation - property :carrier_rate, as: 'carrierRate' - property :excluded, as: 'excluded' - property :flat_rate, as: 'flatRate', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :percentage_rate, as: 'percentageRate' - property :rate_table, as: 'rateTable' - end - end - - # @private - class AccountShippingShippingServiceCostRule - class Representation < Google::Apis::Core::JsonRepresentation - property :calculation_method, as: 'calculationMethod', class: Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod, decorator: Google::Apis::ContentV2::AccountShippingShippingServiceCalculationMethod::Representation - - collection :children, as: 'children', class: Google::Apis::ContentV2::AccountShippingShippingServiceCostRule, decorator: Google::Apis::ContentV2::AccountShippingShippingServiceCostRule::Representation - - property :condition, as: 'condition', class: Google::Apis::ContentV2::AccountShippingCondition, decorator: Google::Apis::ContentV2::AccountShippingCondition::Representation - - end - end - - # @private - class AccountStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :data_quality_issues, as: 'dataQualityIssues', class: Google::Apis::ContentV2::AccountStatusDataQualityIssue, decorator: Google::Apis::ContentV2::AccountStatusDataQualityIssue::Representation - - property :kind, as: 'kind' - end - end - - # @private - class AccountStatusDataQualityIssue - class Representation < Google::Apis::Core::JsonRepresentation - property :country, as: 'country' - property :displayed_value, as: 'displayedValue' - collection :example_items, as: 'exampleItems', class: Google::Apis::ContentV2::AccountStatusExampleItem, decorator: Google::Apis::ContentV2::AccountStatusExampleItem::Representation - - property :id, as: 'id' - property :last_checked, as: 'lastChecked' - property :num_items, as: 'numItems' - property :severity, as: 'severity' - property :submitted_value, as: 'submittedValue' - end - end - - # @private - class AccountStatusExampleItem - class Representation < Google::Apis::Core::JsonRepresentation - property :item_id, as: 'itemId' - property :link, as: 'link' - property :submitted_value, as: 'submittedValue' - property :title, as: 'title' - property :value_on_landing_page, as: 'valueOnLandingPage' - end - end - - # @private - class AccountTax - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :kind, as: 'kind' - collection :rules, as: 'rules', class: Google::Apis::ContentV2::AccountTaxTaxRule, decorator: Google::Apis::ContentV2::AccountTaxTaxRule::Representation - - end - end - - # @private - class AccountTaxTaxRule - class Representation < Google::Apis::Core::JsonRepresentation - property :country, as: 'country' - property :location_id, as: 'locationId' - property :rate_percent, as: 'ratePercent' - property :shipping_taxed, as: 'shippingTaxed' - property :use_global_rate, as: 'useGlobalRate' - end - end - - # @private - class AccountUser - class Representation < Google::Apis::Core::JsonRepresentation - property :admin, as: 'admin' - property :email_address, as: 'emailAddress' - end - end - - # @private - class AccountsAuthInfoResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :account_identifiers, as: 'accountIdentifiers', class: Google::Apis::ContentV2::AccountIdentifier, decorator: Google::Apis::ContentV2::AccountIdentifier::Representation - - property :kind, as: 'kind' - end - end - - # @private - class BatchAccountsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountsBatchRequestEntry, decorator: Google::Apis::ContentV2::AccountsBatchRequestEntry::Representation - - end - end - - # @private - class AccountsBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account, as: 'account', class: Google::Apis::ContentV2::Account, decorator: Google::Apis::ContentV2::Account::Representation - - property :account_id, as: 'accountId' - property :batch_id, as: 'batchId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - end - end - - # @private - class BatchAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountsBatchResponseEntry, decorator: Google::Apis::ContentV2::AccountsBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class AccountsBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account, as: 'account', class: Google::Apis::ContentV2::Account, decorator: Google::Apis::ContentV2::Account::Representation - - property :batch_id, as: 'batchId' - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::Account, decorator: Google::Apis::ContentV2::Account::Representation - - end - end - - # @private - class BatchAccountShippingRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountShippingBatchRequestEntry, decorator: Google::Apis::ContentV2::AccountShippingBatchRequestEntry::Representation - - end - end - - # @private - class AccountShippingBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :account_shipping, as: 'accountShipping', class: Google::Apis::ContentV2::AccountShipping, decorator: Google::Apis::ContentV2::AccountShipping::Representation - - property :batch_id, as: 'batchId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - end - end - - # @private - class BatchAccountShippingResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountShippingBatchResponseEntry, decorator: Google::Apis::ContentV2::AccountShippingBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class AccountShippingBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account_shipping, as: 'accountShipping', class: Google::Apis::ContentV2::AccountShipping, decorator: Google::Apis::ContentV2::AccountShipping::Representation - - property :batch_id, as: 'batchId' - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListAccountShippingResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::AccountShipping, decorator: Google::Apis::ContentV2::AccountShipping::Representation - - end - end - - # @private - class BatchAccountStatusesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountStatusesBatchRequestEntry, decorator: Google::Apis::ContentV2::AccountStatusesBatchRequestEntry::Representation - - end - end - - # @private - class AccountStatusesBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :batch_id, as: 'batchId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - end - end - - # @private - class BatchAccountStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountStatusesBatchResponseEntry, decorator: Google::Apis::ContentV2::AccountStatusesBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class AccountStatusesBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account_status, as: 'accountStatus', class: Google::Apis::ContentV2::AccountStatus, decorator: Google::Apis::ContentV2::AccountStatus::Representation - - property :batch_id, as: 'batchId' - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - end - end - - # @private - class ListAccountStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::AccountStatus, decorator: Google::Apis::ContentV2::AccountStatus::Representation - - end - end - - # @private - class BatchAccountTaxRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountTaxBatchRequestEntry, decorator: Google::Apis::ContentV2::AccountTaxBatchRequestEntry::Representation - - end - end - - # @private - class AccountTaxBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :account_tax, as: 'accountTax', class: Google::Apis::ContentV2::AccountTax, decorator: Google::Apis::ContentV2::AccountTax::Representation - - property :batch_id, as: 'batchId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - end - end - - # @private - class BatchAccountTaxResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::AccountTaxBatchResponseEntry, decorator: Google::Apis::ContentV2::AccountTaxBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class AccountTaxBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :account_tax, as: 'accountTax', class: Google::Apis::ContentV2::AccountTax, decorator: Google::Apis::ContentV2::AccountTax::Representation - - property :batch_id, as: 'batchId' - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListAccountTaxResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::AccountTax, decorator: Google::Apis::ContentV2::AccountTax::Representation - - end - end - - # @private - class Datafeed - class Representation < Google::Apis::Core::JsonRepresentation - property :attribute_language, as: 'attributeLanguage' - property :content_language, as: 'contentLanguage' - property :content_type, as: 'contentType' - property :fetch_schedule, as: 'fetchSchedule', class: Google::Apis::ContentV2::DatafeedFetchSchedule, decorator: Google::Apis::ContentV2::DatafeedFetchSchedule::Representation - - property :file_name, as: 'fileName' - property :format, as: 'format', class: Google::Apis::ContentV2::DatafeedFormat, decorator: Google::Apis::ContentV2::DatafeedFormat::Representation - - property :id, as: 'id' - collection :intended_destinations, as: 'intendedDestinations' - property :kind, as: 'kind' - property :name, as: 'name' - property :target_country, as: 'targetCountry' - end - end - - # @private - class DatafeedFetchSchedule - class Representation < Google::Apis::Core::JsonRepresentation - property :day_of_month, as: 'dayOfMonth' - property :fetch_url, as: 'fetchUrl' - property :hour, as: 'hour' - property :password, as: 'password' - property :time_zone, as: 'timeZone' - property :username, as: 'username' - property :weekday, as: 'weekday' - end - end - - # @private - class DatafeedFormat - class Representation < Google::Apis::Core::JsonRepresentation - property :column_delimiter, as: 'columnDelimiter' - property :file_encoding, as: 'fileEncoding' - property :quoting_mode, as: 'quotingMode' - end - end - - # @private - class DatafeedStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :datafeed_id, as: 'datafeedId' - collection :errors, as: 'errors', class: Google::Apis::ContentV2::DatafeedStatusError, decorator: Google::Apis::ContentV2::DatafeedStatusError::Representation - - property :items_total, as: 'itemsTotal' - property :items_valid, as: 'itemsValid' - property :kind, as: 'kind' - property :last_upload_date, as: 'lastUploadDate' - property :processing_status, as: 'processingStatus' - collection :warnings, as: 'warnings', class: Google::Apis::ContentV2::DatafeedStatusError, decorator: Google::Apis::ContentV2::DatafeedStatusError::Representation - - end - end - - # @private - class DatafeedStatusError - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :count, as: 'count' - collection :examples, as: 'examples', class: Google::Apis::ContentV2::DatafeedStatusExample, decorator: Google::Apis::ContentV2::DatafeedStatusExample::Representation - - property :message, as: 'message' - end - end - - # @private - class DatafeedStatusExample - class Representation < Google::Apis::Core::JsonRepresentation - property :item_id, as: 'itemId' - property :line_number, as: 'lineNumber' - property :value, as: 'value' - end - end - - # @private - class BatchDatafeedsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::DatafeedsBatchRequestEntry, decorator: Google::Apis::ContentV2::DatafeedsBatchRequestEntry::Representation - - end - end - - # @private - class DatafeedsBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :datafeed, as: 'datafeed', class: Google::Apis::ContentV2::Datafeed, decorator: Google::Apis::ContentV2::Datafeed::Representation - - property :datafeed_id, as: 'datafeedId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - end - end - - # @private - class BatchDatafeedsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::DatafeedsBatchResponseEntry, decorator: Google::Apis::ContentV2::DatafeedsBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class DatafeedsBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :datafeed, as: 'datafeed', class: Google::Apis::ContentV2::Datafeed, decorator: Google::Apis::ContentV2::Datafeed::Representation - - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - end - end - - # @private - class ListDatafeedsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::Datafeed, decorator: Google::Apis::ContentV2::Datafeed::Representation - - end - end - - # @private - class BatchDatafeedStatusesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::DatafeedStatusesBatchRequestEntry, decorator: Google::Apis::ContentV2::DatafeedStatusesBatchRequestEntry::Representation - - end - end - - # @private - class DatafeedStatusesBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :datafeed_id, as: 'datafeedId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - end - end - - # @private - class BatchDatafeedStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::DatafeedStatusesBatchResponseEntry, decorator: Google::Apis::ContentV2::DatafeedStatusesBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class DatafeedStatusesBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :datafeed_status, as: 'datafeedStatus', class: Google::Apis::ContentV2::DatafeedStatus, decorator: Google::Apis::ContentV2::DatafeedStatus::Representation - - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - end - end - - # @private - class ListDatafeedStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::DatafeedStatus, decorator: Google::Apis::ContentV2::DatafeedStatus::Representation - - end - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - property :domain, as: 'domain' - property :message, as: 'message' - property :reason, as: 'reason' - end - end - - # @private - class Errors - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :errors, as: 'errors', class: Google::Apis::ContentV2::Error, decorator: Google::Apis::ContentV2::Error::Representation - - property :message, as: 'message' - end - end - - # @private - class Inventory - class Representation < Google::Apis::Core::JsonRepresentation - property :availability, as: 'availability' - property :kind, as: 'kind' - property :price, as: 'price', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :quantity, as: 'quantity' - property :sale_price, as: 'salePrice', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :sale_price_effective_date, as: 'salePriceEffectiveDate' - end - end - - # @private - class BatchInventoryRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::InventoryBatchRequestEntry, decorator: Google::Apis::ContentV2::InventoryBatchRequestEntry::Representation - - end - end - - # @private - class InventoryBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :inventory, as: 'inventory', class: Google::Apis::ContentV2::Inventory, decorator: Google::Apis::ContentV2::Inventory::Representation - - property :merchant_id, as: 'merchantId' - property :product_id, as: 'productId' - property :store_code, as: 'storeCode' - end - end - - # @private - class BatchInventoryResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::InventoryBatchResponseEntry, decorator: Google::Apis::ContentV2::InventoryBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class InventoryBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - property :kind, as: 'kind' - end - end - - # @private - class SetInventoryRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :availability, as: 'availability' - property :price, as: 'price', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :quantity, as: 'quantity' - property :sale_price, as: 'salePrice', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :sale_price_effective_date, as: 'salePriceEffectiveDate' - end - end - - # @private - class SetInventoryResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - end - end - - # @private - class LoyaltyPoints - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :points_value, as: 'pointsValue' - property :ratio, as: 'ratio' - end - end - - # @private - class Price - class Representation < Google::Apis::Core::JsonRepresentation - property :currency, as: 'currency' - property :value, as: 'value' - end - end - - # @private - class Product - class Representation < Google::Apis::Core::JsonRepresentation - collection :additional_image_links, as: 'additionalImageLinks' - property :adult, as: 'adult' - property :adwords_grouping, as: 'adwordsGrouping' - collection :adwords_labels, as: 'adwordsLabels' - property :adwords_redirect, as: 'adwordsRedirect' - property :age_group, as: 'ageGroup' - collection :aspects, as: 'aspects', class: Google::Apis::ContentV2::ProductAspect, decorator: Google::Apis::ContentV2::ProductAspect::Representation - - property :availability, as: 'availability' - property :availability_date, as: 'availabilityDate' - property :brand, as: 'brand' - property :channel, as: 'channel' - property :color, as: 'color' - property :condition, as: 'condition' - property :content_language, as: 'contentLanguage' - collection :custom_attributes, as: 'customAttributes', class: Google::Apis::ContentV2::ProductCustomAttribute, decorator: Google::Apis::ContentV2::ProductCustomAttribute::Representation - - collection :custom_groups, as: 'customGroups', class: Google::Apis::ContentV2::ProductCustomGroup, decorator: Google::Apis::ContentV2::ProductCustomGroup::Representation - - property :custom_label0, as: 'customLabel0' - property :custom_label1, as: 'customLabel1' - property :custom_label2, as: 'customLabel2' - property :custom_label3, as: 'customLabel3' - property :custom_label4, as: 'customLabel4' - property :description, as: 'description' - collection :destinations, as: 'destinations', class: Google::Apis::ContentV2::ProductDestination, decorator: Google::Apis::ContentV2::ProductDestination::Representation - - property :display_ads_id, as: 'displayAdsId' - property :display_ads_link, as: 'displayAdsLink' - collection :display_ads_similar_ids, as: 'displayAdsSimilarIds' - property :display_ads_title, as: 'displayAdsTitle' - property :display_ads_value, as: 'displayAdsValue' - property :energy_efficiency_class, as: 'energyEfficiencyClass' - property :expiration_date, as: 'expirationDate' - property :gender, as: 'gender' - property :google_product_category, as: 'googleProductCategory' - property :gtin, as: 'gtin' - property :id, as: 'id' - property :identifier_exists, as: 'identifierExists' - property :image_link, as: 'imageLink' - property :installment, as: 'installment', class: Google::Apis::ContentV2::ProductInstallment, decorator: Google::Apis::ContentV2::ProductInstallment::Representation - - property :is_bundle, as: 'isBundle' - property :item_group_id, as: 'itemGroupId' - property :kind, as: 'kind' - property :link, as: 'link' - property :loyalty_points, as: 'loyaltyPoints', class: Google::Apis::ContentV2::LoyaltyPoints, decorator: Google::Apis::ContentV2::LoyaltyPoints::Representation - - property :material, as: 'material' - property :mobile_link, as: 'mobileLink' - property :mpn, as: 'mpn' - property :multipack, as: 'multipack' - property :offer_id, as: 'offerId' - property :online_only, as: 'onlineOnly' - property :pattern, as: 'pattern' - property :price, as: 'price', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :product_type, as: 'productType' - property :sale_price, as: 'salePrice', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :sale_price_effective_date, as: 'salePriceEffectiveDate' - collection :shipping, as: 'shipping', class: Google::Apis::ContentV2::ProductShipping, decorator: Google::Apis::ContentV2::ProductShipping::Representation - - property :shipping_height, as: 'shippingHeight', class: Google::Apis::ContentV2::ProductShippingDimension, decorator: Google::Apis::ContentV2::ProductShippingDimension::Representation - - property :shipping_label, as: 'shippingLabel' - property :shipping_length, as: 'shippingLength', class: Google::Apis::ContentV2::ProductShippingDimension, decorator: Google::Apis::ContentV2::ProductShippingDimension::Representation - - property :shipping_weight, as: 'shippingWeight', class: Google::Apis::ContentV2::ProductShippingWeight, decorator: Google::Apis::ContentV2::ProductShippingWeight::Representation - - property :shipping_width, as: 'shippingWidth', class: Google::Apis::ContentV2::ProductShippingDimension, decorator: Google::Apis::ContentV2::ProductShippingDimension::Representation - - property :size_system, as: 'sizeSystem' - property :size_type, as: 'sizeType' - collection :sizes, as: 'sizes' - property :target_country, as: 'targetCountry' - collection :taxes, as: 'taxes', class: Google::Apis::ContentV2::ProductTax, decorator: Google::Apis::ContentV2::ProductTax::Representation - - property :title, as: 'title' - property :unit_pricing_base_measure, as: 'unitPricingBaseMeasure', class: Google::Apis::ContentV2::ProductUnitPricingBaseMeasure, decorator: Google::Apis::ContentV2::ProductUnitPricingBaseMeasure::Representation - - property :unit_pricing_measure, as: 'unitPricingMeasure', class: Google::Apis::ContentV2::ProductUnitPricingMeasure, decorator: Google::Apis::ContentV2::ProductUnitPricingMeasure::Representation - - collection :validated_destinations, as: 'validatedDestinations' - collection :warnings, as: 'warnings', class: Google::Apis::ContentV2::Error, decorator: Google::Apis::ContentV2::Error::Representation - - end - end - - # @private - class ProductAspect - class Representation < Google::Apis::Core::JsonRepresentation - property :aspect_name, as: 'aspectName' - property :destination_name, as: 'destinationName' - property :intention, as: 'intention' - end - end - - # @private - class ProductCustomAttribute - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :type, as: 'type' - property :unit, as: 'unit' - property :value, as: 'value' - end - end - - # @private - class ProductCustomGroup - class Representation < Google::Apis::Core::JsonRepresentation - collection :attributes, as: 'attributes', class: Google::Apis::ContentV2::ProductCustomAttribute, decorator: Google::Apis::ContentV2::ProductCustomAttribute::Representation - - property :name, as: 'name' - end - end - - # @private - class ProductDestination - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_name, as: 'destinationName' - property :intention, as: 'intention' - end - end - - # @private - class ProductInstallment - class Representation < Google::Apis::Core::JsonRepresentation - property :amount, as: 'amount', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :months, as: 'months' - end - end - - # @private - class ProductShipping - class Representation < Google::Apis::Core::JsonRepresentation - property :country, as: 'country' - property :location_group_name, as: 'locationGroupName' - property :location_id, as: 'locationId' - property :postal_code, as: 'postalCode' - property :price, as: 'price', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation - - property :region, as: 'region' - property :service, as: 'service' - end - end - - # @private - class ProductShippingDimension - class Representation < Google::Apis::Core::JsonRepresentation - property :unit, as: 'unit' - property :value, as: 'value' - end - end - - # @private - class ProductShippingWeight - class Representation < Google::Apis::Core::JsonRepresentation - property :unit, as: 'unit' - property :value, as: 'value' - end - end - - # @private - class ProductStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_date, as: 'creationDate' - collection :data_quality_issues, as: 'dataQualityIssues', class: Google::Apis::ContentV2::ProductStatusDataQualityIssue, decorator: Google::Apis::ContentV2::ProductStatusDataQualityIssue::Representation - - collection :destination_statuses, as: 'destinationStatuses', class: Google::Apis::ContentV2::ProductStatusDestinationStatus, decorator: Google::Apis::ContentV2::ProductStatusDestinationStatus::Representation - - property :google_expiration_date, as: 'googleExpirationDate' - property :kind, as: 'kind' - property :last_update_date, as: 'lastUpdateDate' - property :link, as: 'link' - property :product_id, as: 'productId' - property :title, as: 'title' - end - end - - # @private - class ProductStatusDataQualityIssue - class Representation < Google::Apis::Core::JsonRepresentation - property :detail, as: 'detail' - property :fetch_status, as: 'fetchStatus' - property :id, as: 'id' - property :location, as: 'location' - property :severity, as: 'severity' - property :timestamp, as: 'timestamp' - property :value_on_landing_page, as: 'valueOnLandingPage' - property :value_provided, as: 'valueProvided' - end - end - - # @private - class ProductStatusDestinationStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :approval_status, as: 'approvalStatus' - property :destination, as: 'destination' - property :intention, as: 'intention' - end - end - - # @private - class ProductTax - class Representation < Google::Apis::Core::JsonRepresentation - property :country, as: 'country' - property :location_id, as: 'locationId' - property :postal_code, as: 'postalCode' - property :rate, as: 'rate' - property :region, as: 'region' - property :tax_ship, as: 'taxShip' - end - end - - # @private - class ProductUnitPricingBaseMeasure - class Representation < Google::Apis::Core::JsonRepresentation - property :unit, as: 'unit' - property :value, as: 'value' - end - end - - # @private - class ProductUnitPricingMeasure - class Representation < Google::Apis::Core::JsonRepresentation - property :unit, as: 'unit' - property :value, as: 'value' - end - end - - # @private - class BatchProductsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::ProductsBatchRequestEntry, decorator: Google::Apis::ContentV2::ProductsBatchRequestEntry::Representation - - end - end - - # @private - class ProductsBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - property :product, as: 'product', class: Google::Apis::ContentV2::Product, decorator: Google::Apis::ContentV2::Product::Representation - - property :product_id, as: 'productId' - end - end - - # @private - class BatchProductsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::ProductsBatchResponseEntry, decorator: Google::Apis::ContentV2::ProductsBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ProductsBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - property :kind, as: 'kind' - property :product, as: 'product', class: Google::Apis::ContentV2::Product, decorator: Google::Apis::ContentV2::Product::Representation - - end - end - - # @private - class ListProductsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::Product, decorator: Google::Apis::ContentV2::Product::Representation - - end - end - - # @private - class BatchProductStatusesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::ProductStatusesBatchRequestEntry, decorator: Google::Apis::ContentV2::ProductStatusesBatchRequestEntry::Representation - - end - end - - # @private - class ProductStatusesBatchRequestEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :merchant_id, as: 'merchantId' - property :request_method, as: 'method' - property :product_id, as: 'productId' - end - end - - # @private - class BatchProductStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::ContentV2::ProductStatusesBatchResponseEntry, decorator: Google::Apis::ContentV2::ProductStatusesBatchResponseEntry::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ProductStatusesBatchResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :batch_id, as: 'batchId' - property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation - - property :kind, as: 'kind' - property :product_status, as: 'productStatus', class: Google::Apis::ContentV2::ProductStatus, decorator: Google::Apis::ContentV2::ProductStatus::Representation - - end - end - - # @private - class ListProductStatusesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ContentV2::ProductStatus, decorator: Google::Apis::ContentV2::ProductStatus::Representation - - end - end - - # @private - class Weight - class Representation < Google::Apis::Core::JsonRepresentation - property :unit, as: 'unit' - property :value, as: 'value' - end - end - end - end -end diff --git a/generated/google/apis/content_v2/service.rb b/generated/google/apis/content_v2/service.rb deleted file mode 100644 index e6f6eb3c7..000000000 --- a/generated/google/apis/content_v2/service.rb +++ /dev/null @@ -1,1706 +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 ContentV2 - # Content API for Shopping - # - # Manage product items, inventory, and Merchant Center accounts for Google - # Shopping. - # - # @example - # require 'google/apis/content_v2' - # - # Content = Google::Apis::ContentV2 # Alias the module - # service = Content::ShoppingContentService.new - # - # @see https://developers.google.com/shopping-content/v2/ - class ShoppingContentService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - attr_accessor :quota_user - - # @return [String] - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'content/v2/') - end - - # Returns information about 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::ContentV2::AccountsAuthInfoResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountsAuthInfoResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_authinfo(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/authinfo' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::AccountsAuthInfoResponse::Representation - command.response_class = Google::Apis::ContentV2::AccountsAuthInfoResponse - 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, inserts, updates, and deletes multiple Merchant Center (sub-) - # accounts in a single request. - # @param [Google::Apis::ContentV2::BatchAccountsRequest] batch_accounts_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::ContentV2::BatchAccountsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchAccountsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_account(batch_accounts_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchAccountsRequest::Representation - command.request_object = batch_accounts_request_object - command.response_representation = Google::Apis::ContentV2::BatchAccountsResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchAccountsResponse - 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 Merchant Center sub-account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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_account(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounts/{accountId}' - command = make_simple_command(:delete, path, options) - command.params['merchantId'] = merchant_id unless merchant_id.nil? - 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 Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ContentV2::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::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(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounts/{accountId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::Account::Representation - command.response_class = Google::Apis::ContentV2::Account - command.params['merchantId'] = merchant_id unless merchant_id.nil? - 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 - - # Creates a Merchant Center sub-account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Google::Apis::ContentV2::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::ContentV2::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::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 insert_account(merchant_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounts' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::ContentV2::Account::Representation - command.response_class = Google::Apis::ContentV2::Account - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the sub-accounts in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of accounts to return in the response, used for paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListAccountsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListAccountsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListAccountsResponse::Representation - command.response_class = Google::Apis::ContentV2::ListAccountsResponse - command.params['merchantId'] = merchant_id unless merchant_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 - - # Updates a Merchant Center account. This method supports patch semantics. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account. - # @param [Google::Apis::ContentV2::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::ContentV2::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::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(merchant_id, account_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounts/{accountId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ContentV2::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::ContentV2::Account::Representation - command.response_class = Google::Apis::ContentV2::Account - command.params['merchantId'] = merchant_id unless merchant_id.nil? - 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 a Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account. - # @param [Google::Apis::ContentV2::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::ContentV2::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::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(merchant_id, account_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounts/{accountId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ContentV2::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::ContentV2::Account::Representation - command.response_class = Google::Apis::ContentV2::Account - command.params['merchantId'] = merchant_id unless merchant_id.nil? - 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 and updates the shipping settings of multiple accounts in a single - # request. - # @param [Google::Apis::ContentV2::BatchAccountShippingRequest] batch_account_shipping_request_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::BatchAccountShippingResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchAccountShippingResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_account_shipping(batch_account_shipping_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accountshipping/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchAccountShippingRequest::Representation - command.request_object = batch_account_shipping_request_object - command.response_representation = Google::Apis::ContentV2::BatchAccountShippingResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchAccountShippingResponse - command.query['dryRun'] = dry_run unless dry_run.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 shipping settings of the account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account for which to get/update account shipping settings. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::AccountShipping] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountShipping] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_shipping(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accountshipping/{accountId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::AccountShipping::Representation - command.response_class = Google::Apis::ContentV2::AccountShipping - command.params['merchantId'] = merchant_id unless merchant_id.nil? - 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 - - # Lists the shipping settings of the sub-accounts in your Merchant Center - # account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of shipping settings to return in the response, used for - # paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListAccountShippingResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListAccountShippingResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_shippings(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accountshipping' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListAccountShippingResponse::Representation - command.response_class = Google::Apis::ContentV2::ListAccountShippingResponse - command.params['merchantId'] = merchant_id unless merchant_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 - - # Updates the shipping settings of the account. This method supports patch - # semantics. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account for which to get/update account shipping settings. - # @param [Google::Apis::ContentV2::AccountShipping] account_shipping_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::AccountShipping] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountShipping] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_shipping(merchant_id, account_id, account_shipping_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accountshipping/{accountId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ContentV2::AccountShipping::Representation - command.request_object = account_shipping_object - command.response_representation = Google::Apis::ContentV2::AccountShipping::Representation - command.response_class = Google::Apis::ContentV2::AccountShipping - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['accountId'] = account_id unless account_id.nil? - command.query['dryRun'] = dry_run unless dry_run.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 shipping settings of the account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account for which to get/update account shipping settings. - # @param [Google::Apis::ContentV2::AccountShipping] account_shipping_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::AccountShipping] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountShipping] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_shipping(merchant_id, account_id, account_shipping_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accountshipping/{accountId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ContentV2::AccountShipping::Representation - command.request_object = account_shipping_object - command.response_representation = Google::Apis::ContentV2::AccountShipping::Representation - command.response_class = Google::Apis::ContentV2::AccountShipping - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['accountId'] = account_id unless account_id.nil? - command.query['dryRun'] = dry_run unless dry_run.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 [Google::Apis::ContentV2::BatchAccountStatusesRequest] batch_account_statuses_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::ContentV2::BatchAccountStatusesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchAccountStatusesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_account_status(batch_account_statuses_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accountstatuses/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchAccountStatusesRequest::Representation - command.request_object = batch_account_statuses_request_object - command.response_representation = Google::Apis::ContentV2::BatchAccountStatusesResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchAccountStatusesResponse - 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 status of a Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ContentV2::AccountStatus] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountStatus] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_status(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accountstatuses/{accountId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::AccountStatus::Representation - command.response_class = Google::Apis::ContentV2::AccountStatus - command.params['merchantId'] = merchant_id unless merchant_id.nil? - 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 - - # Lists the statuses of the sub-accounts in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of account statuses to return in the response, used for - # paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListAccountStatusesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListAccountStatusesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_statuses(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accountstatuses' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListAccountStatusesResponse::Representation - command.response_class = Google::Apis::ContentV2::ListAccountStatusesResponse - command.params['merchantId'] = merchant_id unless merchant_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 - - # Retrieves and updates tax settings of multiple accounts in a single request. - # @param [Google::Apis::ContentV2::BatchAccountTaxRequest] batch_account_tax_request_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::BatchAccountTaxResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchAccountTaxResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_account_tax(batch_account_tax_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounttax/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchAccountTaxRequest::Representation - command.request_object = batch_account_tax_request_object - command.response_representation = Google::Apis::ContentV2::BatchAccountTaxResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchAccountTaxResponse - command.query['dryRun'] = dry_run unless dry_run.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 tax settings of the account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account for which to get/update account tax settings. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::AccountTax] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountTax] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tax(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounttax/{accountId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::AccountTax::Representation - command.response_class = Google::Apis::ContentV2::AccountTax - command.params['merchantId'] = merchant_id unless merchant_id.nil? - 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 - - # Lists the tax settings of the sub-accounts in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of tax settings to return in the response, used for paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListAccountTaxResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListAccountTaxResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_taxes(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounttax' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListAccountTaxResponse::Representation - command.response_class = Google::Apis::ContentV2::ListAccountTaxResponse - command.params['merchantId'] = merchant_id unless merchant_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 - - # Updates the tax settings of the account. This method supports patch semantics. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account for which to get/update account tax settings. - # @param [Google::Apis::ContentV2::AccountTax] account_tax_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::AccountTax] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountTax] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tax(merchant_id, account_id, account_tax_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounttax/{accountId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ContentV2::AccountTax::Representation - command.request_object = account_tax_object - command.response_representation = Google::Apis::ContentV2::AccountTax::Representation - command.response_class = Google::Apis::ContentV2::AccountTax - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['accountId'] = account_id unless account_id.nil? - command.query['dryRun'] = dry_run unless dry_run.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 tax settings of the account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] account_id - # The ID of the account for which to get/update account tax settings. - # @param [Google::Apis::ContentV2::AccountTax] account_tax_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::AccountTax] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::AccountTax] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tax(merchant_id, account_id, account_tax_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/accounttax/{accountId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ContentV2::AccountTax::Representation - command.request_object = account_tax_object - command.response_representation = Google::Apis::ContentV2::AccountTax::Representation - command.response_class = Google::Apis::ContentV2::AccountTax - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['accountId'] = account_id unless account_id.nil? - command.query['dryRun'] = dry_run unless dry_run.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 [Google::Apis::ContentV2::BatchDatafeedsRequest] batch_datafeeds_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::ContentV2::BatchDatafeedsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchDatafeedsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_datafeed(batch_datafeeds_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datafeeds/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchDatafeedsRequest::Representation - command.request_object = batch_datafeeds_request_object - command.response_representation = Google::Apis::ContentV2::BatchDatafeedsResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchDatafeedsResponse - 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 datafeed from your Merchant Center account. - # @param [String] merchant_id - # @param [String] datafeed_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 [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_datafeed(merchant_id, datafeed_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeeds/{datafeedId}' - command = make_simple_command(:delete, path, options) - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['datafeedId'] = datafeed_id unless datafeed_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 datafeed from your Merchant Center account. - # @param [String] merchant_id - # @param [String] datafeed_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::ContentV2::Datafeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::Datafeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datafeed(merchant_id, datafeed_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeeds/{datafeedId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::Datafeed::Representation - command.response_class = Google::Apis::ContentV2::Datafeed - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['datafeedId'] = datafeed_id unless datafeed_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 - - # Registers a datafeed with your Merchant Center account. - # @param [String] merchant_id - # @param [Google::Apis::ContentV2::Datafeed] datafeed_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::ContentV2::Datafeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::Datafeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datafeed(merchant_id, datafeed_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeeds' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::Datafeed::Representation - command.request_object = datafeed_object - command.response_representation = Google::Apis::ContentV2::Datafeed::Representation - command.response_class = Google::Apis::ContentV2::Datafeed - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the datafeeds in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of products to return in the response, used for paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListDatafeedsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListDatafeedsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datafeeds(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeeds' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListDatafeedsResponse::Representation - command.response_class = Google::Apis::ContentV2::ListDatafeedsResponse - command.params['merchantId'] = merchant_id unless merchant_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 - - # Updates a datafeed of your Merchant Center account. This method supports patch - # semantics. - # @param [String] merchant_id - # @param [String] datafeed_id - # @param [Google::Apis::ContentV2::Datafeed] datafeed_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::ContentV2::Datafeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::Datafeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datafeed(merchant_id, datafeed_id, datafeed_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeeds/{datafeedId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ContentV2::Datafeed::Representation - command.request_object = datafeed_object - command.response_representation = Google::Apis::ContentV2::Datafeed::Representation - command.response_class = Google::Apis::ContentV2::Datafeed - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['datafeedId'] = datafeed_id unless datafeed_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a datafeed of your Merchant Center account. - # @param [String] merchant_id - # @param [String] datafeed_id - # @param [Google::Apis::ContentV2::Datafeed] datafeed_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::ContentV2::Datafeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::Datafeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datafeed(merchant_id, datafeed_id, datafeed_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeeds/{datafeedId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ContentV2::Datafeed::Representation - command.request_object = datafeed_object - command.response_representation = Google::Apis::ContentV2::Datafeed::Representation - command.response_class = Google::Apis::ContentV2::Datafeed - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['datafeedId'] = datafeed_id unless datafeed_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 - - # - # @param [Google::Apis::ContentV2::BatchDatafeedStatusesRequest] batch_datafeed_statuses_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::ContentV2::BatchDatafeedStatusesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchDatafeedStatusesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_datafeed_status(batch_datafeed_statuses_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datafeedstatuses/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchDatafeedStatusesRequest::Representation - command.request_object = batch_datafeed_statuses_request_object - command.response_representation = Google::Apis::ContentV2::BatchDatafeedStatusesResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchDatafeedStatusesResponse - 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 status of a datafeed from your Merchant Center account. - # @param [String] merchant_id - # @param [String] datafeed_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::ContentV2::DatafeedStatus] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::DatafeedStatus] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datafeed_status(merchant_id, datafeed_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeedstatuses/{datafeedId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::DatafeedStatus::Representation - command.response_class = Google::Apis::ContentV2::DatafeedStatus - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['datafeedId'] = datafeed_id unless datafeed_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 the statuses of the datafeeds in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of products to return in the response, used for paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListDatafeedStatusesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListDatafeedStatusesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datafeed_statuses(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/datafeedstatuses' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListDatafeedStatusesResponse::Representation - command.response_class = Google::Apis::ContentV2::ListDatafeedStatusesResponse - command.params['merchantId'] = merchant_id unless merchant_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 - - # Updates price and availability for multiple products or stores in a single - # request. - # @param [Google::Apis::ContentV2::BatchInventoryRequest] batch_inventory_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::ContentV2::BatchInventoryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchInventoryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_inventory(batch_inventory_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'inventory/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchInventoryRequest::Representation - command.request_object = batch_inventory_request_object - command.response_representation = Google::Apis::ContentV2::BatchInventoryResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchInventoryResponse - 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 price and availability of a product in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] store_code - # The code of the store for which to update price and availability. Use online - # to update price and availability of an online product. - # @param [String] product_id - # The ID of the product for which to update price and availability. - # @param [Google::Apis::ContentV2::SetInventoryRequest] set_inventory_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::ContentV2::SetInventoryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::SetInventoryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_inventory(merchant_id, store_code, product_id, set_inventory_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/inventory/{storeCode}/products/{productId}' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::SetInventoryRequest::Representation - command.request_object = set_inventory_request_object - command.response_representation = Google::Apis::ContentV2::SetInventoryResponse::Representation - command.response_class = Google::Apis::ContentV2::SetInventoryResponse - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['storeCode'] = store_code unless store_code.nil? - command.params['productId'] = product_id unless product_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, inserts, and deletes multiple products in a single request. - # @param [Google::Apis::ContentV2::BatchProductsRequest] batch_products_request_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::BatchProductsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchProductsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_product(batch_products_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'products/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchProductsRequest::Representation - command.request_object = batch_products_request_object - command.response_representation = Google::Apis::ContentV2::BatchProductsResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchProductsResponse - command.query['dryRun'] = dry_run unless dry_run.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 product from your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] product_id - # The ID of the product. - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_product(merchant_id, product_id, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/products/{productId}' - command = make_simple_command(:delete, path, options) - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['productId'] = product_id unless product_id.nil? - command.query['dryRun'] = dry_run unless dry_run.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 product from your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] product_id - # The ID of the product. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::Product] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::Product] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product(merchant_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/products/{productId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::Product::Representation - command.response_class = Google::Apis::ContentV2::Product - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['productId'] = product_id unless product_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 - - # Uploads a product to your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Google::Apis::ContentV2::Product] product_object - # @param [Boolean] dry_run - # Flag to run the request in dry-run mode. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::Product] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::Product] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product(merchant_id, product_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/products' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::Product::Representation - command.request_object = product_object - command.response_representation = Google::Apis::ContentV2::Product::Representation - command.response_class = Google::Apis::ContentV2::Product - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.query['dryRun'] = dry_run unless dry_run.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the products in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of products to return in the response, used for paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListProductsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListProductsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_products(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/products' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListProductsResponse::Representation - command.response_class = Google::Apis::ContentV2::ListProductsResponse - command.params['merchantId'] = merchant_id unless merchant_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 - - # Gets the statuses of multiple products in a single request. - # @param [Google::Apis::ContentV2::BatchProductStatusesRequest] batch_product_statuses_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::ContentV2::BatchProductStatusesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::BatchProductStatusesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_product_status(batch_product_statuses_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'productstatuses/batch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ContentV2::BatchProductStatusesRequest::Representation - command.request_object = batch_product_statuses_request_object - command.response_representation = Google::Apis::ContentV2::BatchProductStatusesResponse::Representation - command.response_class = Google::Apis::ContentV2::BatchProductStatusesResponse - 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 of a product from your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [String] product_id - # The ID of the product. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ContentV2::ProductStatus] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ProductStatus] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product_status(merchant_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/productstatuses/{productId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ProductStatus::Representation - command.response_class = Google::Apis::ContentV2::ProductStatus - command.params['merchantId'] = merchant_id unless merchant_id.nil? - command.params['productId'] = product_id unless product_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 the statuses of the products in your Merchant Center account. - # @param [String] merchant_id - # The ID of the managing account. - # @param [Fixnum] max_results - # The maximum number of product statuses to return in the response, used for - # paging. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ContentV2::ListProductStatusesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContentV2::ListProductStatusesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_product_statuses(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{merchantId}/productstatuses' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ContentV2::ListProductStatusesResponse::Representation - command.response_class = Google::Apis::ContentV2::ListProductStatusesResponse - command.params['merchantId'] = merchant_id unless merchant_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 diff --git a/generated/google/apis/coordinate_v1.rb b/generated/google/apis/coordinate_v1.rb deleted file mode 100644 index 489dcbffb..000000000 --- a/generated/google/apis/coordinate_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/coordinate_v1/classes.rb b/generated/google/apis/coordinate_v1/classes.rb deleted file mode 100644 index 3c7687885..000000000 --- a/generated/google/apis/coordinate_v1/classes.rb +++ /dev/null @@ -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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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 diff --git a/generated/google/apis/coordinate_v1/representations.rb b/generated/google/apis/coordinate_v1/representations.rb deleted file mode 100644 index af849cd39..000000000 --- a/generated/google/apis/coordinate_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/coordinate_v1/service.rb b/generated/google/apis/coordinate_v1/service.rb deleted file mode 100644 index 531f841d1..000000000 --- a/generated/google/apis/coordinate_v1/service.rb +++ /dev/null @@ -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] 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] 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] 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 diff --git a/generated/google/apis/customsearch_v1.rb b/generated/google/apis/customsearch_v1.rb deleted file mode 100644 index 1b39b7662..000000000 --- a/generated/google/apis/customsearch_v1.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/customsearch_v1/classes.rb b/generated/google/apis/customsearch_v1/classes.rb deleted file mode 100644 index 9cca789d5..000000000 --- a/generated/google/apis/customsearch_v1/classes.rb +++ /dev/null @@ -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>] - 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] - 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] - 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>>] - 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] - attr_accessor :items - - # - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `promotions` - # @return [Array] - attr_accessor :promotions - - # - # Corresponds to the JSON property `queries` - # @return [Hash>] - 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 diff --git a/generated/google/apis/customsearch_v1/representations.rb b/generated/google/apis/customsearch_v1/representations.rb deleted file mode 100644 index c0baa9ebd..000000000 --- a/generated/google/apis/customsearch_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/customsearch_v1/service.rb b/generated/google/apis/customsearch_v1/service.rb deleted file mode 100644 index 0e0decaf6..000000000 --- a/generated/google/apis/customsearch_v1/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/datastore_v1beta2.rb b/generated/google/apis/datastore_v1beta2.rb deleted file mode 100644 index 41e66a8d7..000000000 --- a/generated/google/apis/datastore_v1beta2.rb +++ /dev/null @@ -1,40 +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/datastore_v1beta2/service.rb' -require 'google/apis/datastore_v1beta2/classes.rb' -require 'google/apis/datastore_v1beta2/representations.rb' - -module Google - module Apis - # Google Cloud Datastore API - # - # API for accessing Google Cloud Datastore. - # - # @see https://developers.google.com/datastore/ - module DatastoreV1beta2 - VERSION = 'V1beta2' - REVISION = '20150402' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # View and manage your Google Cloud Datastore data - AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore' - - # View your email address - AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' - end - end -end diff --git a/generated/google/apis/datastore_v1beta2/classes.rb b/generated/google/apis/datastore_v1beta2/classes.rb deleted file mode 100644 index 42e4dc805..000000000 --- a/generated/google/apis/datastore_v1beta2/classes.rb +++ /dev/null @@ -1,1186 +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 DatastoreV1beta2 - - # - class AllocateIdsRequest - include Google::Apis::Core::Hashable - - # A list of keys with incomplete key paths to allocate IDs for. No key may be - # reserved/read-only. - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @keys = args[:keys] unless args[:keys].nil? - end - end - - # - class AllocateIdsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `header` - # @return [Google::Apis::DatastoreV1beta2::ResponseHeader] - attr_accessor :header - - # The keys specified in the request (in the same order), each with its key path - # completed with a newly allocated ID. - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @header = args[:header] unless args[:header].nil? - @keys = args[:keys] unless args[:keys].nil? - end - end - - # - class BeginTransactionRequest - include Google::Apis::Core::Hashable - - # The transaction isolation level. Either snapshot or serializable. The default - # isolation level is snapshot isolation, which means that another transaction - # may not concurrently modify the data that is modified by this transaction. - # Optionally, a transaction can request to be made serializable which means that - # another transaction cannot concurrently modify the data that is read or - # modified by this transaction. - # Corresponds to the JSON property `isolationLevel` - # @return [String] - attr_accessor :isolation_level - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @isolation_level = args[:isolation_level] unless args[:isolation_level].nil? - end - end - - # - class BeginTransactionResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `header` - # @return [Google::Apis::DatastoreV1beta2::ResponseHeader] - attr_accessor :header - - # The transaction identifier (always present). - # Corresponds to the JSON property `transaction` - # @return [String] - attr_accessor :transaction - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @header = args[:header] unless args[:header].nil? - @transaction = args[:transaction] unless args[:transaction].nil? - end - end - - # - class CommitRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `ignoreReadOnly` - # @return [Boolean] - attr_accessor :ignore_read_only - alias_method :ignore_read_only?, :ignore_read_only - - # The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. - # Corresponds to the JSON property `mode` - # @return [String] - attr_accessor :mode - - # A set of changes to apply. - # Corresponds to the JSON property `mutation` - # @return [Google::Apis::DatastoreV1beta2::Mutation] - attr_accessor :mutation - - # The transaction identifier, returned by a call to beginTransaction. Must be - # set when mode is TRANSACTIONAL. - # Corresponds to the JSON property `transaction` - # @return [String] - attr_accessor :transaction - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ignore_read_only = args[:ignore_read_only] unless args[:ignore_read_only].nil? - @mode = args[:mode] unless args[:mode].nil? - @mutation = args[:mutation] unless args[:mutation].nil? - @transaction = args[:transaction] unless args[:transaction].nil? - end - end - - # - class CommitResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `header` - # @return [Google::Apis::DatastoreV1beta2::ResponseHeader] - attr_accessor :header - - # The result of performing the mutation (if any). - # Corresponds to the JSON property `mutationResult` - # @return [Google::Apis::DatastoreV1beta2::MutationResult] - attr_accessor :mutation_result - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @header = args[:header] unless args[:header].nil? - @mutation_result = args[:mutation_result] unless args[:mutation_result].nil? - end - end - - # A filter that merges the multiple other filters using the given operation. - class CompositeFilter - include Google::Apis::Core::Hashable - - # The list of filters to combine. Must contain at least one filter. - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - # The operator for combining multiple filters. Only "and" is currently supported. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filters = args[:filters] unless args[:filters].nil? - @operator = args[:operator] unless args[:operator].nil? - end - end - - # An entity. - class Entity - include Google::Apis::Core::Hashable - - # A unique identifier for an entity. - # Corresponds to the JSON property `key` - # @return [Google::Apis::DatastoreV1beta2::Key] - attr_accessor :key - - # The entity's properties. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @properties = args[:properties] unless args[:properties].nil? - end - end - - # The result of fetching an entity from the datastore. - class EntityResult - include Google::Apis::Core::Hashable - - # An entity. - # Corresponds to the JSON property `entity` - # @return [Google::Apis::DatastoreV1beta2::Entity] - attr_accessor :entity - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entity = args[:entity] unless args[:entity].nil? - end - end - - # A holder for any type of filter. Exactly one field should be specified. - class Filter - include Google::Apis::Core::Hashable - - # A filter that merges the multiple other filters using the given operation. - # Corresponds to the JSON property `compositeFilter` - # @return [Google::Apis::DatastoreV1beta2::CompositeFilter] - attr_accessor :composite_filter - - # A filter on a specific property. - # Corresponds to the JSON property `propertyFilter` - # @return [Google::Apis::DatastoreV1beta2::PropertyFilter] - attr_accessor :property_filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @composite_filter = args[:composite_filter] unless args[:composite_filter].nil? - @property_filter = args[:property_filter] unless args[:property_filter].nil? - end - end - - # A GQL query. - class GqlQuery - include Google::Apis::Core::Hashable - - # When false, the query string must not contain a literal. - # Corresponds to the JSON property `allowLiteral` - # @return [Boolean] - attr_accessor :allow_literal - alias_method :allow_literal?, :allow_literal - - # A named argument must set field GqlQueryArg.name. No two named arguments may - # have the same name. For each non-reserved named binding site in the query - # string, there must be a named argument with that name, but not necessarily the - # inverse. - # Corresponds to the JSON property `nameArgs` - # @return [Array] - attr_accessor :name_args - - # Numbered binding site @1 references the first numbered argument, effectively - # using 1-based indexing, rather than the usual 0. A numbered argument must NOT - # set field GqlQueryArg.name. For each binding site numbered i in query_string, - # there must be an ith numbered argument. The inverse must also be true. - # Corresponds to the JSON property `numberArgs` - # @return [Array] - attr_accessor :number_args - - # The query string. - # Corresponds to the JSON property `queryString` - # @return [String] - attr_accessor :query_string - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allow_literal = args[:allow_literal] unless args[:allow_literal].nil? - @name_args = args[:name_args] unless args[:name_args].nil? - @number_args = args[:number_args] unless args[:number_args].nil? - @query_string = args[:query_string] unless args[:query_string].nil? - end - end - - # A binding argument for a GQL query. - class GqlQueryArg - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `cursor` - # @return [String] - attr_accessor :cursor - - # Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". - # Must not be "". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A message that can hold any of the supported value types and associated - # metadata. - # Corresponds to the JSON property `value` - # @return [Google::Apis::DatastoreV1beta2::Value] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cursor = args[:cursor] unless args[:cursor].nil? - @name = args[:name] unless args[:name].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # A unique identifier for an entity. - class Key - include Google::Apis::Core::Hashable - - # An identifier for a particular subset of entities. - # Entities are partitioned into various subsets, each used by different datasets - # and different namespaces within a dataset and so forth. - # Corresponds to the JSON property `partitionId` - # @return [Google::Apis::DatastoreV1beta2::PartitionId] - attr_accessor :partition_id - - # The entity path. An entity path consists of one or more elements composed of a - # kind and a string or numerical identifier, which identify entities. The first - # element identifies a root entity, the second element identifies a child of the - # root entity, the third element a child of the second entity, and so forth. The - # entities identified by all prefixes of the path are called the element's - # ancestors. An entity path is always fully complete: ALL of the entity's - # ancestors are required to be in the path along with the entity identifier - # itself. The only exception is that in some documented cases, the identifier in - # the last path element (for the entity) itself may be omitted. A path can never - # be empty. The path can have at most 100 elements. - # Corresponds to the JSON property `path` - # @return [Array] - attr_accessor :path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @partition_id = args[:partition_id] unless args[:partition_id].nil? - @path = args[:path] unless args[:path].nil? - end - end - - # A (kind, ID/name) pair used to construct a key path. - # At most one of name or ID may be set. If either is set, the element is - # complete. If neither is set, the element is incomplete. - class KeyPathElement - include Google::Apis::Core::Hashable - - # The ID of the entity. Never equal to zero. Values less than zero are - # discouraged and will not be supported in the future. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. - # A kind must not contain more than 500 characters. Cannot be "". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the entity. A name matching regex "__.*__" is reserved/read-only. - # A name must not be more than 500 characters. Cannot be "". - # 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 - - # A representation of a kind. - class KindExpression - include Google::Apis::Core::Hashable - - # The name of the kind. - # 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) - @name = args[:name] unless args[:name].nil? - end - end - - # - class LookupRequest - include Google::Apis::Core::Hashable - - # Keys of entities to look up from the datastore. - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - # Options for this lookup request. Optional. - # Corresponds to the JSON property `readOptions` - # @return [Google::Apis::DatastoreV1beta2::ReadOptions] - attr_accessor :read_options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @keys = args[:keys] unless args[:keys].nil? - @read_options = args[:read_options] unless args[:read_options].nil? - end - end - - # - class LookupResponse - include Google::Apis::Core::Hashable - - # A list of keys that were not looked up due to resource constraints. - # Corresponds to the JSON property `deferred` - # @return [Array] - attr_accessor :deferred - - # Entities found. - # Corresponds to the JSON property `found` - # @return [Array] - attr_accessor :found - - # - # Corresponds to the JSON property `header` - # @return [Google::Apis::DatastoreV1beta2::ResponseHeader] - attr_accessor :header - - # Entities not found, with only the key populated. - # Corresponds to the JSON property `missing` - # @return [Array] - attr_accessor :missing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deferred = args[:deferred] unless args[:deferred].nil? - @found = args[:found] unless args[:found].nil? - @header = args[:header] unless args[:header].nil? - @missing = args[:missing] unless args[:missing].nil? - end - end - - # A set of changes to apply. - class Mutation - include Google::Apis::Core::Hashable - - # Keys of entities to delete. Each key must have a complete key path and must - # not be reserved/read-only. - # Corresponds to the JSON property `delete` - # @return [Array] - attr_accessor :delete - - # Ignore a user specified read-only period. Optional. - # Corresponds to the JSON property `force` - # @return [Boolean] - attr_accessor :force - alias_method :force?, :force - - # Entities to insert. Each inserted entity's key must have a complete path and - # must not be reserved/read-only. - # Corresponds to the JSON property `insert` - # @return [Array] - attr_accessor :insert - - # Insert entities with a newly allocated ID. Each inserted entity's key must - # omit the final identifier in its path and must not be reserved/read-only. - # Corresponds to the JSON property `insertAutoId` - # @return [Array] - attr_accessor :insert_auto_id - - # Entities to update. Each updated entity's key must have a complete path and - # must not be reserved/read-only. - # Corresponds to the JSON property `update` - # @return [Array] - attr_accessor :update - - # Entities to upsert. Each upserted entity's key must have a complete path and - # must not be reserved/read-only. - # Corresponds to the JSON property `upsert` - # @return [Array] - attr_accessor :upsert - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @delete = args[:delete] unless args[:delete].nil? - @force = args[:force] unless args[:force].nil? - @insert = args[:insert] unless args[:insert].nil? - @insert_auto_id = args[:insert_auto_id] unless args[:insert_auto_id].nil? - @update = args[:update] unless args[:update].nil? - @upsert = args[:upsert] unless args[:upsert].nil? - end - end - - # - class MutationResult - include Google::Apis::Core::Hashable - - # Number of index writes. - # Corresponds to the JSON property `indexUpdates` - # @return [Fixnum] - attr_accessor :index_updates - - # Keys for insertAutoId entities. One per entity from the request, in the same - # order. - # Corresponds to the JSON property `insertAutoIdKeys` - # @return [Array] - attr_accessor :insert_auto_id_keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @index_updates = args[:index_updates] unless args[:index_updates].nil? - @insert_auto_id_keys = args[:insert_auto_id_keys] unless args[:insert_auto_id_keys].nil? - end - end - - # An identifier for a particular subset of entities. - # Entities are partitioned into various subsets, each used by different datasets - # and different namespaces within a dataset and so forth. - class PartitionId - include Google::Apis::Core::Hashable - - # The dataset ID. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The namespace. - # Corresponds to the JSON property `namespace` - # @return [String] - attr_accessor :namespace - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @namespace = args[:namespace] unless args[:namespace].nil? - end - end - - # An entity property. - class Property - include Google::Apis::Core::Hashable - - # A blob key value. - # Corresponds to the JSON property `blobKeyValue` - # @return [String] - attr_accessor :blob_key_value - - # A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may - # have at most 500 bytes. - # Corresponds to the JSON property `blobValue` - # @return [String] - attr_accessor :blob_value - - # A boolean value. - # Corresponds to the JSON property `booleanValue` - # @return [Boolean] - attr_accessor :boolean_value - alias_method :boolean_value?, :boolean_value - - # A timestamp value. - # Corresponds to the JSON property `dateTimeValue` - # @return [DateTime] - attr_accessor :date_time_value - - # A double value. - # Corresponds to the JSON property `doubleValue` - # @return [Float] - attr_accessor :double_value - - # An entity. - # Corresponds to the JSON property `entityValue` - # @return [Google::Apis::DatastoreV1beta2::Entity] - attr_accessor :entity_value - - # If the value should be indexed. - # The indexed property may be set for a null value. When indexed is true, - # stringValue is limited to 500 characters and the blob value is limited to 500 - # bytes. Input values by default have indexed set to true; however, you can - # explicitly set indexed to true if you want. (An output value never has indexed - # explicitly set to true.) If a value is itself an entity, it cannot have - # indexed set to true. - # Corresponds to the JSON property `indexed` - # @return [Boolean] - attr_accessor :indexed - alias_method :indexed?, :indexed - - # An integer value. - # Corresponds to the JSON property `integerValue` - # @return [String] - attr_accessor :integer_value - - # A unique identifier for an entity. - # Corresponds to the JSON property `keyValue` - # @return [Google::Apis::DatastoreV1beta2::Key] - attr_accessor :key_value - - # A list value. Cannot contain another list value. A Value instance that sets - # field list_value must not set field meaning or field indexed. - # Corresponds to the JSON property `listValue` - # @return [Array] - attr_accessor :list_value - - # The meaning field is reserved and should not be used. - # Corresponds to the JSON property `meaning` - # @return [Fixnum] - attr_accessor :meaning - - # A UTF-8 encoded string value. When indexed is true, may have at most 500 - # characters. - # 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) - @blob_key_value = args[:blob_key_value] unless args[:blob_key_value].nil? - @blob_value = args[:blob_value] unless args[:blob_value].nil? - @boolean_value = args[:boolean_value] unless args[:boolean_value].nil? - @date_time_value = args[:date_time_value] unless args[:date_time_value].nil? - @double_value = args[:double_value] unless args[:double_value].nil? - @entity_value = args[:entity_value] unless args[:entity_value].nil? - @indexed = args[:indexed] unless args[:indexed].nil? - @integer_value = args[:integer_value] unless args[:integer_value].nil? - @key_value = args[:key_value] unless args[:key_value].nil? - @list_value = args[:list_value] unless args[:list_value].nil? - @meaning = args[:meaning] unless args[:meaning].nil? - @string_value = args[:string_value] unless args[:string_value].nil? - end - end - - # A representation of a property in a projection. - class PropertyExpression - include Google::Apis::Core::Hashable - - # The aggregation function to apply to the property. Optional. Can only be used - # when grouping by at least one property. Must then be set on all properties in - # the projection that are not being grouped by. Aggregation functions: first - # selects the first result as determined by the query's order. - # Corresponds to the JSON property `aggregationFunction` - # @return [String] - attr_accessor :aggregation_function - - # A reference to a property relative to the kind expressions. - # Corresponds to the JSON property `property` - # @return [Google::Apis::DatastoreV1beta2::PropertyReference] - attr_accessor :property - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aggregation_function = args[:aggregation_function] unless args[:aggregation_function].nil? - @property = args[:property] unless args[:property].nil? - end - end - - # A filter on a specific property. - class PropertyFilter - include Google::Apis::Core::Hashable - - # The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, - # greaterThanOrEqual, equal, or hasAncestor. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # A reference to a property relative to the kind expressions. - # Corresponds to the JSON property `property` - # @return [Google::Apis::DatastoreV1beta2::PropertyReference] - attr_accessor :property - - # A message that can hold any of the supported value types and associated - # metadata. - # Corresponds to the JSON property `value` - # @return [Google::Apis::DatastoreV1beta2::Value] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operator = args[:operator] unless args[:operator].nil? - @property = args[:property] unless args[:property].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # The desired order for a specific property. - class PropertyOrder - include Google::Apis::Core::Hashable - - # The direction to order by. One of ascending or descending. Optional, defaults - # to ascending. - # Corresponds to the JSON property `direction` - # @return [String] - attr_accessor :direction - - # A reference to a property relative to the kind expressions. - # Corresponds to the JSON property `property` - # @return [Google::Apis::DatastoreV1beta2::PropertyReference] - attr_accessor :property - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @direction = args[:direction] unless args[:direction].nil? - @property = args[:property] unless args[:property].nil? - end - end - - # A reference to a property relative to the kind expressions. - class PropertyReference - include Google::Apis::Core::Hashable - - # The name of the property. - # 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) - @name = args[:name] unless args[:name].nil? - end - end - - # A query. - class Query - include Google::Apis::Core::Hashable - - # An ending point for the query results. Optional. Query cursors are returned in - # query result batches. - # Corresponds to the JSON property `endCursor` - # @return [String] - attr_accessor :end_cursor - - # A holder for any type of filter. Exactly one field should be specified. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::DatastoreV1beta2::Filter] - attr_accessor :filter - - # The properties to group by (if empty, no grouping is applied to the result set) - # . - # Corresponds to the JSON property `groupBy` - # @return [Array] - attr_accessor :group_by - - # The kinds to query (if empty, returns entities from all kinds). - # Corresponds to the JSON property `kinds` - # @return [Array] - attr_accessor :kinds - - # The maximum number of results to return. Applies after all other constraints. - # Optional. - # Corresponds to the JSON property `limit` - # @return [Fixnum] - attr_accessor :limit - - # The number of results to skip. Applies before limit, but after all other - # constraints (optional, defaults to 0). - # Corresponds to the JSON property `offset` - # @return [Fixnum] - attr_accessor :offset - - # The order to apply to the query results (if empty, order is unspecified). - # Corresponds to the JSON property `order` - # @return [Array] - attr_accessor :order - - # The projection to return. If not set the entire entity is returned. - # Corresponds to the JSON property `projection` - # @return [Array] - attr_accessor :projection - - # A starting point for the query results. Optional. Query cursors are returned - # in query result batches. - # Corresponds to the JSON property `startCursor` - # @return [String] - attr_accessor :start_cursor - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_cursor = args[:end_cursor] unless args[:end_cursor].nil? - @filter = args[:filter] unless args[:filter].nil? - @group_by = args[:group_by] unless args[:group_by].nil? - @kinds = args[:kinds] unless args[:kinds].nil? - @limit = args[:limit] unless args[:limit].nil? - @offset = args[:offset] unless args[:offset].nil? - @order = args[:order] unless args[:order].nil? - @projection = args[:projection] unless args[:projection].nil? - @start_cursor = args[:start_cursor] unless args[:start_cursor].nil? - end - end - - # A batch of results produced by a query. - class QueryResultBatch - include Google::Apis::Core::Hashable - - # A cursor that points to the position after the last result in the batch. May - # be absent. TODO(arfuller): Once all plans produce cursors update documentation - # here. - # Corresponds to the JSON property `endCursor` - # @return [String] - attr_accessor :end_cursor - - # The result type for every entity in entityResults. full for full entities, - # projection for entities with only projected properties, keyOnly for entities - # with only a key. - # Corresponds to the JSON property `entityResultType` - # @return [String] - attr_accessor :entity_result_type - - # The results for this batch. - # Corresponds to the JSON property `entityResults` - # @return [Array] - attr_accessor :entity_results - - # The state of the query after the current batch. One of notFinished, - # moreResultsAfterLimit, noMoreResults. - # Corresponds to the JSON property `moreResults` - # @return [String] - attr_accessor :more_results - - # The number of results skipped because of Query.offset. - # Corresponds to the JSON property `skippedResults` - # @return [Fixnum] - attr_accessor :skipped_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_cursor = args[:end_cursor] unless args[:end_cursor].nil? - @entity_result_type = args[:entity_result_type] unless args[:entity_result_type].nil? - @entity_results = args[:entity_results] unless args[:entity_results].nil? - @more_results = args[:more_results] unless args[:more_results].nil? - @skipped_results = args[:skipped_results] unless args[:skipped_results].nil? - end - end - - # - class ReadOptions - include Google::Apis::Core::Hashable - - # The read consistency to use. One of default, strong, or eventual. Cannot be - # set when transaction is set. Lookup and ancestor queries default to strong, - # global queries default to eventual and cannot be set to strong. Optional. - # Default is default. - # Corresponds to the JSON property `readConsistency` - # @return [String] - attr_accessor :read_consistency - - # The transaction to use. Optional. - # Corresponds to the JSON property `transaction` - # @return [String] - attr_accessor :transaction - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @read_consistency = args[:read_consistency] unless args[:read_consistency].nil? - @transaction = args[:transaction] unless args[:transaction].nil? - end - end - - # - class ResponseHeader - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "datastore# - # responseHeader". - # 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 - - # - class RollbackRequest - include Google::Apis::Core::Hashable - - # The transaction identifier, returned by a call to beginTransaction. - # Corresponds to the JSON property `transaction` - # @return [String] - attr_accessor :transaction - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @transaction = args[:transaction] unless args[:transaction].nil? - end - end - - # - class RollbackResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `header` - # @return [Google::Apis::DatastoreV1beta2::ResponseHeader] - attr_accessor :header - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @header = args[:header] unless args[:header].nil? - end - end - - # - class RunQueryRequest - include Google::Apis::Core::Hashable - - # A GQL query. - # Corresponds to the JSON property `gqlQuery` - # @return [Google::Apis::DatastoreV1beta2::GqlQuery] - attr_accessor :gql_query - - # An identifier for a particular subset of entities. - # Entities are partitioned into various subsets, each used by different datasets - # and different namespaces within a dataset and so forth. - # Corresponds to the JSON property `partitionId` - # @return [Google::Apis::DatastoreV1beta2::PartitionId] - attr_accessor :partition_id - - # A query. - # Corresponds to the JSON property `query` - # @return [Google::Apis::DatastoreV1beta2::Query] - attr_accessor :query - - # The options for this query. - # Corresponds to the JSON property `readOptions` - # @return [Google::Apis::DatastoreV1beta2::ReadOptions] - attr_accessor :read_options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gql_query = args[:gql_query] unless args[:gql_query].nil? - @partition_id = args[:partition_id] unless args[:partition_id].nil? - @query = args[:query] unless args[:query].nil? - @read_options = args[:read_options] unless args[:read_options].nil? - end - end - - # - class RunQueryResponse - include Google::Apis::Core::Hashable - - # A batch of results produced by a query. - # Corresponds to the JSON property `batch` - # @return [Google::Apis::DatastoreV1beta2::QueryResultBatch] - attr_accessor :batch - - # - # Corresponds to the JSON property `header` - # @return [Google::Apis::DatastoreV1beta2::ResponseHeader] - attr_accessor :header - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch = args[:batch] unless args[:batch].nil? - @header = args[:header] unless args[:header].nil? - end - end - - # A message that can hold any of the supported value types and associated - # metadata. - class Value - include Google::Apis::Core::Hashable - - # A blob key value. - # Corresponds to the JSON property `blobKeyValue` - # @return [String] - attr_accessor :blob_key_value - - # A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may - # have at most 500 bytes. - # Corresponds to the JSON property `blobValue` - # @return [String] - attr_accessor :blob_value - - # A boolean value. - # Corresponds to the JSON property `booleanValue` - # @return [Boolean] - attr_accessor :boolean_value - alias_method :boolean_value?, :boolean_value - - # A timestamp value. - # Corresponds to the JSON property `dateTimeValue` - # @return [DateTime] - attr_accessor :date_time_value - - # A double value. - # Corresponds to the JSON property `doubleValue` - # @return [Float] - attr_accessor :double_value - - # An entity. - # Corresponds to the JSON property `entityValue` - # @return [Google::Apis::DatastoreV1beta2::Entity] - attr_accessor :entity_value - - # If the value should be indexed. - # The indexed property may be set for a null value. When indexed is true, - # stringValue is limited to 500 characters and the blob value is limited to 500 - # bytes. Input values by default have indexed set to true; however, you can - # explicitly set indexed to true if you want. (An output value never has indexed - # explicitly set to true.) If a value is itself an entity, it cannot have - # indexed set to true. - # Corresponds to the JSON property `indexed` - # @return [Boolean] - attr_accessor :indexed - alias_method :indexed?, :indexed - - # An integer value. - # Corresponds to the JSON property `integerValue` - # @return [String] - attr_accessor :integer_value - - # A unique identifier for an entity. - # Corresponds to the JSON property `keyValue` - # @return [Google::Apis::DatastoreV1beta2::Key] - attr_accessor :key_value - - # A list value. Cannot contain another list value. A Value instance that sets - # field list_value must not set field meaning or field indexed. - # Corresponds to the JSON property `listValue` - # @return [Array] - attr_accessor :list_value - - # The meaning field is reserved and should not be used. - # Corresponds to the JSON property `meaning` - # @return [Fixnum] - attr_accessor :meaning - - # A UTF-8 encoded string value. When indexed is true, may have at most 500 - # characters. - # 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) - @blob_key_value = args[:blob_key_value] unless args[:blob_key_value].nil? - @blob_value = args[:blob_value] unless args[:blob_value].nil? - @boolean_value = args[:boolean_value] unless args[:boolean_value].nil? - @date_time_value = args[:date_time_value] unless args[:date_time_value].nil? - @double_value = args[:double_value] unless args[:double_value].nil? - @entity_value = args[:entity_value] unless args[:entity_value].nil? - @indexed = args[:indexed] unless args[:indexed].nil? - @integer_value = args[:integer_value] unless args[:integer_value].nil? - @key_value = args[:key_value] unless args[:key_value].nil? - @list_value = args[:list_value] unless args[:list_value].nil? - @meaning = args[:meaning] unless args[:meaning].nil? - @string_value = args[:string_value] unless args[:string_value].nil? - end - end - end - end -end diff --git a/generated/google/apis/datastore_v1beta2/representations.rb b/generated/google/apis/datastore_v1beta2/representations.rb deleted file mode 100644 index 30111246b..000000000 --- a/generated/google/apis/datastore_v1beta2/representations.rb +++ /dev/null @@ -1,526 +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 DatastoreV1beta2 - - class AllocateIdsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AllocateIdsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BeginTransactionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BeginTransactionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CommitRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CommitResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CompositeFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Entity - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EntityResult - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Filter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GqlQuery - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GqlQueryArg - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Key - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class KeyPathElement - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class KindExpression - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LookupRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LookupResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Mutation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MutationResult - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PartitionId - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Property - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PropertyExpression - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PropertyFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PropertyOrder - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PropertyReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Query - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QueryResultBatch - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReadOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ResponseHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RollbackRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RollbackResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RunQueryRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RunQueryResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Value - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AllocateIdsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :keys, as: 'keys', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - end - end - - # @private - class AllocateIdsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :header, as: 'header', class: Google::Apis::DatastoreV1beta2::ResponseHeader, decorator: Google::Apis::DatastoreV1beta2::ResponseHeader::Representation - - collection :keys, as: 'keys', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - end - end - - # @private - class BeginTransactionRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :isolation_level, as: 'isolationLevel' - end - end - - # @private - class BeginTransactionResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :header, as: 'header', class: Google::Apis::DatastoreV1beta2::ResponseHeader, decorator: Google::Apis::DatastoreV1beta2::ResponseHeader::Representation - - property :transaction, :base64 => true, as: 'transaction' - end - end - - # @private - class CommitRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :ignore_read_only, as: 'ignoreReadOnly' - property :mode, as: 'mode' - property :mutation, as: 'mutation', class: Google::Apis::DatastoreV1beta2::Mutation, decorator: Google::Apis::DatastoreV1beta2::Mutation::Representation - - property :transaction, :base64 => true, as: 'transaction' - end - end - - # @private - class CommitResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :header, as: 'header', class: Google::Apis::DatastoreV1beta2::ResponseHeader, decorator: Google::Apis::DatastoreV1beta2::ResponseHeader::Representation - - property :mutation_result, as: 'mutationResult', class: Google::Apis::DatastoreV1beta2::MutationResult, decorator: Google::Apis::DatastoreV1beta2::MutationResult::Representation - - end - end - - # @private - class CompositeFilter - class Representation < Google::Apis::Core::JsonRepresentation - collection :filters, as: 'filters', class: Google::Apis::DatastoreV1beta2::Filter, decorator: Google::Apis::DatastoreV1beta2::Filter::Representation - - property :operator, as: 'operator' - end - end - - # @private - class Entity - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - hash :properties, as: 'properties', class: Google::Apis::DatastoreV1beta2::Property, decorator: Google::Apis::DatastoreV1beta2::Property::Representation - - end - end - - # @private - class EntityResult - class Representation < Google::Apis::Core::JsonRepresentation - property :entity, as: 'entity', class: Google::Apis::DatastoreV1beta2::Entity, decorator: Google::Apis::DatastoreV1beta2::Entity::Representation - - end - end - - # @private - class Filter - class Representation < Google::Apis::Core::JsonRepresentation - property :composite_filter, as: 'compositeFilter', class: Google::Apis::DatastoreV1beta2::CompositeFilter, decorator: Google::Apis::DatastoreV1beta2::CompositeFilter::Representation - - property :property_filter, as: 'propertyFilter', class: Google::Apis::DatastoreV1beta2::PropertyFilter, decorator: Google::Apis::DatastoreV1beta2::PropertyFilter::Representation - - end - end - - # @private - class GqlQuery - class Representation < Google::Apis::Core::JsonRepresentation - property :allow_literal, as: 'allowLiteral' - collection :name_args, as: 'nameArgs', class: Google::Apis::DatastoreV1beta2::GqlQueryArg, decorator: Google::Apis::DatastoreV1beta2::GqlQueryArg::Representation - - collection :number_args, as: 'numberArgs', class: Google::Apis::DatastoreV1beta2::GqlQueryArg, decorator: Google::Apis::DatastoreV1beta2::GqlQueryArg::Representation - - property :query_string, as: 'queryString' - end - end - - # @private - class GqlQueryArg - class Representation < Google::Apis::Core::JsonRepresentation - property :cursor, :base64 => true, as: 'cursor' - property :name, as: 'name' - property :value, as: 'value', class: Google::Apis::DatastoreV1beta2::Value, decorator: Google::Apis::DatastoreV1beta2::Value::Representation - - end - end - - # @private - class Key - class Representation < Google::Apis::Core::JsonRepresentation - property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1beta2::PartitionId, decorator: Google::Apis::DatastoreV1beta2::PartitionId::Representation - - collection :path, as: 'path', class: Google::Apis::DatastoreV1beta2::KeyPathElement, decorator: Google::Apis::DatastoreV1beta2::KeyPathElement::Representation - - end - end - - # @private - class KeyPathElement - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class KindExpression - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end - end - - # @private - class LookupRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :keys, as: 'keys', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1beta2::ReadOptions, decorator: Google::Apis::DatastoreV1beta2::ReadOptions::Representation - - end - end - - # @private - class LookupResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :deferred, as: 'deferred', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - collection :found, as: 'found', class: Google::Apis::DatastoreV1beta2::EntityResult, decorator: Google::Apis::DatastoreV1beta2::EntityResult::Representation - - property :header, as: 'header', class: Google::Apis::DatastoreV1beta2::ResponseHeader, decorator: Google::Apis::DatastoreV1beta2::ResponseHeader::Representation - - collection :missing, as: 'missing', class: Google::Apis::DatastoreV1beta2::EntityResult, decorator: Google::Apis::DatastoreV1beta2::EntityResult::Representation - - end - end - - # @private - class Mutation - class Representation < Google::Apis::Core::JsonRepresentation - collection :delete, as: 'delete', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - property :force, as: 'force' - collection :insert, as: 'insert', class: Google::Apis::DatastoreV1beta2::Entity, decorator: Google::Apis::DatastoreV1beta2::Entity::Representation - - collection :insert_auto_id, as: 'insertAutoId', class: Google::Apis::DatastoreV1beta2::Entity, decorator: Google::Apis::DatastoreV1beta2::Entity::Representation - - collection :update, as: 'update', class: Google::Apis::DatastoreV1beta2::Entity, decorator: Google::Apis::DatastoreV1beta2::Entity::Representation - - collection :upsert, as: 'upsert', class: Google::Apis::DatastoreV1beta2::Entity, decorator: Google::Apis::DatastoreV1beta2::Entity::Representation - - end - end - - # @private - class MutationResult - class Representation < Google::Apis::Core::JsonRepresentation - property :index_updates, as: 'indexUpdates' - collection :insert_auto_id_keys, as: 'insertAutoIdKeys', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - end - end - - # @private - class PartitionId - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :namespace, as: 'namespace' - end - end - - # @private - class Property - class Representation < Google::Apis::Core::JsonRepresentation - property :blob_key_value, as: 'blobKeyValue' - property :blob_value, :base64 => true, as: 'blobValue' - property :boolean_value, as: 'booleanValue' - property :date_time_value, as: 'dateTimeValue', type: DateTime - - property :double_value, as: 'doubleValue' - property :entity_value, as: 'entityValue', class: Google::Apis::DatastoreV1beta2::Entity, decorator: Google::Apis::DatastoreV1beta2::Entity::Representation - - property :indexed, as: 'indexed' - property :integer_value, as: 'integerValue' - property :key_value, as: 'keyValue', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - collection :list_value, as: 'listValue', class: Google::Apis::DatastoreV1beta2::Value, decorator: Google::Apis::DatastoreV1beta2::Value::Representation - - property :meaning, as: 'meaning' - property :string_value, as: 'stringValue' - end - end - - # @private - class PropertyExpression - class Representation < Google::Apis::Core::JsonRepresentation - property :aggregation_function, as: 'aggregationFunction' - property :property, as: 'property', class: Google::Apis::DatastoreV1beta2::PropertyReference, decorator: Google::Apis::DatastoreV1beta2::PropertyReference::Representation - - end - end - - # @private - class PropertyFilter - class Representation < Google::Apis::Core::JsonRepresentation - property :operator, as: 'operator' - property :property, as: 'property', class: Google::Apis::DatastoreV1beta2::PropertyReference, decorator: Google::Apis::DatastoreV1beta2::PropertyReference::Representation - - property :value, as: 'value', class: Google::Apis::DatastoreV1beta2::Value, decorator: Google::Apis::DatastoreV1beta2::Value::Representation - - end - end - - # @private - class PropertyOrder - class Representation < Google::Apis::Core::JsonRepresentation - property :direction, as: 'direction' - property :property, as: 'property', class: Google::Apis::DatastoreV1beta2::PropertyReference, decorator: Google::Apis::DatastoreV1beta2::PropertyReference::Representation - - end - end - - # @private - class PropertyReference - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end - end - - # @private - class Query - class Representation < Google::Apis::Core::JsonRepresentation - property :end_cursor, :base64 => true, as: 'endCursor' - property :filter, as: 'filter', class: Google::Apis::DatastoreV1beta2::Filter, decorator: Google::Apis::DatastoreV1beta2::Filter::Representation - - collection :group_by, as: 'groupBy', class: Google::Apis::DatastoreV1beta2::PropertyReference, decorator: Google::Apis::DatastoreV1beta2::PropertyReference::Representation - - collection :kinds, as: 'kinds', class: Google::Apis::DatastoreV1beta2::KindExpression, decorator: Google::Apis::DatastoreV1beta2::KindExpression::Representation - - property :limit, as: 'limit' - property :offset, as: 'offset' - collection :order, as: 'order', class: Google::Apis::DatastoreV1beta2::PropertyOrder, decorator: Google::Apis::DatastoreV1beta2::PropertyOrder::Representation - - collection :projection, as: 'projection', class: Google::Apis::DatastoreV1beta2::PropertyExpression, decorator: Google::Apis::DatastoreV1beta2::PropertyExpression::Representation - - property :start_cursor, :base64 => true, as: 'startCursor' - end - end - - # @private - class QueryResultBatch - class Representation < Google::Apis::Core::JsonRepresentation - property :end_cursor, :base64 => true, as: 'endCursor' - property :entity_result_type, as: 'entityResultType' - collection :entity_results, as: 'entityResults', class: Google::Apis::DatastoreV1beta2::EntityResult, decorator: Google::Apis::DatastoreV1beta2::EntityResult::Representation - - property :more_results, as: 'moreResults' - property :skipped_results, as: 'skippedResults' - end - end - - # @private - class ReadOptions - class Representation < Google::Apis::Core::JsonRepresentation - property :read_consistency, as: 'readConsistency' - property :transaction, :base64 => true, as: 'transaction' - end - end - - # @private - class ResponseHeader - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - end - end - - # @private - class RollbackRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :transaction, :base64 => true, as: 'transaction' - end - end - - # @private - class RollbackResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :header, as: 'header', class: Google::Apis::DatastoreV1beta2::ResponseHeader, decorator: Google::Apis::DatastoreV1beta2::ResponseHeader::Representation - - end - end - - # @private - class RunQueryRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :gql_query, as: 'gqlQuery', class: Google::Apis::DatastoreV1beta2::GqlQuery, decorator: Google::Apis::DatastoreV1beta2::GqlQuery::Representation - - property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1beta2::PartitionId, decorator: Google::Apis::DatastoreV1beta2::PartitionId::Representation - - property :query, as: 'query', class: Google::Apis::DatastoreV1beta2::Query, decorator: Google::Apis::DatastoreV1beta2::Query::Representation - - property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1beta2::ReadOptions, decorator: Google::Apis::DatastoreV1beta2::ReadOptions::Representation - - end - end - - # @private - class RunQueryResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :batch, as: 'batch', class: Google::Apis::DatastoreV1beta2::QueryResultBatch, decorator: Google::Apis::DatastoreV1beta2::QueryResultBatch::Representation - - property :header, as: 'header', class: Google::Apis::DatastoreV1beta2::ResponseHeader, decorator: Google::Apis::DatastoreV1beta2::ResponseHeader::Representation - - end - end - - # @private - class Value - class Representation < Google::Apis::Core::JsonRepresentation - property :blob_key_value, as: 'blobKeyValue' - property :blob_value, :base64 => true, as: 'blobValue' - property :boolean_value, as: 'booleanValue' - property :date_time_value, as: 'dateTimeValue', type: DateTime - - property :double_value, as: 'doubleValue' - property :entity_value, as: 'entityValue', class: Google::Apis::DatastoreV1beta2::Entity, decorator: Google::Apis::DatastoreV1beta2::Entity::Representation - - property :indexed, as: 'indexed' - property :integer_value, as: 'integerValue' - property :key_value, as: 'keyValue', class: Google::Apis::DatastoreV1beta2::Key, decorator: Google::Apis::DatastoreV1beta2::Key::Representation - - collection :list_value, as: 'listValue', class: Google::Apis::DatastoreV1beta2::Value, decorator: Google::Apis::DatastoreV1beta2::Value::Representation - - property :meaning, as: 'meaning' - property :string_value, as: 'stringValue' - end - end - end - end -end diff --git a/generated/google/apis/datastore_v1beta2/service.rb b/generated/google/apis/datastore_v1beta2/service.rb deleted file mode 100644 index 7b594c5e3..000000000 --- a/generated/google/apis/datastore_v1beta2/service.rb +++ /dev/null @@ -1,300 +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 DatastoreV1beta2 - # Google Cloud Datastore API - # - # API for accessing Google Cloud Datastore. - # - # @example - # require 'google/apis/datastore_v1beta2' - # - # Datastore = Google::Apis::DatastoreV1beta2 # Alias the module - # service = Datastore::DatastoreService.new - # - # @see https://developers.google.com/datastore/ - class DatastoreService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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/', 'datastore/v1beta2/datasets/') - end - - # Allocate IDs for incomplete keys (useful for referencing an entity before it - # is inserted). - # @param [String] dataset_id - # Identifies the dataset. - # @param [Google::Apis::DatastoreV1beta2::AllocateIdsRequest] allocate_ids_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DatastoreV1beta2::AllocateIdsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1beta2::AllocateIdsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def allocate_ids(dataset_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{datasetId}/allocateIds' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DatastoreV1beta2::AllocateIdsRequest::Representation - command.request_object = allocate_ids_request_object - command.response_representation = Google::Apis::DatastoreV1beta2::AllocateIdsResponse::Representation - command.response_class = Google::Apis::DatastoreV1beta2::AllocateIdsResponse - command.params['datasetId'] = dataset_id unless dataset_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 - - # Begin a new transaction. - # @param [String] dataset_id - # Identifies the dataset. - # @param [Google::Apis::DatastoreV1beta2::BeginTransactionRequest] begin_transaction_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DatastoreV1beta2::BeginTransactionResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1beta2::BeginTransactionResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def begin_transaction(dataset_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{datasetId}/beginTransaction' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DatastoreV1beta2::BeginTransactionRequest::Representation - command.request_object = begin_transaction_request_object - command.response_representation = Google::Apis::DatastoreV1beta2::BeginTransactionResponse::Representation - command.response_class = Google::Apis::DatastoreV1beta2::BeginTransactionResponse - command.params['datasetId'] = dataset_id unless dataset_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 - - # Commit a transaction, optionally creating, deleting or modifying some entities. - # @param [String] dataset_id - # Identifies the dataset. - # @param [Google::Apis::DatastoreV1beta2::CommitRequest] commit_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DatastoreV1beta2::CommitResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1beta2::CommitResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def commit(dataset_id, commit_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{datasetId}/commit' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DatastoreV1beta2::CommitRequest::Representation - command.request_object = commit_request_object - command.response_representation = Google::Apis::DatastoreV1beta2::CommitResponse::Representation - command.response_class = Google::Apis::DatastoreV1beta2::CommitResponse - command.params['datasetId'] = dataset_id unless dataset_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 - - # Look up some entities by key. - # @param [String] dataset_id - # Identifies the dataset. - # @param [Google::Apis::DatastoreV1beta2::LookupRequest] lookup_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DatastoreV1beta2::LookupResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1beta2::LookupResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def lookup(dataset_id, lookup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{datasetId}/lookup' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DatastoreV1beta2::LookupRequest::Representation - command.request_object = lookup_request_object - command.response_representation = Google::Apis::DatastoreV1beta2::LookupResponse::Representation - command.response_class = Google::Apis::DatastoreV1beta2::LookupResponse - command.params['datasetId'] = dataset_id unless dataset_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 - - # Roll back a transaction. - # @param [String] dataset_id - # Identifies the dataset. - # @param [Google::Apis::DatastoreV1beta2::RollbackRequest] rollback_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DatastoreV1beta2::RollbackResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1beta2::RollbackResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def rollback(dataset_id, rollback_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{datasetId}/rollback' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DatastoreV1beta2::RollbackRequest::Representation - command.request_object = rollback_request_object - command.response_representation = Google::Apis::DatastoreV1beta2::RollbackResponse::Representation - command.response_class = Google::Apis::DatastoreV1beta2::RollbackResponse - command.params['datasetId'] = dataset_id unless dataset_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 - - # Query for entities. - # @param [String] dataset_id - # Identifies the dataset. - # @param [Google::Apis::DatastoreV1beta2::RunQueryRequest] run_query_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DatastoreV1beta2::RunQueryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1beta2::RunQueryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def run_query(dataset_id, run_query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{datasetId}/runQuery' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DatastoreV1beta2::RunQueryRequest::Representation - command.request_object = run_query_request_object - command.response_representation = Google::Apis::DatastoreV1beta2::RunQueryResponse::Representation - command.response_class = Google::Apis::DatastoreV1beta2::RunQueryResponse - command.params['datasetId'] = dataset_id unless dataset_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 diff --git a/generated/google/apis/deploymentmanager_v2beta2.rb b/generated/google/apis/deploymentmanager_v2beta2.rb deleted file mode 100644 index 93cee8849..000000000 --- a/generated/google/apis/deploymentmanager_v2beta2.rb +++ /dev/null @@ -1,41 +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/deploymentmanager_v2beta2/service.rb' -require 'google/apis/deploymentmanager_v2beta2/classes.rb' -require 'google/apis/deploymentmanager_v2beta2/representations.rb' - -module Google - module Apis - # Google Cloud Deployment Manager API V2 - # - # The Deployment Manager API allows users to declaratively configure, deploy and - # run complex solutions on the Google Cloud Platform. - # - # @see https://developers.google.com/deployment-manager/ - module DeploymentmanagerV2beta2 - VERSION = 'V2beta2' - REVISION = '20150616' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # View and manage your Google Cloud Platform management resources and deployment status information - AUTH_NDEV_CLOUDMAN = 'https://www.googleapis.com/auth/ndev.cloudman' - - # View your Google Cloud Platform management resources and deployment status information - AUTH_NDEV_CLOUDMAN_READONLY = 'https://www.googleapis.com/auth/ndev.cloudman.readonly' - end - end -end diff --git a/generated/google/apis/deploymentmanager_v2beta2/classes.rb b/generated/google/apis/deploymentmanager_v2beta2/classes.rb deleted file mode 100644 index 57f0a19c0..000000000 --- a/generated/google/apis/deploymentmanager_v2beta2/classes.rb +++ /dev/null @@ -1,820 +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 DeploymentmanagerV2beta2 - - # - class Deployment - include Google::Apis::Core::Hashable - - # An optional user-provided description of the deployment. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Specifies a fingerprint for update() requests. A fingerprint is a randomly - # generated value that must be provided in update() requests to perform - # optimistic locking. This ensures optimistic concurrency so that only one - # update can be performed at a time. - # The fingerprint is initially generated by Deployment Manager and changes after - # every request to modify data. To get the latest fingerprint value, perform a - # get() request to a deployment. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Timestamp when the deployment was created, in RFC3339 text - # format . - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Input Only] Specifies how Deployment Manager should apply this template. - # Possible options are PREVIEW, UPDATE, and CANCEL. - # PREVIEW creates a deployment and creates "shell" resources but does not - # actually instantiate these resources. This allows you to preview what your - # deployment looks like. You can use this intent to preview updates to - # deployments or preview new deployments. You must provide a target.config with - # a configuration for this intent. After previewing a deployment, you can deploy - # your resources by making a request with the UPDATE intent or you can CANCEL - # the preview altogether. Note that the deployment will still exist after you - # cancel the preview and you must separately delete this deployment if you want - # to remove it. - # UPDATE performs an update to the underlying resources in a deployment. If you - # provide a populated target.config field with this request, Deployment Manager - # uses that configuration to perform an update. If you had previewed this update - # beforehand, and do not supply a target.config or provide an empty target. - # config, Deployment Manager uses the last previewed configuration. - # CANCEL cancels an update that is in PREVIEW or UPDATE but does not undo any - # changes already made. - # Corresponds to the JSON property `intent` - # @return [String] - attr_accessor :intent - - # [Output Only] URL of the manifest representing the last manifest that was - # successfully deployed. - # Corresponds to the JSON property `manifest` - # @return [String] - attr_accessor :manifest - - # The name of the deployment, which must be unique within the project. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] The current state of the deployment. This can be DEPLOYED, - # DEPLOYMENT_FAILED, PREVIEWING, UPDATING, and CANCELING. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # - # Corresponds to the JSON property `target` - # @return [Google::Apis::DeploymentmanagerV2beta2::TargetConfiguration] - attr_accessor :target - - # - # Corresponds to the JSON property `update` - # @return [Google::Apis::DeploymentmanagerV2beta2::DeploymentUpdate] - attr_accessor :update - - # [Output Only] Timestamp when the deployment was updated, in RFC3339 text - # format . - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @id = args[:id] unless args[:id].nil? - @insert_time = args[:insert_time] unless args[:insert_time].nil? - @intent = args[:intent] unless args[:intent].nil? - @manifest = args[:manifest] unless args[:manifest].nil? - @name = args[:name] unless args[:name].nil? - @state = args[:state] unless args[:state].nil? - @target = args[:target] unless args[:target].nil? - @update = args[:update] unless args[:update].nil? - @update_time = args[:update_time] unless args[:update_time].nil? - end - end - - # - class DeploymentUpdate - include Google::Apis::Core::Hashable - - # [Output Only] List of all errors encountered while trying to enact the update. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # [Output Only] URL of the manifest representing the update configuration of - # this deployment. - # Corresponds to the JSON property `manifest` - # @return [String] - attr_accessor :manifest - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @errors = args[:errors] unless args[:errors].nil? - @manifest = args[:manifest] unless args[:manifest].nil? - end - end - - # A response containing a partial list of deployments and a page token used to - # build the next request if the request has been truncated. - class ListDeploymentsResponse - include Google::Apis::Core::Hashable - - # [Output Only] The deployments contained in this response. - # Corresponds to the JSON property `deployments` - # @return [Array] - attr_accessor :deployments - - # [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) - @deployments = args[:deployments] unless args[:deployments].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # - class ImportFile - include Google::Apis::Core::Hashable - - # The contents of the file. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The name 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) - @content = args[:content] unless args[:content].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # - class Manifest - include Google::Apis::Core::Hashable - - # [Output Only] The YAML configuration for this manifest. - # Corresponds to the JSON property `config` - # @return [String] - attr_accessor :config - - # [Output Only] The fully-expanded configuration file, including any templates - # and references. - # Corresponds to the JSON property `evaluatedConfig` - # @return [String] - attr_accessor :evaluated_config - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The imported files for this manifest. - # Corresponds to the JSON property `imports` - # @return [Array] - attr_accessor :imports - - # [Output Only] Timestamp when the manifest was created, in RFC3339 text format. - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Output Only] The YAML layout for this manifest. - # Corresponds to the JSON property `layout` - # @return [String] - attr_accessor :layout - - # [Output Only] The name of the manifest. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Self link for the manifest. - # 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) - @config = args[:config] unless args[:config].nil? - @evaluated_config = args[:evaluated_config] unless args[:evaluated_config].nil? - @id = args[:id] unless args[:id].nil? - @imports = args[:imports] unless args[:imports].nil? - @insert_time = args[:insert_time] unless args[:insert_time].nil? - @layout = args[:layout] unless args[:layout].nil? - @name = args[:name] unless args[:name].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A response containing a partial list of manifests and a page token used to - # build the next request if the request has been truncated. - class ListManifestsResponse - include Google::Apis::Core::Hashable - - # [Output Only] Manifests contained in this list response. - # Corresponds to the JSON property `manifests` - # @return [Array] - attr_accessor :manifests - - # [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) - @manifests = args[:manifests] unless args[:manifests].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # An operation resource, used to manage asynchronous API requests. - class Operation - include Google::Apis::Core::Hashable - - # [Output Only] An optional identifier specified by the client when the mutation - # was initiated. Must be unique for all operation resources in the project. - # Corresponds to the JSON property `clientOperationId` - # @return [String] - attr_accessor :client_operation_id - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # [Output Only] The time that this operation was completed. This is in RFC3339 - # text format. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # [Output Only] If errors are generated during processing of the operation, this - # field will be populated. - # Corresponds to the JSON property `error` - # @return [Google::Apis::DeploymentmanagerV2beta2::Operation::Error] - attr_accessor :error - - # [Output Only] If the operation fails, this field contains the HTTP error - # message that was returned, such as NOT FOUND. - # Corresponds to the JSON property `httpErrorMessage` - # @return [String] - attr_accessor :http_error_message - - # [Output Only] If the operation fails, this field contains the HTTP error - # message that was returned, such as 404. - # Corresponds to the JSON property `httpErrorStatusCode` - # @return [Fixnum] - attr_accessor :http_error_status_code - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The time that this operation was requested. This is in RFC3339 - # text format. - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Output Only] Type of the resource. Always compute#Operation for Operation - # resources. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] Type of the operation, such as insert, update, and delete. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # [Output Only] An optional progress indicator that ranges from 0 to 100. There - # is no requirement that this be linear or support any granularity of operations. - # This should not be used to guess at when the operation will be complete. This - # number should monotonically increase as the operation progresses. - # Corresponds to the JSON property `progress` - # @return [Fixnum] - attr_accessor :progress - - # [Output Only] URL of the region where the operation resides. Only applicable - # for regional resources. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The time that this operation was started by the server. This is - # in RFC3339 text format. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # [Output Only] Status of the operation. Can be one of the following: PENDING, - # RUNNING, or DONE. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] An optional textual description of the current status of the - # operation. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # [Output Only] Unique target ID which identifies a particular incarnation of - # the target. - # Corresponds to the JSON property `targetId` - # @return [String] - attr_accessor :target_id - - # [Output Only] URL of the resource the operation is mutating. - # Corresponds to the JSON property `targetLink` - # @return [String] - attr_accessor :target_link - - # [Output Only] User who requested the operation, for example: user@example.com. - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - # [Output Only] If warning messages are generated during processing of the - # operation, this field will be populated. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - # [Output Only] URL of the zone where the operation 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) - @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 - - # [Output Only] If errors are generated during processing of the operation, this - # field will be populated. - class Error - include Google::Apis::Core::Hashable - - # [Output Only] The array of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - 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 - - # [Output Only] The error type identifier for this error. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Indicates the field in the request which caused the error. This - # property is optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output Only] An optional, human-readable error message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] 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 - - # [Output Only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Metadata for this warning in key: value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output Only] Optional human-readable details for this 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 - - # [Output Only] A key for the warning data. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] A warning data value corresponding to the key. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # A response containing a partial list of operations and a page token used to - # build the next request if the request has been truncated. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # [Output Only] A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] Operations contained in this list response. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @operations = args[:operations] unless args[:operations].nil? - end - end - - # - class Resource - include Google::Apis::Core::Hashable - - # [Output Only] The evaluated properties of the resource with references - # expanded. Returned as serialized YAML. - # Corresponds to the JSON property `finalProperties` - # @return [String] - attr_accessor :final_properties - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] Timestamp when the resource was created or acquired, in RFC3339 - # text format . - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Output Only] URL of the manifest representing the current configuration of - # this resource. - # Corresponds to the JSON property `manifest` - # @return [String] - attr_accessor :manifest - - # [Output Only] The name of the resource as it appears in the YAML config. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output Only] The current properties of the resource before any references - # have been filled in. Returned as serialized YAML. - # Corresponds to the JSON property `properties` - # @return [String] - attr_accessor :properties - - # [Output Only] The type of the resource, for example ?compute.v1.instance?, or ? - # replicaPools.v1beta2.instanceGroupManager? - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # - # Corresponds to the JSON property `update` - # @return [Google::Apis::DeploymentmanagerV2beta2::ResourceUpdate] - attr_accessor :update - - # [Output Only] Timestamp when the resource was updated, in RFC3339 text format . - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - # [Output Only] The URL of the actual resource. - # 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) - @final_properties = args[:final_properties] unless args[:final_properties].nil? - @id = args[:id] unless args[:id].nil? - @insert_time = args[:insert_time] unless args[:insert_time].nil? - @manifest = args[:manifest] unless args[:manifest].nil? - @name = args[:name] unless args[:name].nil? - @properties = args[:properties] unless args[:properties].nil? - @type = args[:type] unless args[:type].nil? - @update = args[:update] unless args[:update].nil? - @update_time = args[:update_time] unless args[:update_time].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # - class ResourceUpdate - include Google::Apis::Core::Hashable - - # [Output Only] List of all errors encountered while trying to enact update. - # intent. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # [Output Only] The expanded properties of the resource with reference values - # expanded. Returned as serialized YAML. - # Corresponds to the JSON property `finalProperties` - # @return [String] - attr_accessor :final_properties - - # [Output Only] The intent of the resource, PREVIEW, UPDATE, or CANCEL. - # Corresponds to the JSON property `intent` - # @return [String] - attr_accessor :intent - - # [Output Only] URL of the manifest representing the update configuration of - # this resource. - # Corresponds to the JSON property `manifest` - # @return [String] - attr_accessor :manifest - - # [Output Only] The set of updated properties for this resource, before - # references are expanded. Returned as serialized YAML. - # Corresponds to the JSON property `properties` - # @return [String] - attr_accessor :properties - - # [Output Only] The state of the resource. - # 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) - @errors = args[:errors] unless args[:errors].nil? - @final_properties = args[:final_properties] unless args[:final_properties].nil? - @intent = args[:intent] unless args[:intent].nil? - @manifest = args[:manifest] unless args[:manifest].nil? - @properties = args[:properties] unless args[:properties].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # A response containing a partial list of resources and a page token used to - # build the next request if the request has been truncated. - class ListResourcesResponse - include Google::Apis::Core::Hashable - - # A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Resources contained in this list response. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class TargetConfiguration - include Google::Apis::Core::Hashable - - # The configuration to use for this deployment. - # Corresponds to the JSON property `config` - # @return [String] - attr_accessor :config - - # Specifies any files to import for this configuration. This can be used to - # import templates or other files. For example, you might import a text file in - # order to use the file in a template. - # Corresponds to the JSON property `imports` - # @return [Array] - attr_accessor :imports - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @config = args[:config] unless args[:config].nil? - @imports = args[:imports] unless args[:imports].nil? - end - end - - # A resource type supported by Deployment Manager. - class Type - include Google::Apis::Core::Hashable - - # Name of the type. - # 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) - @name = args[:name] unless args[:name].nil? - end - end - - # A response that returns all Types supported by Deployment Manager - class ListTypesResponse - include Google::Apis::Core::Hashable - - # A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] A list of resource types supported by Deployment Manager. - # Corresponds to the JSON property `types` - # @return [Array] - attr_accessor :types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @types = args[:types] unless args[:types].nil? - end - end - end - end -end diff --git a/generated/google/apis/deploymentmanager_v2beta2/representations.rb b/generated/google/apis/deploymentmanager_v2beta2/representations.rb deleted file mode 100644 index 17f1e0207..000000000 --- a/generated/google/apis/deploymentmanager_v2beta2/representations.rb +++ /dev/null @@ -1,303 +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 DeploymentmanagerV2beta2 - - class Deployment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeploymentUpdate - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDeploymentsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportFile - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Manifest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListManifestsResponse - 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 ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Resource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ResourceUpdate - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListResourcesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Type - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTypesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Deployment - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :fingerprint, :base64 => true, as: 'fingerprint' - property :id, as: 'id' - property :insert_time, as: 'insertTime' - property :intent, as: 'intent' - property :manifest, as: 'manifest' - property :name, as: 'name' - property :state, as: 'state' - property :target, as: 'target', class: Google::Apis::DeploymentmanagerV2beta2::TargetConfiguration, decorator: Google::Apis::DeploymentmanagerV2beta2::TargetConfiguration::Representation - - property :update, as: 'update', class: Google::Apis::DeploymentmanagerV2beta2::DeploymentUpdate, decorator: Google::Apis::DeploymentmanagerV2beta2::DeploymentUpdate::Representation - - property :update_time, as: 'updateTime' - end - end - - # @private - class DeploymentUpdate - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors' - property :manifest, as: 'manifest' - end - end - - # @private - class ListDeploymentsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :deployments, as: 'deployments', class: Google::Apis::DeploymentmanagerV2beta2::Deployment, decorator: Google::Apis::DeploymentmanagerV2beta2::Deployment::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ImportFile - class Representation < Google::Apis::Core::JsonRepresentation - property :content, as: 'content' - property :name, as: 'name' - end - end - - # @private - class Manifest - class Representation < Google::Apis::Core::JsonRepresentation - property :config, as: 'config' - property :evaluated_config, as: 'evaluatedConfig' - property :id, as: 'id' - collection :imports, as: 'imports', class: Google::Apis::DeploymentmanagerV2beta2::ImportFile, decorator: Google::Apis::DeploymentmanagerV2beta2::ImportFile::Representation - - property :insert_time, as: 'insertTime' - property :layout, as: 'layout' - property :name, as: 'name' - property :self_link, as: 'selfLink' - end - end - - # @private - class ListManifestsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :manifests, as: 'manifests', class: Google::Apis::DeploymentmanagerV2beta2::Manifest, decorator: Google::Apis::DeploymentmanagerV2beta2::Manifest::Representation - - property :next_page_token, as: 'nextPageToken' - 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::DeploymentmanagerV2beta2::Operation::Error, decorator: Google::Apis::DeploymentmanagerV2beta2::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::DeploymentmanagerV2beta2::Operation::Warning, decorator: Google::Apis::DeploymentmanagerV2beta2::Operation::Warning::Representation - - property :zone, as: 'zone' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::DeploymentmanagerV2beta2::Operation::Error::Error, decorator: Google::Apis::DeploymentmanagerV2beta2::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::DeploymentmanagerV2beta2::Operation::Warning::Datum, decorator: Google::Apis::DeploymentmanagerV2beta2::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 ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :operations, as: 'operations', class: Google::Apis::DeploymentmanagerV2beta2::Operation, decorator: Google::Apis::DeploymentmanagerV2beta2::Operation::Representation - - end - end - - # @private - class Resource - class Representation < Google::Apis::Core::JsonRepresentation - property :final_properties, as: 'finalProperties' - property :id, as: 'id' - property :insert_time, as: 'insertTime' - property :manifest, as: 'manifest' - property :name, as: 'name' - property :properties, as: 'properties' - property :type, as: 'type' - property :update, as: 'update', class: Google::Apis::DeploymentmanagerV2beta2::ResourceUpdate, decorator: Google::Apis::DeploymentmanagerV2beta2::ResourceUpdate::Representation - - property :update_time, as: 'updateTime' - property :url, as: 'url' - end - end - - # @private - class ResourceUpdate - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors' - property :final_properties, as: 'finalProperties' - property :intent, as: 'intent' - property :manifest, as: 'manifest' - property :properties, as: 'properties' - property :state, as: 'state' - end - end - - # @private - class ListResourcesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::DeploymentmanagerV2beta2::Resource, decorator: Google::Apis::DeploymentmanagerV2beta2::Resource::Representation - - end - end - - # @private - class TargetConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :config, as: 'config' - collection :imports, as: 'imports', class: Google::Apis::DeploymentmanagerV2beta2::ImportFile, decorator: Google::Apis::DeploymentmanagerV2beta2::ImportFile::Representation - - end - end - - # @private - class Type - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end - end - - # @private - class ListTypesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :types, as: 'types', class: Google::Apis::DeploymentmanagerV2beta2::Type, decorator: Google::Apis::DeploymentmanagerV2beta2::Type::Representation - - end - end - end - end -end diff --git a/generated/google/apis/deploymentmanager_v2beta2/service.rb b/generated/google/apis/deploymentmanager_v2beta2/service.rb deleted file mode 100644 index 3f85192c3..000000000 --- a/generated/google/apis/deploymentmanager_v2beta2/service.rb +++ /dev/null @@ -1,647 +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 DeploymentmanagerV2beta2 - # Google Cloud Deployment Manager API V2 - # - # The Deployment Manager API allows users to declaratively configure, deploy and - # run complex solutions on the Google Cloud Platform. - # - # @example - # require 'google/apis/deploymentmanager_v2beta2' - # - # Deploymentmanager = Google::Apis::DeploymentmanagerV2beta2 # Alias the module - # service = Deploymentmanager::DeploymentManagerService.new - # - # @see https://developers.google.com/deployment-manager/ - class DeploymentManagerService < 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/', 'deploymentmanager/v2beta2/projects/') - end - - # Deletes a deployment and all of the resources in the deployment. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::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_deployment(project, deployment, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Operation::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Operation - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.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 information about a specific deployment. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::Deployment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::Deployment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_deployment(project, deployment, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Deployment::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Deployment - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.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 deployment and all of the resources described by the deployment - # manifest. - # @param [String] project - # The project ID for this request. - # @param [Google::Apis::DeploymentmanagerV2beta2::Deployment] deployment_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::DeploymentmanagerV2beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::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_deployment(project, deployment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DeploymentmanagerV2beta2::Deployment::Representation - command.request_object = deployment_object - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Operation::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all deployments for a given project. - # @param [String] project - # The project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::ListDeploymentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::ListDeploymentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_deployments(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::ListDeploymentsResponse::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::ListDeploymentsResponse - 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 - - # Updates a deployment and all of the resources described by the deployment - # manifest. This method supports patch semantics. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [Google::Apis::DeploymentmanagerV2beta2::Deployment] deployment_object - # @param [String] create_policy - # Sets the policy to use for creating new resources. - # @param [String] delete_policy - # Sets the policy to use for deleting resources. - # @param [String] update_policy - # Sets the policy to use for updating resources. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DeploymentmanagerV2beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::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_deployment(project, deployment, deployment_object = nil, create_policy: nil, delete_policy: nil, update_policy: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DeploymentmanagerV2beta2::Deployment::Representation - command.request_object = deployment_object - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Operation::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Operation - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.nil? - command.query['createPolicy'] = create_policy unless create_policy.nil? - command.query['deletePolicy'] = delete_policy unless delete_policy.nil? - command.query['updatePolicy'] = update_policy unless update_policy.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a deployment and all of the resources described by the deployment - # manifest. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [Google::Apis::DeploymentmanagerV2beta2::Deployment] deployment_object - # @param [String] create_policy - # Sets the policy to use for creating new resources. - # @param [String] delete_policy - # Sets the policy to use for deleting resources. - # @param [String] update_policy - # Sets the policy to use for updating resources. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DeploymentmanagerV2beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::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_deployment(project, deployment, deployment_object = nil, create_policy: nil, delete_policy: nil, update_policy: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DeploymentmanagerV2beta2::Deployment::Representation - command.request_object = deployment_object - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Operation::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Operation - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.nil? - command.query['createPolicy'] = create_policy unless create_policy.nil? - command.query['deletePolicy'] = delete_policy unless delete_policy.nil? - command.query['updatePolicy'] = update_policy unless update_policy.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets information about a specific manifest. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [String] manifest - # The name of the manifest for this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::Manifest] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::Manifest] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_manifest(project, deployment, manifest, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}/manifests/{manifest}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Manifest::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Manifest - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.nil? - command.params['manifest'] = manifest unless manifest.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 manifests for a given deployment. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::ListManifestsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::ListManifestsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_manifests(project, deployment, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}/manifests' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::ListManifestsResponse::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::ListManifestsResponse - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.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 - - # Gets information about a specific operation. - # @param [String] project - # The project ID for this request. - # @param [String] operation - # The name of the operation for this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/operations/{operation}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Operation::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Operation - command.params['project'] = project unless project.nil? - command.params['operation'] = operation unless operation.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all operations for a project. - # @param [String] project - # The project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::ListOperationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/operations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::ListOperationsResponse::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::ListOperationsResponse - 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 - - # Gets information about a single resource. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [String] resource - # The name of the resource for this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::Resource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::Resource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_resource(project, deployment, resource, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}/resources/{resource}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::Resource::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::Resource - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.nil? - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all resources in a given deployment. - # @param [String] project - # The project ID for this request. - # @param [String] deployment - # The name of the deployment for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::ListResourcesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::ListResourcesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_resources(project, deployment, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/deployments/{deployment}/resources' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::ListResourcesResponse::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::ListResourcesResponse - command.params['project'] = project unless project.nil? - command.params['deployment'] = deployment unless deployment.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 - - # Lists all resource types for Deployment Manager. - # @param [String] project - # The project ID for this request. - # @param [String] filter - # Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Maximum count of results to be returned. - # @param [String] page_token - # Tag returned by a previous list request when that list was truncated to - # maxResults. Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DeploymentmanagerV2beta2::ListTypesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DeploymentmanagerV2beta2::ListTypesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_types(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/global/types' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DeploymentmanagerV2beta2::ListTypesResponse::Representation - command.response_class = Google::Apis::DeploymentmanagerV2beta2::ListTypesResponse - 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 diff --git a/generated/google/apis/dfareporting_v2_1.rb b/generated/google/apis/dfareporting_v2_1.rb deleted file mode 100644 index 249150f6a..000000000 --- a/generated/google/apis/dfareporting_v2_1.rb +++ /dev/null @@ -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/dfareporting_v2_1/service.rb' -require 'google/apis/dfareporting_v2_1/classes.rb' -require 'google/apis/dfareporting_v2_1/representations.rb' - -module Google - module Apis - # DCM/DFA Reporting And Trafficking API - # - # Manage your DoubleClick Campaign Manager ad campaigns and reports. - # - # @see https://developers.google.com/doubleclick-advertisers/reporting/ - module DfareportingV2_1 - VERSION = 'V2_1' - REVISION = '20150326' - - # View and manage DoubleClick for Advertisers reports - AUTH_DFAREPORTING = 'https://www.googleapis.com/auth/dfareporting' - - # View and manage your DoubleClick Campaign Manager's (DCM) display ad campaigns - AUTH_DFATRAFFICKING = 'https://www.googleapis.com/auth/dfatrafficking' - end - end -end diff --git a/generated/google/apis/dfareporting_v2_1/classes.rb b/generated/google/apis/dfareporting_v2_1/classes.rb deleted file mode 100644 index a3330d07f..000000000 --- a/generated/google/apis/dfareporting_v2_1/classes.rb +++ /dev/null @@ -1,10755 +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 DfareportingV2_1 - - # Contains properties of a DCM account. - class Account - include Google::Apis::Core::Hashable - - # Account permissions assigned to this account. - # Corresponds to the JSON property `accountPermissionIds` - # @return [Array] - attr_accessor :account_permission_ids - - # Profile for this account. This is a read-only field that can be left blank. - # Corresponds to the JSON property `accountProfile` - # @return [String] - attr_accessor :account_profile - - # Whether this account is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Maximum number of active ads allowed for this account. - # Corresponds to the JSON property `activeAdsLimitTier` - # @return [String] - attr_accessor :active_ads_limit_tier - - # Whether to serve creatives with Active View tags. If disabled, viewability - # data will not be available for any impressions. - # Corresponds to the JSON property `activeViewOptOut` - # @return [Boolean] - attr_accessor :active_view_opt_out - alias_method :active_view_opt_out?, :active_view_opt_out - - # User role permissions available to the user roles of this account. - # Corresponds to the JSON property `availablePermissionIds` - # @return [Array] - attr_accessor :available_permission_ids - - # Whether campaigns created in this account will be enabled for comScore vCE by - # default. - # Corresponds to the JSON property `comscoreVceEnabled` - # @return [Boolean] - attr_accessor :comscore_vce_enabled - alias_method :comscore_vce_enabled?, :comscore_vce_enabled - - # ID of the country associated with this account. - # Corresponds to the JSON property `countryId` - # @return [String] - attr_accessor :country_id - - # ID of currency associated with this account. This is a required field. - # Acceptable values are: - # - "1" for USD - # - "2" for GBP - # - "3" for ESP - # - "4" for SEK - # - "5" for CAD - # - "6" for JPY - # - "7" for DEM - # - "8" for AUD - # - "9" for FRF - # - "10" for ITL - # - "11" for DKK - # - "12" for NOK - # - "13" for FIM - # - "14" for ZAR - # - "15" for IEP - # - "16" for NLG - # - "17" for EUR - # - "18" for KRW - # - "19" for TWD - # - "20" for SGD - # - "21" for CNY - # - "22" for HKD - # - "23" for NZD - # - "24" for MYR - # - "25" for BRL - # - "26" for PTE - # - "27" for MXP - # - "28" for CLP - # - "29" for TRY - # - "30" for ARS - # - "31" for PEN - # - "32" for ILS - # - "33" for CHF - # - "34" for VEF - # - "35" for COP - # - "36" for GTQ - # Corresponds to the JSON property `currencyId` - # @return [String] - attr_accessor :currency_id - - # Default placement dimensions for this account. - # Corresponds to the JSON property `defaultCreativeSizeId` - # @return [String] - attr_accessor :default_creative_size_id - - # Description of this account. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # ID of this account. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#account". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Locale of this account. - # Acceptable values are: - # - "cs" (Czech) - # - "de" (German) - # - "en" (English) - # - "en-GB" (English United Kingdom) - # - "es" (Spanish) - # - "fr" (French) - # - "it" (Italian) - # - "ja" (Japanese) - # - "ko" (Korean) - # - "pl" (Polish) - # - "pt-BR" (Portuguese Brazil) - # - "ru" (Russian) - # - "sv" (Swedish) - # - "tr" (Turkish) - # - "zh-CN" (Chinese Simplified) - # - "zh-TW" (Chinese Traditional) - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Maximum image size allowed for this account. - # Corresponds to the JSON property `maximumImageSize` - # @return [String] - attr_accessor :maximum_image_size - - # Name of this account. This is a required field, and must be less than 128 - # characters long and be globally unique. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Whether campaigns created in this account will be enabled for Nielsen OCR - # reach ratings by default. - # Corresponds to the JSON property `nielsenOcrEnabled` - # @return [Boolean] - attr_accessor :nielsen_ocr_enabled - alias_method :nielsen_ocr_enabled?, :nielsen_ocr_enabled - - # Reporting Configuration - # Corresponds to the JSON property `reportsConfiguration` - # @return [Google::Apis::DfareportingV2_1::ReportsConfiguration] - attr_accessor :reports_configuration - - # File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 - # and 10240. - # Corresponds to the JSON property `teaserSizeLimit` - # @return [String] - attr_accessor :teaser_size_limit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_permission_ids = args[:account_permission_ids] unless args[:account_permission_ids].nil? - @account_profile = args[:account_profile] unless args[:account_profile].nil? - @active = args[:active] unless args[:active].nil? - @active_ads_limit_tier = args[:active_ads_limit_tier] unless args[:active_ads_limit_tier].nil? - @active_view_opt_out = args[:active_view_opt_out] unless args[:active_view_opt_out].nil? - @available_permission_ids = args[:available_permission_ids] unless args[:available_permission_ids].nil? - @comscore_vce_enabled = args[:comscore_vce_enabled] unless args[:comscore_vce_enabled].nil? - @country_id = args[:country_id] unless args[:country_id].nil? - @currency_id = args[:currency_id] unless args[:currency_id].nil? - @default_creative_size_id = args[:default_creative_size_id] unless args[:default_creative_size_id].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @locale = args[:locale] unless args[:locale].nil? - @maximum_image_size = args[:maximum_image_size] unless args[:maximum_image_size].nil? - @name = args[:name] unless args[:name].nil? - @nielsen_ocr_enabled = args[:nielsen_ocr_enabled] unless args[:nielsen_ocr_enabled].nil? - @reports_configuration = args[:reports_configuration] unless args[:reports_configuration].nil? - @teaser_size_limit = args[:teaser_size_limit] unless args[:teaser_size_limit].nil? - end - end - - # Gets a summary of active ads in an account. - class AccountActiveAdSummary - include Google::Apis::Core::Hashable - - # ID of the account. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Ads that have been activated for the account - # Corresponds to the JSON property `activeAds` - # @return [String] - attr_accessor :active_ads - - # Maximum number of active ads allowed for the account. - # Corresponds to the JSON property `activeAdsLimitTier` - # @return [String] - attr_accessor :active_ads_limit_tier - - # Ads that can be activated for the account. - # Corresponds to the JSON property `availableAds` - # @return [String] - attr_accessor :available_ads - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountActiveAdSummary". - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @active_ads = args[:active_ads] unless args[:active_ads].nil? - @active_ads_limit_tier = args[:active_ads_limit_tier] unless args[:active_ads_limit_tier].nil? - @available_ads = args[:available_ads] unless args[:available_ads].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # AccountPermissions contains information about a particular account permission. - # Some features of DCM require an account permission to be present in the - # account. - class AccountPermission - include Google::Apis::Core::Hashable - - # Account profiles associated with this account permission. - # Possible values are: - # - "ACCOUNT_PROFILE_BASIC" - # - "ACCOUNT_PROFILE_STANDARD" - # Corresponds to the JSON property `accountProfiles` - # @return [Array] - attr_accessor :account_profiles - - # ID of this account permission. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountPermission". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Administrative level required to enable this account permission. - # Corresponds to the JSON property `level` - # @return [String] - attr_accessor :level - - # Name of this account permission. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Permission group of this account permission. - # Corresponds to the JSON property `permissionGroupId` - # @return [String] - attr_accessor :permission_group_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_profiles = args[:account_profiles] unless args[:account_profiles].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @level = args[:level] unless args[:level].nil? - @name = args[:name] unless args[:name].nil? - @permission_group_id = args[:permission_group_id] unless args[:permission_group_id].nil? - end - end - - # AccountPermissionGroups contains a mapping of permission group IDs to names. A - # permission group is a grouping of account permissions. - class AccountPermissionGroup - include Google::Apis::Core::Hashable - - # ID of this account permission group. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountPermissionGroup". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this account permission group. - # 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 - - # Account Permission Group List Response - class ListAccountPermissionGroupsResponse - include Google::Apis::Core::Hashable - - # Account permission group collection. - # Corresponds to the JSON property `accountPermissionGroups` - # @return [Array] - attr_accessor :account_permission_groups - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountPermissionGroupsListResponse". - # 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) - @account_permission_groups = args[:account_permission_groups] unless args[:account_permission_groups].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Account Permission List Response - class ListAccountPermissionsResponse - include Google::Apis::Core::Hashable - - # Account permission collection. - # Corresponds to the JSON property `accountPermissions` - # @return [Array] - attr_accessor :account_permissions - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountPermissionsListResponse". - # 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) - @account_permissions = args[:account_permissions] unless args[:account_permissions].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # AccountUserProfiles contains properties of a DCM user profile. This resource - # is specifically for managing user profiles, whereas UserProfiles is for - # accessing the API. - class AccountUserProfile - include Google::Apis::Core::Hashable - - # Account ID of the user profile. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Whether this user profile is active. This defaults to false, and must be set - # true on insert for the user profile to be usable. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Object Filter. - # Corresponds to the JSON property `advertiserFilter` - # @return [Google::Apis::DfareportingV2_1::ObjectFilter] - attr_accessor :advertiser_filter - - # Object Filter. - # Corresponds to the JSON property `campaignFilter` - # @return [Google::Apis::DfareportingV2_1::ObjectFilter] - attr_accessor :campaign_filter - - # Comments for this user profile. - # Corresponds to the JSON property `comments` - # @return [String] - attr_accessor :comments - - # Email of the user profile. The email addresss must be linked to a Google - # Account. This field is required on insertion and is read-only after insertion. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # ID of the user profile. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountUserProfile". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Locale of the user profile. This is a required field. - # Acceptable values are: - # - "cs" (Czech) - # - "de" (German) - # - "en" (English) - # - "en-GB" (English United Kingdom) - # - "es" (Spanish) - # - "fr" (French) - # - "it" (Italian) - # - "ja" (Japanese) - # - "ko" (Korean) - # - "pl" (Polish) - # - "pt-BR" (Portuguese Brazil) - # - "ru" (Russian) - # - "sv" (Swedish) - # - "tr" (Turkish) - # - "zh-CN" (Chinese Simplified) - # - "zh-TW" (Chinese Traditional) - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Name of the user profile. This is a required field. Must be less than 64 - # characters long, must be globally unique, and cannot contain whitespace or any - # of the following characters: "&;"#%,". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Object Filter. - # Corresponds to the JSON property `siteFilter` - # @return [Google::Apis::DfareportingV2_1::ObjectFilter] - attr_accessor :site_filter - - # Subaccount ID of the user profile. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Trafficker type of this user profile. - # Corresponds to the JSON property `traffickerType` - # @return [String] - attr_accessor :trafficker_type - - # User type of the user profile. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `userAccessType` - # @return [String] - attr_accessor :user_access_type - - # Object Filter. - # Corresponds to the JSON property `userRoleFilter` - # @return [Google::Apis::DfareportingV2_1::ObjectFilter] - attr_accessor :user_role_filter - - # User role ID of the user profile. This is a required field. - # Corresponds to the JSON property `userRoleId` - # @return [String] - attr_accessor :user_role_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @advertiser_filter = args[:advertiser_filter] unless args[:advertiser_filter].nil? - @campaign_filter = args[:campaign_filter] unless args[:campaign_filter].nil? - @comments = args[:comments] unless args[:comments].nil? - @email = args[:email] unless args[:email].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @locale = args[:locale] unless args[:locale].nil? - @name = args[:name] unless args[:name].nil? - @site_filter = args[:site_filter] unless args[:site_filter].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @trafficker_type = args[:trafficker_type] unless args[:trafficker_type].nil? - @user_access_type = args[:user_access_type] unless args[:user_access_type].nil? - @user_role_filter = args[:user_role_filter] unless args[:user_role_filter].nil? - @user_role_id = args[:user_role_id] unless args[:user_role_id].nil? - end - end - - # Account User Profile List Response - class ListAccountUserProfilesResponse - include Google::Apis::Core::Hashable - - # Account user profile collection. - # Corresponds to the JSON property `accountUserProfiles` - # @return [Array] - attr_accessor :account_user_profiles - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountUserProfilesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @account_user_profiles = args[:account_user_profiles] unless args[:account_user_profiles].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Account List Response - class ListAccountsResponse - include Google::Apis::Core::Hashable - - # Account collection. - # Corresponds to the JSON property `accounts` - # @return [Array] - attr_accessor :accounts - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#accountsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @accounts = args[:accounts] unless args[:accounts].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Represents an activity group. - class Activities - include Google::Apis::Core::Hashable - - # List of activity filters. The dimension values need to be all either of type " - # dfa:activity" or "dfa:activityGroup". - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - # The kind of resource this is, in this case dfareporting#activities. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # List of names of floodlight activity metrics. - # Corresponds to the JSON property `metricNames` - # @return [Array] - attr_accessor :metric_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filters = args[:filters] unless args[:filters].nil? - @kind = args[:kind] unless args[:kind].nil? - @metric_names = args[:metric_names] unless args[:metric_names].nil? - end - end - - # Contains properties of a DCM ad. - class Ad - include Google::Apis::Core::Hashable - - # Account ID of this ad. This is a read-only field that can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Whether this ad is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Advertiser ID of this ad. This is a required field on insertion. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Whether this ad is archived. - # Corresponds to the JSON property `archived` - # @return [Boolean] - attr_accessor :archived - alias_method :archived?, :archived - - # Audience segment ID that is being targeted for this ad. Applicable when type - # is AD_SERVING_STANDARD_AD. - # Corresponds to the JSON property `audienceSegmentId` - # @return [String] - attr_accessor :audience_segment_id - - # Campaign ID of this ad. This is a required field on insertion. - # Corresponds to the JSON property `campaignId` - # @return [String] - attr_accessor :campaign_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `campaignIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :campaign_id_dimension_value - - # Click-through URL - # Corresponds to the JSON property `clickThroughUrl` - # @return [Google::Apis::DfareportingV2_1::ClickThroughUrl] - attr_accessor :click_through_url - - # Click Through URL Suffix settings. - # Corresponds to the JSON property `clickThroughUrlSuffixProperties` - # @return [Google::Apis::DfareportingV2_1::ClickThroughUrlSuffixProperties] - attr_accessor :click_through_url_suffix_properties - - # Comments for this ad. - # Corresponds to the JSON property `comments` - # @return [String] - attr_accessor :comments - - # Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. WEB - # and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices - # for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are - # for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream - # video ads developed with the VAST standard. - # Corresponds to the JSON property `compatibility` - # @return [String] - attr_accessor :compatibility - - # Modification timestamp. - # Corresponds to the JSON property `createInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :create_info - - # Creative group assignments for this ad. Applicable when type is - # AD_SERVING_CLICK_TRACKER. Only one assignment per creative group number is - # allowed for a maximum of two assignments. - # Corresponds to the JSON property `creativeGroupAssignments` - # @return [Array] - attr_accessor :creative_group_assignments - - # Creative Rotation. - # Corresponds to the JSON property `creativeRotation` - # @return [Google::Apis::DfareportingV2_1::CreativeRotation] - attr_accessor :creative_rotation - - # Day Part Targeting. - # Corresponds to the JSON property `dayPartTargeting` - # @return [Google::Apis::DfareportingV2_1::DayPartTargeting] - attr_accessor :day_part_targeting - - # Properties of inheriting and overriding the default click-through event tag. A - # campaign may override the event tag defined at the advertiser level, and an ad - # may also override the campaign's setting further. - # Corresponds to the JSON property `defaultClickThroughEventTagProperties` - # @return [Google::Apis::DfareportingV2_1::DefaultClickThroughEventTagProperties] - attr_accessor :default_click_through_event_tag_properties - - # Delivery Schedule. - # Corresponds to the JSON property `deliverySchedule` - # @return [Google::Apis::DfareportingV2_1::DeliverySchedule] - attr_accessor :delivery_schedule - - # Whether this ad is a dynamic click tracker. Applicable when type is - # AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is read-only - # after insert. - # Corresponds to the JSON property `dynamicClickTracker` - # @return [Boolean] - attr_accessor :dynamic_click_tracker - alias_method :dynamic_click_tracker?, :dynamic_click_tracker - - # Date and time that this ad should stop serving. Must be later than the start - # time. This is a required field on insertion. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # Event tag overrides for this ad. - # Corresponds to the JSON property `eventTagOverrides` - # @return [Array] - attr_accessor :event_tag_overrides - - # Geographical Targeting. - # Corresponds to the JSON property `geoTargeting` - # @return [Google::Apis::DfareportingV2_1::GeoTargeting] - attr_accessor :geo_targeting - - # ID of this ad. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Key Value Targeting Expression. - # Corresponds to the JSON property `keyValueTargetingExpression` - # @return [Google::Apis::DfareportingV2_1::KeyValueTargetingExpression] - attr_accessor :key_value_targeting_expression - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#ad". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Name of this ad. This is a required field and must be less than 256 characters - # long. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Placement assignments for this ad. - # Corresponds to the JSON property `placementAssignments` - # @return [Array] - attr_accessor :placement_assignments - - # Remarketing List Targeting Expression. - # Corresponds to the JSON property `remarketing_list_expression` - # @return [Google::Apis::DfareportingV2_1::ListTargetingExpression] - attr_accessor :remarketing_list_expression - - # Represents the dimensions of ads, placements, creatives, or creative assets. - # Corresponds to the JSON property `size` - # @return [Google::Apis::DfareportingV2_1::Size] - attr_accessor :size - - # Whether this ad is ssl compliant. This is a read-only field that is auto- - # generated when the ad is inserted or updated. - # Corresponds to the JSON property `sslCompliant` - # @return [Boolean] - attr_accessor :ssl_compliant - alias_method :ssl_compliant?, :ssl_compliant - - # Whether this ad requires ssl. This is a read-only field that is auto-generated - # when the ad is inserted or updated. - # Corresponds to the JSON property `sslRequired` - # @return [Boolean] - attr_accessor :ssl_required - alias_method :ssl_required?, :ssl_required - - # Date and time that this ad should start serving. If creating an ad, this field - # must be a time in the future. This is a required field on insertion. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - # Subaccount ID of this ad. This is a read-only field that can be left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Technology Targeting. - # Corresponds to the JSON property `technologyTargeting` - # @return [Google::Apis::DfareportingV2_1::TechnologyTargeting] - attr_accessor :technology_targeting - - # Type of ad. This is a required field on insertion. Note that default ads ( - # AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource). - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @archived = args[:archived] unless args[:archived].nil? - @audience_segment_id = args[:audience_segment_id] unless args[:audience_segment_id].nil? - @campaign_id = args[:campaign_id] unless args[:campaign_id].nil? - @campaign_id_dimension_value = args[:campaign_id_dimension_value] unless args[:campaign_id_dimension_value].nil? - @click_through_url = args[:click_through_url] unless args[:click_through_url].nil? - @click_through_url_suffix_properties = args[:click_through_url_suffix_properties] unless args[:click_through_url_suffix_properties].nil? - @comments = args[:comments] unless args[:comments].nil? - @compatibility = args[:compatibility] unless args[:compatibility].nil? - @create_info = args[:create_info] unless args[:create_info].nil? - @creative_group_assignments = args[:creative_group_assignments] unless args[:creative_group_assignments].nil? - @creative_rotation = args[:creative_rotation] unless args[:creative_rotation].nil? - @day_part_targeting = args[:day_part_targeting] unless args[:day_part_targeting].nil? - @default_click_through_event_tag_properties = args[:default_click_through_event_tag_properties] unless args[:default_click_through_event_tag_properties].nil? - @delivery_schedule = args[:delivery_schedule] unless args[:delivery_schedule].nil? - @dynamic_click_tracker = args[:dynamic_click_tracker] unless args[:dynamic_click_tracker].nil? - @end_time = args[:end_time] unless args[:end_time].nil? - @event_tag_overrides = args[:event_tag_overrides] unless args[:event_tag_overrides].nil? - @geo_targeting = args[:geo_targeting] unless args[:geo_targeting].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @key_value_targeting_expression = args[:key_value_targeting_expression] unless args[:key_value_targeting_expression].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @name = args[:name] unless args[:name].nil? - @placement_assignments = args[:placement_assignments] unless args[:placement_assignments].nil? - @remarketing_list_expression = args[:remarketing_list_expression] unless args[:remarketing_list_expression].nil? - @size = args[:size] unless args[:size].nil? - @ssl_compliant = args[:ssl_compliant] unless args[:ssl_compliant].nil? - @ssl_required = args[:ssl_required] unless args[:ssl_required].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @technology_targeting = args[:technology_targeting] unless args[:technology_targeting].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Ad Slot - class AdSlot - include Google::Apis::Core::Hashable - - # Comment for this ad slot. - # Corresponds to the JSON property `comment` - # @return [String] - attr_accessor :comment - - # Ad slot compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on - # desktop or on mobile devices for regular or interstitial ads respectively. APP - # and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers - # to rendering in in-stream video ads developed with the VAST standard. - # Corresponds to the JSON property `compatibility` - # @return [String] - attr_accessor :compatibility - - # Height of this ad slot. - # Corresponds to the JSON property `height` - # @return [String] - attr_accessor :height - - # ID of the placement from an external platform that is linked to this ad slot. - # Corresponds to the JSON property `linkedPlacementId` - # @return [String] - attr_accessor :linked_placement_id - - # Name of this ad slot. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Payment source type of this ad slot. - # Corresponds to the JSON property `paymentSourceType` - # @return [String] - attr_accessor :payment_source_type - - # Primary ad slot of a roadblock inventory item. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Width of this ad slot. - # Corresponds to the JSON property `width` - # @return [String] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @comment = args[:comment] unless args[:comment].nil? - @compatibility = args[:compatibility] unless args[:compatibility].nil? - @height = args[:height] unless args[:height].nil? - @linked_placement_id = args[:linked_placement_id] unless args[:linked_placement_id].nil? - @name = args[:name] unless args[:name].nil? - @payment_source_type = args[:payment_source_type] unless args[:payment_source_type].nil? - @primary = args[:primary] unless args[:primary].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # Ad List Response - class ListAdsResponse - include Google::Apis::Core::Hashable - - # Ad collection. - # Corresponds to the JSON property `ads` - # @return [Array] - attr_accessor :ads - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#adsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @ads = args[:ads] unless args[:ads].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Contains properties of a DCM advertiser. - class Advertiser - include Google::Apis::Core::Hashable - - # Account ID of this advertiser.This is a read-only field that can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # ID of the advertiser group this advertiser belongs to. You can group - # advertisers for reporting purposes, allowing you to see aggregated information - # for all advertisers in each group. - # Corresponds to the JSON property `advertiserGroupId` - # @return [String] - attr_accessor :advertiser_group_id - - # Suffix added to click-through URL of ad creative associations under this - # advertiser. Must be less than 129 characters long. - # Corresponds to the JSON property `clickThroughUrlSuffix` - # @return [String] - attr_accessor :click_through_url_suffix - - # ID of the click-through event tag to apply by default to the landing pages of - # this advertiser's campaigns. - # Corresponds to the JSON property `defaultClickThroughEventTagId` - # @return [String] - attr_accessor :default_click_through_event_tag_id - - # Default email address used in sender field for tag emails. - # Corresponds to the JSON property `defaultEmail` - # @return [String] - attr_accessor :default_email - - # Floodlight configuration ID of this advertiser. The floodlight configuration - # ID will be created automatically, so on insert this field should be left blank. - # This field can be set to another advertiser's floodlight configuration ID in - # order to share that advertiser's floodlight configuration with this advertiser, - # so long as: - # - This advertiser's original floodlight configuration is not already - # associated with floodlight activities or floodlight activity groups. - # - This advertiser's original floodlight configuration is not already shared - # with another advertiser. - # Corresponds to the JSON property `floodlightConfigurationId` - # @return [String] - attr_accessor :floodlight_configuration_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `floodlightConfigurationIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :floodlight_configuration_id_dimension_value - - # ID of this advertiser. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#advertiser". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this advertiser. This is a required field and must be less than 256 - # characters long and unique among advertisers of the same account. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Original floodlight configuration before any sharing occurred. Set the - # floodlightConfigurationId of this advertiser to - # originalFloodlightConfigurationId to unshare the advertiser's current - # floodlight configuration. You cannot unshare an advertiser's floodlight - # configuration if the shared configuration has activities associated with any - # campaign or placement. - # Corresponds to the JSON property `originalFloodlightConfigurationId` - # @return [String] - attr_accessor :original_floodlight_configuration_id - - # Status of this advertiser. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Subaccount ID of this advertiser.This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_group_id = args[:advertiser_group_id] unless args[:advertiser_group_id].nil? - @click_through_url_suffix = args[:click_through_url_suffix] unless args[:click_through_url_suffix].nil? - @default_click_through_event_tag_id = args[:default_click_through_event_tag_id] unless args[:default_click_through_event_tag_id].nil? - @default_email = args[:default_email] unless args[:default_email].nil? - @floodlight_configuration_id = args[:floodlight_configuration_id] unless args[:floodlight_configuration_id].nil? - @floodlight_configuration_id_dimension_value = args[:floodlight_configuration_id_dimension_value] unless args[:floodlight_configuration_id_dimension_value].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @original_floodlight_configuration_id = args[:original_floodlight_configuration_id] unless args[:original_floodlight_configuration_id].nil? - @status = args[:status] unless args[:status].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Groups advertisers together so that reports can be generated for the entire - # group at once. - class AdvertiserGroup - include Google::Apis::Core::Hashable - - # Account ID of this advertiser group. This is a read-only field that can be - # left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # ID of this advertiser group. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#advertiserGroup". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this advertiser group. This is a required field and must be less than - # 256 characters long and unique among advertiser groups of the same 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Advertiser Group List Response - class ListAdvertiserGroupsResponse - include Google::Apis::Core::Hashable - - # Advertiser group collection. - # Corresponds to the JSON property `advertiserGroups` - # @return [Array] - attr_accessor :advertiser_groups - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#advertiserGroupsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @advertiser_groups = args[:advertiser_groups] unless args[:advertiser_groups].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Advertiser List Response - class ListAdvertisersResponse - include Google::Apis::Core::Hashable - - # Advertiser collection. - # Corresponds to the JSON property `advertisers` - # @return [Array] - attr_accessor :advertisers - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#advertisersListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @advertisers = args[:advertisers] unless args[:advertisers].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Audience Segment. - class AudienceSegment - include Google::Apis::Core::Hashable - - # Weight allocated to this segment. Must be between 1 and 1000. The weight - # assigned will be understood in proportion to the weights assigned to other - # segments in the same segment group. - # Corresponds to the JSON property `allocation` - # @return [Fixnum] - attr_accessor :allocation - - # ID of this audience segment. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Name of this audience segment. This is a required field and must be less than - # 65 characters long. - # 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) - @allocation = args[:allocation] unless args[:allocation].nil? - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Audience Segment Group. - class AudienceSegmentGroup - include Google::Apis::Core::Hashable - - # Audience segments assigned to this group. The number of segments must be - # between 2 and 100. - # Corresponds to the JSON property `audienceSegments` - # @return [Array] - attr_accessor :audience_segments - - # ID of this audience segment group. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Name of this audience segment group. This is a required field and must be less - # than 65 characters long. - # 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) - @audience_segments = args[:audience_segments] unless args[:audience_segments].nil? - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Contains information about a browser that can be targeted by ads. - class Browser - include Google::Apis::Core::Hashable - - # ID referring to this grouping of browser and version numbers. This is the ID - # used for targeting. - # Corresponds to the JSON property `browserVersionId` - # @return [String] - attr_accessor :browser_version_id - - # DART ID of this browser. This is the ID used when generating reports. - # Corresponds to the JSON property `dartId` - # @return [String] - attr_accessor :dart_id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#browser". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Major version number (leftmost number) of this browser. For example, for - # Chrome 5.0.376.86 beta, this field should be set to 5. An asterisk (*) may be - # used to target any version number, and a question mark (?) may be used to - # target cases where the version number cannot be identified. For example, - # Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* - # targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad - # server knows the browser is Firefox but can't tell which version it is. - # Corresponds to the JSON property `majorVersion` - # @return [String] - attr_accessor :major_version - - # Minor version number (number after first dot on left) of this browser. For - # example, for Chrome 5.0.375.86 beta, this field should be set to 0. An - # asterisk (*) may be used to target any version number, and a question mark (?) - # may be used to target cases where the version number cannot be identified. For - # example, Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. - # Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases - # where the ad server knows the browser is Firefox but can't tell which version - # it is. - # Corresponds to the JSON property `minorVersion` - # @return [String] - attr_accessor :minor_version - - # Name of this browser. - # 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) - @browser_version_id = args[:browser_version_id] unless args[:browser_version_id].nil? - @dart_id = args[:dart_id] unless args[:dart_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @major_version = args[:major_version] unless args[:major_version].nil? - @minor_version = args[:minor_version] unless args[:minor_version].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Browser List Response - class ListBrowsersResponse - include Google::Apis::Core::Hashable - - # Browser collection. - # Corresponds to the JSON property `browsers` - # @return [Array] - attr_accessor :browsers - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#browsersListResponse". - # 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) - @browsers = args[:browsers] unless args[:browsers].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Contains properties of a DCM campaign. - class Campaign - include Google::Apis::Core::Hashable - - # Account ID of this campaign. This is a read-only field that can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Additional creative optimization configurations for the campaign. - # Corresponds to the JSON property `additionalCreativeOptimizationConfigurations` - # @return [Array] - attr_accessor :additional_creative_optimization_configurations - - # Advertiser group ID of the associated advertiser. - # Corresponds to the JSON property `advertiserGroupId` - # @return [String] - attr_accessor :advertiser_group_id - - # Advertiser ID of this campaign. This is a required field. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Whether this campaign has been archived. - # Corresponds to the JSON property `archived` - # @return [Boolean] - attr_accessor :archived - alias_method :archived?, :archived - - # Audience segment groups assigned to this campaign. Cannot have more than 300 - # segment groups. - # Corresponds to the JSON property `audienceSegmentGroups` - # @return [Array] - attr_accessor :audience_segment_groups - - # Billing invoice code included in the DCM client billing invoices associated - # with the campaign. - # Corresponds to the JSON property `billingInvoiceCode` - # @return [String] - attr_accessor :billing_invoice_code - - # Click Through URL Suffix settings. - # Corresponds to the JSON property `clickThroughUrlSuffixProperties` - # @return [Google::Apis::DfareportingV2_1::ClickThroughUrlSuffixProperties] - attr_accessor :click_through_url_suffix_properties - - # Arbitrary comments about this campaign. Must be less than 256 characters long. - # Corresponds to the JSON property `comment` - # @return [String] - attr_accessor :comment - - # Whether comScore vCE reports are enabled for this campaign. - # Corresponds to the JSON property `comscoreVceEnabled` - # @return [Boolean] - attr_accessor :comscore_vce_enabled - alias_method :comscore_vce_enabled?, :comscore_vce_enabled - - # Modification timestamp. - # Corresponds to the JSON property `createInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :create_info - - # List of creative group IDs that are assigned to the campaign. - # Corresponds to the JSON property `creativeGroupIds` - # @return [Array] - attr_accessor :creative_group_ids - - # Creative optimization settings. - # Corresponds to the JSON property `creativeOptimizationConfiguration` - # @return [Google::Apis::DfareportingV2_1::CreativeOptimizationConfiguration] - attr_accessor :creative_optimization_configuration - - # Properties of inheriting and overriding the default click-through event tag. A - # campaign may override the event tag defined at the advertiser level, and an ad - # may also override the campaign's setting further. - # Corresponds to the JSON property `defaultClickThroughEventTagProperties` - # @return [Google::Apis::DfareportingV2_1::DefaultClickThroughEventTagProperties] - attr_accessor :default_click_through_event_tag_properties - - # Date on which the campaign will stop running. On insert, the end date must be - # today or a future date. The end date must be later than or be the same as the - # start date. If, for example, you set 6/25/2015 as both the start and end dates, - # the effective campaign run date is just that day only, 6/25/2015. The hours, - # minutes, and seconds of the end date should not be set, as doing so will - # result in an error. This is a required field. - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # Overrides that can be used to activate or deactivate advertiser event tags. - # Corresponds to the JSON property `eventTagOverrides` - # @return [Array] - attr_accessor :event_tag_overrides - - # External ID for this campaign. - # Corresponds to the JSON property `externalId` - # @return [String] - attr_accessor :external_id - - # ID of this campaign. This is a read-only auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#campaign". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Lookback configuration settings. - # Corresponds to the JSON property `lookbackConfiguration` - # @return [Google::Apis::DfareportingV2_1::LookbackConfiguration] - attr_accessor :lookback_configuration - - # Name of this campaign. This is a required field and must be less than 256 - # characters long and unique among campaigns of the same advertiser. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Whether Nielsen reports are enabled for this campaign. - # Corresponds to the JSON property `nielsenOcrEnabled` - # @return [Boolean] - attr_accessor :nielsen_ocr_enabled - alias_method :nielsen_ocr_enabled?, :nielsen_ocr_enabled - - # Date on which the campaign starts running. The start date can be any date. The - # hours, minutes, and seconds of the start date should not be set, as doing so - # will result in an error. This is a required field. - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - # Subaccount ID of this campaign. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Campaign trafficker contact emails. - # Corresponds to the JSON property `traffickerEmails` - # @return [Array] - attr_accessor :trafficker_emails - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @additional_creative_optimization_configurations = args[:additional_creative_optimization_configurations] unless args[:additional_creative_optimization_configurations].nil? - @advertiser_group_id = args[:advertiser_group_id] unless args[:advertiser_group_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @archived = args[:archived] unless args[:archived].nil? - @audience_segment_groups = args[:audience_segment_groups] unless args[:audience_segment_groups].nil? - @billing_invoice_code = args[:billing_invoice_code] unless args[:billing_invoice_code].nil? - @click_through_url_suffix_properties = args[:click_through_url_suffix_properties] unless args[:click_through_url_suffix_properties].nil? - @comment = args[:comment] unless args[:comment].nil? - @comscore_vce_enabled = args[:comscore_vce_enabled] unless args[:comscore_vce_enabled].nil? - @create_info = args[:create_info] unless args[:create_info].nil? - @creative_group_ids = args[:creative_group_ids] unless args[:creative_group_ids].nil? - @creative_optimization_configuration = args[:creative_optimization_configuration] unless args[:creative_optimization_configuration].nil? - @default_click_through_event_tag_properties = args[:default_click_through_event_tag_properties] unless args[:default_click_through_event_tag_properties].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @event_tag_overrides = args[:event_tag_overrides] unless args[:event_tag_overrides].nil? - @external_id = args[:external_id] unless args[:external_id].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @lookback_configuration = args[:lookback_configuration] unless args[:lookback_configuration].nil? - @name = args[:name] unless args[:name].nil? - @nielsen_ocr_enabled = args[:nielsen_ocr_enabled] unless args[:nielsen_ocr_enabled].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @trafficker_emails = args[:trafficker_emails] unless args[:trafficker_emails].nil? - end - end - - # Identifies a creative which has been associated with a given campaign. - class CampaignCreativeAssociation - include Google::Apis::Core::Hashable - - # ID of the creative associated with the campaign. This is a required field. - # Corresponds to the JSON property `creativeId` - # @return [String] - attr_accessor :creative_id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#campaignCreativeAssociation". - # 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) - @creative_id = args[:creative_id] unless args[:creative_id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Campaign Creative Association List Response - class ListCampaignCreativeAssociationsResponse - include Google::Apis::Core::Hashable - - # Campaign creative association collection - # Corresponds to the JSON property `campaignCreativeAssociations` - # @return [Array] - attr_accessor :campaign_creative_associations - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#campaignCreativeAssociationsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @campaign_creative_associations = args[:campaign_creative_associations] unless args[:campaign_creative_associations].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Campaign List Response - class ListCampaignsResponse - include Google::Apis::Core::Hashable - - # Campaign collection. - # Corresponds to the JSON property `campaigns` - # @return [Array] - attr_accessor :campaigns - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#campaignsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @campaigns = args[:campaigns] unless args[:campaigns].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Describes a change that a user has made to a resource. - class ChangeLog - include Google::Apis::Core::Hashable - - # Account ID of the modified object. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Action which caused the change. - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - # Time when the object was modified. - # Corresponds to the JSON property `changeTime` - # @return [DateTime] - attr_accessor :change_time - - # Field name of the object which changed. - # Corresponds to the JSON property `fieldName` - # @return [String] - attr_accessor :field_name - - # ID of this change log. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#changeLog". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # New value of the object field. - # Corresponds to the JSON property `newValue` - # @return [String] - attr_accessor :new_value - - # ID of the object of this change log. The object could be a campaign, placement, - # ad, or other type. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :obj_id - - # Object type of the change log. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # Old value of the object field. - # Corresponds to the JSON property `oldValue` - # @return [String] - attr_accessor :old_value - - # Subaccount ID of the modified object. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Transaction ID of this change log. When a single API call results in many - # changes, each change will have a separate ID in the change log but will share - # the same transactionId. - # Corresponds to the JSON property `transactionId` - # @return [String] - attr_accessor :transaction_id - - # ID of the user who modified the object. - # Corresponds to the JSON property `userProfileId` - # @return [String] - attr_accessor :user_profile_id - - # User profile name of the user who modified the object. - # Corresponds to the JSON property `userProfileName` - # @return [String] - attr_accessor :user_profile_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @action = args[:action] unless args[:action].nil? - @change_time = args[:change_time] unless args[:change_time].nil? - @field_name = args[:field_name] unless args[:field_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @new_value = args[:new_value] unless args[:new_value].nil? - @obj_id = args[:obj_id] unless args[:obj_id].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @old_value = args[:old_value] unless args[:old_value].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @transaction_id = args[:transaction_id] unless args[:transaction_id].nil? - @user_profile_id = args[:user_profile_id] unless args[:user_profile_id].nil? - @user_profile_name = args[:user_profile_name] unless args[:user_profile_name].nil? - end - end - - # Change Log List Response - class ListChangeLogsResponse - include Google::Apis::Core::Hashable - - # Change log collection. - # Corresponds to the JSON property `changeLogs` - # @return [Array] - attr_accessor :change_logs - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#changeLogsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @change_logs = args[:change_logs] unless args[:change_logs].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # City List Response - class ListCitiesResponse - include Google::Apis::Core::Hashable - - # City collection. - # Corresponds to the JSON property `cities` - # @return [Array] - attr_accessor :cities - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#citiesListResponse". - # 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) - @cities = args[:cities] unless args[:cities].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Contains information about a city that can be targeted by ads. - class City - include Google::Apis::Core::Hashable - - # Country code of the country to which this city belongs. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # DART ID of the country to which this city belongs. - # Corresponds to the JSON property `countryDartId` - # @return [String] - attr_accessor :country_dart_id - - # DART ID of this city. This is the ID used for targeting and generating reports. - # Corresponds to the JSON property `dartId` - # @return [String] - attr_accessor :dart_id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#city". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metro region code of the metro region (DMA) to which this city belongs. - # Corresponds to the JSON property `metroCode` - # @return [String] - attr_accessor :metro_code - - # ID of the metro region (DMA) to which this city belongs. - # Corresponds to the JSON property `metroDmaId` - # @return [String] - attr_accessor :metro_dma_id - - # Name of this city. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Region code of the region to which this city belongs. - # Corresponds to the JSON property `regionCode` - # @return [String] - attr_accessor :region_code - - # DART ID of the region to which this city belongs. - # Corresponds to the JSON property `regionDartId` - # @return [String] - attr_accessor :region_dart_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country_code = args[:country_code] unless args[:country_code].nil? - @country_dart_id = args[:country_dart_id] unless args[:country_dart_id].nil? - @dart_id = args[:dart_id] unless args[:dart_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @metro_code = args[:metro_code] unless args[:metro_code].nil? - @metro_dma_id = args[:metro_dma_id] unless args[:metro_dma_id].nil? - @name = args[:name] unless args[:name].nil? - @region_code = args[:region_code] unless args[:region_code].nil? - @region_dart_id = args[:region_dart_id] unless args[:region_dart_id].nil? - end - end - - # Creative Click Tag. - class ClickTag - include Google::Apis::Core::Hashable - - # Advertiser event name associated with the click tag. This field is used by - # ENHANCED_BANNER, ENHANCED_IMAGE, and HTML5_BANNER creatives. - # Corresponds to the JSON property `eventName` - # @return [String] - attr_accessor :event_name - - # Parameter name for the specified click tag. For ENHANCED_IMAGE creative assets, - # this field must match the value of the creative asset's creativeAssetId.name - # field. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parameter value for the specified click tag. This field contains a click- - # through url. - # 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) - @event_name = args[:event_name] unless args[:event_name].nil? - @name = args[:name] unless args[:name].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Click-through URL - class ClickThroughUrl - include Google::Apis::Core::Hashable - - # Custom click-through URL. Applicable if the defaultLandingPage field is set to - # false and the landingPageId field is left unset. - # Corresponds to the JSON property `customClickThroughUrl` - # @return [String] - attr_accessor :custom_click_through_url - - # Whether the campaign default landing page is used. - # Corresponds to the JSON property `defaultLandingPage` - # @return [Boolean] - attr_accessor :default_landing_page - alias_method :default_landing_page?, :default_landing_page - - # ID of the landing page for the click-through URL. Applicable if the - # defaultLandingPage field is set to false. - # Corresponds to the JSON property `landingPageId` - # @return [String] - attr_accessor :landing_page_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_click_through_url = args[:custom_click_through_url] unless args[:custom_click_through_url].nil? - @default_landing_page = args[:default_landing_page] unless args[:default_landing_page].nil? - @landing_page_id = args[:landing_page_id] unless args[:landing_page_id].nil? - end - end - - # Click Through URL Suffix settings. - class ClickThroughUrlSuffixProperties - include Google::Apis::Core::Hashable - - # Click-through URL suffix to apply to all ads in this entity's scope. Must be - # less than 128 characters long. - # Corresponds to the JSON property `clickThroughUrlSuffix` - # @return [String] - attr_accessor :click_through_url_suffix - - # Whether this entity should override the inherited click-through URL suffix - # with its own defined value. - # Corresponds to the JSON property `overrideInheritedSuffix` - # @return [Boolean] - attr_accessor :override_inherited_suffix - alias_method :override_inherited_suffix?, :override_inherited_suffix - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @click_through_url_suffix = args[:click_through_url_suffix] unless args[:click_through_url_suffix].nil? - @override_inherited_suffix = args[:override_inherited_suffix] unless args[:override_inherited_suffix].nil? - end - end - - # Companion Click-through override. - class CompanionClickThroughOverride - include Google::Apis::Core::Hashable - - # Click-through URL - # Corresponds to the JSON property `clickThroughUrl` - # @return [Google::Apis::DfareportingV2_1::ClickThroughUrl] - attr_accessor :click_through_url - - # ID of the creative for this companion click-through override. - # Corresponds to the JSON property `creativeId` - # @return [String] - attr_accessor :creative_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @click_through_url = args[:click_through_url] unless args[:click_through_url].nil? - @creative_id = args[:creative_id] unless args[:creative_id].nil? - end - end - - # Represents a response to the queryCompatibleFields method. - class CompatibleFields - include Google::Apis::Core::Hashable - - # Represents fields that are compatible to be selected for a report of type " - # CROSS_DIMENSION_REACH". - # Corresponds to the JSON property `crossDimensionReachReportCompatibleFields` - # @return [Google::Apis::DfareportingV2_1::CrossDimensionReachReportCompatibleFields] - attr_accessor :cross_dimension_reach_report_compatible_fields - - # Represents fields that are compatible to be selected for a report of type " - # FlOODLIGHT". - # Corresponds to the JSON property `floodlightReportCompatibleFields` - # @return [Google::Apis::DfareportingV2_1::FloodlightReportCompatibleFields] - attr_accessor :floodlight_report_compatible_fields - - # The kind of resource this is, in this case dfareporting#compatibleFields. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Represents fields that are compatible to be selected for a report of type " - # PATH_TO_CONVERSION". - # Corresponds to the JSON property `pathToConversionReportCompatibleFields` - # @return [Google::Apis::DfareportingV2_1::PathToConversionReportCompatibleFields] - attr_accessor :path_to_conversion_report_compatible_fields - - # Represents fields that are compatible to be selected for a report of type " - # REACH". - # Corresponds to the JSON property `reachReportCompatibleFields` - # @return [Google::Apis::DfareportingV2_1::ReachReportCompatibleFields] - attr_accessor :reach_report_compatible_fields - - # Represents fields that are compatible to be selected for a report of type " - # STANDARD". - # Corresponds to the JSON property `reportCompatibleFields` - # @return [Google::Apis::DfareportingV2_1::ReportCompatibleFields] - attr_accessor :report_compatible_fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cross_dimension_reach_report_compatible_fields = args[:cross_dimension_reach_report_compatible_fields] unless args[:cross_dimension_reach_report_compatible_fields].nil? - @floodlight_report_compatible_fields = args[:floodlight_report_compatible_fields] unless args[:floodlight_report_compatible_fields].nil? - @kind = args[:kind] unless args[:kind].nil? - @path_to_conversion_report_compatible_fields = args[:path_to_conversion_report_compatible_fields] unless args[:path_to_conversion_report_compatible_fields].nil? - @reach_report_compatible_fields = args[:reach_report_compatible_fields] unless args[:reach_report_compatible_fields].nil? - @report_compatible_fields = args[:report_compatible_fields] unless args[:report_compatible_fields].nil? - end - end - - # Contains information about an internet connection type that can be targeted by - # ads. Clients can use the connection type to target mobile vs. broadband users. - class ConnectionType - include Google::Apis::Core::Hashable - - # ID of this connection type. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#connectionType". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this connection type. - # 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 - - # Connection Type List Response - class ListConnectionTypesResponse - include Google::Apis::Core::Hashable - - # Collection of connection types such as broadband and mobile. - # Corresponds to the JSON property `connectionTypes` - # @return [Array] - attr_accessor :connection_types - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#connectionTypesListResponse". - # 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) - @connection_types = args[:connection_types] unless args[:connection_types].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Content Category List Response - class ListContentCategoriesResponse - include Google::Apis::Core::Hashable - - # Content category collection. - # Corresponds to the JSON property `contentCategories` - # @return [Array] - attr_accessor :content_categories - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#contentCategoriesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @content_categories = args[:content_categories] unless args[:content_categories].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Organizes placements according to the contents of their associated webpages. - class ContentCategory - include Google::Apis::Core::Hashable - - # Account ID of this content category. This is a read-only field that can be - # left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # ID of this content category. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#contentCategory". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this content category. This is a required field and must be less than - # 256 characters long and unique among content categories of the same 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Country List Response - class ListCountriesResponse - include Google::Apis::Core::Hashable - - # Country collection. - # Corresponds to the JSON property `countries` - # @return [Array] - attr_accessor :countries - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#countriesListResponse". - # 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) - @countries = args[:countries] unless args[:countries].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Contains information about a country that can be targeted by ads. - class Country - include Google::Apis::Core::Hashable - - # Country code. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # DART ID of this country. This is the ID used for targeting and generating - # reports. - # Corresponds to the JSON property `dartId` - # @return [String] - attr_accessor :dart_id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#country". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this country. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Whether ad serving supports secure servers in this country. - # Corresponds to the JSON property `sslEnabled` - # @return [Boolean] - attr_accessor :ssl_enabled - alias_method :ssl_enabled?, :ssl_enabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country_code = args[:country_code] unless args[:country_code].nil? - @dart_id = args[:dart_id] unless args[:dart_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @ssl_enabled = args[:ssl_enabled] unless args[:ssl_enabled].nil? - end - end - - # Contains properties of a Creative. - class Creative - include Google::Apis::Core::Hashable - - # Account ID of this creative. This field, if left unset, will be auto-generated - # for both insert and update operations. Applicable to all creative types. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Whether the creative is active. Applicable to all creative types. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Ad parameters user for VPAID creative. This is a read-only field. Applicable - # to the following creative types: all VPAID. - # Corresponds to the JSON property `adParameters` - # @return [String] - attr_accessor :ad_parameters - - # Keywords for a Rich Media creative. Keywords let you customize the creative - # settings of a Rich Media ad running on your site without having to contact the - # advertiser. You can use keywords to dynamically change the look or - # functionality of a creative. Applicable to the following creative types: all - # RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `adTagKeys` - # @return [Array] - attr_accessor :ad_tag_keys - - # Advertiser ID of this creative. This is a required field. Applicable to all - # creative types. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Whether script access is allowed for this creative. This is a read-only and - # deprecated field which will automatically be set to true on update. Applicable - # to the following creative types: FLASH_INPAGE. - # Corresponds to the JSON property `allowScriptAccess` - # @return [Boolean] - attr_accessor :allow_script_access - alias_method :allow_script_access?, :allow_script_access - - # Whether the creative is archived. Applicable to all creative types. - # Corresponds to the JSON property `archived` - # @return [Boolean] - attr_accessor :archived - alias_method :archived?, :archived - - # Type of artwork used for the creative. This is a read-only field. Applicable - # to the following creative types: all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `artworkType` - # @return [String] - attr_accessor :artwork_type - - # Authoring tool for HTML5 banner creatives. This is a read-only field. - # Applicable to the following creative types: HTML5_BANNER. - # Corresponds to the JSON property `authoringTool` - # @return [String] - attr_accessor :authoring_tool - - # Whether images are automatically advanced for enhanced image creatives. - # Applicable to the following creative types: ENHANCED_IMAGE. - # Corresponds to the JSON property `auto_advance_images` - # @return [Boolean] - attr_accessor :auto_advance_images - alias_method :auto_advance_images?, :auto_advance_images - - # The 6-character HTML color code, beginning with #, for the background of the - # window area where the Flash file is displayed. Default is white. Applicable to - # the following creative types: FLASH_INPAGE. - # Corresponds to the JSON property `backgroundColor` - # @return [String] - attr_accessor :background_color - - # Click-through URL for backup image. Applicable to the following creative types: - # ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER. - # Corresponds to the JSON property `backupImageClickThroughUrl` - # @return [String] - attr_accessor :backup_image_click_through_url - - # List of feature dependencies that will cause a backup image to be served if - # the browser that serves the ad does not support them. Feature dependencies are - # features that a browser must be able to support in order to render your HTML5 - # creative asset correctly. This field is initially auto-generated to contain - # all features detected by DCM for all the assets of this creative and can then - # be modified by the client. To reset this field, copy over all the - # creativeAssets' detected features. Applicable to the following creative types: - # ENHANCED_BANNER and HTML5_BANNER. - # Corresponds to the JSON property `backupImageFeatures` - # @return [Array] - attr_accessor :backup_image_features - - # Reporting label used for HTML5 banner backup image. Applicable to the - # following creative types: ENHANCED_BANNER. - # Corresponds to the JSON property `backupImageReportingLabel` - # @return [String] - attr_accessor :backup_image_reporting_label - - # Target Window. - # Corresponds to the JSON property `backupImageTargetWindow` - # @return [Google::Apis::DfareportingV2_1::TargetWindow] - attr_accessor :backup_image_target_window - - # Click tags of the creative. For ENHANCED_BANNER, FLASH_INPAGE, and - # HTML5_BANNER creatives, this is a subset of detected click tags for the assets - # associated with this creative. After creating a flash asset, detected click - # tags will be returned in the creativeAssetMetadata. When inserting the - # creative, populate the creative clickTags field using the - # creativeAssetMetadata.clickTags field. For ENHANCED_IMAGE creatives, there - # should be exactly one entry in this list for each image creative asset. A - # click tag is matched with a corresponding creative asset by matching the - # clickTag.name field with the creativeAsset.assetIdentifier.name field. - # Applicable to the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, - # FLASH_INPAGE, HTML5_BANNER. - # Corresponds to the JSON property `clickTags` - # @return [Array] - attr_accessor :click_tags - - # Industry standard ID assigned to creative for reach and frequency. Applicable - # to the following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `commercialId` - # @return [String] - attr_accessor :commercial_id - - # List of companion creatives assigned to an in-Stream videocreative. Acceptable - # values include IDs of existing flash and image creatives. Applicable to the - # following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `companionCreatives` - # @return [Array] - attr_accessor :companion_creatives - - # Compatibilities associated with this creative. This is a read-only field. WEB - # and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices - # for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are - # for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream - # video ads developed with the VAST standard. Applicable to all creative types. - # Acceptable values are: - # - "APP" - # - "APP_INTERSTITIAL" - # - "IN_STREAM_VIDEO" - # - "WEB" - # - "WEB_INTERSTITIAL" - # Corresponds to the JSON property `compatibility` - # @return [Array] - attr_accessor :compatibility - - # Whether Flash assets associated with the creative need to be automatically - # converted to HTML5. This flag is enabled by default and users can choose to - # disable it if they don't want the system to generate and use HTML5 asset for - # this creative. Applicable to the following creative types: ENHANCED_BANNER and - # FLASH_INPAGE. - # Corresponds to the JSON property `convertFlashToHtml5` - # @return [Boolean] - attr_accessor :convert_flash_to_html5 - alias_method :convert_flash_to_html5?, :convert_flash_to_html5 - - # List of counter events configured for the creative. Applicable to the - # following creative types: all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `counterCustomEvents` - # @return [Array] - attr_accessor :counter_custom_events - - # Assets associated with a creative. Applicable to all but the following - # creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and - # REDIRECT - # Corresponds to the JSON property `creativeAssets` - # @return [Array] - attr_accessor :creative_assets - - # Creative field assignments for this creative. Applicable to all creative types. - # Corresponds to the JSON property `creativeFieldAssignments` - # @return [Array] - attr_accessor :creative_field_assignments - - # Custom key-values for a Rich Media creative. Key-values let you customize the - # creative settings of a Rich Media ad running on your site without having to - # contact the advertiser. You can use key-values to dynamically change the look - # or functionality of a creative. Applicable to the following creative types: - # all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `customKeyValues` - # @return [Array] - attr_accessor :custom_key_values - - # List of exit events configured for the creative. Applicable to the following - # creative types: all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `exitCustomEvents` - # @return [Array] - attr_accessor :exit_custom_events - - # FsCommand. - # Corresponds to the JSON property `fsCommand` - # @return [Google::Apis::DfareportingV2_1::FsCommand] - attr_accessor :fs_command - - # HTML code for the creative. This is a required field when applicable. This - # field is ignored if htmlCodeLocked is false. Applicable to the following - # creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA. - # Corresponds to the JSON property `htmlCode` - # @return [String] - attr_accessor :html_code - - # Whether HTML code is DCM-generated or manually entered. Set to true to ignore - # changes to htmlCode. Applicable to the following creative types: FLASH_INPAGE - # and HTML5_BANNER. - # Corresponds to the JSON property `htmlCodeLocked` - # @return [Boolean] - attr_accessor :html_code_locked - alias_method :html_code_locked?, :html_code_locked - - # ID of this creative. This is a read-only, auto-generated field. Applicable to - # all creative types. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creative". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Latest Studio trafficked creative ID associated with rich media and VPAID - # creatives. This is a read-only field. Applicable to the following creative - # types: all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `latestTraffickedCreativeId` - # @return [String] - attr_accessor :latest_trafficked_creative_id - - # Name of the creative. This is a required field and must be less than 256 - # characters long. Applicable to all creative types. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Override CSS value for rich media creatives. Applicable to the following - # creative types: all RICH_MEDIA. - # Corresponds to the JSON property `overrideCss` - # @return [String] - attr_accessor :override_css - - # URL of hosted image or another ad tag. This is a required field when - # applicable. Applicable to the following creative types: INTERNAL_REDIRECT, - # INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT - # Corresponds to the JSON property `redirectUrl` - # @return [String] - attr_accessor :redirect_url - - # ID of current rendering version. This is a read-only field. Applicable to all - # creative types. - # Corresponds to the JSON property `renderingId` - # @return [String] - attr_accessor :rendering_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `renderingIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :rendering_id_dimension_value - - # The minimum required Flash plugin version for this creative. For example, 11.2. - # 202.235. This is a read-only field. Applicable to the following creative types: - # all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `requiredFlashPluginVersion` - # @return [String] - attr_accessor :required_flash_plugin_version - - # The internal Flash version for this creative as calculated by DoubleClick - # Studio. This is a read-only field. Applicable to the following creative types: - # FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `requiredFlashVersion` - # @return [Fixnum] - attr_accessor :required_flash_version - - # Represents the dimensions of ads, placements, creatives, or creative assets. - # Corresponds to the JSON property `size` - # @return [Google::Apis::DfareportingV2_1::Size] - attr_accessor :size - - # Whether the user can choose to skip the creative. Applicable to the following - # creative types: INSTREAM_VIDEO. - # Corresponds to the JSON property `skippable` - # @return [Boolean] - attr_accessor :skippable - alias_method :skippable?, :skippable - - # Whether the creative is SSL-compliant. This is a read-only field. Applicable - # to all creative types. - # Corresponds to the JSON property `sslCompliant` - # @return [Boolean] - attr_accessor :ssl_compliant - alias_method :ssl_compliant?, :ssl_compliant - - # Studio advertiser ID associated with rich media and VPAID creatives. This is a - # read-only field. Applicable to the following creative types: all RICH_MEDIA, - # and all VPAID. - # Corresponds to the JSON property `studioAdvertiserId` - # @return [String] - attr_accessor :studio_advertiser_id - - # Studio creative ID associated with rich media and VPAID creatives. This is a - # read-only field. Applicable to the following creative types: all RICH_MEDIA, - # and all VPAID. - # Corresponds to the JSON property `studioCreativeId` - # @return [String] - attr_accessor :studio_creative_id - - # Studio trafficked creative ID associated with rich media and VPAID creatives. - # This is a read-only field. Applicable to the following creative types: all - # RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `studioTraffickedCreativeId` - # @return [String] - attr_accessor :studio_trafficked_creative_id - - # Subaccount ID of this creative. This field, if left unset, will be auto- - # generated for both insert and update operations. Applicable to all creative - # types. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Third-party URL used to record backup image impressions. Applicable to the - # following creative types: all RICH_MEDIA - # Corresponds to the JSON property `thirdPartyBackupImageImpressionsUrl` - # @return [String] - attr_accessor :third_party_backup_image_impressions_url - - # Third-party URL used to record rich media impressions. Applicable to the - # following creative types: all RICH_MEDIA - # Corresponds to the JSON property `thirdPartyRichMediaImpressionsUrl` - # @return [String] - attr_accessor :third_party_rich_media_impressions_url - - # Third-party URLs for tracking in-stream video creative events. Applicable to - # the following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `thirdPartyUrls` - # @return [Array] - attr_accessor :third_party_urls - - # List of timer events configured for the creative. Applicable to the following - # creative types: all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `timerCustomEvents` - # @return [Array] - attr_accessor :timer_custom_events - - # Combined size of all creative assets. This is a read-only field. Applicable to - # the following creative types: all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `totalFileSize` - # @return [String] - attr_accessor :total_file_size - - # Type of this creative.This is a required field. Applicable to all creative - # types. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The version number helps you keep track of multiple versions of your creative - # in your reports. The version number will always be auto-generated during - # insert operations to start at 1. For tracking creatives the version cannot be - # incremented and will always remain at 1. For all other creative types the - # version can be incremented only by 1 during update operations. In addition, - # the version will be automatically incremented by 1 when undergoing Rich Media - # creative merging. Applicable to all creative types. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Description of the video ad. Applicable to the following creative types: - # INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `videoDescription` - # @return [String] - attr_accessor :video_description - - # Creative video duration in seconds. This is a read-only field. Applicable to - # the following creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID. - # Corresponds to the JSON property `videoDuration` - # @return [Float] - attr_accessor :video_duration - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @ad_parameters = args[:ad_parameters] unless args[:ad_parameters].nil? - @ad_tag_keys = args[:ad_tag_keys] unless args[:ad_tag_keys].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @allow_script_access = args[:allow_script_access] unless args[:allow_script_access].nil? - @archived = args[:archived] unless args[:archived].nil? - @artwork_type = args[:artwork_type] unless args[:artwork_type].nil? - @authoring_tool = args[:authoring_tool] unless args[:authoring_tool].nil? - @auto_advance_images = args[:auto_advance_images] unless args[:auto_advance_images].nil? - @background_color = args[:background_color] unless args[:background_color].nil? - @backup_image_click_through_url = args[:backup_image_click_through_url] unless args[:backup_image_click_through_url].nil? - @backup_image_features = args[:backup_image_features] unless args[:backup_image_features].nil? - @backup_image_reporting_label = args[:backup_image_reporting_label] unless args[:backup_image_reporting_label].nil? - @backup_image_target_window = args[:backup_image_target_window] unless args[:backup_image_target_window].nil? - @click_tags = args[:click_tags] unless args[:click_tags].nil? - @commercial_id = args[:commercial_id] unless args[:commercial_id].nil? - @companion_creatives = args[:companion_creatives] unless args[:companion_creatives].nil? - @compatibility = args[:compatibility] unless args[:compatibility].nil? - @convert_flash_to_html5 = args[:convert_flash_to_html5] unless args[:convert_flash_to_html5].nil? - @counter_custom_events = args[:counter_custom_events] unless args[:counter_custom_events].nil? - @creative_assets = args[:creative_assets] unless args[:creative_assets].nil? - @creative_field_assignments = args[:creative_field_assignments] unless args[:creative_field_assignments].nil? - @custom_key_values = args[:custom_key_values] unless args[:custom_key_values].nil? - @exit_custom_events = args[:exit_custom_events] unless args[:exit_custom_events].nil? - @fs_command = args[:fs_command] unless args[:fs_command].nil? - @html_code = args[:html_code] unless args[:html_code].nil? - @html_code_locked = args[:html_code_locked] unless args[:html_code_locked].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @latest_trafficked_creative_id = args[:latest_trafficked_creative_id] unless args[:latest_trafficked_creative_id].nil? - @name = args[:name] unless args[:name].nil? - @override_css = args[:override_css] unless args[:override_css].nil? - @redirect_url = args[:redirect_url] unless args[:redirect_url].nil? - @rendering_id = args[:rendering_id] unless args[:rendering_id].nil? - @rendering_id_dimension_value = args[:rendering_id_dimension_value] unless args[:rendering_id_dimension_value].nil? - @required_flash_plugin_version = args[:required_flash_plugin_version] unless args[:required_flash_plugin_version].nil? - @required_flash_version = args[:required_flash_version] unless args[:required_flash_version].nil? - @size = args[:size] unless args[:size].nil? - @skippable = args[:skippable] unless args[:skippable].nil? - @ssl_compliant = args[:ssl_compliant] unless args[:ssl_compliant].nil? - @studio_advertiser_id = args[:studio_advertiser_id] unless args[:studio_advertiser_id].nil? - @studio_creative_id = args[:studio_creative_id] unless args[:studio_creative_id].nil? - @studio_trafficked_creative_id = args[:studio_trafficked_creative_id] unless args[:studio_trafficked_creative_id].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @third_party_backup_image_impressions_url = args[:third_party_backup_image_impressions_url] unless args[:third_party_backup_image_impressions_url].nil? - @third_party_rich_media_impressions_url = args[:third_party_rich_media_impressions_url] unless args[:third_party_rich_media_impressions_url].nil? - @third_party_urls = args[:third_party_urls] unless args[:third_party_urls].nil? - @timer_custom_events = args[:timer_custom_events] unless args[:timer_custom_events].nil? - @total_file_size = args[:total_file_size] unless args[:total_file_size].nil? - @type = args[:type] unless args[:type].nil? - @version = args[:version] unless args[:version].nil? - @video_description = args[:video_description] unless args[:video_description].nil? - @video_duration = args[:video_duration] unless args[:video_duration].nil? - end - end - - # Creative Asset. - class CreativeAsset - include Google::Apis::Core::Hashable - - # Whether ActionScript3 is enabled for the flash asset. This is a read-only - # field. Applicable to the following creative types: FLASH_INPAGE and - # ENHANCED_BANNER. - # Corresponds to the JSON property `actionScript3` - # @return [Boolean] - attr_accessor :action_script3 - alias_method :action_script3?, :action_script3 - - # Whether the video asset is active. This is a read-only field for - # VPAID_NON_LINEAR assets. Applicable to the following creative types: - # INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Possible alignments for an asset. This is a read-only field. Applicable to the - # following creative types: RICH_MEDIA_MULTI_FLOATING. - # Corresponds to the JSON property `alignment` - # @return [String] - attr_accessor :alignment - - # Artwork type of rich media creative. This is a read-only field. Applicable to - # the following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `artworkType` - # @return [String] - attr_accessor :artwork_type - - # Creative Asset ID. - # Corresponds to the JSON property `assetIdentifier` - # @return [Google::Apis::DfareportingV2_1::CreativeAssetId] - attr_accessor :asset_identifier - - # Creative Custom Event. - # Corresponds to the JSON property `backupImageExit` - # @return [Google::Apis::DfareportingV2_1::CreativeCustomEvent] - attr_accessor :backup_image_exit - - # Detected bit-rate for video asset. This is a read-only field. Applicable to - # the following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `bitRate` - # @return [Fixnum] - attr_accessor :bit_rate - - # Rich media child asset type. This is a read-only field. Applicable to the - # following creative types: all VPAID. - # Corresponds to the JSON property `childAssetType` - # @return [String] - attr_accessor :child_asset_type - - # Represents the dimensions of ads, placements, creatives, or creative assets. - # Corresponds to the JSON property `collapsedSize` - # @return [Google::Apis::DfareportingV2_1::Size] - attr_accessor :collapsed_size - - # Custom start time in seconds for making the asset visible. Applicable to the - # following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `customStartTimeValue` - # @return [Fixnum] - attr_accessor :custom_start_time_value - - # List of feature dependencies for the creative asset that are detected by DCM. - # Feature dependencies are features that a browser must be able to support in - # order to render your HTML5 creative correctly. This is a read-only, auto- - # generated field. Applicable to the following creative types: ENHANCED_BANNER - # and HTML5_BANNER. - # Corresponds to the JSON property `detectedFeatures` - # @return [Array] - attr_accessor :detected_features - - # Type of rich media asset. This is a read-only field. Applicable to the - # following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `displayType` - # @return [String] - attr_accessor :display_type - - # Duration in seconds for which an asset will be displayed. Applicable to the - # following creative types: INSTREAM_VIDEO and VPAID_LINEAR. - # Corresponds to the JSON property `duration` - # @return [Fixnum] - attr_accessor :duration - - # Duration type for which an asset will be displayed. Applicable to the - # following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `durationType` - # @return [String] - attr_accessor :duration_type - - # Represents the dimensions of ads, placements, creatives, or creative assets. - # Corresponds to the JSON property `expandedDimension` - # @return [Google::Apis::DfareportingV2_1::Size] - attr_accessor :expanded_dimension - - # File size associated with this creative asset. This is a read-only field. - # Applicable to all but the following creative types: all REDIRECT and - # TRACKING_TEXT. - # Corresponds to the JSON property `fileSize` - # @return [String] - attr_accessor :file_size - - # Flash version of the asset. This is a read-only field. Applicable to the - # following creative types: FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, and - # all VPAID. - # Corresponds to the JSON property `flashVersion` - # @return [Fixnum] - attr_accessor :flash_version - - # Whether to hide Flash objects flag for an asset. Applicable to the following - # creative types: all RICH_MEDIA. - # Corresponds to the JSON property `hideFlashObjects` - # @return [Boolean] - attr_accessor :hide_flash_objects - alias_method :hide_flash_objects?, :hide_flash_objects - - # Whether to hide selection boxes flag for an asset. Applicable to the following - # creative types: all RICH_MEDIA. - # Corresponds to the JSON property `hideSelectionBoxes` - # @return [Boolean] - attr_accessor :hide_selection_boxes - alias_method :hide_selection_boxes?, :hide_selection_boxes - - # Whether the asset is horizontally locked. This is a read-only field. - # Applicable to the following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `horizontallyLocked` - # @return [Boolean] - attr_accessor :horizontally_locked - alias_method :horizontally_locked?, :horizontally_locked - - # Numeric ID of this creative asset. This is a required field and should not be - # modified. Applicable to all but the following creative types: all REDIRECT and - # TRACKING_TEXT. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Detected MIME type for video asset. This is a read-only field. Applicable to - # the following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # Offset Position. - # Corresponds to the JSON property `offset` - # @return [Google::Apis::DfareportingV2_1::OffsetPosition] - attr_accessor :offset - - # Whether the backup asset is original or changed by the user in DCM. Applicable - # to the following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `originalBackup` - # @return [Boolean] - attr_accessor :original_backup - alias_method :original_backup?, :original_backup - - # Offset Position. - # Corresponds to the JSON property `position` - # @return [Google::Apis::DfareportingV2_1::OffsetPosition] - attr_accessor :position - - # Offset left unit for an asset. This is a read-only field. Applicable to the - # following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `positionLeftUnit` - # @return [String] - attr_accessor :position_left_unit - - # Offset top unit for an asset. This is a read-only field if the asset - # displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following - # creative types: all RICH_MEDIA. - # Corresponds to the JSON property `positionTopUnit` - # @return [String] - attr_accessor :position_top_unit - - # Progressive URL for video asset. This is a read-only field. Applicable to the - # following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `progressiveServingUrl` - # @return [String] - attr_accessor :progressive_serving_url - - # Whether the asset pushes down other content. Applicable to the following - # creative types: all RICH_MEDIA. Additionally, only applicable when the asset - # offsets are 0, the collapsedSize.width matches size.width, and the - # collapsedSize.height is less than size.height. - # Corresponds to the JSON property `pushdown` - # @return [Boolean] - attr_accessor :pushdown - alias_method :pushdown?, :pushdown - - # Pushdown duration in seconds for an asset. Must be between 0 and 9.99. - # Applicable to the following creative types: all RICH_MEDIA.Additionally, only - # applicable when the asset pushdown field is true, the offsets are 0, the - # collapsedSize.width matches size.width, and the collapsedSize.height is less - # than size.height. - # Corresponds to the JSON property `pushdownDuration` - # @return [Float] - attr_accessor :pushdown_duration - - # Role of the asset in relation to creative. Applicable to all but the following - # creative types: all REDIRECT and TRACKING_TEXT. This is a required field. - # PRIMARY applies to ENHANCED_BANNER, FLASH_INPAGE, HTML5_BANNER, IMAGE, - # IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple primary assets), and - # all VPAID creatives. - # BACKUP_IMAGE applies to ENHANCED_BANNER, FLASH_INPAGE, HTML5_BANNER, all - # RICH_MEDIA, and all VPAID creatives. - # ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE creatives. - # OTHER refers to assets from sources other than DCM, such as Studio uploaded - # assets, applicable to all RICH_MEDIA and all VPAID creatives. - # PARENT_VIDEO refers to videos uploaded by the user in DCM and is applicable to - # INSTREAM_VIDEO and VPAID_LINEAR creatives. - # TRANSCODED_VIDEO refers to videos transcoded by DCM from PARENT_VIDEO assets - # and is applicable to INSTREAM_VIDEO and VPAID_LINEAR creatives. - # ALTERNATE_VIDEO refers to the DCM representation of child asset videos from - # Studio, and is applicable to VPAID_LINEAR creatives. These cannot be added or - # removed within DCM. - # For VPAID_LINEAR creatives, PARENT_VIDEO, TRANSCODED_VIDEO and ALTERNATE_VIDEO - # assets that are marked active serve as backup in case the VPAID creative - # cannot be served. Only PARENT_VIDEO assets can be added or removed for an - # INSTREAM_VIDEO or VPAID_LINEAR creative. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # Represents the dimensions of ads, placements, creatives, or creative assets. - # Corresponds to the JSON property `size` - # @return [Google::Apis::DfareportingV2_1::Size] - attr_accessor :size - - # Whether the asset is SSL-compliant. This is a read-only field. Applicable to - # all but the following creative types: all REDIRECT and TRACKING_TEXT. - # Corresponds to the JSON property `sslCompliant` - # @return [Boolean] - attr_accessor :ssl_compliant - alias_method :ssl_compliant?, :ssl_compliant - - # Initial wait time type before making the asset visible. Applicable to the - # following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `startTimeType` - # @return [String] - attr_accessor :start_time_type - - # Streaming URL for video asset. This is a read-only field. Applicable to the - # following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `streamingServingUrl` - # @return [String] - attr_accessor :streaming_serving_url - - # Whether the asset is transparent. Applicable to the following creative types: - # all RICH_MEDIA. Additionally, only applicable to HTML5 assets. - # Corresponds to the JSON property `transparency` - # @return [Boolean] - attr_accessor :transparency - alias_method :transparency?, :transparency - - # Whether the asset is vertically locked. This is a read-only field. Applicable - # to the following creative types: all RICH_MEDIA. - # Corresponds to the JSON property `verticallyLocked` - # @return [Boolean] - attr_accessor :vertically_locked - alias_method :vertically_locked?, :vertically_locked - - # Detected video duration for video asset. This is a read-only field. Applicable - # to the following creative types: INSTREAM_VIDEO and all VPAID. - # Corresponds to the JSON property `videoDuration` - # @return [Float] - attr_accessor :video_duration - - # Window mode options for flash assets. Applicable to the following creative - # types: FLASH_INPAGE, RICH_MEDIA_EXPANDING, RICH_MEDIA_IM_EXPAND, - # RICH_MEDIA_INPAGE, and RICH_MEDIA_INPAGE_FLOATING. - # Corresponds to the JSON property `windowMode` - # @return [String] - attr_accessor :window_mode - - # zIndex value of an asset. This is a read-only field. Applicable to the - # following creative types: all RICH_MEDIA.Additionally, only applicable to - # assets whose displayType is NOT one of the following types: - # ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. - # Corresponds to the JSON property `zIndex` - # @return [Fixnum] - attr_accessor :z_index - - # File name of zip file. This is a read-only field. Applicable to the following - # creative types: HTML5_BANNER. - # Corresponds to the JSON property `zipFilename` - # @return [String] - attr_accessor :zip_filename - - # Size of zip file. This is a read-only field. Applicable to the following - # creative types: HTML5_BANNER. - # Corresponds to the JSON property `zipFilesize` - # @return [String] - attr_accessor :zip_filesize - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @action_script3 = args[:action_script3] unless args[:action_script3].nil? - @active = args[:active] unless args[:active].nil? - @alignment = args[:alignment] unless args[:alignment].nil? - @artwork_type = args[:artwork_type] unless args[:artwork_type].nil? - @asset_identifier = args[:asset_identifier] unless args[:asset_identifier].nil? - @backup_image_exit = args[:backup_image_exit] unless args[:backup_image_exit].nil? - @bit_rate = args[:bit_rate] unless args[:bit_rate].nil? - @child_asset_type = args[:child_asset_type] unless args[:child_asset_type].nil? - @collapsed_size = args[:collapsed_size] unless args[:collapsed_size].nil? - @custom_start_time_value = args[:custom_start_time_value] unless args[:custom_start_time_value].nil? - @detected_features = args[:detected_features] unless args[:detected_features].nil? - @display_type = args[:display_type] unless args[:display_type].nil? - @duration = args[:duration] unless args[:duration].nil? - @duration_type = args[:duration_type] unless args[:duration_type].nil? - @expanded_dimension = args[:expanded_dimension] unless args[:expanded_dimension].nil? - @file_size = args[:file_size] unless args[:file_size].nil? - @flash_version = args[:flash_version] unless args[:flash_version].nil? - @hide_flash_objects = args[:hide_flash_objects] unless args[:hide_flash_objects].nil? - @hide_selection_boxes = args[:hide_selection_boxes] unless args[:hide_selection_boxes].nil? - @horizontally_locked = args[:horizontally_locked] unless args[:horizontally_locked].nil? - @id = args[:id] unless args[:id].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - @offset = args[:offset] unless args[:offset].nil? - @original_backup = args[:original_backup] unless args[:original_backup].nil? - @position = args[:position] unless args[:position].nil? - @position_left_unit = args[:position_left_unit] unless args[:position_left_unit].nil? - @position_top_unit = args[:position_top_unit] unless args[:position_top_unit].nil? - @progressive_serving_url = args[:progressive_serving_url] unless args[:progressive_serving_url].nil? - @pushdown = args[:pushdown] unless args[:pushdown].nil? - @pushdown_duration = args[:pushdown_duration] unless args[:pushdown_duration].nil? - @role = args[:role] unless args[:role].nil? - @size = args[:size] unless args[:size].nil? - @ssl_compliant = args[:ssl_compliant] unless args[:ssl_compliant].nil? - @start_time_type = args[:start_time_type] unless args[:start_time_type].nil? - @streaming_serving_url = args[:streaming_serving_url] unless args[:streaming_serving_url].nil? - @transparency = args[:transparency] unless args[:transparency].nil? - @vertically_locked = args[:vertically_locked] unless args[:vertically_locked].nil? - @video_duration = args[:video_duration] unless args[:video_duration].nil? - @window_mode = args[:window_mode] unless args[:window_mode].nil? - @z_index = args[:z_index] unless args[:z_index].nil? - @zip_filename = args[:zip_filename] unless args[:zip_filename].nil? - @zip_filesize = args[:zip_filesize] unless args[:zip_filesize].nil? - end - end - - # Creative Asset ID. - class CreativeAssetId - include Google::Apis::Core::Hashable - - # Name of the creative asset. This is a required field while inserting an asset. - # After insertion, this assetIdentifier is used to identify the uploaded asset. - # Characters in the name must be alphanumeric or one of the following: ".-_ ". - # Spaces are allowed. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Type of asset to upload. This is a required field. IMAGE is solely used for - # IMAGE creatives. Other image assets should use HTML_IMAGE. - # 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? - @type = args[:type] unless args[:type].nil? - end - end - - # CreativeAssets contains properties of a creative asset file which will be - # uploaded or has already been uploaded. Refer to the creative sample code for - # how to upload assets and insert a creative. - class CreativeAssetMetadata - include Google::Apis::Core::Hashable - - # Creative Asset ID. - # Corresponds to the JSON property `assetIdentifier` - # @return [Google::Apis::DfareportingV2_1::CreativeAssetId] - attr_accessor :asset_identifier - - # List of detected click tags for assets. This is a read-only auto-generated - # field. - # Corresponds to the JSON property `clickTags` - # @return [Array] - attr_accessor :click_tags - - # List of feature dependencies for the creative asset that are detected by DCM. - # Feature dependencies are features that a browser must be able to support in - # order to render your HTML5 creative correctly. This is a read-only, auto- - # generated field. - # Corresponds to the JSON property `detectedFeatures` - # @return [Array] - attr_accessor :detected_features - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativeAssetMetadata". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Rules validated during code generation that generated a warning. This is a - # read-only, auto-generated field. - # Possible values are: - # - "CLICK_TAG_NON_TOP_LEVEL" - # - "CLICK_TAG_MISSING" - # - "CLICK_TAG_MORE_THAN_ONE" - # - "CLICK_TAG_INVALID" - # - "ORPHANED_ASSET" - # - "PRIMARY_HTML_MISSING" - # - "EXTERNAL_FILE_REFERENCED" - # - "MRAID_REFERENCED" - # - "ADMOB_REFERENCED" - # - "FILE_TYPE_INVALID" - # - "ZIP_INVALID" - # - "LINKED_FILE_NOT_FOUND" - # - "MAX_FLASH_VERSION_11" - # - "NOT_SSL_COMPLIANT" - # - "FILE_DETAIL_EMPTY" - # - "ASSET_INVALID" - # - "GWD_PROPERTIES_INVALID" - # - "ENABLER_UNSUPPORTED_METHOD_DCM" - # - "ASSET_FORMAT_UNSUPPORTED_DCM" - # - "COMPONENT_UNSUPPORTED_DCM" - # - "HTML5_FEATURE_UNSUPPORTED' " - # Corresponds to the JSON property `warnedValidationRules` - # @return [Array] - attr_accessor :warned_validation_rules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @asset_identifier = args[:asset_identifier] unless args[:asset_identifier].nil? - @click_tags = args[:click_tags] unless args[:click_tags].nil? - @detected_features = args[:detected_features] unless args[:detected_features].nil? - @kind = args[:kind] unless args[:kind].nil? - @warned_validation_rules = args[:warned_validation_rules] unless args[:warned_validation_rules].nil? - end - end - - # Creative Assignment. - class CreativeAssignment - include Google::Apis::Core::Hashable - - # Whether this creative assignment is active. When true, the creative will be - # included in the ad's rotation. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Whether applicable event tags should fire when this creative assignment is - # rendered. If this value is unset when the ad is inserted or updated, it will - # default to true for all creative types EXCEPT for INTERNAL_REDIRECT, - # INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO. - # Corresponds to the JSON property `applyEventTags` - # @return [Boolean] - attr_accessor :apply_event_tags - alias_method :apply_event_tags?, :apply_event_tags - - # Click-through URL - # Corresponds to the JSON property `clickThroughUrl` - # @return [Google::Apis::DfareportingV2_1::ClickThroughUrl] - attr_accessor :click_through_url - - # Companion creative overrides for this creative assignment. Applicable to video - # ads. - # Corresponds to the JSON property `companionCreativeOverrides` - # @return [Array] - attr_accessor :companion_creative_overrides - - # Creative group assignments for this creative assignment. Only one assignment - # per creative group number is allowed for a maximum of two assignments. - # Corresponds to the JSON property `creativeGroupAssignments` - # @return [Array] - attr_accessor :creative_group_assignments - - # ID of the creative to be assigned. This is a required field. - # Corresponds to the JSON property `creativeId` - # @return [String] - attr_accessor :creative_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `creativeIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :creative_id_dimension_value - - # Date and time that the assigned creative should stop serving. Must be later - # than the start time. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # Rich media exit overrides for this creative assignment. - # Applicable when the creative type is any of the following: - # - RICH_MEDIA_INPAGE - # - RICH_MEDIA_INPAGE_FLOATING - # - RICH_MEDIA_IM_EXPAND - # - RICH_MEDIA_EXPANDING - # - RICH_MEDIA_INTERSTITIAL_FLOAT - # - RICH_MEDIA_MOBILE_IN_APP - # - RICH_MEDIA_MULTI_FLOATING - # - RICH_MEDIA_PEEL_DOWN - # - ADVANCED_BANNER - # - VPAID_LINEAR - # - VPAID_NON_LINEAR - # Corresponds to the JSON property `richMediaExitOverrides` - # @return [Array] - attr_accessor :rich_media_exit_overrides - - # Sequence number of the creative assignment, applicable when the rotation type - # is CREATIVE_ROTATION_TYPE_SEQUENTIAL. - # Corresponds to the JSON property `sequence` - # @return [Fixnum] - attr_accessor :sequence - - # Whether the creative to be assigned is SSL-compliant. This is a read-only - # field that is auto-generated when the ad is inserted or updated. - # Corresponds to the JSON property `sslCompliant` - # @return [Boolean] - attr_accessor :ssl_compliant - alias_method :ssl_compliant?, :ssl_compliant - - # Date and time that the assigned creative should start serving. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - # Weight of the creative assignment, applicable when the rotation type is - # CREATIVE_ROTATION_TYPE_RANDOM. - # Corresponds to the JSON property `weight` - # @return [Fixnum] - attr_accessor :weight - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active = args[:active] unless args[:active].nil? - @apply_event_tags = args[:apply_event_tags] unless args[:apply_event_tags].nil? - @click_through_url = args[:click_through_url] unless args[:click_through_url].nil? - @companion_creative_overrides = args[:companion_creative_overrides] unless args[:companion_creative_overrides].nil? - @creative_group_assignments = args[:creative_group_assignments] unless args[:creative_group_assignments].nil? - @creative_id = args[:creative_id] unless args[:creative_id].nil? - @creative_id_dimension_value = args[:creative_id_dimension_value] unless args[:creative_id_dimension_value].nil? - @end_time = args[:end_time] unless args[:end_time].nil? - @rich_media_exit_overrides = args[:rich_media_exit_overrides] unless args[:rich_media_exit_overrides].nil? - @sequence = args[:sequence] unless args[:sequence].nil? - @ssl_compliant = args[:ssl_compliant] unless args[:ssl_compliant].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - @weight = args[:weight] unless args[:weight].nil? - end - end - - # Creative Custom Event. - class CreativeCustomEvent - include Google::Apis::Core::Hashable - - # Whether the event is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # User-entered name for the event. - # Corresponds to the JSON property `advertiserCustomEventName` - # @return [String] - attr_accessor :advertiser_custom_event_name - - # Type of the event. This is a read-only field. - # Corresponds to the JSON property `advertiserCustomEventType` - # @return [String] - attr_accessor :advertiser_custom_event_type - - # Artwork label column, used to link events in DCM back to events in Studio. - # This is a required field and should not be modified after insertion. - # Corresponds to the JSON property `artworkLabel` - # @return [String] - attr_accessor :artwork_label - - # Artwork type used by the creative.This is a read-only field. - # Corresponds to the JSON property `artworkType` - # @return [String] - attr_accessor :artwork_type - - # Exit URL of the event. This field is used only for exit events. - # Corresponds to the JSON property `exitUrl` - # @return [String] - attr_accessor :exit_url - - # ID of this event. This is a required field and should not be modified after - # insertion. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Popup Window Properties. - # Corresponds to the JSON property `popupWindowProperties` - # @return [Google::Apis::DfareportingV2_1::PopupWindowProperties] - attr_accessor :popup_window_properties - - # Target type used by the event. - # Corresponds to the JSON property `targetType` - # @return [String] - attr_accessor :target_type - - # Reporting ID, used to differentiate multiple videos in a single creative. - # Corresponds to the JSON property `videoReportingId` - # @return [String] - attr_accessor :video_reporting_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active = args[:active] unless args[:active].nil? - @advertiser_custom_event_name = args[:advertiser_custom_event_name] unless args[:advertiser_custom_event_name].nil? - @advertiser_custom_event_type = args[:advertiser_custom_event_type] unless args[:advertiser_custom_event_type].nil? - @artwork_label = args[:artwork_label] unless args[:artwork_label].nil? - @artwork_type = args[:artwork_type] unless args[:artwork_type].nil? - @exit_url = args[:exit_url] unless args[:exit_url].nil? - @id = args[:id] unless args[:id].nil? - @popup_window_properties = args[:popup_window_properties] unless args[:popup_window_properties].nil? - @target_type = args[:target_type] unless args[:target_type].nil? - @video_reporting_id = args[:video_reporting_id] unless args[:video_reporting_id].nil? - end - end - - # Contains properties of a creative field. - class CreativeField - include Google::Apis::Core::Hashable - - # Account ID of this creative field. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this creative field. This is a required field on insertion. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # ID of this creative field. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativeField". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this creative field. This is a required field and must be less than - # 256 characters long and unique among creative fields of the same advertiser. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Subaccount ID of this creative field. This is a read-only field that can be - # left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Creative Field Assignment. - class CreativeFieldAssignment - include Google::Apis::Core::Hashable - - # ID of the creative field. - # Corresponds to the JSON property `creativeFieldId` - # @return [String] - attr_accessor :creative_field_id - - # ID of the creative field value. - # Corresponds to the JSON property `creativeFieldValueId` - # @return [String] - attr_accessor :creative_field_value_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creative_field_id = args[:creative_field_id] unless args[:creative_field_id].nil? - @creative_field_value_id = args[:creative_field_value_id] unless args[:creative_field_value_id].nil? - end - end - - # Contains properties of a creative field value. - class CreativeFieldValue - include Google::Apis::Core::Hashable - - # ID of this creative field value. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativeFieldValue". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Value of this creative field value. It needs to be less than 256 characters in - # length and unique per creative field. - # 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) - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Creative Field Value List Response - class ListCreativeFieldValuesResponse - include Google::Apis::Core::Hashable - - # Creative field value collection. - # Corresponds to the JSON property `creativeFieldValues` - # @return [Array] - attr_accessor :creative_field_values - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativeFieldValuesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @creative_field_values = args[:creative_field_values] unless args[:creative_field_values].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Creative Field List Response - class ListCreativeFieldsResponse - include Google::Apis::Core::Hashable - - # Creative field collection. - # Corresponds to the JSON property `creativeFields` - # @return [Array] - attr_accessor :creative_fields - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativeFieldsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @creative_fields = args[:creative_fields] unless args[:creative_fields].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Contains properties of a creative group. - class CreativeGroup - include Google::Apis::Core::Hashable - - # Account ID of this creative group. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this creative group. This is a required field on insertion. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Subgroup of the creative group. Assign your creative groups to one of the - # following subgroups in order to filter or manage them more easily. This field - # is required on insertion and is read-only after insertion. - # Acceptable values are: - # - 1 - # - 2 - # Corresponds to the JSON property `groupNumber` - # @return [Fixnum] - attr_accessor :group_number - - # ID of this creative group. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativeGroup". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this creative group. This is a required field and must be less than - # 256 characters long and unique among creative groups of the same advertiser. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Subaccount ID of this creative group. This is a read-only field that can be - # left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @group_number = args[:group_number] unless args[:group_number].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Creative Group Assignment. - class CreativeGroupAssignment - include Google::Apis::Core::Hashable - - # ID of the creative group to be assigned. - # Corresponds to the JSON property `creativeGroupId` - # @return [String] - attr_accessor :creative_group_id - - # Creative group number of the creative group assignment. - # Corresponds to the JSON property `creativeGroupNumber` - # @return [String] - attr_accessor :creative_group_number - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creative_group_id = args[:creative_group_id] unless args[:creative_group_id].nil? - @creative_group_number = args[:creative_group_number] unless args[:creative_group_number].nil? - end - end - - # Creative Group List Response - class ListCreativeGroupsResponse - include Google::Apis::Core::Hashable - - # Creative group collection. - # Corresponds to the JSON property `creativeGroups` - # @return [Array] - attr_accessor :creative_groups - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativeGroupsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @creative_groups = args[:creative_groups] unless args[:creative_groups].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Creative optimization settings. - class CreativeOptimizationConfiguration - include Google::Apis::Core::Hashable - - # ID of this creative optimization config. This field is auto-generated when the - # campaign is inserted or updated. It can be null for existing campaigns. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Name of this creative optimization config. This is a required field and must - # be less than 129 characters long. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # List of optimization activities associated with this configuration. - # Corresponds to the JSON property `optimizationActivitys` - # @return [Array] - attr_accessor :optimization_activitys - - # Optimization model for this configuration. - # Corresponds to the JSON property `optimizationModel` - # @return [String] - attr_accessor :optimization_model - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - @optimization_activitys = args[:optimization_activitys] unless args[:optimization_activitys].nil? - @optimization_model = args[:optimization_model] unless args[:optimization_model].nil? - end - end - - # Creative Rotation. - class CreativeRotation - include Google::Apis::Core::Hashable - - # Creative assignments in this creative rotation. - # Corresponds to the JSON property `creativeAssignments` - # @return [Array] - attr_accessor :creative_assignments - - # Creative optimization configuration that is used by this ad. It should refer - # to one of the existing optimization configurations in the ad's campaign. If it - # is unset or set to 0, then the campaign's default optimization configuration - # will be used for this ad. - # Corresponds to the JSON property `creativeOptimizationConfigurationId` - # @return [String] - attr_accessor :creative_optimization_configuration_id - - # Type of creative rotation. Can be used to specify whether to use sequential or - # random rotation. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Strategy for calculating weights. Used with CREATIVE_ROTATION_TYPE_RANDOM. - # Corresponds to the JSON property `weightCalculationStrategy` - # @return [String] - attr_accessor :weight_calculation_strategy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creative_assignments = args[:creative_assignments] unless args[:creative_assignments].nil? - @creative_optimization_configuration_id = args[:creative_optimization_configuration_id] unless args[:creative_optimization_configuration_id].nil? - @type = args[:type] unless args[:type].nil? - @weight_calculation_strategy = args[:weight_calculation_strategy] unless args[:weight_calculation_strategy].nil? - end - end - - # Creative Settings - class CreativeSettings - include Google::Apis::Core::Hashable - - # Header text for iFrames for this site. Must be less than or equal to 2000 - # characters long. - # Corresponds to the JSON property `iFrameFooter` - # @return [String] - attr_accessor :i_frame_footer - - # Header text for iFrames for this site. Must be less than or equal to 2000 - # characters long. - # Corresponds to the JSON property `iFrameHeader` - # @return [String] - attr_accessor :i_frame_header - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @i_frame_footer = args[:i_frame_footer] unless args[:i_frame_footer].nil? - @i_frame_header = args[:i_frame_header] unless args[:i_frame_header].nil? - end - end - - # Creative List Response - class ListCreativesResponse - include Google::Apis::Core::Hashable - - # Creative collection. - # Corresponds to the JSON property `creatives` - # @return [Array] - attr_accessor :creatives - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#creativesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @creatives = args[:creatives] unless args[:creatives].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Represents fields that are compatible to be selected for a report of type " - # CROSS_DIMENSION_REACH". - class CrossDimensionReachReportCompatibleFields - include Google::Apis::Core::Hashable - - # Dimensions which are compatible to be selected in the "breakdown" section of - # the report. - # Corresponds to the JSON property `breakdown` - # @return [Array] - attr_accessor :breakdown - - # Dimensions which are compatible to be selected in the "dimensionFilters" - # section of the report. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # The kind of resource this is, in this case dfareporting# - # crossDimensionReachReportCompatibleFields. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metrics which are compatible to be selected in the "metricNames" section of - # the report. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # Metrics which are compatible to be selected in the "overlapMetricNames" - # section of the report. - # Corresponds to the JSON property `overlapMetrics` - # @return [Array] - attr_accessor :overlap_metrics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @breakdown = args[:breakdown] unless args[:breakdown].nil? - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @kind = args[:kind] unless args[:kind].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @overlap_metrics = args[:overlap_metrics] unless args[:overlap_metrics].nil? - end - end - - # Represents a Custom Rich Media Events group. - class CustomRichMediaEvents - include Google::Apis::Core::Hashable - - # List of custom rich media event IDs. Dimension values must be all of type dfa: - # richMediaEventTypeIdAndName. - # Corresponds to the JSON property `filteredEventIds` - # @return [Array] - attr_accessor :filtered_event_ids - - # The kind of resource this is, in this case dfareporting#customRichMediaEvents. - # 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) - @filtered_event_ids = args[:filtered_event_ids] unless args[:filtered_event_ids].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Represents a date range. - class DateRange - include Google::Apis::Core::Hashable - - # The end date of the date range, inclusive. A string of the format: "yyyy-MM-dd" - # . - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # The kind of resource this is, in this case dfareporting#dateRange. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The date range relative to the date of when the report is run. - # Corresponds to the JSON property `relativeDateRange` - # @return [String] - attr_accessor :relative_date_range - - # The start date of the date range, inclusive. A string of the format: "yyyy-MM- - # dd". - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_date = args[:end_date] unless args[:end_date].nil? - @kind = args[:kind] unless args[:kind].nil? - @relative_date_range = args[:relative_date_range] unless args[:relative_date_range].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - end - end - - # Day Part Targeting. - class DayPartTargeting - include Google::Apis::Core::Hashable - - # Days of the week when the ad will serve. - # Acceptable values are: - # - "SUNDAY" - # - "MONDAY" - # - "TUESDAY" - # - "WEDNESDAY" - # - "THURSDAY" - # - "FRIDAY" - # - "SATURDAY" - # Corresponds to the JSON property `daysOfWeek` - # @return [Array] - attr_accessor :days_of_week - - # Hours of the day when the ad will serve. Must be an integer between 0 and 23 ( - # inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be - # specified with days of week, in which case the ad would serve during these - # hours on the specified days. For example, if Monday, Wednesday, Friday are the - # days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, - # the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. - # Corresponds to the JSON property `hoursOfDay` - # @return [Array] - attr_accessor :hours_of_day - - # Whether or not to use the user's local time. If false, the America/New York - # time zone applies. - # Corresponds to the JSON property `userLocalTime` - # @return [Boolean] - attr_accessor :user_local_time - alias_method :user_local_time?, :user_local_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @days_of_week = args[:days_of_week] unless args[:days_of_week].nil? - @hours_of_day = args[:hours_of_day] unless args[:hours_of_day].nil? - @user_local_time = args[:user_local_time] unless args[:user_local_time].nil? - end - end - - # Properties of inheriting and overriding the default click-through event tag. A - # campaign may override the event tag defined at the advertiser level, and an ad - # may also override the campaign's setting further. - class DefaultClickThroughEventTagProperties - include Google::Apis::Core::Hashable - - # ID of the click-through event tag to apply to all ads in this entity's scope. - # Corresponds to the JSON property `defaultClickThroughEventTagId` - # @return [String] - attr_accessor :default_click_through_event_tag_id - - # Whether this entity should override the inherited default click-through event - # tag with its own defined value. - # Corresponds to the JSON property `overrideInheritedEventTag` - # @return [Boolean] - attr_accessor :override_inherited_event_tag - alias_method :override_inherited_event_tag?, :override_inherited_event_tag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default_click_through_event_tag_id = args[:default_click_through_event_tag_id] unless args[:default_click_through_event_tag_id].nil? - @override_inherited_event_tag = args[:override_inherited_event_tag] unless args[:override_inherited_event_tag].nil? - end - end - - # Delivery Schedule. - class DeliverySchedule - include Google::Apis::Core::Hashable - - # Frequency Cap. - # Corresponds to the JSON property `frequencyCap` - # @return [Google::Apis::DfareportingV2_1::FrequencyCap] - attr_accessor :frequency_cap - - # Whether or not hard cutoff is enabled. If true, the ad will not serve after - # the end date and time. Otherwise the ad will continue to be served until it - # has reached its delivery goals. - # Corresponds to the JSON property `hardCutoff` - # @return [Boolean] - attr_accessor :hard_cutoff - alias_method :hard_cutoff?, :hard_cutoff - - # Impression ratio for this ad. This ratio determines how often each ad is - # served relative to the others. For example, if ad A has an impression ratio of - # 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times - # as often as ad A. Must be between 1 and 10. - # Corresponds to the JSON property `impressionRatio` - # @return [String] - attr_accessor :impression_ratio - - # Serving priority of an ad, with respect to other ads. The lower the priority - # number, the greater the priority with which it is served. - # Corresponds to the JSON property `priority` - # @return [String] - attr_accessor :priority - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @frequency_cap = args[:frequency_cap] unless args[:frequency_cap].nil? - @hard_cutoff = args[:hard_cutoff] unless args[:hard_cutoff].nil? - @impression_ratio = args[:impression_ratio] unless args[:impression_ratio].nil? - @priority = args[:priority] unless args[:priority].nil? - end - end - - # DFP Settings - class DfpSettings - include Google::Apis::Core::Hashable - - # DFP network code for this directory site. - # Corresponds to the JSON property `dfp_network_code` - # @return [String] - attr_accessor :dfp_network_code - - # DFP network name for this directory site. - # Corresponds to the JSON property `dfp_network_name` - # @return [String] - attr_accessor :dfp_network_name - - # Whether this directory site accepts programmatic placements. - # Corresponds to the JSON property `programmaticPlacementAccepted` - # @return [Boolean] - attr_accessor :programmatic_placement_accepted - alias_method :programmatic_placement_accepted?, :programmatic_placement_accepted - - # Whether this directory site accepts publisher-paid tags. - # Corresponds to the JSON property `pubPaidPlacementAccepted` - # @return [Boolean] - attr_accessor :pub_paid_placement_accepted - alias_method :pub_paid_placement_accepted?, :pub_paid_placement_accepted - - # Whether this directory site is available only via DoubleClick Publisher Portal. - # Corresponds to the JSON property `publisherPortalOnly` - # @return [Boolean] - attr_accessor :publisher_portal_only - alias_method :publisher_portal_only?, :publisher_portal_only - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dfp_network_code = args[:dfp_network_code] unless args[:dfp_network_code].nil? - @dfp_network_name = args[:dfp_network_name] unless args[:dfp_network_name].nil? - @programmatic_placement_accepted = args[:programmatic_placement_accepted] unless args[:programmatic_placement_accepted].nil? - @pub_paid_placement_accepted = args[:pub_paid_placement_accepted] unless args[:pub_paid_placement_accepted].nil? - @publisher_portal_only = args[:publisher_portal_only] unless args[:publisher_portal_only].nil? - end - end - - # Represents a dimension. - class Dimension - include Google::Apis::Core::Hashable - - # The kind of resource this is, in this case dfareporting#dimension. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The dimension name, e.g. dfa:advertiser - # 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) - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Represents a dimension filter. - class DimensionFilter - include Google::Apis::Core::Hashable - - # The name of the dimension to filter. - # Corresponds to the JSON property `dimensionName` - # @return [String] - attr_accessor :dimension_name - - # The kind of resource this is, in this case dfareporting#dimensionFilter. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The value of the dimension to filter. - # 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) - @dimension_name = args[:dimension_name] unless args[:dimension_name].nil? - @kind = args[:kind] unless args[:kind].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Represents a DimensionValue resource. - class DimensionValue - include Google::Apis::Core::Hashable - - # The name of the dimension. - # Corresponds to the JSON property `dimensionName` - # @return [String] - attr_accessor :dimension_name - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID associated with the value if available. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of resource this is, in this case dfareporting#dimensionValue. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Determines how the 'value' field is matched when filtering. If not specified, - # defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a - # placeholder for variable length character sequences, and it can be escaped - # with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow - # a matchType other than EXACT. - # Corresponds to the JSON property `matchType` - # @return [String] - attr_accessor :match_type - - # The value of the dimension. - # 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) - @dimension_name = args[:dimension_name] unless args[:dimension_name].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @match_type = args[:match_type] unless args[:match_type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Represents the list of DimensionValue resources. - class DimensionValueList - include Google::Apis::Core::Hashable - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The dimension values returned in this response. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of list this is, in this case dfareporting#dimensionValueList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Continuation token used to page through dimension values. To retrieve the next - # page of results, set the next request's "pageToken" to the value of this field. - # The page token is only valid for a limited amount of time and should not be - # persisted. - # 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 - - # Represents a DimensionValuesRequest. - class DimensionValueRequest - include Google::Apis::Core::Hashable - - # The name of the dimension for which values should be requested. - # Corresponds to the JSON property `dimensionName` - # @return [String] - attr_accessor :dimension_name - - # The end date of the date range for which to retrieve dimension values. A - # string of the format "yyyy-MM-dd". - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # The list of filters by which to filter values. The filters are ANDed. - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - # The kind of request this is, in this case dfareporting#dimensionValueRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The start date of the date range for which to retrieve dimension values. A - # string of the format "yyyy-MM-dd". - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension_name = args[:dimension_name] unless args[:dimension_name].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @filters = args[:filters] unless args[:filters].nil? - @kind = args[:kind] unless args[:kind].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - end - end - - # DirectorySites contains properties of a website from the Site Directory. Sites - # need to be added to an account via the Sites resource before they can be - # assigned to a placement. - class DirectorySite - include Google::Apis::Core::Hashable - - # Whether this directory site is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Directory site contacts. - # Corresponds to the JSON property `contactAssignments` - # @return [Array] - attr_accessor :contact_assignments - - # Country ID of this directory site. - # Corresponds to the JSON property `countryId` - # @return [String] - attr_accessor :country_id - - # Currency ID of this directory site. - # Possible values are: - # - "1" for USD - # - "2" for GBP - # - "3" for ESP - # - "4" for SEK - # - "5" for CAD - # - "6" for JPY - # - "7" for DEM - # - "8" for AUD - # - "9" for FRF - # - "10" for ITL - # - "11" for DKK - # - "12" for NOK - # - "13" for FIM - # - "14" for ZAR - # - "15" for IEP - # - "16" for NLG - # - "17" for EUR - # - "18" for KRW - # - "19" for TWD - # - "20" for SGD - # - "21" for CNY - # - "22" for HKD - # - "23" for NZD - # - "24" for MYR - # - "25" for BRL - # - "26" for PTE - # - "27" for MXP - # - "28" for CLP - # - "29" for TRY - # - "30" for ARS - # - "31" for PEN - # - "32" for ILS - # - "33" for CHF - # - "34" for VEF - # - "35" for COP - # - "36" for GTQ - # Corresponds to the JSON property `currencyId` - # @return [String] - attr_accessor :currency_id - - # Description of this directory site. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # ID of this directory site. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Tag types for regular placements. - # Acceptable values are: - # - "STANDARD" - # - "IFRAME_JAVASCRIPT_INPAGE" - # - "INTERNAL_REDIRECT_INPAGE" - # - "JAVASCRIPT_INPAGE" - # Corresponds to the JSON property `inpageTagFormats` - # @return [Array] - attr_accessor :inpage_tag_formats - - # Tag types for interstitial placements. - # Acceptable values are: - # - "IFRAME_JAVASCRIPT_INTERSTITIAL" - # - "INTERNAL_REDIRECT_INTERSTITIAL" - # - "JAVASCRIPT_INTERSTITIAL" - # Corresponds to the JSON property `interstitialTagFormats` - # @return [Array] - attr_accessor :interstitial_tag_formats - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#directorySite". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this directory site. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parent directory site ID. - # Corresponds to the JSON property `parentId` - # @return [String] - attr_accessor :parent_id - - # Directory Site Settings - # Corresponds to the JSON property `settings` - # @return [Google::Apis::DfareportingV2_1::DirectorySiteSettings] - attr_accessor :settings - - # URL of this directory site. - # 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) - @active = args[:active] unless args[:active].nil? - @contact_assignments = args[:contact_assignments] unless args[:contact_assignments].nil? - @country_id = args[:country_id] unless args[:country_id].nil? - @currency_id = args[:currency_id] unless args[:currency_id].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @inpage_tag_formats = args[:inpage_tag_formats] unless args[:inpage_tag_formats].nil? - @interstitial_tag_formats = args[:interstitial_tag_formats] unless args[:interstitial_tag_formats].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @parent_id = args[:parent_id] unless args[:parent_id].nil? - @settings = args[:settings] unless args[:settings].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # Contains properties of a Site Directory contact. - class DirectorySiteContact - include Google::Apis::Core::Hashable - - # Address of this directory site contact. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # Email address of this directory site contact. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # First name of this directory site contact. - # Corresponds to the JSON property `firstName` - # @return [String] - attr_accessor :first_name - - # ID of this directory site contact. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#directorySiteContact". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Last name of this directory site contact. - # Corresponds to the JSON property `lastName` - # @return [String] - attr_accessor :last_name - - # Phone number of this directory site contact. - # Corresponds to the JSON property `phone` - # @return [String] - attr_accessor :phone - - # Directory site contact role. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # Title or designation of this directory site contact. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Directory site contact 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) - @address = args[:address] unless args[:address].nil? - @email = args[:email] unless args[:email].nil? - @first_name = args[:first_name] unless args[:first_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_name = args[:last_name] unless args[:last_name].nil? - @phone = args[:phone] unless args[:phone].nil? - @role = args[:role] unless args[:role].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Directory Site Contact Assignment - class DirectorySiteContactAssignment - include Google::Apis::Core::Hashable - - # ID of this directory site contact. This is a read-only, auto-generated field. - # Corresponds to the JSON property `contactId` - # @return [String] - attr_accessor :contact_id - - # Visibility of this directory site contact assignment. When set to PUBLIC this - # contact assignment is visible to all account and agency users; when set to - # PRIVATE it is visible only to the site. - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contact_id = args[:contact_id] unless args[:contact_id].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # Directory Site Contact List Response - class ListDirectorySiteContactsResponse - include Google::Apis::Core::Hashable - - # Directory site contact collection - # Corresponds to the JSON property `directorySiteContacts` - # @return [Array] - attr_accessor :directory_site_contacts - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#directorySiteContactsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @directory_site_contacts = args[:directory_site_contacts] unless args[:directory_site_contacts].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Directory Site Settings - class DirectorySiteSettings - include Google::Apis::Core::Hashable - - # Whether this directory site has disabled active view creatives. - # Corresponds to the JSON property `activeViewOptOut` - # @return [Boolean] - attr_accessor :active_view_opt_out - alias_method :active_view_opt_out?, :active_view_opt_out - - # DFP Settings - # Corresponds to the JSON property `dfp_settings` - # @return [Google::Apis::DfareportingV2_1::DfpSettings] - attr_accessor :dfp_settings - - # Whether this site accepts in-stream video ads. - # Corresponds to the JSON property `instream_video_placement_accepted` - # @return [Boolean] - attr_accessor :instream_video_placement_accepted - alias_method :instream_video_placement_accepted?, :instream_video_placement_accepted - - # Whether this site accepts interstitial ads. - # Corresponds to the JSON property `interstitialPlacementAccepted` - # @return [Boolean] - attr_accessor :interstitial_placement_accepted - alias_method :interstitial_placement_accepted?, :interstitial_placement_accepted - - # Whether this directory site has disabled Nielsen OCR reach ratings. - # Corresponds to the JSON property `nielsenOcrOptOut` - # @return [Boolean] - attr_accessor :nielsen_ocr_opt_out - alias_method :nielsen_ocr_opt_out?, :nielsen_ocr_opt_out - - # Whether this directory site has disabled generation of Verification ins tags. - # Corresponds to the JSON property `verificationTagOptOut` - # @return [Boolean] - attr_accessor :verification_tag_opt_out - alias_method :verification_tag_opt_out?, :verification_tag_opt_out - - # Whether this directory site has disabled active view for in-stream video - # creatives. - # Corresponds to the JSON property `videoActiveViewOptOut` - # @return [Boolean] - attr_accessor :video_active_view_opt_out - alias_method :video_active_view_opt_out?, :video_active_view_opt_out - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active_view_opt_out = args[:active_view_opt_out] unless args[:active_view_opt_out].nil? - @dfp_settings = args[:dfp_settings] unless args[:dfp_settings].nil? - @instream_video_placement_accepted = args[:instream_video_placement_accepted] unless args[:instream_video_placement_accepted].nil? - @interstitial_placement_accepted = args[:interstitial_placement_accepted] unless args[:interstitial_placement_accepted].nil? - @nielsen_ocr_opt_out = args[:nielsen_ocr_opt_out] unless args[:nielsen_ocr_opt_out].nil? - @verification_tag_opt_out = args[:verification_tag_opt_out] unless args[:verification_tag_opt_out].nil? - @video_active_view_opt_out = args[:video_active_view_opt_out] unless args[:video_active_view_opt_out].nil? - end - end - - # Directory Site List Response - class ListDirectorySitesResponse - include Google::Apis::Core::Hashable - - # Directory site collection. - # Corresponds to the JSON property `directorySites` - # @return [Array] - attr_accessor :directory_sites - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#directorySitesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @directory_sites = args[:directory_sites] unless args[:directory_sites].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Contains properties of an event tag. - class EventTag - include Google::Apis::Core::Hashable - - # Account ID of this event tag. This is a read-only field that can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this event tag. This field or the campaignId field is - # required on insertion. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Campaign ID of this event tag. This field or the advertiserId field is - # required on insertion. - # Corresponds to the JSON property `campaignId` - # @return [String] - attr_accessor :campaign_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `campaignIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :campaign_id_dimension_value - - # Whether this event tag should be automatically enabled for all of the - # advertiser's campaigns and ads. - # Corresponds to the JSON property `enabledByDefault` - # @return [Boolean] - attr_accessor :enabled_by_default - alias_method :enabled_by_default?, :enabled_by_default - - # ID of this event tag. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#eventTag". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this event tag. This is a required field and must be less than 256 - # characters long. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Site filter type for this event tag. If no type is specified then the event - # tag will be applied to all sites. - # Corresponds to the JSON property `siteFilterType` - # @return [String] - attr_accessor :site_filter_type - - # Filter list of site IDs associated with this event tag. The siteFilterType - # determines whether this is a whitelist or blacklist filter. - # Corresponds to the JSON property `siteIds` - # @return [Array] - attr_accessor :site_ids - - # Whether this tag is SSL-compliant or not. - # Corresponds to the JSON property `sslCompliant` - # @return [Boolean] - attr_accessor :ssl_compliant - alias_method :ssl_compliant?, :ssl_compliant - - # Status of this event tag. Must be ENABLED for this event tag to fire. This is - # a required field. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Subaccount ID of this event tag. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Event tag type. Can be used to specify whether to use a third-party pixel, a - # third-party JavaScript URL, or a third-party click-through URL for either - # impression or click tracking. This is a required field. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Payload URL for this event tag. The URL on a click-through event tag should - # have a landing page URL appended to the end of it. This field is required on - # insertion. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # Number of times the landing page URL should be URL-escaped before being - # appended to the click-through event tag URL. Only applies to click-through - # event tags as specified by the event tag type. - # Corresponds to the JSON property `urlEscapeLevels` - # @return [Fixnum] - attr_accessor :url_escape_levels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @campaign_id = args[:campaign_id] unless args[:campaign_id].nil? - @campaign_id_dimension_value = args[:campaign_id_dimension_value] unless args[:campaign_id_dimension_value].nil? - @enabled_by_default = args[:enabled_by_default] unless args[:enabled_by_default].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @site_filter_type = args[:site_filter_type] unless args[:site_filter_type].nil? - @site_ids = args[:site_ids] unless args[:site_ids].nil? - @ssl_compliant = args[:ssl_compliant] unless args[:ssl_compliant].nil? - @status = args[:status] unless args[:status].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @url_escape_levels = args[:url_escape_levels] unless args[:url_escape_levels].nil? - end - end - - # Event tag override information. - class EventTagOverride - include Google::Apis::Core::Hashable - - # Whether this override is enabled. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - - # ID of this event tag override. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @enabled = args[:enabled] unless args[:enabled].nil? - @id = args[:id] unless args[:id].nil? - end - end - - # Event Tag List Response - class ListEventTagsResponse - include Google::Apis::Core::Hashable - - # Event tag collection. - # Corresponds to the JSON property `eventTags` - # @return [Array] - attr_accessor :event_tags - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#eventTagsListResponse". - # 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) - @event_tags = args[:event_tags] unless args[:event_tags].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Represents a File resource. A file contains the metadata for a report run. It - # shows the status of the run and holds the URLs to the generated report data if - # the run is finished and the status is "REPORT_AVAILABLE". - class File - include Google::Apis::Core::Hashable - - # Represents a date range. - # Corresponds to the JSON property `dateRange` - # @return [Google::Apis::DfareportingV2_1::DateRange] - attr_accessor :date_range - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The filename of the file. - # Corresponds to the JSON property `fileName` - # @return [String] - attr_accessor :file_name - - # The output format of the report. Only available once the file is available. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # The unique ID of this report file. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of resource this is, in this case dfareporting#file. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp in milliseconds since epoch when this file was last modified. - # Corresponds to the JSON property `lastModifiedTime` - # @return [String] - attr_accessor :last_modified_time - - # The ID of the report this file was generated from. - # Corresponds to the JSON property `reportId` - # @return [String] - attr_accessor :report_id - - # The status of the report file. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The URLs where the completed report file can be downloaded. - # Corresponds to the JSON property `urls` - # @return [Google::Apis::DfareportingV2_1::File::Urls] - attr_accessor :urls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @date_range = args[:date_range] unless args[:date_range].nil? - @etag = args[:etag] unless args[:etag].nil? - @file_name = args[:file_name] unless args[:file_name].nil? - @format = args[:format] unless args[:format].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @report_id = args[:report_id] unless args[:report_id].nil? - @status = args[:status] unless args[:status].nil? - @urls = args[:urls] unless args[:urls].nil? - end - - # The URLs where the completed report file can be downloaded. - class Urls - include Google::Apis::Core::Hashable - - # The URL for downloading the report data through the API. - # Corresponds to the JSON property `apiUrl` - # @return [String] - attr_accessor :api_url - - # The URL for downloading the report data through a browser. - # Corresponds to the JSON property `browserUrl` - # @return [String] - attr_accessor :browser_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @api_url = args[:api_url] unless args[:api_url].nil? - @browser_url = args[:browser_url] unless args[:browser_url].nil? - end - end - end - - # Represents the list of File resources. - class FileList - include Google::Apis::Core::Hashable - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The files returned in this response. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of list this is, in this case dfareporting#fileList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Continuation token used to page through files. To retrieve the next page of - # results, set the next request's "pageToken" to the value of this field. The - # page token is only valid for a limited amount of time and should not be - # persisted. - # 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 - - # Flight - class Flight - include Google::Apis::Core::Hashable - - # Inventory item flight end date. - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # Rate or cost of this flight. - # Corresponds to the JSON property `rateOrCost` - # @return [String] - attr_accessor :rate_or_cost - - # Inventory item flight start date. - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - # Units of this flight. - # Corresponds to the JSON property `units` - # @return [String] - attr_accessor :units - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_date = args[:end_date] unless args[:end_date].nil? - @rate_or_cost = args[:rate_or_cost] unless args[:rate_or_cost].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @units = args[:units] unless args[:units].nil? - end - end - - # Floodlight Activity GenerateTag Response - class FloodlightActivitiesGenerateTagResponse - include Google::Apis::Core::Hashable - - # Generated tag for this floodlight activity. - # Corresponds to the JSON property `floodlightActivityTag` - # @return [String] - attr_accessor :floodlight_activity_tag - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#floodlightActivitiesGenerateTagResponse". - # 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) - @floodlight_activity_tag = args[:floodlight_activity_tag] unless args[:floodlight_activity_tag].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Floodlight Activity List Response - class ListFloodlightActivitiesResponse - include Google::Apis::Core::Hashable - - # Floodlight activity collection. - # Corresponds to the JSON property `floodlightActivities` - # @return [Array] - attr_accessor :floodlight_activities - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#floodlightActivitiesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @floodlight_activities = args[:floodlight_activities] unless args[:floodlight_activities].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Contains properties of a Floodlight activity. - class FloodlightActivity - include Google::Apis::Core::Hashable - - # Account ID of this floodlight activity. This is a read-only field that can be - # left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this floodlight activity. If this field is left blank, the - # value will be copied over either from the activity group's advertiser or the - # existing activity's advertiser. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Code type used for cache busting in the generated tag. - # Corresponds to the JSON property `cacheBustingType` - # @return [String] - attr_accessor :cache_busting_type - - # Counting method for conversions for this floodlight activity. This is a - # required field. - # Corresponds to the JSON property `countingMethod` - # @return [String] - attr_accessor :counting_method - - # Dynamic floodlight tags. - # Corresponds to the JSON property `defaultTags` - # @return [Array] - attr_accessor :default_tags - - # URL where this tag will be deployed. If specified, must be less than 256 - # characters long. - # Corresponds to the JSON property `expectedUrl` - # @return [String] - attr_accessor :expected_url - - # Floodlight activity group ID of this floodlight activity. This is a required - # field. - # Corresponds to the JSON property `floodlightActivityGroupId` - # @return [String] - attr_accessor :floodlight_activity_group_id - - # Name of the associated floodlight activity group. This is a read-only field. - # Corresponds to the JSON property `floodlightActivityGroupName` - # @return [String] - attr_accessor :floodlight_activity_group_name - - # Tag string of the associated floodlight activity group. This is a read-only - # field. - # Corresponds to the JSON property `floodlightActivityGroupTagString` - # @return [String] - attr_accessor :floodlight_activity_group_tag_string - - # Type of the associated floodlight activity group. This is a read-only field. - # Corresponds to the JSON property `floodlightActivityGroupType` - # @return [String] - attr_accessor :floodlight_activity_group_type - - # Floodlight configuration ID of this floodlight activity. If this field is left - # blank, the value will be copied over either from the activity group's - # floodlight configuration or from the existing activity's floodlight - # configuration. - # Corresponds to the JSON property `floodlightConfigurationId` - # @return [String] - attr_accessor :floodlight_configuration_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `floodlightConfigurationIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :floodlight_configuration_id_dimension_value - - # Whether this activity is archived. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # ID of this floodlight activity. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Whether the image tag is enabled for this activity. - # Corresponds to the JSON property `imageTagEnabled` - # @return [Boolean] - attr_accessor :image_tag_enabled - alias_method :image_tag_enabled?, :image_tag_enabled - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#floodlightActivity". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this floodlight activity. This is a required field. Must be less than - # 129 characters long and cannot contain quotes. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # General notes or implementation instructions for the tag. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # Publisher dynamic floodlight tags. - # Corresponds to the JSON property `publisherTags` - # @return [Array] - attr_accessor :publisher_tags - - # Whether this tag should use SSL. - # Corresponds to the JSON property `secure` - # @return [Boolean] - attr_accessor :secure - alias_method :secure?, :secure - - # Whether the floodlight activity is SSL-compliant. This is a read-only field, - # its value detected by the system from the floodlight tags. - # Corresponds to the JSON property `sslCompliant` - # @return [Boolean] - attr_accessor :ssl_compliant - alias_method :ssl_compliant?, :ssl_compliant - - # Whether this floodlight activity must be SSL-compliant. - # Corresponds to the JSON property `sslRequired` - # @return [Boolean] - attr_accessor :ssl_required - alias_method :ssl_required?, :ssl_required - - # Subaccount ID of this floodlight activity. This is a read-only field that can - # be left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Tag format type for the floodlight activity. If left blank, the tag format - # will default to HTML. - # Corresponds to the JSON property `tagFormat` - # @return [String] - attr_accessor :tag_format - - # Value of the cat= paramter in the floodlight tag, which the ad servers use to - # identify the activity. This is optional: if empty, a new tag string will be - # generated for you. This string must be 1 to 8 characters long, with valid - # characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique - # among activities of the same activity group. This field is read-only after - # insertion. - # Corresponds to the JSON property `tagString` - # @return [String] - attr_accessor :tag_string - - # List of the user-defined variables used by this conversion tag. These map to - # the "u[1-20]=" in the tags. Each of these can have a user defined type. - # Acceptable values are: - # - "U1" - # - "U2" - # - "U3" - # - "U4" - # - "U5" - # - "U6" - # - "U7" - # - "U8" - # - "U9" - # - "U10" - # - "U11" - # - "U12" - # - "U13" - # - "U14" - # - "U15" - # - "U16" - # - "U17" - # - "U18" - # - "U19" - # - "U20" - # Corresponds to the JSON property `userDefinedVariableTypes` - # @return [Array] - attr_accessor :user_defined_variable_types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @cache_busting_type = args[:cache_busting_type] unless args[:cache_busting_type].nil? - @counting_method = args[:counting_method] unless args[:counting_method].nil? - @default_tags = args[:default_tags] unless args[:default_tags].nil? - @expected_url = args[:expected_url] unless args[:expected_url].nil? - @floodlight_activity_group_id = args[:floodlight_activity_group_id] unless args[:floodlight_activity_group_id].nil? - @floodlight_activity_group_name = args[:floodlight_activity_group_name] unless args[:floodlight_activity_group_name].nil? - @floodlight_activity_group_tag_string = args[:floodlight_activity_group_tag_string] unless args[:floodlight_activity_group_tag_string].nil? - @floodlight_activity_group_type = args[:floodlight_activity_group_type] unless args[:floodlight_activity_group_type].nil? - @floodlight_configuration_id = args[:floodlight_configuration_id] unless args[:floodlight_configuration_id].nil? - @floodlight_configuration_id_dimension_value = args[:floodlight_configuration_id_dimension_value] unless args[:floodlight_configuration_id_dimension_value].nil? - @hidden = args[:hidden] unless args[:hidden].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @image_tag_enabled = args[:image_tag_enabled] unless args[:image_tag_enabled].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @publisher_tags = args[:publisher_tags] unless args[:publisher_tags].nil? - @secure = args[:secure] unless args[:secure].nil? - @ssl_compliant = args[:ssl_compliant] unless args[:ssl_compliant].nil? - @ssl_required = args[:ssl_required] unless args[:ssl_required].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @tag_format = args[:tag_format] unless args[:tag_format].nil? - @tag_string = args[:tag_string] unless args[:tag_string].nil? - @user_defined_variable_types = args[:user_defined_variable_types] unless args[:user_defined_variable_types].nil? - end - end - - # Dynamic Tag - class FloodlightActivityDynamicTag - include Google::Apis::Core::Hashable - - # ID of this dynamic tag. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Name of this tag. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Tag code. - # Corresponds to the JSON property `tag` - # @return [String] - attr_accessor :tag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - @tag = args[:tag] unless args[:tag].nil? - end - end - - # Contains properties of a Floodlight activity group. - class FloodlightActivityGroup - include Google::Apis::Core::Hashable - - # Account ID of this floodlight activity group. This is a read-only field that - # can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this floodlight activity group. If this field is left blank, - # the value will be copied over either from the floodlight configuration's - # advertiser or from the existing activity group's advertiser. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Floodlight configuration ID of this floodlight activity group. This is a - # required field. - # Corresponds to the JSON property `floodlightConfigurationId` - # @return [String] - attr_accessor :floodlight_configuration_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `floodlightConfigurationIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :floodlight_configuration_id_dimension_value - - # ID of this floodlight activity group. This is a read-only, auto-generated - # field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#floodlightActivityGroup". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this floodlight activity group. This is a required field. Must be less - # than 65 characters long and cannot contain quotes. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Subaccount ID of this floodlight activity group. This is a read-only field - # that can be left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Value of the type= parameter in the floodlight tag, which the ad servers use - # to identify the activity group that the activity belongs to. This is optional: - # if empty, a new tag string will be generated for you. This string must be 1 to - # 8 characters long, with valid characters being [a-z][A-Z][0-9][-][ _ ]. This - # tag string must also be unique among activity groups of the same floodlight - # configuration. This field is read-only after insertion. - # Corresponds to the JSON property `tagString` - # @return [String] - attr_accessor :tag_string - - # Type of the floodlight activity group. This is a required field that is read- - # only after insertion. - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @floodlight_configuration_id = args[:floodlight_configuration_id] unless args[:floodlight_configuration_id].nil? - @floodlight_configuration_id_dimension_value = args[:floodlight_configuration_id_dimension_value] unless args[:floodlight_configuration_id_dimension_value].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @tag_string = args[:tag_string] unless args[:tag_string].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Floodlight Activity Group List Response - class ListFloodlightActivityGroupsResponse - include Google::Apis::Core::Hashable - - # Floodlight activity group collection. - # Corresponds to the JSON property `floodlightActivityGroups` - # @return [Array] - attr_accessor :floodlight_activity_groups - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#floodlightActivityGroupsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @floodlight_activity_groups = args[:floodlight_activity_groups] unless args[:floodlight_activity_groups].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Publisher Dynamic Tag - class FloodlightActivityPublisherDynamicTag - include Google::Apis::Core::Hashable - - # Whether this tag is applicable only for click-throughs. - # Corresponds to the JSON property `clickThrough` - # @return [Boolean] - attr_accessor :click_through - alias_method :click_through?, :click_through - - # Directory site ID of this dynamic tag. This is a write-only field that can be - # used as an alternative to the siteId field. When this resource is retrieved, - # only the siteId field will be populated. - # Corresponds to the JSON property `directorySiteId` - # @return [String] - attr_accessor :directory_site_id - - # Dynamic Tag - # Corresponds to the JSON property `dynamicTag` - # @return [Google::Apis::DfareportingV2_1::FloodlightActivityDynamicTag] - attr_accessor :dynamic_tag - - # Site ID of this dynamic tag. - # Corresponds to the JSON property `siteId` - # @return [String] - attr_accessor :site_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `siteIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :site_id_dimension_value - - # Whether this tag is applicable only for view-throughs. - # Corresponds to the JSON property `viewThrough` - # @return [Boolean] - attr_accessor :view_through - alias_method :view_through?, :view_through - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @click_through = args[:click_through] unless args[:click_through].nil? - @directory_site_id = args[:directory_site_id] unless args[:directory_site_id].nil? - @dynamic_tag = args[:dynamic_tag] unless args[:dynamic_tag].nil? - @site_id = args[:site_id] unless args[:site_id].nil? - @site_id_dimension_value = args[:site_id_dimension_value] unless args[:site_id_dimension_value].nil? - @view_through = args[:view_through] unless args[:view_through].nil? - end - end - - # Contains properties of a Floodlight configuration. - class FloodlightConfiguration - include Google::Apis::Core::Hashable - - # Account ID of this floodlight configuration. This is a read-only field that - # can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of the parent advertiser of this floodlight configuration. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Whether advertiser data is shared with Google Analytics. - # Corresponds to the JSON property `analyticsDataSharingEnabled` - # @return [Boolean] - attr_accessor :analytics_data_sharing_enabled - alias_method :analytics_data_sharing_enabled?, :analytics_data_sharing_enabled - - # Whether the exposure-to-conversion report is enabled. This report shows - # detailed pathway information on up to 10 of the most recent ad exposures seen - # by a user before converting. - # Corresponds to the JSON property `exposureToConversionEnabled` - # @return [Boolean] - attr_accessor :exposure_to_conversion_enabled - alias_method :exposure_to_conversion_enabled?, :exposure_to_conversion_enabled - - # Day that will be counted as the first day of the week in reports. This is a - # required field. - # Corresponds to the JSON property `firstDayOfWeek` - # @return [String] - attr_accessor :first_day_of_week - - # ID of this floodlight configuration. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#floodlightConfiguration". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Lookback configuration settings. - # Corresponds to the JSON property `lookbackConfiguration` - # @return [Google::Apis::DfareportingV2_1::LookbackConfiguration] - attr_accessor :lookback_configuration - - # Types of attribution options for natural search conversions. - # Corresponds to the JSON property `naturalSearchConversionAttributionOption` - # @return [String] - attr_accessor :natural_search_conversion_attribution_option - - # Omniture Integration Settings. - # Corresponds to the JSON property `omnitureSettings` - # @return [Google::Apis::DfareportingV2_1::OmnitureSettings] - attr_accessor :omniture_settings - - # Whether floodlight activities owned by this configuration are required to be - # SSL-compliant. - # Corresponds to the JSON property `sslRequired` - # @return [Boolean] - attr_accessor :ssl_required - alias_method :ssl_required?, :ssl_required - - # List of standard variables enabled for this configuration. - # Acceptable values are: - # - "ORD" - # - "NUM" - # Corresponds to the JSON property `standardVariableTypes` - # @return [Array] - attr_accessor :standard_variable_types - - # Subaccount ID of this floodlight configuration. This is a read-only field that - # can be left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Dynamic and Image Tag Settings. - # Corresponds to the JSON property `tagSettings` - # @return [Google::Apis::DfareportingV2_1::TagSettings] - attr_accessor :tag_settings - - # List of user defined variables enabled for this configuration. - # Corresponds to the JSON property `userDefinedVariableConfigurations` - # @return [Array] - attr_accessor :user_defined_variable_configurations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @analytics_data_sharing_enabled = args[:analytics_data_sharing_enabled] unless args[:analytics_data_sharing_enabled].nil? - @exposure_to_conversion_enabled = args[:exposure_to_conversion_enabled] unless args[:exposure_to_conversion_enabled].nil? - @first_day_of_week = args[:first_day_of_week] unless args[:first_day_of_week].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @kind = args[:kind] unless args[:kind].nil? - @lookback_configuration = args[:lookback_configuration] unless args[:lookback_configuration].nil? - @natural_search_conversion_attribution_option = args[:natural_search_conversion_attribution_option] unless args[:natural_search_conversion_attribution_option].nil? - @omniture_settings = args[:omniture_settings] unless args[:omniture_settings].nil? - @ssl_required = args[:ssl_required] unless args[:ssl_required].nil? - @standard_variable_types = args[:standard_variable_types] unless args[:standard_variable_types].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @tag_settings = args[:tag_settings] unless args[:tag_settings].nil? - @user_defined_variable_configurations = args[:user_defined_variable_configurations] unless args[:user_defined_variable_configurations].nil? - end - end - - # Floodlight Configuration List Response - class ListFloodlightConfigurationsResponse - include Google::Apis::Core::Hashable - - # Floodlight configuration collection. - # Corresponds to the JSON property `floodlightConfigurations` - # @return [Array] - attr_accessor :floodlight_configurations - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#floodlightConfigurationsListResponse". - # 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) - @floodlight_configurations = args[:floodlight_configurations] unless args[:floodlight_configurations].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Represents fields that are compatible to be selected for a report of type " - # FlOODLIGHT". - class FloodlightReportCompatibleFields - include Google::Apis::Core::Hashable - - # Dimensions which are compatible to be selected in the "dimensionFilters" - # section of the report. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # Dimensions which are compatible to be selected in the "dimensions" section of - # the report. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # The kind of resource this is, in this case dfareporting# - # floodlightReportCompatibleFields. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metrics which are compatible to be selected in the "metricNames" section of - # the report. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @kind = args[:kind] unless args[:kind].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - end - end - - # Frequency Cap. - class FrequencyCap - include Google::Apis::Core::Hashable - - # Duration of time, in seconds, for this frequency cap. The maximum duration is - # 90 days in seconds, or 7,776,000. - # Corresponds to the JSON property `duration` - # @return [String] - attr_accessor :duration - - # Number of times an individual user can be served the ad within the specified - # duration. The maximum allowed is 15. - # Corresponds to the JSON property `impressions` - # @return [String] - attr_accessor :impressions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @duration = args[:duration] unless args[:duration].nil? - @impressions = args[:impressions] unless args[:impressions].nil? - end - end - - # FsCommand. - class FsCommand - include Google::Apis::Core::Hashable - - # Distance from the left of the browser.Applicable when positionOption is - # DISTANCE_FROM_TOP_LEFT_CORNER. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # Position in the browser where the window will open. - # Corresponds to the JSON property `positionOption` - # @return [String] - attr_accessor :position_option - - # Distance from the top of the browser. Applicable when positionOption is - # DISTANCE_FROM_TOP_LEFT_CORNER. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - # Height of the window. - # Corresponds to the JSON property `windowHeight` - # @return [Fixnum] - attr_accessor :window_height - - # Width of the window. - # Corresponds to the JSON property `windowWidth` - # @return [Fixnum] - attr_accessor :window_width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left = args[:left] unless args[:left].nil? - @position_option = args[:position_option] unless args[:position_option].nil? - @top = args[:top] unless args[:top].nil? - @window_height = args[:window_height] unless args[:window_height].nil? - @window_width = args[:window_width] unless args[:window_width].nil? - end - end - - # Geographical Targeting. - class GeoTargeting - include Google::Apis::Core::Hashable - - # Cities to be targeted. For each city only dartId is required. The other fields - # are populated automatically when the ad is inserted or updated. If targeting a - # city, do not target or exclude the country of the city, and do not target the - # metro or region of the city. - # Corresponds to the JSON property `cities` - # @return [Array] - attr_accessor :cities - - # Countries to be targeted or excluded from targeting, depending on the setting - # of the excludeCountries field. For each country only dartId is required. The - # other fields are populated automatically when the ad is inserted or updated. - # If targeting or excluding a country, do not target regions, cities, metros, or - # postal codes in the same country. - # Corresponds to the JSON property `countries` - # @return [Array] - attr_accessor :countries - - # Whether or not to exclude the countries in the countries field from targeting. - # If false, the countries field refers to countries which will be targeted by - # the ad. - # Corresponds to the JSON property `excludeCountries` - # @return [Boolean] - attr_accessor :exclude_countries - alias_method :exclude_countries?, :exclude_countries - - # Metros to be targeted. For each metro only dmaId is required. The other fields - # are populated automatically when the ad is inserted or updated. If targeting a - # metro, do not target or exclude the country of the metro. - # Corresponds to the JSON property `metros` - # @return [Array] - attr_accessor :metros - - # Postal codes to be targeted. For each postal code only id is required. The - # other fields are populated automatically when the ad is inserted or updated. - # If targeting a postal code, do not target or exclude the country of the postal - # code. - # Corresponds to the JSON property `postalCodes` - # @return [Array] - attr_accessor :postal_codes - - # Regions to be targeted. For each region only dartId is required. The other - # fields are populated automatically when the ad is inserted or updated. If - # targeting a region, do not target or exclude the country of the region. - # Corresponds to the JSON property `regions` - # @return [Array] - attr_accessor :regions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cities = args[:cities] unless args[:cities].nil? - @countries = args[:countries] unless args[:countries].nil? - @exclude_countries = args[:exclude_countries] unless args[:exclude_countries].nil? - @metros = args[:metros] unless args[:metros].nil? - @postal_codes = args[:postal_codes] unless args[:postal_codes].nil? - @regions = args[:regions] unless args[:regions].nil? - end - end - - # Represents a buy from the DoubleClick Planning inventory store. - class InventoryItem - include Google::Apis::Core::Hashable - - # Account ID of this inventory item. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Ad slots of this inventory item. If this inventory item represents a - # standalone placement, there will be exactly one ad slot. If this inventory - # item represents a placement group, there will be more than one ad slot, each - # representing one child placement in that placement group. - # Corresponds to the JSON property `adSlots` - # @return [Array] - attr_accessor :ad_slots - - # Advertiser ID of this inventory item. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Content category ID of this inventory item. - # Corresponds to the JSON property `contentCategoryId` - # @return [String] - attr_accessor :content_category_id - - # Estimated click-through rate of this inventory item. - # Corresponds to the JSON property `estimatedClickThroughRate` - # @return [String] - attr_accessor :estimated_click_through_rate - - # Estimated conversion rate of this inventory item. - # Corresponds to the JSON property `estimatedConversionRate` - # @return [String] - attr_accessor :estimated_conversion_rate - - # ID of this inventory item. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Whether this inventory item is in plan. - # Corresponds to the JSON property `inPlan` - # @return [Boolean] - attr_accessor :in_plan - alias_method :in_plan?, :in_plan - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#inventoryItem". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Name of this inventory item. For standalone inventory items, this is the same - # name as that of its only ad slot. For group inventory items, this can differ - # from the name of any of its ad slots. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Negotiation channel ID of this inventory item. - # Corresponds to the JSON property `negotiationChannelId` - # @return [String] - attr_accessor :negotiation_channel_id - - # Order ID of this inventory item. - # Corresponds to the JSON property `orderId` - # @return [String] - attr_accessor :order_id - - # Placement strategy ID of this inventory item. - # Corresponds to the JSON property `placementStrategyId` - # @return [String] - attr_accessor :placement_strategy_id - - # Pricing Information - # Corresponds to the JSON property `pricing` - # @return [Google::Apis::DfareportingV2_1::Pricing] - attr_accessor :pricing - - # Project ID of this inventory item. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # RFP ID of this inventory item. - # Corresponds to the JSON property `rfpId` - # @return [String] - attr_accessor :rfp_id - - # ID of the site this inventory item is associated with. - # Corresponds to the JSON property `siteId` - # @return [String] - attr_accessor :site_id - - # Subaccount ID of this inventory item. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @ad_slots = args[:ad_slots] unless args[:ad_slots].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @content_category_id = args[:content_category_id] unless args[:content_category_id].nil? - @estimated_click_through_rate = args[:estimated_click_through_rate] unless args[:estimated_click_through_rate].nil? - @estimated_conversion_rate = args[:estimated_conversion_rate] unless args[:estimated_conversion_rate].nil? - @id = args[:id] unless args[:id].nil? - @in_plan = args[:in_plan] unless args[:in_plan].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @name = args[:name] unless args[:name].nil? - @negotiation_channel_id = args[:negotiation_channel_id] unless args[:negotiation_channel_id].nil? - @order_id = args[:order_id] unless args[:order_id].nil? - @placement_strategy_id = args[:placement_strategy_id] unless args[:placement_strategy_id].nil? - @pricing = args[:pricing] unless args[:pricing].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @rfp_id = args[:rfp_id] unless args[:rfp_id].nil? - @site_id = args[:site_id] unless args[:site_id].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Inventory item List Response - class ListInventoryItemsResponse - include Google::Apis::Core::Hashable - - # Inventory item collection - # Corresponds to the JSON property `inventoryItems` - # @return [Array] - attr_accessor :inventory_items - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#inventoryItemsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # 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) - @inventory_items = args[:inventory_items] unless args[:inventory_items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Key Value Targeting Expression. - class KeyValueTargetingExpression - include Google::Apis::Core::Hashable - - # Keyword expression being targeted by the ad. - # Corresponds to the JSON property `expression` - # @return [String] - attr_accessor :expression - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expression = args[:expression] unless args[:expression].nil? - end - end - - # Contains information about where a user's browser is taken after the user - # clicks an ad. - class LandingPage - include Google::Apis::Core::Hashable - - # Whether or not this landing page will be assigned to any ads or creatives that - # do not have a landing page assigned explicitly. Only one default landing page - # is allowed per campaign. - # Corresponds to the JSON property `default` - # @return [Boolean] - attr_accessor :default - alias_method :default?, :default - - # ID of this landing page. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#landingPage". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this landing page. This is a required field. It must be less than 256 - # characters long, and must be unique among landing pages of the same campaign. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL of this landing page. This is a required field. - # 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) - @default = args[:default] unless args[:default].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # Landing Page List Response - class ListLandingPagesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#landingPagesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Landing page collection - # Corresponds to the JSON property `landingPages` - # @return [Array] - attr_accessor :landing_pages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @landing_pages = args[:landing_pages] unless args[:landing_pages].nil? - end - end - - # Modification timestamp. - class LastModifiedInfo - include Google::Apis::Core::Hashable - - # Timestamp of the last change in milliseconds since epoch. - # Corresponds to the JSON property `time` - # @return [String] - attr_accessor :time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time = args[:time] unless args[:time].nil? - end - end - - # A group clause made up of list population terms representing constraints - # joined by ORs. - class ListPopulationClause - include Google::Apis::Core::Hashable - - # Terms of this list population clause. Each clause is made up of list - # population terms representing constraints and are joined by ORs. - # Corresponds to the JSON property `terms` - # @return [Array] - attr_accessor :terms - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @terms = args[:terms] unless args[:terms].nil? - end - end - - # Remarketing List Population Rule. - class ListPopulationRule - include Google::Apis::Core::Hashable - - # Floodlight activity ID associated with this rule. This field can be left blank. - # Corresponds to the JSON property `floodlightActivityId` - # @return [String] - attr_accessor :floodlight_activity_id - - # Name of floodlight activity associated with this rule. This is a read-only, - # auto-generated field. - # Corresponds to the JSON property `floodlightActivityName` - # @return [String] - attr_accessor :floodlight_activity_name - - # Clauses that make up this list population rule. Clauses are joined by ANDs, - # and the clauses themselves are made up of list population terms which are - # joined by ORs. - # Corresponds to the JSON property `listPopulationClauses` - # @return [Array] - attr_accessor :list_population_clauses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @floodlight_activity_id = args[:floodlight_activity_id] unless args[:floodlight_activity_id].nil? - @floodlight_activity_name = args[:floodlight_activity_name] unless args[:floodlight_activity_name].nil? - @list_population_clauses = args[:list_population_clauses] unless args[:list_population_clauses].nil? - end - end - - # Remarketing List Population Rule Term. - class ListPopulationTerm - include Google::Apis::Core::Hashable - - # Will be true if the term should check if the user is in the list and false if - # the term should check if the user is not in the list. This field is only - # relevant when type is set to LIST_MEMBERSHIP_TERM. False by default. - # Corresponds to the JSON property `contains` - # @return [Boolean] - attr_accessor :contains - alias_method :contains?, :contains - - # Whether to negate the comparison result of this term during rule evaluation. - # This field is only relevant when type is left unset or set to - # CUSTOM_VARIABLE_TERM or REFERRER_TERM. - # Corresponds to the JSON property `negation` - # @return [Boolean] - attr_accessor :negation - alias_method :negation?, :negation - - # Comparison operator of this term. This field is only relevant when type is - # left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # ID of the list in question. This field is only relevant when type is set to - # LIST_MEMBERSHIP_TERM. - # Corresponds to the JSON property `remarketingListId` - # @return [String] - attr_accessor :remarketing_list_id - - # List population term type determines the applicable fields in this object. If - # left unset or set to CUSTOM_VARIABLE_TERM, then variableName, - # variableFriendlyName, operator, value, and negation are applicable. If set to - # LIST_MEMBERSHIP_TERM then remarketingListId and contains are applicable. If - # set to REFERRER_TERM then operator, value, and negation are applicable. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Literal to compare the variable to. This field is only relevant when type is - # left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Friendly name of this term's variable. This is a read-only, auto-generated - # field. This field is only relevant when type is left unset or set to - # CUSTOM_VARIABLE_TERM. - # Corresponds to the JSON property `variableFriendlyName` - # @return [String] - attr_accessor :variable_friendly_name - - # Name of the variable (U1, U2, etc.) being compared in this term. This field is - # only relevant when type is set to null, CUSTOM_VARIABLE_TERM or REFERRER_TERM. - # Corresponds to the JSON property `variableName` - # @return [String] - attr_accessor :variable_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contains = args[:contains] unless args[:contains].nil? - @negation = args[:negation] unless args[:negation].nil? - @operator = args[:operator] unless args[:operator].nil? - @remarketing_list_id = args[:remarketing_list_id] unless args[:remarketing_list_id].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - @variable_friendly_name = args[:variable_friendly_name] unless args[:variable_friendly_name].nil? - @variable_name = args[:variable_name] unless args[:variable_name].nil? - end - end - - # Remarketing List Targeting Expression. - class ListTargetingExpression - include Google::Apis::Core::Hashable - - # Expression describing which lists are being targeted by the ad. - # Corresponds to the JSON property `expression` - # @return [String] - attr_accessor :expression - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expression = args[:expression] unless args[:expression].nil? - end - end - - # Lookback configuration settings. - class LookbackConfiguration - include Google::Apis::Core::Hashable - - # Lookback window, in days, from the last time a given user clicked on one of - # your ads. If you enter 0, clicks will not be considered as triggering events - # for floodlight tracking. If you leave this field blank, the default value for - # your account will be used. - # Corresponds to the JSON property `clickDuration` - # @return [Fixnum] - attr_accessor :click_duration - - # Lookback window, in days, from the last time a given user viewed one of your - # ads. If you enter 0, impressions will not be considered as triggering events - # for floodlight tracking. If you leave this field blank, the default value for - # your account will be used. - # Corresponds to the JSON property `postImpressionActivitiesDuration` - # @return [Fixnum] - attr_accessor :post_impression_activities_duration - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @click_duration = args[:click_duration] unless args[:click_duration].nil? - @post_impression_activities_duration = args[:post_impression_activities_duration] unless args[:post_impression_activities_duration].nil? - end - end - - # Represents a metric. - class Metric - include Google::Apis::Core::Hashable - - # The kind of resource this is, in this case dfareporting#metric. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The metric name, e.g. dfa:impressions - # 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) - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Contains information about a metro region that can be targeted by ads. - class Metro - include Google::Apis::Core::Hashable - - # Country code of the country to which this metro region belongs. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # DART ID of the country to which this metro region belongs. - # Corresponds to the JSON property `countryDartId` - # @return [String] - attr_accessor :country_dart_id - - # DART ID of this metro region. - # Corresponds to the JSON property `dartId` - # @return [String] - attr_accessor :dart_id - - # DMA ID of this metro region. This is the ID used for targeting and generating - # reports, and is equivalent to metro_code. - # Corresponds to the JSON property `dmaId` - # @return [String] - attr_accessor :dma_id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#metro". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metro code of this metro region. This is equivalent to dma_id. - # Corresponds to the JSON property `metroCode` - # @return [String] - attr_accessor :metro_code - - # Name of this metro region. - # 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) - @country_code = args[:country_code] unless args[:country_code].nil? - @country_dart_id = args[:country_dart_id] unless args[:country_dart_id].nil? - @dart_id = args[:dart_id] unless args[:dart_id].nil? - @dma_id = args[:dma_id] unless args[:dma_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @metro_code = args[:metro_code] unless args[:metro_code].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Metro List Response - class ListMetrosResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#metrosListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metro collection. - # Corresponds to the JSON property `metros` - # @return [Array] - attr_accessor :metros - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @metros = args[:metros] unless args[:metros].nil? - end - end - - # Contains information about a mobile carrier that can be targeted by ads. - class MobileCarrier - include Google::Apis::Core::Hashable - - # Country code of the country to which this mobile carrier belongs. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # DART ID of the country to which this mobile carrier belongs. - # Corresponds to the JSON property `countryDartId` - # @return [String] - attr_accessor :country_dart_id - - # ID of this mobile carrier. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#mobileCarrier". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this mobile carrier. - # 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) - @country_code = args[:country_code] unless args[:country_code].nil? - @country_dart_id = args[:country_dart_id] unless args[:country_dart_id].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Mobile Carrier List Response - class ListMobileCarriersResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#mobileCarriersListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Mobile carrier collection. - # Corresponds to the JSON property `mobileCarriers` - # @return [Array] - attr_accessor :mobile_carriers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @mobile_carriers = args[:mobile_carriers] unless args[:mobile_carriers].nil? - end - end - - # Object Filter. - class ObjectFilter - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#objectFilter". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Applicable when status is ASSIGNED. The user has access to objects with these - # object IDs. - # Corresponds to the JSON property `objectIds` - # @return [Array] - attr_accessor :object_ids - - # Status of the filter. NONE means the user has access to none of the objects. - # ALL means the user has access to all objects. ASSIGNED means the user has - # access to the objects with IDs in the objectIds list. - # 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) - @kind = args[:kind] unless args[:kind].nil? - @object_ids = args[:object_ids] unless args[:object_ids].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # Offset Position. - class OffsetPosition - include Google::Apis::Core::Hashable - - # Offset distance from left side of an asset or a window. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # Offset distance from top side of an asset or a window. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left = args[:left] unless args[:left].nil? - @top = args[:top] unless args[:top].nil? - end - end - - # Omniture Integration Settings. - class OmnitureSettings - include Google::Apis::Core::Hashable - - # Whether placement cost data will be sent to Omniture. This property can be - # enabled only if omnitureIntegrationEnabled is true. - # Corresponds to the JSON property `omnitureCostDataEnabled` - # @return [Boolean] - attr_accessor :omniture_cost_data_enabled - alias_method :omniture_cost_data_enabled?, :omniture_cost_data_enabled - - # Whether Omniture integration is enabled. This property can be enabled only - # when the "Advanced Ad Serving" account setting is enabled. - # Corresponds to the JSON property `omnitureIntegrationEnabled` - # @return [Boolean] - attr_accessor :omniture_integration_enabled - alias_method :omniture_integration_enabled?, :omniture_integration_enabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @omniture_cost_data_enabled = args[:omniture_cost_data_enabled] unless args[:omniture_cost_data_enabled].nil? - @omniture_integration_enabled = args[:omniture_integration_enabled] unless args[:omniture_integration_enabled].nil? - end - end - - # Contains information about an operating system that can be targeted by ads. - class OperatingSystem - include Google::Apis::Core::Hashable - - # DART ID of this operating system. This is the ID used for targeting. - # Corresponds to the JSON property `dartId` - # @return [String] - attr_accessor :dart_id - - # Whether this operating system is for desktop. - # Corresponds to the JSON property `desktop` - # @return [Boolean] - attr_accessor :desktop - alias_method :desktop?, :desktop - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#operatingSystem". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Whether this operating system is for mobile. - # Corresponds to the JSON property `mobile` - # @return [Boolean] - attr_accessor :mobile - alias_method :mobile?, :mobile - - # Name of this operating system. - # 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) - @dart_id = args[:dart_id] unless args[:dart_id].nil? - @desktop = args[:desktop] unless args[:desktop].nil? - @kind = args[:kind] unless args[:kind].nil? - @mobile = args[:mobile] unless args[:mobile].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Contains information about a particular version of an operating system that - # can be targeted by ads. - class OperatingSystemVersion - include Google::Apis::Core::Hashable - - # ID of this operating system version. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#operatingSystemVersion". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Major version (leftmost number) of this operating system version. - # Corresponds to the JSON property `majorVersion` - # @return [String] - attr_accessor :major_version - - # Minor version (number after the first dot) of this operating system version. - # Corresponds to the JSON property `minorVersion` - # @return [String] - attr_accessor :minor_version - - # Name of this operating system version. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Contains information about an operating system that can be targeted by ads. - # Corresponds to the JSON property `operatingSystem` - # @return [Google::Apis::DfareportingV2_1::OperatingSystem] - attr_accessor :operating_system - - 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? - @major_version = args[:major_version] unless args[:major_version].nil? - @minor_version = args[:minor_version] unless args[:minor_version].nil? - @name = args[:name] unless args[:name].nil? - @operating_system = args[:operating_system] unless args[:operating_system].nil? - end - end - - # Operating System Version List Response - class ListOperatingSystemVersionsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#operatingSystemVersionsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Operating system version collection. - # Corresponds to the JSON property `operatingSystemVersions` - # @return [Array] - attr_accessor :operating_system_versions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @operating_system_versions = args[:operating_system_versions] unless args[:operating_system_versions].nil? - end - end - - # Operating System List Response - class ListOperatingSystemsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#operatingSystemsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Operating system collection. - # Corresponds to the JSON property `operatingSystems` - # @return [Array] - attr_accessor :operating_systems - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @operating_systems = args[:operating_systems] unless args[:operating_systems].nil? - end - end - - # Creative optimization activity. - class OptimizationActivity - include Google::Apis::Core::Hashable - - # Floodlight activity ID of this optimization activity. This is a required field. - # Corresponds to the JSON property `floodlightActivityId` - # @return [String] - attr_accessor :floodlight_activity_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `floodlightActivityIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :floodlight_activity_id_dimension_value - - # Weight associated with this optimization. Must be greater than 1. The weight - # assigned will be understood in proportion to the weights assigned to the other - # optimization activities. - # Corresponds to the JSON property `weight` - # @return [Fixnum] - attr_accessor :weight - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @floodlight_activity_id = args[:floodlight_activity_id] unless args[:floodlight_activity_id].nil? - @floodlight_activity_id_dimension_value = args[:floodlight_activity_id_dimension_value] unless args[:floodlight_activity_id_dimension_value].nil? - @weight = args[:weight] unless args[:weight].nil? - end - end - - # Describes properties of a DoubleClick Planning order. - class Order - include Google::Apis::Core::Hashable - - # Account ID of this order. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this order. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # IDs for users that have to approve documents created for this order. - # Corresponds to the JSON property `approverUserProfileIds` - # @return [Array] - attr_accessor :approver_user_profile_ids - - # Buyer invoice ID associated with this order. - # Corresponds to the JSON property `buyerInvoiceId` - # @return [String] - attr_accessor :buyer_invoice_id - - # Name of the buyer organization. - # Corresponds to the JSON property `buyerOrganizationName` - # @return [String] - attr_accessor :buyer_organization_name - - # Comments in this order. - # Corresponds to the JSON property `comments` - # @return [String] - attr_accessor :comments - - # Contacts for this order. - # Corresponds to the JSON property `contacts` - # @return [Array] - attr_accessor :contacts - - # ID of this order. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#order". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Name of this order. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Notes of this order. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # ID of the terms and conditions template used in this order. - # Corresponds to the JSON property `planningTermId` - # @return [String] - attr_accessor :planning_term_id - - # Project ID of this order. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Seller order ID associated with this order. - # Corresponds to the JSON property `sellerOrderId` - # @return [String] - attr_accessor :seller_order_id - - # Name of the seller organization. - # Corresponds to the JSON property `sellerOrganizationName` - # @return [String] - attr_accessor :seller_organization_name - - # Site IDs this order is associated with. - # Corresponds to the JSON property `siteId` - # @return [Array] - attr_accessor :site_id - - # Free-form site names this order is associated with. - # Corresponds to the JSON property `siteNames` - # @return [Array] - attr_accessor :site_names - - # Subaccount ID of this order. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Terms and conditions of this order. - # Corresponds to the JSON property `termsAndConditions` - # @return [String] - attr_accessor :terms_and_conditions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @approver_user_profile_ids = args[:approver_user_profile_ids] unless args[:approver_user_profile_ids].nil? - @buyer_invoice_id = args[:buyer_invoice_id] unless args[:buyer_invoice_id].nil? - @buyer_organization_name = args[:buyer_organization_name] unless args[:buyer_organization_name].nil? - @comments = args[:comments] unless args[:comments].nil? - @contacts = args[:contacts] unless args[:contacts].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @planning_term_id = args[:planning_term_id] unless args[:planning_term_id].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @seller_order_id = args[:seller_order_id] unless args[:seller_order_id].nil? - @seller_organization_name = args[:seller_organization_name] unless args[:seller_organization_name].nil? - @site_id = args[:site_id] unless args[:site_id].nil? - @site_names = args[:site_names] unless args[:site_names].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @terms_and_conditions = args[:terms_and_conditions] unless args[:terms_and_conditions].nil? - end - end - - # Contact of an order. - class OrderContact - include Google::Apis::Core::Hashable - - # Free-form information about this contact. It could be any information related - # to this contact in addition to type, title, name, and signature user profile - # ID. - # Corresponds to the JSON property `contactInfo` - # @return [String] - attr_accessor :contact_info - - # Name of this contact. - # Corresponds to the JSON property `contactName` - # @return [String] - attr_accessor :contact_name - - # Title of this contact. - # Corresponds to the JSON property `contactTitle` - # @return [String] - attr_accessor :contact_title - - # Type of this contact. - # Corresponds to the JSON property `contactType` - # @return [String] - attr_accessor :contact_type - - # ID of the user profile containing the signature that will be embedded into - # order documents. - # Corresponds to the JSON property `signatureUserProfileId` - # @return [String] - attr_accessor :signature_user_profile_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contact_info = args[:contact_info] unless args[:contact_info].nil? - @contact_name = args[:contact_name] unless args[:contact_name].nil? - @contact_title = args[:contact_title] unless args[:contact_title].nil? - @contact_type = args[:contact_type] unless args[:contact_type].nil? - @signature_user_profile_id = args[:signature_user_profile_id] unless args[:signature_user_profile_id].nil? - end - end - - # Contains properties of a DoubleClick Planning order document. - class OrderDocument - include Google::Apis::Core::Hashable - - # Account ID of this order document. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this order document. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # The amended order document ID of this order document. An order document can be - # created by optionally amending another order document so that the change - # history can be preserved. - # Corresponds to the JSON property `amendedOrderDocumentId` - # @return [String] - attr_accessor :amended_order_document_id - - # IDs of users who have approved this order document. - # Corresponds to the JSON property `approvedByUserProfileIds` - # @return [Array] - attr_accessor :approved_by_user_profile_ids - - # Whether this order document is cancelled. - # Corresponds to the JSON property `cancelled` - # @return [Boolean] - attr_accessor :cancelled - alias_method :cancelled?, :cancelled - - # Modification timestamp. - # Corresponds to the JSON property `createdInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :created_info - - # Effective date of this order document. - # Corresponds to the JSON property `effectiveDate` - # @return [Date] - attr_accessor :effective_date - - # ID of this order document. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#orderDocument". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # ID of the order from which this order document is created. - # Corresponds to the JSON property `orderId` - # @return [String] - attr_accessor :order_id - - # Project ID of this order document. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Whether this order document has been signed. - # Corresponds to the JSON property `signed` - # @return [Boolean] - attr_accessor :signed - alias_method :signed?, :signed - - # Subaccount ID of this order document. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Title of this order document. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Type of this order document - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @amended_order_document_id = args[:amended_order_document_id] unless args[:amended_order_document_id].nil? - @approved_by_user_profile_ids = args[:approved_by_user_profile_ids] unless args[:approved_by_user_profile_ids].nil? - @cancelled = args[:cancelled] unless args[:cancelled].nil? - @created_info = args[:created_info] unless args[:created_info].nil? - @effective_date = args[:effective_date] unless args[:effective_date].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @order_id = args[:order_id] unless args[:order_id].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @signed = args[:signed] unless args[:signed].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Order document List Response - class ListOrderDocumentsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#orderDocumentsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Order document collection - # Corresponds to the JSON property `orderDocuments` - # @return [Array] - attr_accessor :order_documents - - 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? - @order_documents = args[:order_documents] unless args[:order_documents].nil? - end - end - - # Order List Response - class ListOrdersResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#ordersListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Order collection. - # Corresponds to the JSON property `orders` - # @return [Array] - attr_accessor :orders - - 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? - @orders = args[:orders] unless args[:orders].nil? - end - end - - # Represents fields that are compatible to be selected for a report of type " - # PATH_TO_CONVERSION". - class PathToConversionReportCompatibleFields - include Google::Apis::Core::Hashable - - # Conversion dimensions which are compatible to be selected in the " - # conversionDimensions" section of the report. - # Corresponds to the JSON property `conversionDimensions` - # @return [Array] - attr_accessor :conversion_dimensions - - # Custom floodlight variables which are compatible to be selected in the " - # customFloodlightVariables" section of the report. - # Corresponds to the JSON property `customFloodlightVariables` - # @return [Array] - attr_accessor :custom_floodlight_variables - - # The kind of resource this is, in this case dfareporting# - # pathToConversionReportCompatibleFields. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metrics which are compatible to be selected in the "metricNames" section of - # the report. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # Per-interaction dimensions which are compatible to be selected in the " - # perInteractionDimensions" section of the report. - # Corresponds to the JSON property `perInteractionDimensions` - # @return [Array] - attr_accessor :per_interaction_dimensions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @conversion_dimensions = args[:conversion_dimensions] unless args[:conversion_dimensions].nil? - @custom_floodlight_variables = args[:custom_floodlight_variables] unless args[:custom_floodlight_variables].nil? - @kind = args[:kind] unless args[:kind].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @per_interaction_dimensions = args[:per_interaction_dimensions] unless args[:per_interaction_dimensions].nil? - end - end - - # Contains properties of a placement. - class Placement - include Google::Apis::Core::Hashable - - # Account ID of this placement. This field can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this placement. This field can be left blank. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Whether this placement is archived. - # Corresponds to the JSON property `archived` - # @return [Boolean] - attr_accessor :archived - alias_method :archived?, :archived - - # Campaign ID of this placement. This field is a required field on insertion. - # Corresponds to the JSON property `campaignId` - # @return [String] - attr_accessor :campaign_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `campaignIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :campaign_id_dimension_value - - # Comments for this placement. - # Corresponds to the JSON property `comment` - # @return [String] - attr_accessor :comment - - # Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on - # desktop or on mobile devices for regular or interstitial ads, respectively. - # APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO - # refers to rendering in in-stream video ads developed with the VAST standard. - # This field is required on insertion. - # Corresponds to the JSON property `compatibility` - # @return [String] - attr_accessor :compatibility - - # ID of the content category assigned to this placement. - # Corresponds to the JSON property `contentCategoryId` - # @return [String] - attr_accessor :content_category_id - - # Modification timestamp. - # Corresponds to the JSON property `createInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :create_info - - # Directory site ID of this placement. On insert, you must set either this field - # or the siteId field to specify the site associated with this placement. This - # is a required field that is read-only after insertion. - # Corresponds to the JSON property `directorySiteId` - # @return [String] - attr_accessor :directory_site_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `directorySiteIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :directory_site_id_dimension_value - - # External ID for this placement. - # Corresponds to the JSON property `externalId` - # @return [String] - attr_accessor :external_id - - # ID of this placement. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Key name of this placement. This is a read-only, auto-generated field. - # Corresponds to the JSON property `keyName` - # @return [String] - attr_accessor :key_name - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#placement". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Lookback configuration settings. - # Corresponds to the JSON property `lookbackConfiguration` - # @return [Google::Apis::DfareportingV2_1::LookbackConfiguration] - attr_accessor :lookback_configuration - - # Name of this placement.This is a required field and must be less than 256 - # characters long. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Whether payment was approved for this placement. This is a read-only field - # relevant only to publisher-paid placements. - # Corresponds to the JSON property `paymentApproved` - # @return [Boolean] - attr_accessor :payment_approved - alias_method :payment_approved?, :payment_approved - - # Payment source for this placement. This is a required field that is read-only - # after insertion. - # Corresponds to the JSON property `paymentSource` - # @return [String] - attr_accessor :payment_source - - # ID of this placement's group, if applicable. - # Corresponds to the JSON property `placementGroupId` - # @return [String] - attr_accessor :placement_group_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `placementGroupIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :placement_group_id_dimension_value - - # ID of the placement strategy assigned to this placement. - # Corresponds to the JSON property `placementStrategyId` - # @return [String] - attr_accessor :placement_strategy_id - - # Pricing Schedule - # Corresponds to the JSON property `pricingSchedule` - # @return [Google::Apis::DfareportingV2_1::PricingSchedule] - attr_accessor :pricing_schedule - - # Whether this placement is the primary placement of a roadblock (placement - # group). You cannot change this field from true to false. Setting this field to - # true will automatically set the primary field on the original primary - # placement of the roadblock to false, and it will automatically set the - # roadblock's primaryPlacementId field to the ID of this placement. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # Modification timestamp. - # Corresponds to the JSON property `publisherUpdateInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :publisher_update_info - - # Site ID associated with this placement. On insert, you must set either this - # field or the directorySiteId field to specify the site associated with this - # placement. This is a required field that is read-only after insertion. - # Corresponds to the JSON property `siteId` - # @return [String] - attr_accessor :site_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `siteIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :site_id_dimension_value - - # Represents the dimensions of ads, placements, creatives, or creative assets. - # Corresponds to the JSON property `size` - # @return [Google::Apis::DfareportingV2_1::Size] - attr_accessor :size - - # Whether creatives assigned to this placement must be SSL-compliant. - # Corresponds to the JSON property `sslRequired` - # @return [Boolean] - attr_accessor :ssl_required - alias_method :ssl_required?, :ssl_required - - # Third-party placement status. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Subaccount ID of this placement. This field can be left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Tag formats to generate for this placement. This field is required on - # insertion. - # Acceptable values are: - # - "PLACEMENT_TAG_STANDARD" - # - "PLACEMENT_TAG_IFRAME_JAVASCRIPT" - # - "PLACEMENT_TAG_IFRAME_ILAYER" - # - "PLACEMENT_TAG_INTERNAL_REDIRECT" - # - "PLACEMENT_TAG_JAVASCRIPT" - # - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT" - # - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT" - # - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" - # - "PLACEMENT_TAG_CLICK_COMMANDS" - # - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" - # - "PLACEMENT_TAG_TRACKING" - # - "PLACEMENT_TAG_TRACKING_IFRAME" - # - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" - # Corresponds to the JSON property `tagFormats` - # @return [Array] - attr_accessor :tag_formats - - # Tag Settings - # Corresponds to the JSON property `tagSetting` - # @return [Google::Apis::DfareportingV2_1::TagSetting] - attr_accessor :tag_setting - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @archived = args[:archived] unless args[:archived].nil? - @campaign_id = args[:campaign_id] unless args[:campaign_id].nil? - @campaign_id_dimension_value = args[:campaign_id_dimension_value] unless args[:campaign_id_dimension_value].nil? - @comment = args[:comment] unless args[:comment].nil? - @compatibility = args[:compatibility] unless args[:compatibility].nil? - @content_category_id = args[:content_category_id] unless args[:content_category_id].nil? - @create_info = args[:create_info] unless args[:create_info].nil? - @directory_site_id = args[:directory_site_id] unless args[:directory_site_id].nil? - @directory_site_id_dimension_value = args[:directory_site_id_dimension_value] unless args[:directory_site_id_dimension_value].nil? - @external_id = args[:external_id] unless args[:external_id].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @key_name = args[:key_name] unless args[:key_name].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @lookback_configuration = args[:lookback_configuration] unless args[:lookback_configuration].nil? - @name = args[:name] unless args[:name].nil? - @payment_approved = args[:payment_approved] unless args[:payment_approved].nil? - @payment_source = args[:payment_source] unless args[:payment_source].nil? - @placement_group_id = args[:placement_group_id] unless args[:placement_group_id].nil? - @placement_group_id_dimension_value = args[:placement_group_id_dimension_value] unless args[:placement_group_id_dimension_value].nil? - @placement_strategy_id = args[:placement_strategy_id] unless args[:placement_strategy_id].nil? - @pricing_schedule = args[:pricing_schedule] unless args[:pricing_schedule].nil? - @primary = args[:primary] unless args[:primary].nil? - @publisher_update_info = args[:publisher_update_info] unless args[:publisher_update_info].nil? - @site_id = args[:site_id] unless args[:site_id].nil? - @site_id_dimension_value = args[:site_id_dimension_value] unless args[:site_id_dimension_value].nil? - @size = args[:size] unless args[:size].nil? - @ssl_required = args[:ssl_required] unless args[:ssl_required].nil? - @status = args[:status] unless args[:status].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @tag_formats = args[:tag_formats] unless args[:tag_formats].nil? - @tag_setting = args[:tag_setting] unless args[:tag_setting].nil? - end - end - - # Placement Assignment. - class PlacementAssignment - include Google::Apis::Core::Hashable - - # Whether this placement assignment is active. When true, the placement will be - # included in the ad's rotation. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # ID of the placement to be assigned. This is a required field. - # Corresponds to the JSON property `placementId` - # @return [String] - attr_accessor :placement_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `placementIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :placement_id_dimension_value - - # Whether the placement to be assigned requires SSL. This is a read-only field - # that is auto-generated when the ad is inserted or updated. - # Corresponds to the JSON property `sslRequired` - # @return [Boolean] - attr_accessor :ssl_required - alias_method :ssl_required?, :ssl_required - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active = args[:active] unless args[:active].nil? - @placement_id = args[:placement_id] unless args[:placement_id].nil? - @placement_id_dimension_value = args[:placement_id_dimension_value] unless args[:placement_id_dimension_value].nil? - @ssl_required = args[:ssl_required] unless args[:ssl_required].nil? - end - end - - # Contains properties of a package or roadblock. - class PlacementGroup - include Google::Apis::Core::Hashable - - # Account ID of this placement group. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this placement group. This is a required field on insertion. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Whether this placement group is archived. - # Corresponds to the JSON property `archived` - # @return [Boolean] - attr_accessor :archived - alias_method :archived?, :archived - - # Campaign ID of this placement group. This field is required on insertion. - # Corresponds to the JSON property `campaignId` - # @return [String] - attr_accessor :campaign_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `campaignIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :campaign_id_dimension_value - - # IDs of placements which are assigned to this placement group. This is a read- - # only, auto-generated field. - # Corresponds to the JSON property `childPlacementIds` - # @return [Array] - attr_accessor :child_placement_ids - - # Comments for this placement group. - # Corresponds to the JSON property `comment` - # @return [String] - attr_accessor :comment - - # ID of the content category assigned to this placement group. - # Corresponds to the JSON property `contentCategoryId` - # @return [String] - attr_accessor :content_category_id - - # Modification timestamp. - # Corresponds to the JSON property `createInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :create_info - - # Directory site ID associated with this placement group. On insert, you must - # set either this field or the site_id field to specify the site associated with - # this placement group. This is a required field that is read-only after - # insertion. - # Corresponds to the JSON property `directorySiteId` - # @return [String] - attr_accessor :directory_site_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `directorySiteIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :directory_site_id_dimension_value - - # External ID for this placement. - # Corresponds to the JSON property `externalId` - # @return [String] - attr_accessor :external_id - - # ID of this placement group. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#placementGroup". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Name of this placement group. This is a required field and must be less than - # 256 characters long. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Type of this placement group. A package is a simple group of placements that - # acts as a single pricing point for a group of tags. A roadblock is a group of - # placements that not only acts as a single pricing point, but also assumes that - # all the tags in it will be served at the same time. A roadblock requires one - # of its assigned placements to be marked as primary for reporting. This field - # is required on insertion. - # Corresponds to the JSON property `placementGroupType` - # @return [String] - attr_accessor :placement_group_type - - # ID of the placement strategy assigned to this placement group. - # Corresponds to the JSON property `placementStrategyId` - # @return [String] - attr_accessor :placement_strategy_id - - # Pricing Schedule - # Corresponds to the JSON property `pricingSchedule` - # @return [Google::Apis::DfareportingV2_1::PricingSchedule] - attr_accessor :pricing_schedule - - # ID of the primary placement, used to calculate the media cost of a roadblock ( - # placement group). Modifying this field will automatically modify the primary - # field on all affected roadblock child placements. - # Corresponds to the JSON property `primaryPlacementId` - # @return [String] - attr_accessor :primary_placement_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `primaryPlacementIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :primary_placement_id_dimension_value - - # Programmatic Setting - # Corresponds to the JSON property `programmaticSetting` - # @return [Google::Apis::DfareportingV2_1::ProgrammaticSetting] - attr_accessor :programmatic_setting - - # Site ID associated with this placement group. On insert, you must set either - # this field or the directorySiteId field to specify the site associated with - # this placement group. This is a required field that is read-only after - # insertion. - # Corresponds to the JSON property `siteId` - # @return [String] - attr_accessor :site_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `siteIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :site_id_dimension_value - - # Subaccount ID of this placement group. This is a read-only field that can be - # left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @archived = args[:archived] unless args[:archived].nil? - @campaign_id = args[:campaign_id] unless args[:campaign_id].nil? - @campaign_id_dimension_value = args[:campaign_id_dimension_value] unless args[:campaign_id_dimension_value].nil? - @child_placement_ids = args[:child_placement_ids] unless args[:child_placement_ids].nil? - @comment = args[:comment] unless args[:comment].nil? - @content_category_id = args[:content_category_id] unless args[:content_category_id].nil? - @create_info = args[:create_info] unless args[:create_info].nil? - @directory_site_id = args[:directory_site_id] unless args[:directory_site_id].nil? - @directory_site_id_dimension_value = args[:directory_site_id_dimension_value] unless args[:directory_site_id_dimension_value].nil? - @external_id = args[:external_id] unless args[:external_id].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @name = args[:name] unless args[:name].nil? - @placement_group_type = args[:placement_group_type] unless args[:placement_group_type].nil? - @placement_strategy_id = args[:placement_strategy_id] unless args[:placement_strategy_id].nil? - @pricing_schedule = args[:pricing_schedule] unless args[:pricing_schedule].nil? - @primary_placement_id = args[:primary_placement_id] unless args[:primary_placement_id].nil? - @primary_placement_id_dimension_value = args[:primary_placement_id_dimension_value] unless args[:primary_placement_id_dimension_value].nil? - @programmatic_setting = args[:programmatic_setting] unless args[:programmatic_setting].nil? - @site_id = args[:site_id] unless args[:site_id].nil? - @site_id_dimension_value = args[:site_id_dimension_value] unless args[:site_id_dimension_value].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Placement Group List Response - class ListPlacementGroupsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#placementGroupsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Placement group collection. - # Corresponds to the JSON property `placementGroups` - # @return [Array] - attr_accessor :placement_groups - - 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? - @placement_groups = args[:placement_groups] unless args[:placement_groups].nil? - end - end - - # Placement Strategy List Response - class ListPlacementStrategiesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#placementStrategiesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Placement strategy collection. - # Corresponds to the JSON property `placementStrategies` - # @return [Array] - attr_accessor :placement_strategies - - 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? - @placement_strategies = args[:placement_strategies] unless args[:placement_strategies].nil? - end - end - - # Contains properties of a placement strategy. - class PlacementStrategy - include Google::Apis::Core::Hashable - - # Account ID of this placement strategy.This is a read-only field that can be - # left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # ID of this placement strategy. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#placementStrategy". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this placement strategy. This is a required field. It must be less - # than 256 characters long and unique among placement strategies of the same - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Placement Tag - class PlacementTag - include Google::Apis::Core::Hashable - - # Placement ID - # Corresponds to the JSON property `placementId` - # @return [String] - attr_accessor :placement_id - - # Tags generated for this placement. - # Corresponds to the JSON property `tagDatas` - # @return [Array] - attr_accessor :tag_datas - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @placement_id = args[:placement_id] unless args[:placement_id].nil? - @tag_datas = args[:tag_datas] unless args[:tag_datas].nil? - end - end - - # Placement GenerateTags Response - class GeneratePlacementsTagsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#placementsGenerateTagsResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Set of generated tags for the specified placements. - # Corresponds to the JSON property `placementTags` - # @return [Array] - attr_accessor :placement_tags - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @placement_tags = args[:placement_tags] unless args[:placement_tags].nil? - end - end - - # Placement List Response - class ListPlacementsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#placementsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Placement collection. - # Corresponds to the JSON property `placements` - # @return [Array] - attr_accessor :placements - - 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? - @placements = args[:placements] unless args[:placements].nil? - end - end - - # Contains information about a platform type that can be targeted by ads. - class PlatformType - include Google::Apis::Core::Hashable - - # ID of this platform type. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#platformType". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this platform type. - # 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 - - # Platform Type List Response - class ListPlatformTypesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#platformTypesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Platform type collection. - # Corresponds to the JSON property `platformTypes` - # @return [Array] - attr_accessor :platform_types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @platform_types = args[:platform_types] unless args[:platform_types].nil? - end - end - - # Popup Window Properties. - class PopupWindowProperties - include Google::Apis::Core::Hashable - - # Represents the dimensions of ads, placements, creatives, or creative assets. - # Corresponds to the JSON property `dimension` - # @return [Google::Apis::DfareportingV2_1::Size] - attr_accessor :dimension - - # Offset Position. - # Corresponds to the JSON property `offset` - # @return [Google::Apis::DfareportingV2_1::OffsetPosition] - attr_accessor :offset - - # Popup window position either centered or at specific coordinate. - # Corresponds to the JSON property `positionType` - # @return [String] - attr_accessor :position_type - - # Whether to display the browser address bar. - # Corresponds to the JSON property `showAddressBar` - # @return [Boolean] - attr_accessor :show_address_bar - alias_method :show_address_bar?, :show_address_bar - - # Whether to display the browser menu bar. - # Corresponds to the JSON property `showMenuBar` - # @return [Boolean] - attr_accessor :show_menu_bar - alias_method :show_menu_bar?, :show_menu_bar - - # Whether to display the browser scroll bar. - # Corresponds to the JSON property `showScrollBar` - # @return [Boolean] - attr_accessor :show_scroll_bar - alias_method :show_scroll_bar?, :show_scroll_bar - - # Whether to display the browser status bar. - # Corresponds to the JSON property `showStatusBar` - # @return [Boolean] - attr_accessor :show_status_bar - alias_method :show_status_bar?, :show_status_bar - - # Whether to display the browser tool bar. - # Corresponds to the JSON property `showToolBar` - # @return [Boolean] - attr_accessor :show_tool_bar - alias_method :show_tool_bar?, :show_tool_bar - - # Title of popup window. - # 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) - @dimension = args[:dimension] unless args[:dimension].nil? - @offset = args[:offset] unless args[:offset].nil? - @position_type = args[:position_type] unless args[:position_type].nil? - @show_address_bar = args[:show_address_bar] unless args[:show_address_bar].nil? - @show_menu_bar = args[:show_menu_bar] unless args[:show_menu_bar].nil? - @show_scroll_bar = args[:show_scroll_bar] unless args[:show_scroll_bar].nil? - @show_status_bar = args[:show_status_bar] unless args[:show_status_bar].nil? - @show_tool_bar = args[:show_tool_bar] unless args[:show_tool_bar].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # Contains information about a postal code that can be targeted by ads. - class PostalCode - include Google::Apis::Core::Hashable - - # Postal code. This is equivalent to the id field. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # Country code of the country to which this postal code belongs. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # DART ID of the country to which this postal code belongs. - # Corresponds to the JSON property `countryDartId` - # @return [String] - attr_accessor :country_dart_id - - # ID of this postal code. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#postalCode". - # 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) - @code = args[:code] unless args[:code].nil? - @country_code = args[:country_code] unless args[:country_code].nil? - @country_dart_id = args[:country_dart_id] unless args[:country_dart_id].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Postal Code List Response - class ListPostalCodesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#postalCodesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Postal code collection. - # Corresponds to the JSON property `postalCodes` - # @return [Array] - attr_accessor :postal_codes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @postal_codes = args[:postal_codes] unless args[:postal_codes].nil? - end - end - - # Pricing Information - class Pricing - include Google::Apis::Core::Hashable - - # Cap cost type of this inventory item. - # Corresponds to the JSON property `capCostType` - # @return [String] - attr_accessor :cap_cost_type - - # End date of this inventory item. - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # Flights of this inventory item. A flight (a.k.a. pricing period) represents - # the inventory item pricing information for a specific period of time. - # Corresponds to the JSON property `flights` - # @return [Array] - attr_accessor :flights - - # Group type of this inventory item if it represents a placement group. Is null - # otherwise. There are two type of placement groups: - # PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of inventory items - # that acts as a single pricing point for a group of tags. - # PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory items that not - # only acts as a single pricing point, but also assumes that all the tags in it - # will be served at the same time. A roadblock requires one of its assigned - # inventory items to be marked as primary. - # Corresponds to the JSON property `groupType` - # @return [String] - attr_accessor :group_type - - # Pricing type of this inventory item. - # Corresponds to the JSON property `pricingType` - # @return [String] - attr_accessor :pricing_type - - # Start date of this inventory item. - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cap_cost_type = args[:cap_cost_type] unless args[:cap_cost_type].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @flights = args[:flights] unless args[:flights].nil? - @group_type = args[:group_type] unless args[:group_type].nil? - @pricing_type = args[:pricing_type] unless args[:pricing_type].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - end - end - - # Pricing Schedule - class PricingSchedule - include Google::Apis::Core::Hashable - - # Placement cap cost option. - # Corresponds to the JSON property `capCostOption` - # @return [String] - attr_accessor :cap_cost_option - - # Whether cap costs are ignored by ad serving. - # Corresponds to the JSON property `disregardOverdelivery` - # @return [Boolean] - attr_accessor :disregard_overdelivery - alias_method :disregard_overdelivery?, :disregard_overdelivery - - # Placement end date. This date must be later than, or the same day as, the - # placement start date, but not later than the campaign end date. If, for - # example, you set 6/25/2015 as both the start and end dates, the effective - # placement date is just that day only, 6/25/2015. The hours, minutes, and - # seconds of the end date should not be set, as doing so will result in an error. - # This field is required on insertion. - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # Whether this placement is flighted. If true, pricing periods will be computed - # automatically. - # Corresponds to the JSON property `flighted` - # @return [Boolean] - attr_accessor :flighted - alias_method :flighted?, :flighted - - # Floodlight activity ID associated with this placement. This field should be - # set when placement pricing type is set to PRICING_TYPE_CPA. - # Corresponds to the JSON property `floodlightActivityId` - # @return [String] - attr_accessor :floodlight_activity_id - - # Pricing periods for this placement. - # Corresponds to the JSON property `pricingPeriods` - # @return [Array] - attr_accessor :pricing_periods - - # Placement pricing type. This field is required on insertion. - # Corresponds to the JSON property `pricingType` - # @return [String] - attr_accessor :pricing_type - - # Placement start date. This date must be later than, or the same day as, the - # campaign start date. The hours, minutes, and seconds of the start date should - # not be set, as doing so will result in an error. This field is required on - # insertion. - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - # Testing start date of this placement. The hours, minutes, and seconds of the - # start date should not be set, as doing so will result in an error. - # Corresponds to the JSON property `testingStartDate` - # @return [Date] - attr_accessor :testing_start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cap_cost_option = args[:cap_cost_option] unless args[:cap_cost_option].nil? - @disregard_overdelivery = args[:disregard_overdelivery] unless args[:disregard_overdelivery].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @flighted = args[:flighted] unless args[:flighted].nil? - @floodlight_activity_id = args[:floodlight_activity_id] unless args[:floodlight_activity_id].nil? - @pricing_periods = args[:pricing_periods] unless args[:pricing_periods].nil? - @pricing_type = args[:pricing_type] unless args[:pricing_type].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @testing_start_date = args[:testing_start_date] unless args[:testing_start_date].nil? - end - end - - # Pricing Period - class PricingSchedulePricingPeriod - include Google::Apis::Core::Hashable - - # Pricing period end date. This date must be later than, or the same day as, the - # pricing period start date, but not later than the placement end date. The - # period end date can be the same date as the period start date. If, for example, - # you set 6/25/2015 as both the start and end dates, the effective pricing - # period date is just that day only, 6/25/2015. The hours, minutes, and seconds - # of the end date should not be set, as doing so will result in an error. - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # Comments for this pricing period. - # Corresponds to the JSON property `pricingComment` - # @return [String] - attr_accessor :pricing_comment - - # Rate or cost of this pricing period. - # Corresponds to the JSON property `rateOrCostNanos` - # @return [String] - attr_accessor :rate_or_cost_nanos - - # Pricing period start date. This date must be later than, or the same day as, - # the placement start date. The hours, minutes, and seconds of the start date - # should not be set, as doing so will result in an error. - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - # Units of this pricing period. - # Corresponds to the JSON property `units` - # @return [String] - attr_accessor :units - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_date = args[:end_date] unless args[:end_date].nil? - @pricing_comment = args[:pricing_comment] unless args[:pricing_comment].nil? - @rate_or_cost_nanos = args[:rate_or_cost_nanos] unless args[:rate_or_cost_nanos].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @units = args[:units] unless args[:units].nil? - end - end - - # Programmatic Setting - class ProgrammaticSetting - include Google::Apis::Core::Hashable - - # Adx deal IDs assigned to the placement. - # Corresponds to the JSON property `adxDealIds` - # @return [Array] - attr_accessor :adx_deal_ids - - # Insertion order ID. - # Corresponds to the JSON property `insertionOrderId` - # @return [String] - attr_accessor :insertion_order_id - - # Whether insertion order ID has been placed in DFP. This is a read-only field. - # Corresponds to the JSON property `insertionOrderIdStatus` - # @return [Boolean] - attr_accessor :insertion_order_id_status - alias_method :insertion_order_id_status?, :insertion_order_id_status - - # Media cost for the programmatic placement. - # Corresponds to the JSON property `mediaCostNanos` - # @return [String] - attr_accessor :media_cost_nanos - - # Whether programmatic is enabled. - # Corresponds to the JSON property `programmatic` - # @return [Boolean] - attr_accessor :programmatic - alias_method :programmatic?, :programmatic - - # Trafficker emails assigned to the placement. - # Corresponds to the JSON property `traffickerEmails` - # @return [Array] - attr_accessor :trafficker_emails - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @adx_deal_ids = args[:adx_deal_ids] unless args[:adx_deal_ids].nil? - @insertion_order_id = args[:insertion_order_id] unless args[:insertion_order_id].nil? - @insertion_order_id_status = args[:insertion_order_id_status] unless args[:insertion_order_id_status].nil? - @media_cost_nanos = args[:media_cost_nanos] unless args[:media_cost_nanos].nil? - @programmatic = args[:programmatic] unless args[:programmatic].nil? - @trafficker_emails = args[:trafficker_emails] unless args[:trafficker_emails].nil? - end - end - - # Contains properties of a DoubleClick Planning project. - class Project - include Google::Apis::Core::Hashable - - # Account ID of this project. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Advertiser ID of this project. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Audience age group of this project. - # Corresponds to the JSON property `audienceAgeGroup` - # @return [String] - attr_accessor :audience_age_group - - # Audience gender of this project. - # Corresponds to the JSON property `audienceGender` - # @return [String] - attr_accessor :audience_gender - - # Budget of this project in the currency specified by the current account. The - # value stored in this field represents only the non-fractional amount. For - # example, for USD, the smallest value that can be represented by this field is - # 1 US dollar. - # Corresponds to the JSON property `budget` - # @return [String] - attr_accessor :budget - - # Client billing code of this project. - # Corresponds to the JSON property `clientBillingCode` - # @return [String] - attr_accessor :client_billing_code - - # Name of the project client. - # Corresponds to the JSON property `clientName` - # @return [String] - attr_accessor :client_name - - # End date of the project. - # Corresponds to the JSON property `endDate` - # @return [Date] - attr_accessor :end_date - - # ID of this project. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#project". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Modification timestamp. - # Corresponds to the JSON property `lastModifiedInfo` - # @return [Google::Apis::DfareportingV2_1::LastModifiedInfo] - attr_accessor :last_modified_info - - # Name of this project. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Overview of this project. - # Corresponds to the JSON property `overview` - # @return [String] - attr_accessor :overview - - # Start date of the project. - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - # Subaccount ID of this project. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - # Number of clicks that the advertiser is targeting. - # Corresponds to the JSON property `targetClicks` - # @return [String] - attr_accessor :target_clicks - - # Number of conversions that the advertiser is targeting. - # Corresponds to the JSON property `targetConversions` - # @return [String] - attr_accessor :target_conversions - - # CPA that the advertiser is targeting. - # Corresponds to the JSON property `targetCpaNanos` - # @return [String] - attr_accessor :target_cpa_nanos - - # CPC that the advertiser is targeting. - # Corresponds to the JSON property `targetCpcNanos` - # @return [String] - attr_accessor :target_cpc_nanos - - # CPM that the advertiser is targeting. - # Corresponds to the JSON property `targetCpmNanos` - # @return [String] - attr_accessor :target_cpm_nanos - - # Number of impressions that the advertiser is targeting. - # Corresponds to the JSON property `targetImpressions` - # @return [String] - attr_accessor :target_impressions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @audience_age_group = args[:audience_age_group] unless args[:audience_age_group].nil? - @audience_gender = args[:audience_gender] unless args[:audience_gender].nil? - @budget = args[:budget] unless args[:budget].nil? - @client_billing_code = args[:client_billing_code] unless args[:client_billing_code].nil? - @client_name = args[:client_name] unless args[:client_name].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_info = args[:last_modified_info] unless args[:last_modified_info].nil? - @name = args[:name] unless args[:name].nil? - @overview = args[:overview] unless args[:overview].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - @target_clicks = args[:target_clicks] unless args[:target_clicks].nil? - @target_conversions = args[:target_conversions] unless args[:target_conversions].nil? - @target_cpa_nanos = args[:target_cpa_nanos] unless args[:target_cpa_nanos].nil? - @target_cpc_nanos = args[:target_cpc_nanos] unless args[:target_cpc_nanos].nil? - @target_cpm_nanos = args[:target_cpm_nanos] unless args[:target_cpm_nanos].nil? - @target_impressions = args[:target_impressions] unless args[:target_impressions].nil? - end - end - - # Project List Response - class ListProjectsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#projectsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Project collection. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects - - 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? - @projects = args[:projects] unless args[:projects].nil? - end - end - - # Represents fields that are compatible to be selected for a report of type " - # REACH". - class ReachReportCompatibleFields - include Google::Apis::Core::Hashable - - # Dimensions which are compatible to be selected in the "dimensionFilters" - # section of the report. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # Dimensions which are compatible to be selected in the "dimensions" section of - # the report. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # The kind of resource this is, in this case dfareporting# - # reachReportCompatibleFields. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metrics which are compatible to be selected in the "metricNames" section of - # the report. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # Metrics which are compatible to be selected as activity metrics to pivot on in - # the "activities" section of the report. - # Corresponds to the JSON property `pivotedActivityMetrics` - # @return [Array] - attr_accessor :pivoted_activity_metrics - - # Metrics which are compatible to be selected in the " - # reachByFrequencyMetricNames" section of the report. - # Corresponds to the JSON property `reachByFrequencyMetrics` - # @return [Array] - attr_accessor :reach_by_frequency_metrics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @kind = args[:kind] unless args[:kind].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @pivoted_activity_metrics = args[:pivoted_activity_metrics] unless args[:pivoted_activity_metrics].nil? - @reach_by_frequency_metrics = args[:reach_by_frequency_metrics] unless args[:reach_by_frequency_metrics].nil? - end - end - - # Represents a recipient. - class Recipient - include Google::Apis::Core::Hashable - - # The delivery type for the recipient. - # Corresponds to the JSON property `deliveryType` - # @return [String] - attr_accessor :delivery_type - - # The email address of the recipient. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The kind of resource this is, in this case dfareporting#recipient. - # 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) - @delivery_type = args[:delivery_type] unless args[:delivery_type].nil? - @email = args[:email] unless args[:email].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Contains information about a region that can be targeted by ads. - class Region - include Google::Apis::Core::Hashable - - # Country code of the country to which this region belongs. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # DART ID of the country to which this region belongs. - # Corresponds to the JSON property `countryDartId` - # @return [String] - attr_accessor :country_dart_id - - # DART ID of this region. - # Corresponds to the JSON property `dartId` - # @return [String] - attr_accessor :dart_id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#region". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this region. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Region code. - # Corresponds to the JSON property `regionCode` - # @return [String] - attr_accessor :region_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country_code = args[:country_code] unless args[:country_code].nil? - @country_dart_id = args[:country_dart_id] unless args[:country_dart_id].nil? - @dart_id = args[:dart_id] unless args[:dart_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @region_code = args[:region_code] unless args[:region_code].nil? - end - end - - # Region List Response - class ListRegionsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#regionsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Region collection. - # Corresponds to the JSON property `regions` - # @return [Array] - attr_accessor :regions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @regions = args[:regions] unless args[:regions].nil? - end - end - - # Contains properties of a remarketing list. Remarketing enables you to create - # lists of users who have performed specific actions on a site, then target ads - # to members of those lists. This resource can be used to manage remarketing - # lists that are owned by your advertisers. To see all remarketing lists that - # are visible to your advertisers, including those that are shared to your - # advertiser or account, use the TargetableRemarketingList resource. - class RemarketingList - include Google::Apis::Core::Hashable - - # Account ID of this remarketing list. This is a read-only, auto-generated field - # that is only returned in GET requests. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Whether this remarketing list is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Dimension value for the advertiser ID that owns this remarketing list. This is - # a required field. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Remarketing list description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Remarketing list ID. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#remarketingList". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Number of days that a user should remain in the remarketing list without an - # impression. - # Corresponds to the JSON property `lifeSpan` - # @return [String] - attr_accessor :life_span - - # Remarketing List Population Rule. - # Corresponds to the JSON property `listPopulationRule` - # @return [Google::Apis::DfareportingV2_1::ListPopulationRule] - attr_accessor :list_population_rule - - # Number of users currently in the list. This is a read-only field. - # Corresponds to the JSON property `listSize` - # @return [String] - attr_accessor :list_size - - # Product from which this remarketing list was originated. - # Corresponds to the JSON property `listSource` - # @return [String] - attr_accessor :list_source - - # Name of the remarketing list. This is a required field. Must be no greater - # than 128 characters long. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Subaccount ID of this remarketing list. This is a read-only, auto-generated - # field that is only returned in GET requests. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @life_span = args[:life_span] unless args[:life_span].nil? - @list_population_rule = args[:list_population_rule] unless args[:list_population_rule].nil? - @list_size = args[:list_size] unless args[:list_size].nil? - @list_source = args[:list_source] unless args[:list_source].nil? - @name = args[:name] unless args[:name].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Contains properties of a remarketing list's sharing information. Sharing - # allows other accounts or advertisers to target to your remarketing lists. This - # resource can be used to manage remarketing list sharing to other accounts and - # advertisers. - class RemarketingListShare - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#remarketingListShare". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Remarketing list ID. This is a read-only, auto-generated field. - # Corresponds to the JSON property `remarketingListId` - # @return [String] - attr_accessor :remarketing_list_id - - # Accounts that the remarketing list is shared with. - # Corresponds to the JSON property `sharedAccountIds` - # @return [Array] - attr_accessor :shared_account_ids - - # Advertisers that the remarketing list is shared with. - # Corresponds to the JSON property `sharedAdvertiserIds` - # @return [Array] - attr_accessor :shared_advertiser_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @remarketing_list_id = args[:remarketing_list_id] unless args[:remarketing_list_id].nil? - @shared_account_ids = args[:shared_account_ids] unless args[:shared_account_ids].nil? - @shared_advertiser_ids = args[:shared_advertiser_ids] unless args[:shared_advertiser_ids].nil? - end - end - - # Remarketing list response - class ListRemarketingListsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#remarketingListsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Remarketing list collection. - # Corresponds to the JSON property `remarketingLists` - # @return [Array] - attr_accessor :remarketing_lists - - 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? - @remarketing_lists = args[:remarketing_lists] unless args[:remarketing_lists].nil? - end - end - - # Represents a Report resource. - class Report - include Google::Apis::Core::Hashable - - # The account ID to which this report belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The report criteria for a report of type "STANDARD". - # Corresponds to the JSON property `criteria` - # @return [Google::Apis::DfareportingV2_1::Report::Criteria] - attr_accessor :criteria - - # The report criteria for a report of type "CROSS_DIMENSION_REACH". - # Corresponds to the JSON property `crossDimensionReachCriteria` - # @return [Google::Apis::DfareportingV2_1::Report::CrossDimensionReachCriteria] - attr_accessor :cross_dimension_reach_criteria - - # The report's email delivery settings. - # Corresponds to the JSON property `delivery` - # @return [Google::Apis::DfareportingV2_1::Report::Delivery] - attr_accessor :delivery - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The filename used when generating report files for this report. - # Corresponds to the JSON property `fileName` - # @return [String] - attr_accessor :file_name - - # The report criteria for a report of type "FLOODLIGHT". - # Corresponds to the JSON property `floodlightCriteria` - # @return [Google::Apis::DfareportingV2_1::Report::FloodlightCriteria] - attr_accessor :floodlight_criteria - - # The output format of the report. If not specified, default format is "CSV". - # Note that the actual format in the completed report file might differ if for - # instance the report's size exceeds the format's capabilities. "CSV" will then - # be the fallback format. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # The unique ID identifying this report resource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of resource this is, in this case dfareporting#report. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp (in milliseconds since epoch) of when this report was last - # modified. - # Corresponds to the JSON property `lastModifiedTime` - # @return [String] - attr_accessor :last_modified_time - - # The name of the report. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The user profile id of the owner of this report. - # Corresponds to the JSON property `ownerProfileId` - # @return [String] - attr_accessor :owner_profile_id - - # The report criteria for a report of type "PATH_TO_CONVERSION". - # Corresponds to the JSON property `pathToConversionCriteria` - # @return [Google::Apis::DfareportingV2_1::Report::PathToConversionCriteria] - attr_accessor :path_to_conversion_criteria - - # The report criteria for a report of type "REACH". - # Corresponds to the JSON property `reachCriteria` - # @return [Google::Apis::DfareportingV2_1::Report::ReachCriteria] - attr_accessor :reach_criteria - - # The report's schedule. Can only be set if the report's 'dateRange' is a - # relative date range and the relative date range is not "TODAY". - # Corresponds to the JSON property `schedule` - # @return [Google::Apis::DfareportingV2_1::Report::Schedule] - attr_accessor :schedule - - # The subaccount ID to which this report belongs if applicable. - # Corresponds to the JSON property `subAccountId` - # @return [String] - attr_accessor :sub_account_id - - # The type of the report. - # 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @criteria = args[:criteria] unless args[:criteria].nil? - @cross_dimension_reach_criteria = args[:cross_dimension_reach_criteria] unless args[:cross_dimension_reach_criteria].nil? - @delivery = args[:delivery] unless args[:delivery].nil? - @etag = args[:etag] unless args[:etag].nil? - @file_name = args[:file_name] unless args[:file_name].nil? - @floodlight_criteria = args[:floodlight_criteria] unless args[:floodlight_criteria].nil? - @format = args[:format] unless args[:format].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @name = args[:name] unless args[:name].nil? - @owner_profile_id = args[:owner_profile_id] unless args[:owner_profile_id].nil? - @path_to_conversion_criteria = args[:path_to_conversion_criteria] unless args[:path_to_conversion_criteria].nil? - @reach_criteria = args[:reach_criteria] unless args[:reach_criteria].nil? - @schedule = args[:schedule] unless args[:schedule].nil? - @sub_account_id = args[:sub_account_id] unless args[:sub_account_id].nil? - @type = args[:type] unless args[:type].nil? - end - - # The report criteria for a report of type "STANDARD". - class Criteria - include Google::Apis::Core::Hashable - - # Represents an activity group. - # Corresponds to the JSON property `activities` - # @return [Google::Apis::DfareportingV2_1::Activities] - attr_accessor :activities - - # Represents a Custom Rich Media Events group. - # Corresponds to the JSON property `customRichMediaEvents` - # @return [Google::Apis::DfareportingV2_1::CustomRichMediaEvents] - attr_accessor :custom_rich_media_events - - # Represents a date range. - # Corresponds to the JSON property `dateRange` - # @return [Google::Apis::DfareportingV2_1::DateRange] - attr_accessor :date_range - - # The list of filters on which dimensions are filtered. - # Filters for different dimensions are ANDed, filters for the same dimension are - # grouped together and ORed. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # The list of standard dimensions the report should include. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # The list of names of metrics the report should include. - # Corresponds to the JSON property `metricNames` - # @return [Array] - attr_accessor :metric_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @activities = args[:activities] unless args[:activities].nil? - @custom_rich_media_events = args[:custom_rich_media_events] unless args[:custom_rich_media_events].nil? - @date_range = args[:date_range] unless args[:date_range].nil? - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @metric_names = args[:metric_names] unless args[:metric_names].nil? - end - end - - # The report criteria for a report of type "CROSS_DIMENSION_REACH". - class CrossDimensionReachCriteria - include Google::Apis::Core::Hashable - - # The list of dimensions the report should include. - # Corresponds to the JSON property `breakdown` - # @return [Array] - attr_accessor :breakdown - - # Represents a date range. - # Corresponds to the JSON property `dateRange` - # @return [Google::Apis::DfareportingV2_1::DateRange] - attr_accessor :date_range - - # The dimension option. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - # The list of filters on which dimensions are filtered. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # The list of names of metrics the report should include. - # Corresponds to the JSON property `metricNames` - # @return [Array] - attr_accessor :metric_names - - # The list of names of overlap metrics the report should include. - # Corresponds to the JSON property `overlapMetricNames` - # @return [Array] - attr_accessor :overlap_metric_names - - # Whether the report is pivoted or not. Defaults to true. - # Corresponds to the JSON property `pivoted` - # @return [Boolean] - attr_accessor :pivoted - alias_method :pivoted?, :pivoted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @breakdown = args[:breakdown] unless args[:breakdown].nil? - @date_range = args[:date_range] unless args[:date_range].nil? - @dimension = args[:dimension] unless args[:dimension].nil? - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @metric_names = args[:metric_names] unless args[:metric_names].nil? - @overlap_metric_names = args[:overlap_metric_names] unless args[:overlap_metric_names].nil? - @pivoted = args[:pivoted] unless args[:pivoted].nil? - end - end - - # The report's email delivery settings. - class Delivery - include Google::Apis::Core::Hashable - - # Whether the report should be emailed to the report owner. - # Corresponds to the JSON property `emailOwner` - # @return [Boolean] - attr_accessor :email_owner - alias_method :email_owner?, :email_owner - - # The type of delivery for the owner to receive, if enabled. - # Corresponds to the JSON property `emailOwnerDeliveryType` - # @return [String] - attr_accessor :email_owner_delivery_type - - # The message to be sent with each email. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # The list of recipients to which to email the report. - # Corresponds to the JSON property `recipients` - # @return [Array] - attr_accessor :recipients - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @email_owner = args[:email_owner] unless args[:email_owner].nil? - @email_owner_delivery_type = args[:email_owner_delivery_type] unless args[:email_owner_delivery_type].nil? - @message = args[:message] unless args[:message].nil? - @recipients = args[:recipients] unless args[:recipients].nil? - end - end - - # The report criteria for a report of type "FLOODLIGHT". - class FloodlightCriteria - include Google::Apis::Core::Hashable - - # The list of custom rich media events to include. - # Corresponds to the JSON property `customRichMediaEvents` - # @return [Array] - attr_accessor :custom_rich_media_events - - # Represents a date range. - # Corresponds to the JSON property `dateRange` - # @return [Google::Apis::DfareportingV2_1::DateRange] - attr_accessor :date_range - - # The list of filters on which dimensions are filtered. - # Filters for different dimensions are ANDed, filters for the same dimension are - # grouped together and ORed. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # The list of dimensions the report should include. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `floodlightConfigId` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :floodlight_config_id - - # The list of names of metrics the report should include. - # Corresponds to the JSON property `metricNames` - # @return [Array] - attr_accessor :metric_names - - # The properties of the report. - # Corresponds to the JSON property `reportProperties` - # @return [Google::Apis::DfareportingV2_1::Report::FloodlightCriteria::ReportProperties] - attr_accessor :report_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_rich_media_events = args[:custom_rich_media_events] unless args[:custom_rich_media_events].nil? - @date_range = args[:date_range] unless args[:date_range].nil? - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @floodlight_config_id = args[:floodlight_config_id] unless args[:floodlight_config_id].nil? - @metric_names = args[:metric_names] unless args[:metric_names].nil? - @report_properties = args[:report_properties] unless args[:report_properties].nil? - end - - # The properties of the report. - class ReportProperties - include Google::Apis::Core::Hashable - - # Include conversions that have no cookie, but do have an exposure path. - # Corresponds to the JSON property `includeAttributedIPConversions` - # @return [Boolean] - attr_accessor :include_attributed_ip_conversions - alias_method :include_attributed_ip_conversions?, :include_attributed_ip_conversions - - # Include conversions of users with a DoubleClick cookie but without an exposure. - # That means the user did not click or see an ad from the advertiser within the - # Floodlight group, or that the interaction happened outside the lookback window. - # Corresponds to the JSON property `includeUnattributedCookieConversions` - # @return [Boolean] - attr_accessor :include_unattributed_cookie_conversions - alias_method :include_unattributed_cookie_conversions?, :include_unattributed_cookie_conversions - - # Include conversions that have no associated cookies and no exposures. It’s - # therefore impossible to know how the user was exposed to your ads during the - # lookback window prior to a conversion. - # Corresponds to the JSON property `includeUnattributedIPConversions` - # @return [Boolean] - attr_accessor :include_unattributed_ip_conversions - alias_method :include_unattributed_ip_conversions?, :include_unattributed_ip_conversions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @include_attributed_ip_conversions = args[:include_attributed_ip_conversions] unless args[:include_attributed_ip_conversions].nil? - @include_unattributed_cookie_conversions = args[:include_unattributed_cookie_conversions] unless args[:include_unattributed_cookie_conversions].nil? - @include_unattributed_ip_conversions = args[:include_unattributed_ip_conversions] unless args[:include_unattributed_ip_conversions].nil? - end - end - end - - # The report criteria for a report of type "PATH_TO_CONVERSION". - class PathToConversionCriteria - include Google::Apis::Core::Hashable - - # The list of 'dfa:activity' values to filter on. - # Corresponds to the JSON property `activityFilters` - # @return [Array] - attr_accessor :activity_filters - - # The list of conversion dimensions the report should include. - # Corresponds to the JSON property `conversionDimensions` - # @return [Array] - attr_accessor :conversion_dimensions - - # The list of custom floodlight variables the report should include. - # Corresponds to the JSON property `customFloodlightVariables` - # @return [Array] - attr_accessor :custom_floodlight_variables - - # The list of custom rich media events to include. - # Corresponds to the JSON property `customRichMediaEvents` - # @return [Array] - attr_accessor :custom_rich_media_events - - # Represents a date range. - # Corresponds to the JSON property `dateRange` - # @return [Google::Apis::DfareportingV2_1::DateRange] - attr_accessor :date_range - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `floodlightConfigId` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :floodlight_config_id - - # The list of names of metrics the report should include. - # Corresponds to the JSON property `metricNames` - # @return [Array] - attr_accessor :metric_names - - # The list of per interaction dimensions the report should include. - # Corresponds to the JSON property `perInteractionDimensions` - # @return [Array] - attr_accessor :per_interaction_dimensions - - # The properties of the report. - # Corresponds to the JSON property `reportProperties` - # @return [Google::Apis::DfareportingV2_1::Report::PathToConversionCriteria::ReportProperties] - attr_accessor :report_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @activity_filters = args[:activity_filters] unless args[:activity_filters].nil? - @conversion_dimensions = args[:conversion_dimensions] unless args[:conversion_dimensions].nil? - @custom_floodlight_variables = args[:custom_floodlight_variables] unless args[:custom_floodlight_variables].nil? - @custom_rich_media_events = args[:custom_rich_media_events] unless args[:custom_rich_media_events].nil? - @date_range = args[:date_range] unless args[:date_range].nil? - @floodlight_config_id = args[:floodlight_config_id] unless args[:floodlight_config_id].nil? - @metric_names = args[:metric_names] unless args[:metric_names].nil? - @per_interaction_dimensions = args[:per_interaction_dimensions] unless args[:per_interaction_dimensions].nil? - @report_properties = args[:report_properties] unless args[:report_properties].nil? - end - - # The properties of the report. - class ReportProperties - include Google::Apis::Core::Hashable - - # DFA checks to see if a click interaction occurred within the specified period - # of time before a conversion. By default the value is pulled from Floodlight or - # you can manually enter a custom value. Valid values: 1-90. - # Corresponds to the JSON property `clicksLookbackWindow` - # @return [Fixnum] - attr_accessor :clicks_lookback_window - - # DFA checks to see if an impression interaction occurred within the specified - # period of time before a conversion. By default the value is pulled from - # Floodlight or you can manually enter a custom value. Valid values: 1-90. - # Corresponds to the JSON property `impressionsLookbackWindow` - # @return [Fixnum] - attr_accessor :impressions_lookback_window - - # Deprecated: has no effect. - # Corresponds to the JSON property `includeAttributedIPConversions` - # @return [Boolean] - attr_accessor :include_attributed_ip_conversions - alias_method :include_attributed_ip_conversions?, :include_attributed_ip_conversions - - # Include conversions of users with a DoubleClick cookie but without an exposure. - # That means the user did not click or see an ad from the advertiser within the - # Floodlight group, or that the interaction happened outside the lookback window. - # Corresponds to the JSON property `includeUnattributedCookieConversions` - # @return [Boolean] - attr_accessor :include_unattributed_cookie_conversions - alias_method :include_unattributed_cookie_conversions?, :include_unattributed_cookie_conversions - - # Include conversions that have no associated cookies and no exposures. It’s - # therefore impossible to know how the user was exposed to your ads during the - # lookback window prior to a conversion. - # Corresponds to the JSON property `includeUnattributedIPConversions` - # @return [Boolean] - attr_accessor :include_unattributed_ip_conversions - alias_method :include_unattributed_ip_conversions?, :include_unattributed_ip_conversions - - # The maximum number of click interactions to include in the report. Advertisers - # currently paying for E2C reports get up to 200 (100 clicks, 100 impressions). - # If another advertiser in your network is paying for E2C, you can have up to 5 - # total exposures per report. - # Corresponds to the JSON property `maximumClickInteractions` - # @return [Fixnum] - attr_accessor :maximum_click_interactions - - # The maximum number of click interactions to include in the report. Advertisers - # currently paying for E2C reports get up to 200 (100 clicks, 100 impressions). - # If another advertiser in your network is paying for E2C, you can have up to 5 - # total exposures per report. - # Corresponds to the JSON property `maximumImpressionInteractions` - # @return [Fixnum] - attr_accessor :maximum_impression_interactions - - # The maximum amount of time that can take place between interactions (clicks or - # impressions) by the same user. Valid values: 1-90. - # Corresponds to the JSON property `maximumInteractionGap` - # @return [Fixnum] - attr_accessor :maximum_interaction_gap - - # Enable pivoting on interaction path. - # Corresponds to the JSON property `pivotOnInteractionPath` - # @return [Boolean] - attr_accessor :pivot_on_interaction_path - alias_method :pivot_on_interaction_path?, :pivot_on_interaction_path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @clicks_lookback_window = args[:clicks_lookback_window] unless args[:clicks_lookback_window].nil? - @impressions_lookback_window = args[:impressions_lookback_window] unless args[:impressions_lookback_window].nil? - @include_attributed_ip_conversions = args[:include_attributed_ip_conversions] unless args[:include_attributed_ip_conversions].nil? - @include_unattributed_cookie_conversions = args[:include_unattributed_cookie_conversions] unless args[:include_unattributed_cookie_conversions].nil? - @include_unattributed_ip_conversions = args[:include_unattributed_ip_conversions] unless args[:include_unattributed_ip_conversions].nil? - @maximum_click_interactions = args[:maximum_click_interactions] unless args[:maximum_click_interactions].nil? - @maximum_impression_interactions = args[:maximum_impression_interactions] unless args[:maximum_impression_interactions].nil? - @maximum_interaction_gap = args[:maximum_interaction_gap] unless args[:maximum_interaction_gap].nil? - @pivot_on_interaction_path = args[:pivot_on_interaction_path] unless args[:pivot_on_interaction_path].nil? - end - end - end - - # The report criteria for a report of type "REACH". - class ReachCriteria - include Google::Apis::Core::Hashable - - # Represents an activity group. - # Corresponds to the JSON property `activities` - # @return [Google::Apis::DfareportingV2_1::Activities] - attr_accessor :activities - - # Represents a Custom Rich Media Events group. - # Corresponds to the JSON property `customRichMediaEvents` - # @return [Google::Apis::DfareportingV2_1::CustomRichMediaEvents] - attr_accessor :custom_rich_media_events - - # Represents a date range. - # Corresponds to the JSON property `dateRange` - # @return [Google::Apis::DfareportingV2_1::DateRange] - attr_accessor :date_range - - # The list of filters on which dimensions are filtered. - # Filters for different dimensions are ANDed, filters for the same dimension are - # grouped together and ORed. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # The list of dimensions the report should include. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # Whether to enable all reach dimension combinations in the report. Defaults to - # false. If enabled, the date range of the report should be within the last - # three months. - # Corresponds to the JSON property `enableAllDimensionCombinations` - # @return [Boolean] - attr_accessor :enable_all_dimension_combinations - alias_method :enable_all_dimension_combinations?, :enable_all_dimension_combinations - - # The list of names of metrics the report should include. - # Corresponds to the JSON property `metricNames` - # @return [Array] - attr_accessor :metric_names - - # The list of names of Reach By Frequency metrics the report should include. - # Corresponds to the JSON property `reachByFrequencyMetricNames` - # @return [Array] - attr_accessor :reach_by_frequency_metric_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @activities = args[:activities] unless args[:activities].nil? - @custom_rich_media_events = args[:custom_rich_media_events] unless args[:custom_rich_media_events].nil? - @date_range = args[:date_range] unless args[:date_range].nil? - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @enable_all_dimension_combinations = args[:enable_all_dimension_combinations] unless args[:enable_all_dimension_combinations].nil? - @metric_names = args[:metric_names] unless args[:metric_names].nil? - @reach_by_frequency_metric_names = args[:reach_by_frequency_metric_names] unless args[:reach_by_frequency_metric_names].nil? - end - end - - # The report's schedule. Can only be set if the report's 'dateRange' is a - # relative date range and the relative date range is not "TODAY". - class Schedule - include Google::Apis::Core::Hashable - - # Whether the schedule is active or not. Must be set to either true or false. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Defines every how many days, weeks or months the report should be run. Needs - # to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY". - # Corresponds to the JSON property `every` - # @return [Fixnum] - attr_accessor :every - - # The expiration date when the scheduled report stops running. - # Corresponds to the JSON property `expirationDate` - # @return [Date] - attr_accessor :expiration_date - - # The interval for which the report is repeated. Note: - # - "DAILY" also requires field "every" to be set. - # - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be set. - # - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be set. - # Corresponds to the JSON property `repeats` - # @return [String] - attr_accessor :repeats - - # List of week days "WEEKLY" on which scheduled reports should run. - # Corresponds to the JSON property `repeatsOnWeekDays` - # @return [Array] - attr_accessor :repeats_on_week_days - - # Enum to define for "MONTHLY" scheduled reports whether reports should be - # repeated on the same day of the month as "startDate" or the same day of the - # week of the month. - # Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02), "DAY_OF_MONTH" - # would run subsequent reports on the 2nd of every Month, and "WEEK_OF_MONTH" - # would run subsequent reports on the first Monday of the month. - # Corresponds to the JSON property `runsOnDayOfMonth` - # @return [String] - attr_accessor :runs_on_day_of_month - - # Start date of date range for which scheduled reports should be run. - # Corresponds to the JSON property `startDate` - # @return [Date] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active = args[:active] unless args[:active].nil? - @every = args[:every] unless args[:every].nil? - @expiration_date = args[:expiration_date] unless args[:expiration_date].nil? - @repeats = args[:repeats] unless args[:repeats].nil? - @repeats_on_week_days = args[:repeats_on_week_days] unless args[:repeats_on_week_days].nil? - @runs_on_day_of_month = args[:runs_on_day_of_month] unless args[:runs_on_day_of_month].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - end - end - end - - # Represents fields that are compatible to be selected for a report of type " - # STANDARD". - class ReportCompatibleFields - include Google::Apis::Core::Hashable - - # Dimensions which are compatible to be selected in the "dimensionFilters" - # section of the report. - # Corresponds to the JSON property `dimensionFilters` - # @return [Array] - attr_accessor :dimension_filters - - # Dimensions which are compatible to be selected in the "dimensions" section of - # the report. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # The kind of resource this is, in this case dfareporting#reportCompatibleFields. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Metrics which are compatible to be selected in the "metricNames" section of - # the report. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # Metrics which are compatible to be selected as activity metrics to pivot on in - # the "activities" section of the report. - # Corresponds to the JSON property `pivotedActivityMetrics` - # @return [Array] - attr_accessor :pivoted_activity_metrics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension_filters = args[:dimension_filters] unless args[:dimension_filters].nil? - @dimensions = args[:dimensions] unless args[:dimensions].nil? - @kind = args[:kind] unless args[:kind].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @pivoted_activity_metrics = args[:pivoted_activity_metrics] unless args[:pivoted_activity_metrics].nil? - end - end - - # Represents the list of reports. - class ReportList - include Google::Apis::Core::Hashable - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The reports returned in this response. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of list this is, in this case dfareporting#reportList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Continuation token used to page through reports. To retrieve the next page of - # results, set the next request's "pageToken" to the value of this field. The - # page token is only valid for a limited amount of time and should not be - # persisted. - # 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 - - # Reporting Configuration - class ReportsConfiguration - include Google::Apis::Core::Hashable - - # Whether the exposure to conversion report is enabled. This report shows - # detailed pathway information on up to 10 of the most recent ad exposures seen - # by a user before converting. - # Corresponds to the JSON property `exposureToConversionEnabled` - # @return [Boolean] - attr_accessor :exposure_to_conversion_enabled - alias_method :exposure_to_conversion_enabled?, :exposure_to_conversion_enabled - - # Lookback configuration settings. - # Corresponds to the JSON property `lookbackConfiguration` - # @return [Google::Apis::DfareportingV2_1::LookbackConfiguration] - attr_accessor :lookback_configuration - - # Report generation time zone ID of this account. This is a required field that - # can only be changed by a superuser. - # Acceptable values are: - # - "1" for "America/New_York" - # - "2" for "Europe/London" - # - "3" for "Europe/Paris" - # - "4" for "Africa/Johannesburg" - # - "5" for "Asia/Jerusalem" - # - "6" for "Asia/Shanghai" - # - "7" for "Asia/Hong_Kong" - # - "8" for "Asia/Tokyo" - # - "9" for "Australia/Sydney" - # - "10" for "Asia/Dubai" - # - "11" for "America/Los_Angeles" - # - "12" for "Pacific/Auckland" - # - "13" for "America/Sao_Paulo" - # Corresponds to the JSON property `reportGenerationTimeZoneId` - # @return [String] - attr_accessor :report_generation_time_zone_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @exposure_to_conversion_enabled = args[:exposure_to_conversion_enabled] unless args[:exposure_to_conversion_enabled].nil? - @lookback_configuration = args[:lookback_configuration] unless args[:lookback_configuration].nil? - @report_generation_time_zone_id = args[:report_generation_time_zone_id] unless args[:report_generation_time_zone_id].nil? - end - end - - # Rich Media Exit Override. - class RichMediaExitOverride - include Google::Apis::Core::Hashable - - # Click-through URL to override the default exit URL. Applicable if the - # useCustomExitUrl field is set to true. - # Corresponds to the JSON property `customExitUrl` - # @return [String] - attr_accessor :custom_exit_url - - # ID for the override to refer to a specific exit in the creative. - # Corresponds to the JSON property `exitId` - # @return [String] - attr_accessor :exit_id - - # Whether to use the custom exit URL. - # Corresponds to the JSON property `useCustomExitUrl` - # @return [Boolean] - attr_accessor :use_custom_exit_url - alias_method :use_custom_exit_url?, :use_custom_exit_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_exit_url = args[:custom_exit_url] unless args[:custom_exit_url].nil? - @exit_id = args[:exit_id] unless args[:exit_id].nil? - @use_custom_exit_url = args[:use_custom_exit_url] unless args[:use_custom_exit_url].nil? - end - end - - # Contains properties of a site. - class Site - include Google::Apis::Core::Hashable - - # Account ID of this site. This is a read-only field that can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Whether this site is approved. - # Corresponds to the JSON property `approved` - # @return [Boolean] - attr_accessor :approved - alias_method :approved?, :approved - - # Directory site associated with this site. This is a required field that is - # read-only after insertion. - # Corresponds to the JSON property `directorySiteId` - # @return [String] - attr_accessor :directory_site_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `directorySiteIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :directory_site_id_dimension_value - - # ID of this site. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `idDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :id_dimension_value - - # Key name of this site. This is a read-only, auto-generated field. - # Corresponds to the JSON property `keyName` - # @return [String] - attr_accessor :key_name - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#site". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this site.This is a required field. Must be less than 128 characters - # long. If this site is under a subaccount, the name must be unique among sites - # of the same subaccount. Otherwise, this site is a top-level site, and the name - # must be unique among top-level sites of the same account. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Site contacts. - # Corresponds to the JSON property `siteContacts` - # @return [Array] - attr_accessor :site_contacts - - # Site Settings - # Corresponds to the JSON property `siteSettings` - # @return [Google::Apis::DfareportingV2_1::SiteSettings] - attr_accessor :site_settings - - # Subaccount ID of this site. This is a read-only field that can be left blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @approved = args[:approved] unless args[:approved].nil? - @directory_site_id = args[:directory_site_id] unless args[:directory_site_id].nil? - @directory_site_id_dimension_value = args[:directory_site_id_dimension_value] unless args[:directory_site_id_dimension_value].nil? - @id = args[:id] unless args[:id].nil? - @id_dimension_value = args[:id_dimension_value] unless args[:id_dimension_value].nil? - @key_name = args[:key_name] unless args[:key_name].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @site_contacts = args[:site_contacts] unless args[:site_contacts].nil? - @site_settings = args[:site_settings] unless args[:site_settings].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Site Contact - class SiteContact - include Google::Apis::Core::Hashable - - # Address of this site contact. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # Site contact type. - # Corresponds to the JSON property `contactType` - # @return [String] - attr_accessor :contact_type - - # Email address of this site contact. This is a required field. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # First name of this site contact. - # Corresponds to the JSON property `firstName` - # @return [String] - attr_accessor :first_name - - # ID of this site contact. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Last name of this site contact. - # Corresponds to the JSON property `lastName` - # @return [String] - attr_accessor :last_name - - # Primary phone number of this site contact. - # Corresponds to the JSON property `phone` - # @return [String] - attr_accessor :phone - - # Title or designation of this site contact. - # 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) - @address = args[:address] unless args[:address].nil? - @contact_type = args[:contact_type] unless args[:contact_type].nil? - @email = args[:email] unless args[:email].nil? - @first_name = args[:first_name] unless args[:first_name].nil? - @id = args[:id] unless args[:id].nil? - @last_name = args[:last_name] unless args[:last_name].nil? - @phone = args[:phone] unless args[:phone].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # Site Settings - class SiteSettings - include Google::Apis::Core::Hashable - - # Whether active view creatives are disabled for this site. - # Corresponds to the JSON property `activeViewOptOut` - # @return [Boolean] - attr_accessor :active_view_opt_out - alias_method :active_view_opt_out?, :active_view_opt_out - - # Creative Settings - # Corresponds to the JSON property `creativeSettings` - # @return [Google::Apis::DfareportingV2_1::CreativeSettings] - attr_accessor :creative_settings - - # Whether brand safe ads are disabled for this site. - # Corresponds to the JSON property `disableBrandSafeAds` - # @return [Boolean] - attr_accessor :disable_brand_safe_ads - alias_method :disable_brand_safe_ads?, :disable_brand_safe_ads - - # Whether new cookies are disabled for this site. - # Corresponds to the JSON property `disableNewCookie` - # @return [Boolean] - attr_accessor :disable_new_cookie - alias_method :disable_new_cookie?, :disable_new_cookie - - # Lookback configuration settings. - # Corresponds to the JSON property `lookbackConfiguration` - # @return [Google::Apis::DfareportingV2_1::LookbackConfiguration] - attr_accessor :lookback_configuration - - # Tag Settings - # Corresponds to the JSON property `tagSetting` - # @return [Google::Apis::DfareportingV2_1::TagSetting] - attr_accessor :tag_setting - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active_view_opt_out = args[:active_view_opt_out] unless args[:active_view_opt_out].nil? - @creative_settings = args[:creative_settings] unless args[:creative_settings].nil? - @disable_brand_safe_ads = args[:disable_brand_safe_ads] unless args[:disable_brand_safe_ads].nil? - @disable_new_cookie = args[:disable_new_cookie] unless args[:disable_new_cookie].nil? - @lookback_configuration = args[:lookback_configuration] unless args[:lookback_configuration].nil? - @tag_setting = args[:tag_setting] unless args[:tag_setting].nil? - end - end - - # Site List Response - class ListSitesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#sitesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Site collection - # Corresponds to the JSON property `sites` - # @return [Array] - attr_accessor :sites - - 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? - @sites = args[:sites] unless args[:sites].nil? - end - end - - # Represents the dimensions of ads, placements, creatives, or creative assets. - class Size - include Google::Apis::Core::Hashable - - # Height of this size. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # IAB standard size. This is a read-only, auto-generated field. - # Corresponds to the JSON property `iab` - # @return [Boolean] - attr_accessor :iab - alias_method :iab?, :iab - - # ID of this size. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#size". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Width of this size. - # 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? - @iab = args[:iab] unless args[:iab].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # Size List Response - class ListSizesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#sizesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Size collection. - # Corresponds to the JSON property `sizes` - # @return [Array] - attr_accessor :sizes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @sizes = args[:sizes] unless args[:sizes].nil? - end - end - - # Represents a sorted dimension. - class SortedDimension - include Google::Apis::Core::Hashable - - # The kind of resource this is, in this case dfareporting#sortedDimension. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the dimension. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # An optional sort order for the dimension column. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @sort_order = args[:sort_order] unless args[:sort_order].nil? - end - end - - # Contains properties of a DCM subaccount. - class Subaccount - include Google::Apis::Core::Hashable - - # ID of the account that contains this subaccount. This is a read-only field - # that can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # IDs of the available user role permissions for this subaccount. - # Corresponds to the JSON property `availablePermissionIds` - # @return [Array] - attr_accessor :available_permission_ids - - # ID of this subaccount. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#subaccount". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this subaccount. This is a required field. Must be less than 128 - # characters long and be unique among subaccounts of the same 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @available_permission_ids = args[:available_permission_ids] unless args[:available_permission_ids].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Subaccount List Response - class ListSubaccountsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#subaccountsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Subaccount collection. - # Corresponds to the JSON property `subaccounts` - # @return [Array] - attr_accessor :subaccounts - - 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? - @subaccounts = args[:subaccounts] unless args[:subaccounts].nil? - end - end - - # Placement Tag Data - class TagData - include Google::Apis::Core::Hashable - - # Ad associated with this placement tag. - # Corresponds to the JSON property `adId` - # @return [String] - attr_accessor :ad_id - - # Tag string to record a click. - # Corresponds to the JSON property `clickTag` - # @return [String] - attr_accessor :click_tag - - # Creative associated with this placement tag. - # Corresponds to the JSON property `creativeId` - # @return [String] - attr_accessor :creative_id - - # TagData tag format of this tag. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Tag string for serving an ad. - # Corresponds to the JSON property `impressionTag` - # @return [String] - attr_accessor :impression_tag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ad_id = args[:ad_id] unless args[:ad_id].nil? - @click_tag = args[:click_tag] unless args[:click_tag].nil? - @creative_id = args[:creative_id] unless args[:creative_id].nil? - @format = args[:format] unless args[:format].nil? - @impression_tag = args[:impression_tag] unless args[:impression_tag].nil? - end - end - - # Tag Settings - class TagSetting - include Google::Apis::Core::Hashable - - # Additional key-values to be included in tags. Each key-value pair must be of - # the form key=value, and pairs must be separated by a semicolon (;). Keys and - # values must not contain commas. For example, id=2;color=red is a valid value - # for this field. - # Corresponds to the JSON property `additionalKeyValues` - # @return [String] - attr_accessor :additional_key_values - - # Whether static landing page URLs should be included in the tags. This setting - # applies only to placements. - # Corresponds to the JSON property `includeClickThroughUrls` - # @return [Boolean] - attr_accessor :include_click_through_urls - alias_method :include_click_through_urls?, :include_click_through_urls - - # Whether click-tracking string should be included in the tags. - # Corresponds to the JSON property `includeClickTracking` - # @return [Boolean] - attr_accessor :include_click_tracking - alias_method :include_click_tracking?, :include_click_tracking - - # Option specifying how keywords are embedded in ad tags. This setting can be - # used to specify whether keyword placeholders are inserted in placement tags - # for this site. Publishers can then add keywords to those placeholders. - # Corresponds to the JSON property `keywordOption` - # @return [String] - attr_accessor :keyword_option - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_key_values = args[:additional_key_values] unless args[:additional_key_values].nil? - @include_click_through_urls = args[:include_click_through_urls] unless args[:include_click_through_urls].nil? - @include_click_tracking = args[:include_click_tracking] unless args[:include_click_tracking].nil? - @keyword_option = args[:keyword_option] unless args[:keyword_option].nil? - end - end - - # Dynamic and Image Tag Settings. - class TagSettings - include Google::Apis::Core::Hashable - - # Whether dynamic floodlight tags are enabled. - # Corresponds to the JSON property `dynamicTagEnabled` - # @return [Boolean] - attr_accessor :dynamic_tag_enabled - alias_method :dynamic_tag_enabled?, :dynamic_tag_enabled - - # Whether image tags are enabled. - # Corresponds to the JSON property `imageTagEnabled` - # @return [Boolean] - attr_accessor :image_tag_enabled - alias_method :image_tag_enabled?, :image_tag_enabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dynamic_tag_enabled = args[:dynamic_tag_enabled] unless args[:dynamic_tag_enabled].nil? - @image_tag_enabled = args[:image_tag_enabled] unless args[:image_tag_enabled].nil? - end - end - - # Target Window. - class TargetWindow - include Google::Apis::Core::Hashable - - # User-entered value. - # Corresponds to the JSON property `customHtml` - # @return [String] - attr_accessor :custom_html - - # Type of browser window for which the backup image of the flash creative can be - # displayed. - # Corresponds to the JSON property `targetWindowOption` - # @return [String] - attr_accessor :target_window_option - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_html = args[:custom_html] unless args[:custom_html].nil? - @target_window_option = args[:target_window_option] unless args[:target_window_option].nil? - end - end - - # Contains properties of a targetable remarketing list. Remarketing enables you - # to create lists of users who have performed specific actions on a site, then - # target ads to members of those lists. This resource is a read-only view of a - # remarketing list to be used to faciliate targeting ads to specific lists. - # Remarketing lists that are owned by your advertisers and those that are shared - # to your advertisers or account are accessible via this resource. To manage - # remarketing lists that are owned by your advertisers, use the RemarketingList - # resource. - class TargetableRemarketingList - include Google::Apis::Core::Hashable - - # Account ID of this remarketing list. This is a read-only, auto-generated field - # that is only returned in GET requests. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Whether this targetable remarketing list is active. - # Corresponds to the JSON property `active` - # @return [Boolean] - attr_accessor :active - alias_method :active?, :active - - # Dimension value for the advertiser ID that owns this targetable remarketing - # list. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Represents a DimensionValue resource. - # Corresponds to the JSON property `advertiserIdDimensionValue` - # @return [Google::Apis::DfareportingV2_1::DimensionValue] - attr_accessor :advertiser_id_dimension_value - - # Targetable remarketing list description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Targetable remarketing list ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#targetableRemarketingList". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Number of days that a user should remain in the targetable remarketing list - # without an impression. - # Corresponds to the JSON property `lifeSpan` - # @return [String] - attr_accessor :life_span - - # Number of users currently in the list. This is a read-only field. - # Corresponds to the JSON property `listSize` - # @return [String] - attr_accessor :list_size - - # Product from which this targetable remarketing list was originated. - # Corresponds to the JSON property `listSource` - # @return [String] - attr_accessor :list_source - - # Name of the targetable remarketing list. Is no greater than 128 characters - # long. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Subaccount ID of this remarketing list. This is a read-only, auto-generated - # field that is only returned in GET requests. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @active = args[:active] unless args[:active].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_id_dimension_value = args[:advertiser_id_dimension_value] unless args[:advertiser_id_dimension_value].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @life_span = args[:life_span] unless args[:life_span].nil? - @list_size = args[:list_size] unless args[:list_size].nil? - @list_source = args[:list_source] unless args[:list_source].nil? - @name = args[:name] unless args[:name].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Targetable remarketing list response - class ListTargetableRemarketingListsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#targetableRemarketingListsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Targetable remarketing list collection. - # Corresponds to the JSON property `targetableRemarketingLists` - # @return [Array] - attr_accessor :targetable_remarketing_lists - - 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? - @targetable_remarketing_lists = args[:targetable_remarketing_lists] unless args[:targetable_remarketing_lists].nil? - end - end - - # Technology Targeting. - class TechnologyTargeting - include Google::Apis::Core::Hashable - - # Browsers that this ad targets. For each browser either set browserVersionId or - # dartId along with the version numbers. If both are specified, only - # browserVersionId will be used.The other fields are populated automatically - # when the ad is inserted or updated. - # Corresponds to the JSON property `browsers` - # @return [Array] - attr_accessor :browsers - - # Connection types that this ad targets. For each connection type only id is - # required.The other fields are populated automatically when the ad is inserted - # or updated. - # Corresponds to the JSON property `connectionTypes` - # @return [Array] - attr_accessor :connection_types - - # Mobile carriers that this ad targets. For each mobile carrier only id is - # required, and the other fields are populated automatically when the ad is - # inserted or updated. If targeting a mobile carrier, do not set targeting for - # any zip codes. - # Corresponds to the JSON property `mobileCarriers` - # @return [Array] - attr_accessor :mobile_carriers - - # Operating system versions that this ad targets. To target all versions, use - # operatingSystems. For each operating system version, only id is required. The - # other fields are populated automatically when the ad is inserted or updated. - # If targeting an operating system version, do not set targeting for the - # corresponding operating system in operatingSystems. - # Corresponds to the JSON property `operatingSystemVersions` - # @return [Array] - attr_accessor :operating_system_versions - - # Operating systems that this ad targets. To target specific versions, use - # operatingSystemVersions. For each operating system only dartId is required. - # The other fields are populated automatically when the ad is inserted or - # updated. If targeting an operating system, do not set targeting for operating - # system versions for the same operating system. - # Corresponds to the JSON property `operatingSystems` - # @return [Array] - attr_accessor :operating_systems - - # Platform types that this ad targets. For example, desktop, mobile, or tablet. - # For each platform type, only id is required, and the other fields are - # populated automatically when the ad is inserted or updated. - # Corresponds to the JSON property `platformTypes` - # @return [Array] - attr_accessor :platform_types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @browsers = args[:browsers] unless args[:browsers].nil? - @connection_types = args[:connection_types] unless args[:connection_types].nil? - @mobile_carriers = args[:mobile_carriers] unless args[:mobile_carriers].nil? - @operating_system_versions = args[:operating_system_versions] unless args[:operating_system_versions].nil? - @operating_systems = args[:operating_systems] unless args[:operating_systems].nil? - @platform_types = args[:platform_types] unless args[:platform_types].nil? - end - end - - # Third-party Tracking URL. - class ThirdPartyTrackingUrl - include Google::Apis::Core::Hashable - - # Third-party URL type for in-stream video creatives. - # Corresponds to the JSON property `thirdPartyUrlType` - # @return [String] - attr_accessor :third_party_url_type - - # URL for the specified third-party URL type. - # 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) - @third_party_url_type = args[:third_party_url_type] unless args[:third_party_url_type].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # User Defined Variable configuration. - class UserDefinedVariableConfiguration - include Google::Apis::Core::Hashable - - # Data type for the variable. This is a required field. - # Corresponds to the JSON property `dataType` - # @return [String] - attr_accessor :data_type - - # User-friendly name for the variable which will appear in reports. This is a - # required field, must be less than 64 characters long, and cannot contain the - # following characters: ""<>". - # Corresponds to the JSON property `reportName` - # @return [String] - attr_accessor :report_name - - # Variable name in the tag. This is a required field. - # Corresponds to the JSON property `variableType` - # @return [String] - attr_accessor :variable_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_type = args[:data_type] unless args[:data_type].nil? - @report_name = args[:report_name] unless args[:report_name].nil? - @variable_type = args[:variable_type] unless args[:variable_type].nil? - end - end - - # Represents a UserProfile resource. - class UserProfile - include Google::Apis::Core::Hashable - - # The account ID to which this profile belongs. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The account name this profile belongs to. - # Corresponds to the JSON property `accountName` - # @return [String] - attr_accessor :account_name - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The kind of resource this is, in this case dfareporting#userProfile. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The unique ID of the user profile. - # Corresponds to the JSON property `profileId` - # @return [String] - attr_accessor :profile_id - - # The sub account ID this profile belongs to if applicable. - # Corresponds to the JSON property `subAccountId` - # @return [String] - attr_accessor :sub_account_id - - # The sub account name this profile belongs to if applicable. - # Corresponds to the JSON property `subAccountName` - # @return [String] - attr_accessor :sub_account_name - - # The user name. - # Corresponds to the JSON property `userName` - # @return [String] - attr_accessor :user_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @account_name = args[:account_name] unless args[:account_name].nil? - @etag = args[:etag] unless args[:etag].nil? - @kind = args[:kind] unless args[:kind].nil? - @profile_id = args[:profile_id] unless args[:profile_id].nil? - @sub_account_id = args[:sub_account_id] unless args[:sub_account_id].nil? - @sub_account_name = args[:sub_account_name] unless args[:sub_account_name].nil? - @user_name = args[:user_name] unless args[:user_name].nil? - end - end - - # Represents the list of user profiles. - class UserProfileList - include Google::Apis::Core::Hashable - - # The eTag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The user profiles returned in this response. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of list this is, in this case dfareporting#userProfileList. - # 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 - - # Contains properties of auser role, which is used to manage user access. - class UserRole - include Google::Apis::Core::Hashable - - # Account ID of this user role. This is a read-only field that can be left blank. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Whether this is a default user role. Default user roles are created by the - # system for the account/subaccount and cannot be modified or deleted. Each - # default user role comes with a basic set of preassigned permissions. - # Corresponds to the JSON property `defaultUserRole` - # @return [Boolean] - attr_accessor :default_user_role - alias_method :default_user_role?, :default_user_role - - # ID of this user role. This is a read-only, auto-generated field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#userRole". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this user role. This is a required field. Must be less than 256 - # characters long. If this user role is under a subaccount, the name must be - # unique among sites of the same subaccount. Otherwise, this user role is a top- - # level user role, and the name must be unique among top-level user roles of the - # same account. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # ID of the user role that this user role is based on or copied from. This is a - # required field. - # Corresponds to the JSON property `parentUserRoleId` - # @return [String] - attr_accessor :parent_user_role_id - - # List of permissions associated with this user role. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - # Subaccount ID of this user role. This is a read-only field that can be left - # blank. - # Corresponds to the JSON property `subaccountId` - # @return [String] - attr_accessor :subaccount_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @default_user_role = args[:default_user_role] unless args[:default_user_role].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @parent_user_role_id = args[:parent_user_role_id] unless args[:parent_user_role_id].nil? - @permissions = args[:permissions] unless args[:permissions].nil? - @subaccount_id = args[:subaccount_id] unless args[:subaccount_id].nil? - end - end - - # Contains properties of a user role permission. - class UserRolePermission - include Google::Apis::Core::Hashable - - # Levels of availability for a user role permission. - # Corresponds to the JSON property `availability` - # @return [String] - attr_accessor :availability - - # ID of this user role permission. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#userRolePermission". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this user role permission. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # ID of the permission group that this user role permission belongs to. - # Corresponds to the JSON property `permissionGroupId` - # @return [String] - attr_accessor :permission_group_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @availability = args[:availability] unless args[:availability].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @permission_group_id = args[:permission_group_id] unless args[:permission_group_id].nil? - end - end - - # Represents a grouping of related user role permissions. - class UserRolePermissionGroup - include Google::Apis::Core::Hashable - - # ID of this user role permission. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#userRolePermissionGroup". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of this user role permission group. - # 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 - - # User Role Permission Group List Response - class ListUserRolePermissionGroupsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#userRolePermissionGroupsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # User role permission group collection. - # Corresponds to the JSON property `userRolePermissionGroups` - # @return [Array] - attr_accessor :user_role_permission_groups - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @user_role_permission_groups = args[:user_role_permission_groups] unless args[:user_role_permission_groups].nil? - end - end - - # User Role Permission List Response - class ListUserRolePermissionsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#userRolePermissionsListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # User role permission collection. - # Corresponds to the JSON property `userRolePermissions` - # @return [Array] - attr_accessor :user_role_permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @user_role_permissions = args[:user_role_permissions] unless args[:user_role_permissions].nil? - end - end - - # User Role List Response - class ListUserRolesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # dfareporting#userRolesListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to be used for the next list operation. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # User role collection. - # Corresponds to the JSON property `userRoles` - # @return [Array] - attr_accessor :user_roles - - 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? - @user_roles = args[:user_roles] unless args[:user_roles].nil? - end - end - end - end -end diff --git a/generated/google/apis/dfareporting_v2_1/representations.rb b/generated/google/apis/dfareporting_v2_1/representations.rb deleted file mode 100644 index 4835ad093..000000000 --- a/generated/google/apis/dfareporting_v2_1/representations.rb +++ /dev/null @@ -1,3438 +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 DfareportingV2_1 - - class Account - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountActiveAdSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountPermission - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountPermissionGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountPermissionGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountUserProfile - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountUserProfilesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Activities - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Ad - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AdSlot - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAdsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Advertiser - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AdvertiserGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAdvertiserGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAdvertisersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AudienceSegment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AudienceSegmentGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Browser - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListBrowsersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Campaign - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CampaignCreativeAssociation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCampaignCreativeAssociationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCampaignsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ChangeLog - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListChangeLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCitiesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class City - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ClickTag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ClickThroughUrl - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ClickThroughUrlSuffixProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CompanionClickThroughOverride - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ConnectionType - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListConnectionTypesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListContentCategoriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ContentCategory - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCountriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Country - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Creative - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeAsset - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeAssetId - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeAssetMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeCustomEvent - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeField - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeFieldAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeFieldValue - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCreativeFieldValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCreativeFieldsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeGroupAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCreativeGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeOptimizationConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeRotation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreativeSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCreativesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CrossDimensionReachReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CustomRichMediaEvents - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DateRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DayPartTargeting - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DefaultClickThroughEventTagProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeliverySchedule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DfpSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Dimension - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DimensionFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DimensionValue - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DimensionValueList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DimensionValueRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DirectorySite - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DirectorySiteContact - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DirectorySiteContactAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDirectorySiteContactsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DirectorySiteSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDirectorySitesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventTag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventTagOverride - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListEventTagsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class File - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Urls - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class FileList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Flight - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightActivitiesGenerateTagResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListFloodlightActivitiesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightActivity - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightActivityDynamicTag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightActivityGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListFloodlightActivityGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightActivityPublisherDynamicTag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListFloodlightConfigurationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FrequencyCap - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FsCommand - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoTargeting - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InventoryItem - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListInventoryItemsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class KeyValueTargetingExpression - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LandingPage - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLandingPagesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LastModifiedInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPopulationClause - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPopulationRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPopulationTerm - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTargetingExpression - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LookbackConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Metric - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Metro - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListMetrosResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MobileCarrier - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListMobileCarriersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ObjectFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OffsetPosition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OmnitureSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OperatingSystem - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OperatingSystemVersion - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListOperatingSystemVersionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListOperatingSystemsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OptimizationActivity - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Order - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OrderContact - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OrderDocument - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListOrderDocumentsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListOrdersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PathToConversionReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Placement - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlacementAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlacementGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlacementGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlacementStrategiesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlacementStrategy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlacementTag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeneratePlacementsTagsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlacementsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlatformType - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlatformTypesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PopupWindowProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PostalCode - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPostalCodesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Pricing - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PricingSchedule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PricingSchedulePricingPeriod - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProgrammaticSetting - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Project - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListProjectsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReachReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Recipient - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Region - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListRegionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RemarketingList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RemarketingListShare - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListRemarketingListsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Report - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Criteria - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CrossDimensionReachCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Delivery - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FloodlightCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ReportProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class PathToConversionCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ReportProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ReachCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Schedule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportsConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RichMediaExitOverride - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Site - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SiteContact - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SiteSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSitesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Size - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSizesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SortedDimension - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Subaccount - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSubaccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TagData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TagSetting - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TagSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetWindow - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TargetableRemarketingList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTargetableRemarketingListsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TechnologyTargeting - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ThirdPartyTrackingUrl - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserDefinedVariableConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserProfile - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserProfileList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserRole - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserRolePermission - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserRolePermissionGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListUserRolePermissionGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListUserRolePermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListUserRolesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Account - class Representation < Google::Apis::Core::JsonRepresentation - collection :account_permission_ids, as: 'accountPermissionIds' - property :account_profile, as: 'accountProfile' - property :active, as: 'active' - property :active_ads_limit_tier, as: 'activeAdsLimitTier' - property :active_view_opt_out, as: 'activeViewOptOut' - collection :available_permission_ids, as: 'availablePermissionIds' - property :comscore_vce_enabled, as: 'comscoreVceEnabled' - property :country_id, as: 'countryId' - property :currency_id, as: 'currencyId' - property :default_creative_size_id, as: 'defaultCreativeSizeId' - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :locale, as: 'locale' - property :maximum_image_size, as: 'maximumImageSize' - property :name, as: 'name' - property :nielsen_ocr_enabled, as: 'nielsenOcrEnabled' - property :reports_configuration, as: 'reportsConfiguration', class: Google::Apis::DfareportingV2_1::ReportsConfiguration, decorator: Google::Apis::DfareportingV2_1::ReportsConfiguration::Representation - - property :teaser_size_limit, as: 'teaserSizeLimit' - end - end - - # @private - class AccountActiveAdSummary - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active_ads, as: 'activeAds' - property :active_ads_limit_tier, as: 'activeAdsLimitTier' - property :available_ads, as: 'availableAds' - property :kind, as: 'kind' - end - end - - # @private - class AccountPermission - class Representation < Google::Apis::Core::JsonRepresentation - collection :account_profiles, as: 'accountProfiles' - property :id, as: 'id' - property :kind, as: 'kind' - property :level, as: 'level' - property :name, as: 'name' - property :permission_group_id, as: 'permissionGroupId' - end - end - - # @private - class AccountPermissionGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListAccountPermissionGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :account_permission_groups, as: 'accountPermissionGroups', class: Google::Apis::DfareportingV2_1::AccountPermissionGroup, decorator: Google::Apis::DfareportingV2_1::AccountPermissionGroup::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListAccountPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :account_permissions, as: 'accountPermissions', class: Google::Apis::DfareportingV2_1::AccountPermission, decorator: Google::Apis::DfareportingV2_1::AccountPermission::Representation - - property :kind, as: 'kind' - end - end - - # @private - class AccountUserProfile - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :advertiser_filter, as: 'advertiserFilter', class: Google::Apis::DfareportingV2_1::ObjectFilter, decorator: Google::Apis::DfareportingV2_1::ObjectFilter::Representation - - property :campaign_filter, as: 'campaignFilter', class: Google::Apis::DfareportingV2_1::ObjectFilter, decorator: Google::Apis::DfareportingV2_1::ObjectFilter::Representation - - property :comments, as: 'comments' - property :email, as: 'email' - property :id, as: 'id' - property :kind, as: 'kind' - property :locale, as: 'locale' - property :name, as: 'name' - property :site_filter, as: 'siteFilter', class: Google::Apis::DfareportingV2_1::ObjectFilter, decorator: Google::Apis::DfareportingV2_1::ObjectFilter::Representation - - property :subaccount_id, as: 'subaccountId' - property :trafficker_type, as: 'traffickerType' - property :user_access_type, as: 'userAccessType' - property :user_role_filter, as: 'userRoleFilter', class: Google::Apis::DfareportingV2_1::ObjectFilter, decorator: Google::Apis::DfareportingV2_1::ObjectFilter::Representation - - property :user_role_id, as: 'userRoleId' - end - end - - # @private - class ListAccountUserProfilesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :account_user_profiles, as: 'accountUserProfiles', class: Google::Apis::DfareportingV2_1::AccountUserProfile, decorator: Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :accounts, as: 'accounts', class: Google::Apis::DfareportingV2_1::Account, decorator: Google::Apis::DfareportingV2_1::Account::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Activities - class Representation < Google::Apis::Core::JsonRepresentation - collection :filters, as: 'filters', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - collection :metric_names, as: 'metricNames' - end - end - - # @private - class Ad - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :archived, as: 'archived' - property :audience_segment_id, as: 'audienceSegmentId' - property :campaign_id, as: 'campaignId' - property :campaign_id_dimension_value, as: 'campaignIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :click_through_url, as: 'clickThroughUrl', class: Google::Apis::DfareportingV2_1::ClickThroughUrl, decorator: Google::Apis::DfareportingV2_1::ClickThroughUrl::Representation - - property :click_through_url_suffix_properties, as: 'clickThroughUrlSuffixProperties', class: Google::Apis::DfareportingV2_1::ClickThroughUrlSuffixProperties, decorator: Google::Apis::DfareportingV2_1::ClickThroughUrlSuffixProperties::Representation - - property :comments, as: 'comments' - property :compatibility, as: 'compatibility' - property :create_info, as: 'createInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - collection :creative_group_assignments, as: 'creativeGroupAssignments', class: Google::Apis::DfareportingV2_1::CreativeGroupAssignment, decorator: Google::Apis::DfareportingV2_1::CreativeGroupAssignment::Representation - - property :creative_rotation, as: 'creativeRotation', class: Google::Apis::DfareportingV2_1::CreativeRotation, decorator: Google::Apis::DfareportingV2_1::CreativeRotation::Representation - - property :day_part_targeting, as: 'dayPartTargeting', class: Google::Apis::DfareportingV2_1::DayPartTargeting, decorator: Google::Apis::DfareportingV2_1::DayPartTargeting::Representation - - property :default_click_through_event_tag_properties, as: 'defaultClickThroughEventTagProperties', class: Google::Apis::DfareportingV2_1::DefaultClickThroughEventTagProperties, decorator: Google::Apis::DfareportingV2_1::DefaultClickThroughEventTagProperties::Representation - - property :delivery_schedule, as: 'deliverySchedule', class: Google::Apis::DfareportingV2_1::DeliverySchedule, decorator: Google::Apis::DfareportingV2_1::DeliverySchedule::Representation - - property :dynamic_click_tracker, as: 'dynamicClickTracker' - property :end_time, as: 'endTime', type: DateTime - - collection :event_tag_overrides, as: 'eventTagOverrides', class: Google::Apis::DfareportingV2_1::EventTagOverride, decorator: Google::Apis::DfareportingV2_1::EventTagOverride::Representation - - property :geo_targeting, as: 'geoTargeting', class: Google::Apis::DfareportingV2_1::GeoTargeting, decorator: Google::Apis::DfareportingV2_1::GeoTargeting::Representation - - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :key_value_targeting_expression, as: 'keyValueTargetingExpression', class: Google::Apis::DfareportingV2_1::KeyValueTargetingExpression, decorator: Google::Apis::DfareportingV2_1::KeyValueTargetingExpression::Representation - - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :name, as: 'name' - collection :placement_assignments, as: 'placementAssignments', class: Google::Apis::DfareportingV2_1::PlacementAssignment, decorator: Google::Apis::DfareportingV2_1::PlacementAssignment::Representation - - property :remarketing_list_expression, as: 'remarketing_list_expression', class: Google::Apis::DfareportingV2_1::ListTargetingExpression, decorator: Google::Apis::DfareportingV2_1::ListTargetingExpression::Representation - - property :size, as: 'size', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - property :ssl_compliant, as: 'sslCompliant' - property :ssl_required, as: 'sslRequired' - property :start_time, as: 'startTime', type: DateTime - - property :subaccount_id, as: 'subaccountId' - property :technology_targeting, as: 'technologyTargeting', class: Google::Apis::DfareportingV2_1::TechnologyTargeting, decorator: Google::Apis::DfareportingV2_1::TechnologyTargeting::Representation - - property :type, as: 'type' - end - end - - # @private - class AdSlot - class Representation < Google::Apis::Core::JsonRepresentation - property :comment, as: 'comment' - property :compatibility, as: 'compatibility' - property :height, as: 'height' - property :linked_placement_id, as: 'linkedPlacementId' - property :name, as: 'name' - property :payment_source_type, as: 'paymentSourceType' - property :primary, as: 'primary' - property :width, as: 'width' - end - end - - # @private - class ListAdsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :ads, as: 'ads', class: Google::Apis::DfareportingV2_1::Ad, decorator: Google::Apis::DfareportingV2_1::Ad::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Advertiser - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_group_id, as: 'advertiserGroupId' - property :click_through_url_suffix, as: 'clickThroughUrlSuffix' - property :default_click_through_event_tag_id, as: 'defaultClickThroughEventTagId' - property :default_email, as: 'defaultEmail' - property :floodlight_configuration_id, as: 'floodlightConfigurationId' - property :floodlight_configuration_id_dimension_value, as: 'floodlightConfigurationIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - property :name, as: 'name' - property :original_floodlight_configuration_id, as: 'originalFloodlightConfigurationId' - property :status, as: 'status' - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class AdvertiserGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListAdvertiserGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :advertiser_groups, as: 'advertiserGroups', class: Google::Apis::DfareportingV2_1::AdvertiserGroup, decorator: Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListAdvertisersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :advertisers, as: 'advertisers', class: Google::Apis::DfareportingV2_1::Advertiser, decorator: Google::Apis::DfareportingV2_1::Advertiser::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class AudienceSegment - class Representation < Google::Apis::Core::JsonRepresentation - property :allocation, as: 'allocation' - property :id, as: 'id' - property :name, as: 'name' - end - end - - # @private - class AudienceSegmentGroup - class Representation < Google::Apis::Core::JsonRepresentation - collection :audience_segments, as: 'audienceSegments', class: Google::Apis::DfareportingV2_1::AudienceSegment, decorator: Google::Apis::DfareportingV2_1::AudienceSegment::Representation - - property :id, as: 'id' - property :name, as: 'name' - end - end - - # @private - class Browser - class Representation < Google::Apis::Core::JsonRepresentation - property :browser_version_id, as: 'browserVersionId' - property :dart_id, as: 'dartId' - property :kind, as: 'kind' - property :major_version, as: 'majorVersion' - property :minor_version, as: 'minorVersion' - property :name, as: 'name' - end - end - - # @private - class ListBrowsersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :browsers, as: 'browsers', class: Google::Apis::DfareportingV2_1::Browser, decorator: Google::Apis::DfareportingV2_1::Browser::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Campaign - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :additional_creative_optimization_configurations, as: 'additionalCreativeOptimizationConfigurations', class: Google::Apis::DfareportingV2_1::CreativeOptimizationConfiguration, decorator: Google::Apis::DfareportingV2_1::CreativeOptimizationConfiguration::Representation - - property :advertiser_group_id, as: 'advertiserGroupId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :archived, as: 'archived' - collection :audience_segment_groups, as: 'audienceSegmentGroups', class: Google::Apis::DfareportingV2_1::AudienceSegmentGroup, decorator: Google::Apis::DfareportingV2_1::AudienceSegmentGroup::Representation - - property :billing_invoice_code, as: 'billingInvoiceCode' - property :click_through_url_suffix_properties, as: 'clickThroughUrlSuffixProperties', class: Google::Apis::DfareportingV2_1::ClickThroughUrlSuffixProperties, decorator: Google::Apis::DfareportingV2_1::ClickThroughUrlSuffixProperties::Representation - - property :comment, as: 'comment' - property :comscore_vce_enabled, as: 'comscoreVceEnabled' - property :create_info, as: 'createInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - collection :creative_group_ids, as: 'creativeGroupIds' - property :creative_optimization_configuration, as: 'creativeOptimizationConfiguration', class: Google::Apis::DfareportingV2_1::CreativeOptimizationConfiguration, decorator: Google::Apis::DfareportingV2_1::CreativeOptimizationConfiguration::Representation - - property :default_click_through_event_tag_properties, as: 'defaultClickThroughEventTagProperties', class: Google::Apis::DfareportingV2_1::DefaultClickThroughEventTagProperties, decorator: Google::Apis::DfareportingV2_1::DefaultClickThroughEventTagProperties::Representation - - property :end_date, as: 'endDate', type: Date - - collection :event_tag_overrides, as: 'eventTagOverrides', class: Google::Apis::DfareportingV2_1::EventTagOverride, decorator: Google::Apis::DfareportingV2_1::EventTagOverride::Representation - - property :external_id, as: 'externalId' - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :lookback_configuration, as: 'lookbackConfiguration', class: Google::Apis::DfareportingV2_1::LookbackConfiguration, decorator: Google::Apis::DfareportingV2_1::LookbackConfiguration::Representation - - property :name, as: 'name' - property :nielsen_ocr_enabled, as: 'nielsenOcrEnabled' - property :start_date, as: 'startDate', type: Date - - property :subaccount_id, as: 'subaccountId' - collection :trafficker_emails, as: 'traffickerEmails' - end - end - - # @private - class CampaignCreativeAssociation - class Representation < Google::Apis::Core::JsonRepresentation - property :creative_id, as: 'creativeId' - property :kind, as: 'kind' - end - end - - # @private - class ListCampaignCreativeAssociationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :campaign_creative_associations, as: 'campaignCreativeAssociations', class: Google::Apis::DfareportingV2_1::CampaignCreativeAssociation, decorator: Google::Apis::DfareportingV2_1::CampaignCreativeAssociation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListCampaignsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :campaigns, as: 'campaigns', class: Google::Apis::DfareportingV2_1::Campaign, decorator: Google::Apis::DfareportingV2_1::Campaign::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ChangeLog - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :action, as: 'action' - property :change_time, as: 'changeTime', type: DateTime - - property :field_name, as: 'fieldName' - property :id, as: 'id' - property :kind, as: 'kind' - property :new_value, as: 'newValue' - property :obj_id, as: 'objectId' - property :object_type, as: 'objectType' - property :old_value, as: 'oldValue' - property :subaccount_id, as: 'subaccountId' - property :transaction_id, as: 'transactionId' - property :user_profile_id, as: 'userProfileId' - property :user_profile_name, as: 'userProfileName' - end - end - - # @private - class ListChangeLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :change_logs, as: 'changeLogs', class: Google::Apis::DfareportingV2_1::ChangeLog, decorator: Google::Apis::DfareportingV2_1::ChangeLog::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListCitiesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :cities, as: 'cities', class: Google::Apis::DfareportingV2_1::City, decorator: Google::Apis::DfareportingV2_1::City::Representation - - property :kind, as: 'kind' - end - end - - # @private - class City - class Representation < Google::Apis::Core::JsonRepresentation - property :country_code, as: 'countryCode' - property :country_dart_id, as: 'countryDartId' - property :dart_id, as: 'dartId' - property :kind, as: 'kind' - property :metro_code, as: 'metroCode' - property :metro_dma_id, as: 'metroDmaId' - property :name, as: 'name' - property :region_code, as: 'regionCode' - property :region_dart_id, as: 'regionDartId' - end - end - - # @private - class ClickTag - class Representation < Google::Apis::Core::JsonRepresentation - property :event_name, as: 'eventName' - property :name, as: 'name' - property :value, as: 'value' - end - end - - # @private - class ClickThroughUrl - class Representation < Google::Apis::Core::JsonRepresentation - property :custom_click_through_url, as: 'customClickThroughUrl' - property :default_landing_page, as: 'defaultLandingPage' - property :landing_page_id, as: 'landingPageId' - end - end - - # @private - class ClickThroughUrlSuffixProperties - class Representation < Google::Apis::Core::JsonRepresentation - property :click_through_url_suffix, as: 'clickThroughUrlSuffix' - property :override_inherited_suffix, as: 'overrideInheritedSuffix' - end - end - - # @private - class CompanionClickThroughOverride - class Representation < Google::Apis::Core::JsonRepresentation - property :click_through_url, as: 'clickThroughUrl', class: Google::Apis::DfareportingV2_1::ClickThroughUrl, decorator: Google::Apis::DfareportingV2_1::ClickThroughUrl::Representation - - property :creative_id, as: 'creativeId' - end - end - - # @private - class CompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation - property :cross_dimension_reach_report_compatible_fields, as: 'crossDimensionReachReportCompatibleFields', class: Google::Apis::DfareportingV2_1::CrossDimensionReachReportCompatibleFields, decorator: Google::Apis::DfareportingV2_1::CrossDimensionReachReportCompatibleFields::Representation - - property :floodlight_report_compatible_fields, as: 'floodlightReportCompatibleFields', class: Google::Apis::DfareportingV2_1::FloodlightReportCompatibleFields, decorator: Google::Apis::DfareportingV2_1::FloodlightReportCompatibleFields::Representation - - property :kind, as: 'kind' - property :path_to_conversion_report_compatible_fields, as: 'pathToConversionReportCompatibleFields', class: Google::Apis::DfareportingV2_1::PathToConversionReportCompatibleFields, decorator: Google::Apis::DfareportingV2_1::PathToConversionReportCompatibleFields::Representation - - property :reach_report_compatible_fields, as: 'reachReportCompatibleFields', class: Google::Apis::DfareportingV2_1::ReachReportCompatibleFields, decorator: Google::Apis::DfareportingV2_1::ReachReportCompatibleFields::Representation - - property :report_compatible_fields, as: 'reportCompatibleFields', class: Google::Apis::DfareportingV2_1::ReportCompatibleFields, decorator: Google::Apis::DfareportingV2_1::ReportCompatibleFields::Representation - - end - end - - # @private - class ConnectionType - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListConnectionTypesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :connection_types, as: 'connectionTypes', class: Google::Apis::DfareportingV2_1::ConnectionType, decorator: Google::Apis::DfareportingV2_1::ConnectionType::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListContentCategoriesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :content_categories, as: 'contentCategories', class: Google::Apis::DfareportingV2_1::ContentCategory, decorator: Google::Apis::DfareportingV2_1::ContentCategory::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ContentCategory - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListCountriesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :countries, as: 'countries', class: Google::Apis::DfareportingV2_1::Country, decorator: Google::Apis::DfareportingV2_1::Country::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Country - class Representation < Google::Apis::Core::JsonRepresentation - property :country_code, as: 'countryCode' - property :dart_id, as: 'dartId' - property :kind, as: 'kind' - property :name, as: 'name' - property :ssl_enabled, as: 'sslEnabled' - end - end - - # @private - class Creative - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :ad_parameters, as: 'adParameters' - collection :ad_tag_keys, as: 'adTagKeys' - property :advertiser_id, as: 'advertiserId' - property :allow_script_access, as: 'allowScriptAccess' - property :archived, as: 'archived' - property :artwork_type, as: 'artworkType' - property :authoring_tool, as: 'authoringTool' - property :auto_advance_images, as: 'auto_advance_images' - property :background_color, as: 'backgroundColor' - property :backup_image_click_through_url, as: 'backupImageClickThroughUrl' - collection :backup_image_features, as: 'backupImageFeatures' - property :backup_image_reporting_label, as: 'backupImageReportingLabel' - property :backup_image_target_window, as: 'backupImageTargetWindow', class: Google::Apis::DfareportingV2_1::TargetWindow, decorator: Google::Apis::DfareportingV2_1::TargetWindow::Representation - - collection :click_tags, as: 'clickTags', class: Google::Apis::DfareportingV2_1::ClickTag, decorator: Google::Apis::DfareportingV2_1::ClickTag::Representation - - property :commercial_id, as: 'commercialId' - collection :companion_creatives, as: 'companionCreatives' - collection :compatibility, as: 'compatibility' - property :convert_flash_to_html5, as: 'convertFlashToHtml5' - collection :counter_custom_events, as: 'counterCustomEvents', class: Google::Apis::DfareportingV2_1::CreativeCustomEvent, decorator: Google::Apis::DfareportingV2_1::CreativeCustomEvent::Representation - - collection :creative_assets, as: 'creativeAssets', class: Google::Apis::DfareportingV2_1::CreativeAsset, decorator: Google::Apis::DfareportingV2_1::CreativeAsset::Representation - - collection :creative_field_assignments, as: 'creativeFieldAssignments', class: Google::Apis::DfareportingV2_1::CreativeFieldAssignment, decorator: Google::Apis::DfareportingV2_1::CreativeFieldAssignment::Representation - - collection :custom_key_values, as: 'customKeyValues' - collection :exit_custom_events, as: 'exitCustomEvents', class: Google::Apis::DfareportingV2_1::CreativeCustomEvent, decorator: Google::Apis::DfareportingV2_1::CreativeCustomEvent::Representation - - property :fs_command, as: 'fsCommand', class: Google::Apis::DfareportingV2_1::FsCommand, decorator: Google::Apis::DfareportingV2_1::FsCommand::Representation - - property :html_code, as: 'htmlCode' - property :html_code_locked, as: 'htmlCodeLocked' - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :latest_trafficked_creative_id, as: 'latestTraffickedCreativeId' - property :name, as: 'name' - property :override_css, as: 'overrideCss' - property :redirect_url, as: 'redirectUrl' - property :rendering_id, as: 'renderingId' - property :rendering_id_dimension_value, as: 'renderingIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :required_flash_plugin_version, as: 'requiredFlashPluginVersion' - property :required_flash_version, as: 'requiredFlashVersion' - property :size, as: 'size', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - property :skippable, as: 'skippable' - property :ssl_compliant, as: 'sslCompliant' - property :studio_advertiser_id, as: 'studioAdvertiserId' - property :studio_creative_id, as: 'studioCreativeId' - property :studio_trafficked_creative_id, as: 'studioTraffickedCreativeId' - property :subaccount_id, as: 'subaccountId' - property :third_party_backup_image_impressions_url, as: 'thirdPartyBackupImageImpressionsUrl' - property :third_party_rich_media_impressions_url, as: 'thirdPartyRichMediaImpressionsUrl' - collection :third_party_urls, as: 'thirdPartyUrls', class: Google::Apis::DfareportingV2_1::ThirdPartyTrackingUrl, decorator: Google::Apis::DfareportingV2_1::ThirdPartyTrackingUrl::Representation - - collection :timer_custom_events, as: 'timerCustomEvents', class: Google::Apis::DfareportingV2_1::CreativeCustomEvent, decorator: Google::Apis::DfareportingV2_1::CreativeCustomEvent::Representation - - property :total_file_size, as: 'totalFileSize' - property :type, as: 'type' - property :version, as: 'version' - property :video_description, as: 'videoDescription' - property :video_duration, as: 'videoDuration' - end - end - - # @private - class CreativeAsset - class Representation < Google::Apis::Core::JsonRepresentation - property :action_script3, as: 'actionScript3' - property :active, as: 'active' - property :alignment, as: 'alignment' - property :artwork_type, as: 'artworkType' - property :asset_identifier, as: 'assetIdentifier', class: Google::Apis::DfareportingV2_1::CreativeAssetId, decorator: Google::Apis::DfareportingV2_1::CreativeAssetId::Representation - - property :backup_image_exit, as: 'backupImageExit', class: Google::Apis::DfareportingV2_1::CreativeCustomEvent, decorator: Google::Apis::DfareportingV2_1::CreativeCustomEvent::Representation - - property :bit_rate, as: 'bitRate' - property :child_asset_type, as: 'childAssetType' - property :collapsed_size, as: 'collapsedSize', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - property :custom_start_time_value, as: 'customStartTimeValue' - collection :detected_features, as: 'detectedFeatures' - property :display_type, as: 'displayType' - property :duration, as: 'duration' - property :duration_type, as: 'durationType' - property :expanded_dimension, as: 'expandedDimension', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - property :file_size, as: 'fileSize' - property :flash_version, as: 'flashVersion' - property :hide_flash_objects, as: 'hideFlashObjects' - property :hide_selection_boxes, as: 'hideSelectionBoxes' - property :horizontally_locked, as: 'horizontallyLocked' - property :id, as: 'id' - property :mime_type, as: 'mimeType' - property :offset, as: 'offset', class: Google::Apis::DfareportingV2_1::OffsetPosition, decorator: Google::Apis::DfareportingV2_1::OffsetPosition::Representation - - property :original_backup, as: 'originalBackup' - property :position, as: 'position', class: Google::Apis::DfareportingV2_1::OffsetPosition, decorator: Google::Apis::DfareportingV2_1::OffsetPosition::Representation - - property :position_left_unit, as: 'positionLeftUnit' - property :position_top_unit, as: 'positionTopUnit' - property :progressive_serving_url, as: 'progressiveServingUrl' - property :pushdown, as: 'pushdown' - property :pushdown_duration, as: 'pushdownDuration' - property :role, as: 'role' - property :size, as: 'size', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - property :ssl_compliant, as: 'sslCompliant' - property :start_time_type, as: 'startTimeType' - property :streaming_serving_url, as: 'streamingServingUrl' - property :transparency, as: 'transparency' - property :vertically_locked, as: 'verticallyLocked' - property :video_duration, as: 'videoDuration' - property :window_mode, as: 'windowMode' - property :z_index, as: 'zIndex' - property :zip_filename, as: 'zipFilename' - property :zip_filesize, as: 'zipFilesize' - end - end - - # @private - class CreativeAssetId - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :type, as: 'type' - end - end - - # @private - class CreativeAssetMetadata - class Representation < Google::Apis::Core::JsonRepresentation - property :asset_identifier, as: 'assetIdentifier', class: Google::Apis::DfareportingV2_1::CreativeAssetId, decorator: Google::Apis::DfareportingV2_1::CreativeAssetId::Representation - - collection :click_tags, as: 'clickTags', class: Google::Apis::DfareportingV2_1::ClickTag, decorator: Google::Apis::DfareportingV2_1::ClickTag::Representation - - collection :detected_features, as: 'detectedFeatures' - property :kind, as: 'kind' - collection :warned_validation_rules, as: 'warnedValidationRules' - end - end - - # @private - class CreativeAssignment - class Representation < Google::Apis::Core::JsonRepresentation - property :active, as: 'active' - property :apply_event_tags, as: 'applyEventTags' - property :click_through_url, as: 'clickThroughUrl', class: Google::Apis::DfareportingV2_1::ClickThroughUrl, decorator: Google::Apis::DfareportingV2_1::ClickThroughUrl::Representation - - collection :companion_creative_overrides, as: 'companionCreativeOverrides', class: Google::Apis::DfareportingV2_1::CompanionClickThroughOverride, decorator: Google::Apis::DfareportingV2_1::CompanionClickThroughOverride::Representation - - collection :creative_group_assignments, as: 'creativeGroupAssignments', class: Google::Apis::DfareportingV2_1::CreativeGroupAssignment, decorator: Google::Apis::DfareportingV2_1::CreativeGroupAssignment::Representation - - property :creative_id, as: 'creativeId' - property :creative_id_dimension_value, as: 'creativeIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :end_time, as: 'endTime', type: DateTime - - collection :rich_media_exit_overrides, as: 'richMediaExitOverrides', class: Google::Apis::DfareportingV2_1::RichMediaExitOverride, decorator: Google::Apis::DfareportingV2_1::RichMediaExitOverride::Representation - - property :sequence, as: 'sequence' - property :ssl_compliant, as: 'sslCompliant' - property :start_time, as: 'startTime', type: DateTime - - property :weight, as: 'weight' - end - end - - # @private - class CreativeCustomEvent - class Representation < Google::Apis::Core::JsonRepresentation - property :active, as: 'active' - property :advertiser_custom_event_name, as: 'advertiserCustomEventName' - property :advertiser_custom_event_type, as: 'advertiserCustomEventType' - property :artwork_label, as: 'artworkLabel' - property :artwork_type, as: 'artworkType' - property :exit_url, as: 'exitUrl' - property :id, as: 'id' - property :popup_window_properties, as: 'popupWindowProperties', class: Google::Apis::DfareportingV2_1::PopupWindowProperties, decorator: Google::Apis::DfareportingV2_1::PopupWindowProperties::Representation - - property :target_type, as: 'targetType' - property :video_reporting_id, as: 'videoReportingId' - end - end - - # @private - class CreativeField - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class CreativeFieldAssignment - class Representation < Google::Apis::Core::JsonRepresentation - property :creative_field_id, as: 'creativeFieldId' - property :creative_field_value_id, as: 'creativeFieldValueId' - end - end - - # @private - class CreativeFieldValue - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :value, as: 'value' - end - end - - # @private - class ListCreativeFieldValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :creative_field_values, as: 'creativeFieldValues', class: Google::Apis::DfareportingV2_1::CreativeFieldValue, decorator: Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListCreativeFieldsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :creative_fields, as: 'creativeFields', class: Google::Apis::DfareportingV2_1::CreativeField, decorator: Google::Apis::DfareportingV2_1::CreativeField::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class CreativeGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :group_number, as: 'groupNumber' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class CreativeGroupAssignment - class Representation < Google::Apis::Core::JsonRepresentation - property :creative_group_id, as: 'creativeGroupId' - property :creative_group_number, as: 'creativeGroupNumber' - end - end - - # @private - class ListCreativeGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :creative_groups, as: 'creativeGroups', class: Google::Apis::DfareportingV2_1::CreativeGroup, decorator: Google::Apis::DfareportingV2_1::CreativeGroup::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class CreativeOptimizationConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :name, as: 'name' - collection :optimization_activitys, as: 'optimizationActivitys', class: Google::Apis::DfareportingV2_1::OptimizationActivity, decorator: Google::Apis::DfareportingV2_1::OptimizationActivity::Representation - - property :optimization_model, as: 'optimizationModel' - end - end - - # @private - class CreativeRotation - class Representation < Google::Apis::Core::JsonRepresentation - collection :creative_assignments, as: 'creativeAssignments', class: Google::Apis::DfareportingV2_1::CreativeAssignment, decorator: Google::Apis::DfareportingV2_1::CreativeAssignment::Representation - - property :creative_optimization_configuration_id, as: 'creativeOptimizationConfigurationId' - property :type, as: 'type' - property :weight_calculation_strategy, as: 'weightCalculationStrategy' - end - end - - # @private - class CreativeSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :i_frame_footer, as: 'iFrameFooter' - property :i_frame_header, as: 'iFrameHeader' - end - end - - # @private - class ListCreativesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :creatives, as: 'creatives', class: Google::Apis::DfareportingV2_1::Creative, decorator: Google::Apis::DfareportingV2_1::Creative::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class CrossDimensionReachReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation - collection :breakdown, as: 'breakdown', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - property :kind, as: 'kind' - collection :metrics, as: 'metrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - collection :overlap_metrics, as: 'overlapMetrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - end - end - - # @private - class CustomRichMediaEvents - class Representation < Google::Apis::Core::JsonRepresentation - collection :filtered_event_ids, as: 'filteredEventIds', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - end - end - - # @private - class DateRange - class Representation < Google::Apis::Core::JsonRepresentation - property :end_date, as: 'endDate', type: Date - - property :kind, as: 'kind' - property :relative_date_range, as: 'relativeDateRange' - property :start_date, as: 'startDate', type: Date - - end - end - - # @private - class DayPartTargeting - class Representation < Google::Apis::Core::JsonRepresentation - collection :days_of_week, as: 'daysOfWeek' - collection :hours_of_day, as: 'hoursOfDay' - property :user_local_time, as: 'userLocalTime' - end - end - - # @private - class DefaultClickThroughEventTagProperties - class Representation < Google::Apis::Core::JsonRepresentation - property :default_click_through_event_tag_id, as: 'defaultClickThroughEventTagId' - property :override_inherited_event_tag, as: 'overrideInheritedEventTag' - end - end - - # @private - class DeliverySchedule - class Representation < Google::Apis::Core::JsonRepresentation - property :frequency_cap, as: 'frequencyCap', class: Google::Apis::DfareportingV2_1::FrequencyCap, decorator: Google::Apis::DfareportingV2_1::FrequencyCap::Representation - - property :hard_cutoff, as: 'hardCutoff' - property :impression_ratio, as: 'impressionRatio' - property :priority, as: 'priority' - end - end - - # @private - class DfpSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :dfp_network_code, as: 'dfp_network_code' - property :dfp_network_name, as: 'dfp_network_name' - property :programmatic_placement_accepted, as: 'programmaticPlacementAccepted' - property :pub_paid_placement_accepted, as: 'pubPaidPlacementAccepted' - property :publisher_portal_only, as: 'publisherPortalOnly' - end - end - - # @private - class Dimension - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class DimensionFilter - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension_name, as: 'dimensionName' - property :kind, as: 'kind' - property :value, as: 'value' - end - end - - # @private - class DimensionValue - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension_name, as: 'dimensionName' - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :match_type, as: 'matchType' - property :value, as: 'value' - end - end - - # @private - class DimensionValueList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class DimensionValueRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension_name, as: 'dimensionName' - property :end_date, as: 'endDate', type: Date - - collection :filters, as: 'filters', class: Google::Apis::DfareportingV2_1::DimensionFilter, decorator: Google::Apis::DfareportingV2_1::DimensionFilter::Representation - - property :kind, as: 'kind' - property :start_date, as: 'startDate', type: Date - - end - end - - # @private - class DirectorySite - class Representation < Google::Apis::Core::JsonRepresentation - property :active, as: 'active' - collection :contact_assignments, as: 'contactAssignments', class: Google::Apis::DfareportingV2_1::DirectorySiteContactAssignment, decorator: Google::Apis::DfareportingV2_1::DirectorySiteContactAssignment::Representation - - property :country_id, as: 'countryId' - property :currency_id, as: 'currencyId' - property :description, as: 'description' - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :inpage_tag_formats, as: 'inpageTagFormats' - collection :interstitial_tag_formats, as: 'interstitialTagFormats' - property :kind, as: 'kind' - property :name, as: 'name' - property :parent_id, as: 'parentId' - property :settings, as: 'settings', class: Google::Apis::DfareportingV2_1::DirectorySiteSettings, decorator: Google::Apis::DfareportingV2_1::DirectorySiteSettings::Representation - - property :url, as: 'url' - end - end - - # @private - class DirectorySiteContact - class Representation < Google::Apis::Core::JsonRepresentation - property :address, as: 'address' - property :email, as: 'email' - property :first_name, as: 'firstName' - property :id, as: 'id' - property :kind, as: 'kind' - property :last_name, as: 'lastName' - property :phone, as: 'phone' - property :role, as: 'role' - property :title, as: 'title' - property :type, as: 'type' - end - end - - # @private - class DirectorySiteContactAssignment - class Representation < Google::Apis::Core::JsonRepresentation - property :contact_id, as: 'contactId' - property :visibility, as: 'visibility' - end - end - - # @private - class ListDirectorySiteContactsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :directory_site_contacts, as: 'directorySiteContacts', class: Google::Apis::DfareportingV2_1::DirectorySiteContact, decorator: Google::Apis::DfareportingV2_1::DirectorySiteContact::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class DirectorySiteSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :active_view_opt_out, as: 'activeViewOptOut' - property :dfp_settings, as: 'dfp_settings', class: Google::Apis::DfareportingV2_1::DfpSettings, decorator: Google::Apis::DfareportingV2_1::DfpSettings::Representation - - property :instream_video_placement_accepted, as: 'instream_video_placement_accepted' - property :interstitial_placement_accepted, as: 'interstitialPlacementAccepted' - property :nielsen_ocr_opt_out, as: 'nielsenOcrOptOut' - property :verification_tag_opt_out, as: 'verificationTagOptOut' - property :video_active_view_opt_out, as: 'videoActiveViewOptOut' - end - end - - # @private - class ListDirectorySitesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :directory_sites, as: 'directorySites', class: Google::Apis::DfareportingV2_1::DirectorySite, decorator: Google::Apis::DfareportingV2_1::DirectorySite::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class EventTag - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :campaign_id, as: 'campaignId' - property :campaign_id_dimension_value, as: 'campaignIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :enabled_by_default, as: 'enabledByDefault' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :site_filter_type, as: 'siteFilterType' - collection :site_ids, as: 'siteIds' - property :ssl_compliant, as: 'sslCompliant' - property :status, as: 'status' - property :subaccount_id, as: 'subaccountId' - property :type, as: 'type' - property :url, as: 'url' - property :url_escape_levels, as: 'urlEscapeLevels' - end - end - - # @private - class EventTagOverride - class Representation < Google::Apis::Core::JsonRepresentation - property :enabled, as: 'enabled' - property :id, as: 'id' - end - end - - # @private - class ListEventTagsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :event_tags, as: 'eventTags', class: Google::Apis::DfareportingV2_1::EventTag, decorator: Google::Apis::DfareportingV2_1::EventTag::Representation - - property :kind, as: 'kind' - end - end - - # @private - class File - class Representation < Google::Apis::Core::JsonRepresentation - property :date_range, as: 'dateRange', class: Google::Apis::DfareportingV2_1::DateRange, decorator: Google::Apis::DfareportingV2_1::DateRange::Representation - - property :etag, as: 'etag' - property :file_name, as: 'fileName' - property :format, as: 'format' - property :id, as: 'id' - property :kind, as: 'kind' - property :last_modified_time, as: 'lastModifiedTime' - property :report_id, as: 'reportId' - property :status, as: 'status' - property :urls, as: 'urls', class: Google::Apis::DfareportingV2_1::File::Urls, decorator: Google::Apis::DfareportingV2_1::File::Urls::Representation - - end - - # @private - class Urls - class Representation < Google::Apis::Core::JsonRepresentation - property :api_url, as: 'apiUrl' - property :browser_url, as: 'browserUrl' - end - end - end - - # @private - class FileList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DfareportingV2_1::File, decorator: Google::Apis::DfareportingV2_1::File::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Flight - class Representation < Google::Apis::Core::JsonRepresentation - property :end_date, as: 'endDate', type: Date - - property :rate_or_cost, as: 'rateOrCost' - property :start_date, as: 'startDate', type: Date - - property :units, as: 'units' - end - end - - # @private - class FloodlightActivitiesGenerateTagResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :floodlight_activity_tag, as: 'floodlightActivityTag' - property :kind, as: 'kind' - end - end - - # @private - class ListFloodlightActivitiesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :floodlight_activities, as: 'floodlightActivities', class: Google::Apis::DfareportingV2_1::FloodlightActivity, decorator: Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class FloodlightActivity - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :cache_busting_type, as: 'cacheBustingType' - property :counting_method, as: 'countingMethod' - collection :default_tags, as: 'defaultTags', class: Google::Apis::DfareportingV2_1::FloodlightActivityDynamicTag, decorator: Google::Apis::DfareportingV2_1::FloodlightActivityDynamicTag::Representation - - property :expected_url, as: 'expectedUrl' - property :floodlight_activity_group_id, as: 'floodlightActivityGroupId' - property :floodlight_activity_group_name, as: 'floodlightActivityGroupName' - property :floodlight_activity_group_tag_string, as: 'floodlightActivityGroupTagString' - property :floodlight_activity_group_type, as: 'floodlightActivityGroupType' - property :floodlight_configuration_id, as: 'floodlightConfigurationId' - property :floodlight_configuration_id_dimension_value, as: 'floodlightConfigurationIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :hidden, as: 'hidden' - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :image_tag_enabled, as: 'imageTagEnabled' - property :kind, as: 'kind' - property :name, as: 'name' - property :notes, as: 'notes' - collection :publisher_tags, as: 'publisherTags', class: Google::Apis::DfareportingV2_1::FloodlightActivityPublisherDynamicTag, decorator: Google::Apis::DfareportingV2_1::FloodlightActivityPublisherDynamicTag::Representation - - property :secure, as: 'secure' - property :ssl_compliant, as: 'sslCompliant' - property :ssl_required, as: 'sslRequired' - property :subaccount_id, as: 'subaccountId' - property :tag_format, as: 'tagFormat' - property :tag_string, as: 'tagString' - collection :user_defined_variable_types, as: 'userDefinedVariableTypes' - end - end - - # @private - class FloodlightActivityDynamicTag - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :name, as: 'name' - property :tag, as: 'tag' - end - end - - # @private - class FloodlightActivityGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :floodlight_configuration_id, as: 'floodlightConfigurationId' - property :floodlight_configuration_id_dimension_value, as: 'floodlightConfigurationIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - property :name, as: 'name' - property :subaccount_id, as: 'subaccountId' - property :tag_string, as: 'tagString' - property :type, as: 'type' - end - end - - # @private - class ListFloodlightActivityGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :floodlight_activity_groups, as: 'floodlightActivityGroups', class: Google::Apis::DfareportingV2_1::FloodlightActivityGroup, decorator: Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class FloodlightActivityPublisherDynamicTag - class Representation < Google::Apis::Core::JsonRepresentation - property :click_through, as: 'clickThrough' - property :directory_site_id, as: 'directorySiteId' - property :dynamic_tag, as: 'dynamicTag', class: Google::Apis::DfareportingV2_1::FloodlightActivityDynamicTag, decorator: Google::Apis::DfareportingV2_1::FloodlightActivityDynamicTag::Representation - - property :site_id, as: 'siteId' - property :site_id_dimension_value, as: 'siteIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :view_through, as: 'viewThrough' - end - end - - # @private - class FloodlightConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :analytics_data_sharing_enabled, as: 'analyticsDataSharingEnabled' - property :exposure_to_conversion_enabled, as: 'exposureToConversionEnabled' - property :first_day_of_week, as: 'firstDayOfWeek' - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - property :lookback_configuration, as: 'lookbackConfiguration', class: Google::Apis::DfareportingV2_1::LookbackConfiguration, decorator: Google::Apis::DfareportingV2_1::LookbackConfiguration::Representation - - property :natural_search_conversion_attribution_option, as: 'naturalSearchConversionAttributionOption' - property :omniture_settings, as: 'omnitureSettings', class: Google::Apis::DfareportingV2_1::OmnitureSettings, decorator: Google::Apis::DfareportingV2_1::OmnitureSettings::Representation - - property :ssl_required, as: 'sslRequired' - collection :standard_variable_types, as: 'standardVariableTypes' - property :subaccount_id, as: 'subaccountId' - property :tag_settings, as: 'tagSettings', class: Google::Apis::DfareportingV2_1::TagSettings, decorator: Google::Apis::DfareportingV2_1::TagSettings::Representation - - collection :user_defined_variable_configurations, as: 'userDefinedVariableConfigurations', class: Google::Apis::DfareportingV2_1::UserDefinedVariableConfiguration, decorator: Google::Apis::DfareportingV2_1::UserDefinedVariableConfiguration::Representation - - end - end - - # @private - class ListFloodlightConfigurationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :floodlight_configurations, as: 'floodlightConfigurations', class: Google::Apis::DfareportingV2_1::FloodlightConfiguration, decorator: Google::Apis::DfareportingV2_1::FloodlightConfiguration::Representation - - property :kind, as: 'kind' - end - end - - # @private - class FloodlightReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - collection :dimensions, as: 'dimensions', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - property :kind, as: 'kind' - collection :metrics, as: 'metrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - end - end - - # @private - class FrequencyCap - class Representation < Google::Apis::Core::JsonRepresentation - property :duration, as: 'duration' - property :impressions, as: 'impressions' - end - end - - # @private - class FsCommand - class Representation < Google::Apis::Core::JsonRepresentation - property :left, as: 'left' - property :position_option, as: 'positionOption' - property :top, as: 'top' - property :window_height, as: 'windowHeight' - property :window_width, as: 'windowWidth' - end - end - - # @private - class GeoTargeting - class Representation < Google::Apis::Core::JsonRepresentation - collection :cities, as: 'cities', class: Google::Apis::DfareportingV2_1::City, decorator: Google::Apis::DfareportingV2_1::City::Representation - - collection :countries, as: 'countries', class: Google::Apis::DfareportingV2_1::Country, decorator: Google::Apis::DfareportingV2_1::Country::Representation - - property :exclude_countries, as: 'excludeCountries' - collection :metros, as: 'metros', class: Google::Apis::DfareportingV2_1::Metro, decorator: Google::Apis::DfareportingV2_1::Metro::Representation - - collection :postal_codes, as: 'postalCodes', class: Google::Apis::DfareportingV2_1::PostalCode, decorator: Google::Apis::DfareportingV2_1::PostalCode::Representation - - collection :regions, as: 'regions', class: Google::Apis::DfareportingV2_1::Region, decorator: Google::Apis::DfareportingV2_1::Region::Representation - - end - end - - # @private - class InventoryItem - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :ad_slots, as: 'adSlots', class: Google::Apis::DfareportingV2_1::AdSlot, decorator: Google::Apis::DfareportingV2_1::AdSlot::Representation - - property :advertiser_id, as: 'advertiserId' - property :content_category_id, as: 'contentCategoryId' - property :estimated_click_through_rate, as: 'estimatedClickThroughRate' - property :estimated_conversion_rate, as: 'estimatedConversionRate' - property :id, as: 'id' - property :in_plan, as: 'inPlan' - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :name, as: 'name' - property :negotiation_channel_id, as: 'negotiationChannelId' - property :order_id, as: 'orderId' - property :placement_strategy_id, as: 'placementStrategyId' - property :pricing, as: 'pricing', class: Google::Apis::DfareportingV2_1::Pricing, decorator: Google::Apis::DfareportingV2_1::Pricing::Representation - - property :project_id, as: 'projectId' - property :rfp_id, as: 'rfpId' - property :site_id, as: 'siteId' - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class ListInventoryItemsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :inventory_items, as: 'inventoryItems', class: Google::Apis::DfareportingV2_1::InventoryItem, decorator: Google::Apis::DfareportingV2_1::InventoryItem::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class KeyValueTargetingExpression - class Representation < Google::Apis::Core::JsonRepresentation - property :expression, as: 'expression' - end - end - - # @private - class LandingPage - class Representation < Google::Apis::Core::JsonRepresentation - property :default, as: 'default' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :url, as: 'url' - end - end - - # @private - class ListLandingPagesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :landing_pages, as: 'landingPages', class: Google::Apis::DfareportingV2_1::LandingPage, decorator: Google::Apis::DfareportingV2_1::LandingPage::Representation - - end - end - - # @private - class LastModifiedInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :time, as: 'time' - end - end - - # @private - class ListPopulationClause - class Representation < Google::Apis::Core::JsonRepresentation - collection :terms, as: 'terms', class: Google::Apis::DfareportingV2_1::ListPopulationTerm, decorator: Google::Apis::DfareportingV2_1::ListPopulationTerm::Representation - - end - end - - # @private - class ListPopulationRule - class Representation < Google::Apis::Core::JsonRepresentation - property :floodlight_activity_id, as: 'floodlightActivityId' - property :floodlight_activity_name, as: 'floodlightActivityName' - collection :list_population_clauses, as: 'listPopulationClauses', class: Google::Apis::DfareportingV2_1::ListPopulationClause, decorator: Google::Apis::DfareportingV2_1::ListPopulationClause::Representation - - end - end - - # @private - class ListPopulationTerm - class Representation < Google::Apis::Core::JsonRepresentation - property :contains, as: 'contains' - property :negation, as: 'negation' - property :operator, as: 'operator' - property :remarketing_list_id, as: 'remarketingListId' - property :type, as: 'type' - property :value, as: 'value' - property :variable_friendly_name, as: 'variableFriendlyName' - property :variable_name, as: 'variableName' - end - end - - # @private - class ListTargetingExpression - class Representation < Google::Apis::Core::JsonRepresentation - property :expression, as: 'expression' - end - end - - # @private - class LookbackConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :click_duration, as: 'clickDuration' - property :post_impression_activities_duration, as: 'postImpressionActivitiesDuration' - end - end - - # @private - class Metric - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class Metro - class Representation < Google::Apis::Core::JsonRepresentation - property :country_code, as: 'countryCode' - property :country_dart_id, as: 'countryDartId' - property :dart_id, as: 'dartId' - property :dma_id, as: 'dmaId' - property :kind, as: 'kind' - property :metro_code, as: 'metroCode' - property :name, as: 'name' - end - end - - # @private - class ListMetrosResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :metros, as: 'metros', class: Google::Apis::DfareportingV2_1::Metro, decorator: Google::Apis::DfareportingV2_1::Metro::Representation - - end - end - - # @private - class MobileCarrier - class Representation < Google::Apis::Core::JsonRepresentation - property :country_code, as: 'countryCode' - property :country_dart_id, as: 'countryDartId' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListMobileCarriersResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :mobile_carriers, as: 'mobileCarriers', class: Google::Apis::DfareportingV2_1::MobileCarrier, decorator: Google::Apis::DfareportingV2_1::MobileCarrier::Representation - - end - end - - # @private - class ObjectFilter - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :object_ids, as: 'objectIds' - property :status, as: 'status' - end - end - - # @private - class OffsetPosition - class Representation < Google::Apis::Core::JsonRepresentation - property :left, as: 'left' - property :top, as: 'top' - end - end - - # @private - class OmnitureSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :omniture_cost_data_enabled, as: 'omnitureCostDataEnabled' - property :omniture_integration_enabled, as: 'omnitureIntegrationEnabled' - end - end - - # @private - class OperatingSystem - class Representation < Google::Apis::Core::JsonRepresentation - property :dart_id, as: 'dartId' - property :desktop, as: 'desktop' - property :kind, as: 'kind' - property :mobile, as: 'mobile' - property :name, as: 'name' - end - end - - # @private - class OperatingSystemVersion - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :major_version, as: 'majorVersion' - property :minor_version, as: 'minorVersion' - property :name, as: 'name' - property :operating_system, as: 'operatingSystem', class: Google::Apis::DfareportingV2_1::OperatingSystem, decorator: Google::Apis::DfareportingV2_1::OperatingSystem::Representation - - end - end - - # @private - class ListOperatingSystemVersionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :operating_system_versions, as: 'operatingSystemVersions', class: Google::Apis::DfareportingV2_1::OperatingSystemVersion, decorator: Google::Apis::DfareportingV2_1::OperatingSystemVersion::Representation - - end - end - - # @private - class ListOperatingSystemsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :operating_systems, as: 'operatingSystems', class: Google::Apis::DfareportingV2_1::OperatingSystem, decorator: Google::Apis::DfareportingV2_1::OperatingSystem::Representation - - end - end - - # @private - class OptimizationActivity - class Representation < Google::Apis::Core::JsonRepresentation - property :floodlight_activity_id, as: 'floodlightActivityId' - property :floodlight_activity_id_dimension_value, as: 'floodlightActivityIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :weight, as: 'weight' - end - end - - # @private - class Order - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - collection :approver_user_profile_ids, as: 'approverUserProfileIds' - property :buyer_invoice_id, as: 'buyerInvoiceId' - property :buyer_organization_name, as: 'buyerOrganizationName' - property :comments, as: 'comments' - collection :contacts, as: 'contacts', class: Google::Apis::DfareportingV2_1::OrderContact, decorator: Google::Apis::DfareportingV2_1::OrderContact::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :name, as: 'name' - property :notes, as: 'notes' - property :planning_term_id, as: 'planningTermId' - property :project_id, as: 'projectId' - property :seller_order_id, as: 'sellerOrderId' - property :seller_organization_name, as: 'sellerOrganizationName' - collection :site_id, as: 'siteId' - collection :site_names, as: 'siteNames' - property :subaccount_id, as: 'subaccountId' - property :terms_and_conditions, as: 'termsAndConditions' - end - end - - # @private - class OrderContact - class Representation < Google::Apis::Core::JsonRepresentation - property :contact_info, as: 'contactInfo' - property :contact_name, as: 'contactName' - property :contact_title, as: 'contactTitle' - property :contact_type, as: 'contactType' - property :signature_user_profile_id, as: 'signatureUserProfileId' - end - end - - # @private - class OrderDocument - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :amended_order_document_id, as: 'amendedOrderDocumentId' - collection :approved_by_user_profile_ids, as: 'approvedByUserProfileIds' - property :cancelled, as: 'cancelled' - property :created_info, as: 'createdInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :effective_date, as: 'effectiveDate', type: Date - - property :id, as: 'id' - property :kind, as: 'kind' - property :order_id, as: 'orderId' - property :project_id, as: 'projectId' - property :signed, as: 'signed' - property :subaccount_id, as: 'subaccountId' - property :title, as: 'title' - property :type, as: 'type' - end - end - - # @private - class ListOrderDocumentsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :order_documents, as: 'orderDocuments', class: Google::Apis::DfareportingV2_1::OrderDocument, decorator: Google::Apis::DfareportingV2_1::OrderDocument::Representation - - end - end - - # @private - class ListOrdersResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :orders, as: 'orders', class: Google::Apis::DfareportingV2_1::Order, decorator: Google::Apis::DfareportingV2_1::Order::Representation - - end - end - - # @private - class PathToConversionReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation - collection :conversion_dimensions, as: 'conversionDimensions', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - collection :custom_floodlight_variables, as: 'customFloodlightVariables', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - property :kind, as: 'kind' - collection :metrics, as: 'metrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - collection :per_interaction_dimensions, as: 'perInteractionDimensions', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - end - end - - # @private - class Placement - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :archived, as: 'archived' - property :campaign_id, as: 'campaignId' - property :campaign_id_dimension_value, as: 'campaignIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :comment, as: 'comment' - property :compatibility, as: 'compatibility' - property :content_category_id, as: 'contentCategoryId' - property :create_info, as: 'createInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :directory_site_id, as: 'directorySiteId' - property :directory_site_id_dimension_value, as: 'directorySiteIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :external_id, as: 'externalId' - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :key_name, as: 'keyName' - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :lookback_configuration, as: 'lookbackConfiguration', class: Google::Apis::DfareportingV2_1::LookbackConfiguration, decorator: Google::Apis::DfareportingV2_1::LookbackConfiguration::Representation - - property :name, as: 'name' - property :payment_approved, as: 'paymentApproved' - property :payment_source, as: 'paymentSource' - property :placement_group_id, as: 'placementGroupId' - property :placement_group_id_dimension_value, as: 'placementGroupIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :placement_strategy_id, as: 'placementStrategyId' - property :pricing_schedule, as: 'pricingSchedule', class: Google::Apis::DfareportingV2_1::PricingSchedule, decorator: Google::Apis::DfareportingV2_1::PricingSchedule::Representation - - property :primary, as: 'primary' - property :publisher_update_info, as: 'publisherUpdateInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :site_id, as: 'siteId' - property :site_id_dimension_value, as: 'siteIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :size, as: 'size', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - property :ssl_required, as: 'sslRequired' - property :status, as: 'status' - property :subaccount_id, as: 'subaccountId' - collection :tag_formats, as: 'tagFormats' - property :tag_setting, as: 'tagSetting', class: Google::Apis::DfareportingV2_1::TagSetting, decorator: Google::Apis::DfareportingV2_1::TagSetting::Representation - - end - end - - # @private - class PlacementAssignment - class Representation < Google::Apis::Core::JsonRepresentation - property :active, as: 'active' - property :placement_id, as: 'placementId' - property :placement_id_dimension_value, as: 'placementIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :ssl_required, as: 'sslRequired' - end - end - - # @private - class PlacementGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :archived, as: 'archived' - property :campaign_id, as: 'campaignId' - property :campaign_id_dimension_value, as: 'campaignIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :child_placement_ids, as: 'childPlacementIds' - property :comment, as: 'comment' - property :content_category_id, as: 'contentCategoryId' - property :create_info, as: 'createInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :directory_site_id, as: 'directorySiteId' - property :directory_site_id_dimension_value, as: 'directorySiteIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :external_id, as: 'externalId' - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :name, as: 'name' - property :placement_group_type, as: 'placementGroupType' - property :placement_strategy_id, as: 'placementStrategyId' - property :pricing_schedule, as: 'pricingSchedule', class: Google::Apis::DfareportingV2_1::PricingSchedule, decorator: Google::Apis::DfareportingV2_1::PricingSchedule::Representation - - property :primary_placement_id, as: 'primaryPlacementId' - property :primary_placement_id_dimension_value, as: 'primaryPlacementIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :programmatic_setting, as: 'programmaticSetting', class: Google::Apis::DfareportingV2_1::ProgrammaticSetting, decorator: Google::Apis::DfareportingV2_1::ProgrammaticSetting::Representation - - property :site_id, as: 'siteId' - property :site_id_dimension_value, as: 'siteIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class ListPlacementGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :placement_groups, as: 'placementGroups', class: Google::Apis::DfareportingV2_1::PlacementGroup, decorator: Google::Apis::DfareportingV2_1::PlacementGroup::Representation - - end - end - - # @private - class ListPlacementStrategiesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :placement_strategies, as: 'placementStrategies', class: Google::Apis::DfareportingV2_1::PlacementStrategy, decorator: Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - - end - end - - # @private - class PlacementStrategy - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class PlacementTag - class Representation < Google::Apis::Core::JsonRepresentation - property :placement_id, as: 'placementId' - collection :tag_datas, as: 'tagDatas', class: Google::Apis::DfareportingV2_1::TagData, decorator: Google::Apis::DfareportingV2_1::TagData::Representation - - end - end - - # @private - class GeneratePlacementsTagsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :placement_tags, as: 'placementTags', class: Google::Apis::DfareportingV2_1::PlacementTag, decorator: Google::Apis::DfareportingV2_1::PlacementTag::Representation - - end - end - - # @private - class ListPlacementsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :placements, as: 'placements', class: Google::Apis::DfareportingV2_1::Placement, decorator: Google::Apis::DfareportingV2_1::Placement::Representation - - end - end - - # @private - class PlatformType - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListPlatformTypesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :platform_types, as: 'platformTypes', class: Google::Apis::DfareportingV2_1::PlatformType, decorator: Google::Apis::DfareportingV2_1::PlatformType::Representation - - end - end - - # @private - class PopupWindowProperties - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension, as: 'dimension', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - property :offset, as: 'offset', class: Google::Apis::DfareportingV2_1::OffsetPosition, decorator: Google::Apis::DfareportingV2_1::OffsetPosition::Representation - - property :position_type, as: 'positionType' - property :show_address_bar, as: 'showAddressBar' - property :show_menu_bar, as: 'showMenuBar' - property :show_scroll_bar, as: 'showScrollBar' - property :show_status_bar, as: 'showStatusBar' - property :show_tool_bar, as: 'showToolBar' - property :title, as: 'title' - end - end - - # @private - class PostalCode - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :country_code, as: 'countryCode' - property :country_dart_id, as: 'countryDartId' - property :id, as: 'id' - property :kind, as: 'kind' - end - end - - # @private - class ListPostalCodesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :postal_codes, as: 'postalCodes', class: Google::Apis::DfareportingV2_1::PostalCode, decorator: Google::Apis::DfareportingV2_1::PostalCode::Representation - - end - end - - # @private - class Pricing - class Representation < Google::Apis::Core::JsonRepresentation - property :cap_cost_type, as: 'capCostType' - property :end_date, as: 'endDate', type: Date - - collection :flights, as: 'flights', class: Google::Apis::DfareportingV2_1::Flight, decorator: Google::Apis::DfareportingV2_1::Flight::Representation - - property :group_type, as: 'groupType' - property :pricing_type, as: 'pricingType' - property :start_date, as: 'startDate', type: Date - - end - end - - # @private - class PricingSchedule - class Representation < Google::Apis::Core::JsonRepresentation - property :cap_cost_option, as: 'capCostOption' - property :disregard_overdelivery, as: 'disregardOverdelivery' - property :end_date, as: 'endDate', type: Date - - property :flighted, as: 'flighted' - property :floodlight_activity_id, as: 'floodlightActivityId' - collection :pricing_periods, as: 'pricingPeriods', class: Google::Apis::DfareportingV2_1::PricingSchedulePricingPeriod, decorator: Google::Apis::DfareportingV2_1::PricingSchedulePricingPeriod::Representation - - property :pricing_type, as: 'pricingType' - property :start_date, as: 'startDate', type: Date - - property :testing_start_date, as: 'testingStartDate', type: Date - - end - end - - # @private - class PricingSchedulePricingPeriod - class Representation < Google::Apis::Core::JsonRepresentation - property :end_date, as: 'endDate', type: Date - - property :pricing_comment, as: 'pricingComment' - property :rate_or_cost_nanos, as: 'rateOrCostNanos' - property :start_date, as: 'startDate', type: Date - - property :units, as: 'units' - end - end - - # @private - class ProgrammaticSetting - class Representation < Google::Apis::Core::JsonRepresentation - collection :adx_deal_ids, as: 'adxDealIds' - property :insertion_order_id, as: 'insertionOrderId' - property :insertion_order_id_status, as: 'insertionOrderIdStatus' - property :media_cost_nanos, as: 'mediaCostNanos' - property :programmatic, as: 'programmatic' - collection :trafficker_emails, as: 'traffickerEmails' - end - end - - # @private - class Project - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :advertiser_id, as: 'advertiserId' - property :audience_age_group, as: 'audienceAgeGroup' - property :audience_gender, as: 'audienceGender' - property :budget, as: 'budget' - property :client_billing_code, as: 'clientBillingCode' - property :client_name, as: 'clientName' - property :end_date, as: 'endDate', type: Date - - property :id, as: 'id' - property :kind, as: 'kind' - property :last_modified_info, as: 'lastModifiedInfo', class: Google::Apis::DfareportingV2_1::LastModifiedInfo, decorator: Google::Apis::DfareportingV2_1::LastModifiedInfo::Representation - - property :name, as: 'name' - property :overview, as: 'overview' - property :start_date, as: 'startDate', type: Date - - property :subaccount_id, as: 'subaccountId' - property :target_clicks, as: 'targetClicks' - property :target_conversions, as: 'targetConversions' - property :target_cpa_nanos, as: 'targetCpaNanos' - property :target_cpc_nanos, as: 'targetCpcNanos' - property :target_cpm_nanos, as: 'targetCpmNanos' - property :target_impressions, as: 'targetImpressions' - end - end - - # @private - class ListProjectsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :projects, as: 'projects', class: Google::Apis::DfareportingV2_1::Project, decorator: Google::Apis::DfareportingV2_1::Project::Representation - - end - end - - # @private - class ReachReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - collection :dimensions, as: 'dimensions', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - property :kind, as: 'kind' - collection :metrics, as: 'metrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - collection :pivoted_activity_metrics, as: 'pivotedActivityMetrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - collection :reach_by_frequency_metrics, as: 'reachByFrequencyMetrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - end - end - - # @private - class Recipient - class Representation < Google::Apis::Core::JsonRepresentation - property :delivery_type, as: 'deliveryType' - property :email, as: 'email' - property :kind, as: 'kind' - end - end - - # @private - class Region - class Representation < Google::Apis::Core::JsonRepresentation - property :country_code, as: 'countryCode' - property :country_dart_id, as: 'countryDartId' - property :dart_id, as: 'dartId' - property :kind, as: 'kind' - property :name, as: 'name' - property :region_code, as: 'regionCode' - end - end - - # @private - class ListRegionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :regions, as: 'regions', class: Google::Apis::DfareportingV2_1::Region, decorator: Google::Apis::DfareportingV2_1::Region::Representation - - end - end - - # @private - class RemarketingList - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :life_span, as: 'lifeSpan' - property :list_population_rule, as: 'listPopulationRule', class: Google::Apis::DfareportingV2_1::ListPopulationRule, decorator: Google::Apis::DfareportingV2_1::ListPopulationRule::Representation - - property :list_size, as: 'listSize' - property :list_source, as: 'listSource' - property :name, as: 'name' - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class RemarketingListShare - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :remarketing_list_id, as: 'remarketingListId' - collection :shared_account_ids, as: 'sharedAccountIds' - collection :shared_advertiser_ids, as: 'sharedAdvertiserIds' - end - end - - # @private - class ListRemarketingListsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :remarketing_lists, as: 'remarketingLists', class: Google::Apis::DfareportingV2_1::RemarketingList, decorator: Google::Apis::DfareportingV2_1::RemarketingList::Representation - - end - end - - # @private - class Report - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :criteria, as: 'criteria', class: Google::Apis::DfareportingV2_1::Report::Criteria, decorator: Google::Apis::DfareportingV2_1::Report::Criteria::Representation - - property :cross_dimension_reach_criteria, as: 'crossDimensionReachCriteria', class: Google::Apis::DfareportingV2_1::Report::CrossDimensionReachCriteria, decorator: Google::Apis::DfareportingV2_1::Report::CrossDimensionReachCriteria::Representation - - property :delivery, as: 'delivery', class: Google::Apis::DfareportingV2_1::Report::Delivery, decorator: Google::Apis::DfareportingV2_1::Report::Delivery::Representation - - property :etag, as: 'etag' - property :file_name, as: 'fileName' - property :floodlight_criteria, as: 'floodlightCriteria', class: Google::Apis::DfareportingV2_1::Report::FloodlightCriteria, decorator: Google::Apis::DfareportingV2_1::Report::FloodlightCriteria::Representation - - property :format, as: 'format' - property :id, as: 'id' - property :kind, as: 'kind' - property :last_modified_time, as: 'lastModifiedTime' - property :name, as: 'name' - property :owner_profile_id, as: 'ownerProfileId' - property :path_to_conversion_criteria, as: 'pathToConversionCriteria', class: Google::Apis::DfareportingV2_1::Report::PathToConversionCriteria, decorator: Google::Apis::DfareportingV2_1::Report::PathToConversionCriteria::Representation - - property :reach_criteria, as: 'reachCriteria', class: Google::Apis::DfareportingV2_1::Report::ReachCriteria, decorator: Google::Apis::DfareportingV2_1::Report::ReachCriteria::Representation - - property :schedule, as: 'schedule', class: Google::Apis::DfareportingV2_1::Report::Schedule, decorator: Google::Apis::DfareportingV2_1::Report::Schedule::Representation - - property :sub_account_id, as: 'subAccountId' - property :type, as: 'type' - end - - # @private - class Criteria - class Representation < Google::Apis::Core::JsonRepresentation - property :activities, as: 'activities', class: Google::Apis::DfareportingV2_1::Activities, decorator: Google::Apis::DfareportingV2_1::Activities::Representation - - property :custom_rich_media_events, as: 'customRichMediaEvents', class: Google::Apis::DfareportingV2_1::CustomRichMediaEvents, decorator: Google::Apis::DfareportingV2_1::CustomRichMediaEvents::Representation - - property :date_range, as: 'dateRange', class: Google::Apis::DfareportingV2_1::DateRange, decorator: Google::Apis::DfareportingV2_1::DateRange::Representation - - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :dimensions, as: 'dimensions', class: Google::Apis::DfareportingV2_1::SortedDimension, decorator: Google::Apis::DfareportingV2_1::SortedDimension::Representation - - collection :metric_names, as: 'metricNames' - end - end - - # @private - class CrossDimensionReachCriteria - class Representation < Google::Apis::Core::JsonRepresentation - collection :breakdown, as: 'breakdown', class: Google::Apis::DfareportingV2_1::SortedDimension, decorator: Google::Apis::DfareportingV2_1::SortedDimension::Representation - - property :date_range, as: 'dateRange', class: Google::Apis::DfareportingV2_1::DateRange, decorator: Google::Apis::DfareportingV2_1::DateRange::Representation - - property :dimension, as: 'dimension' - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :metric_names, as: 'metricNames' - collection :overlap_metric_names, as: 'overlapMetricNames' - property :pivoted, as: 'pivoted' - end - end - - # @private - class Delivery - class Representation < Google::Apis::Core::JsonRepresentation - property :email_owner, as: 'emailOwner' - property :email_owner_delivery_type, as: 'emailOwnerDeliveryType' - property :message, as: 'message' - collection :recipients, as: 'recipients', class: Google::Apis::DfareportingV2_1::Recipient, decorator: Google::Apis::DfareportingV2_1::Recipient::Representation - - end - end - - # @private - class FloodlightCriteria - class Representation < Google::Apis::Core::JsonRepresentation - collection :custom_rich_media_events, as: 'customRichMediaEvents', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :date_range, as: 'dateRange', class: Google::Apis::DfareportingV2_1::DateRange, decorator: Google::Apis::DfareportingV2_1::DateRange::Representation - - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :dimensions, as: 'dimensions', class: Google::Apis::DfareportingV2_1::SortedDimension, decorator: Google::Apis::DfareportingV2_1::SortedDimension::Representation - - property :floodlight_config_id, as: 'floodlightConfigId', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :metric_names, as: 'metricNames' - property :report_properties, as: 'reportProperties', class: Google::Apis::DfareportingV2_1::Report::FloodlightCriteria::ReportProperties, decorator: Google::Apis::DfareportingV2_1::Report::FloodlightCriteria::ReportProperties::Representation - - end - - # @private - class ReportProperties - class Representation < Google::Apis::Core::JsonRepresentation - property :include_attributed_ip_conversions, as: 'includeAttributedIPConversions' - property :include_unattributed_cookie_conversions, as: 'includeUnattributedCookieConversions' - property :include_unattributed_ip_conversions, as: 'includeUnattributedIPConversions' - end - end - end - - # @private - class PathToConversionCriteria - class Representation < Google::Apis::Core::JsonRepresentation - collection :activity_filters, as: 'activityFilters', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :conversion_dimensions, as: 'conversionDimensions', class: Google::Apis::DfareportingV2_1::SortedDimension, decorator: Google::Apis::DfareportingV2_1::SortedDimension::Representation - - collection :custom_floodlight_variables, as: 'customFloodlightVariables', class: Google::Apis::DfareportingV2_1::SortedDimension, decorator: Google::Apis::DfareportingV2_1::SortedDimension::Representation - - collection :custom_rich_media_events, as: 'customRichMediaEvents', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :date_range, as: 'dateRange', class: Google::Apis::DfareportingV2_1::DateRange, decorator: Google::Apis::DfareportingV2_1::DateRange::Representation - - property :floodlight_config_id, as: 'floodlightConfigId', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :metric_names, as: 'metricNames' - collection :per_interaction_dimensions, as: 'perInteractionDimensions', class: Google::Apis::DfareportingV2_1::SortedDimension, decorator: Google::Apis::DfareportingV2_1::SortedDimension::Representation - - property :report_properties, as: 'reportProperties', class: Google::Apis::DfareportingV2_1::Report::PathToConversionCriteria::ReportProperties, decorator: Google::Apis::DfareportingV2_1::Report::PathToConversionCriteria::ReportProperties::Representation - - end - - # @private - class ReportProperties - class Representation < Google::Apis::Core::JsonRepresentation - property :clicks_lookback_window, as: 'clicksLookbackWindow' - property :impressions_lookback_window, as: 'impressionsLookbackWindow' - property :include_attributed_ip_conversions, as: 'includeAttributedIPConversions' - property :include_unattributed_cookie_conversions, as: 'includeUnattributedCookieConversions' - property :include_unattributed_ip_conversions, as: 'includeUnattributedIPConversions' - property :maximum_click_interactions, as: 'maximumClickInteractions' - property :maximum_impression_interactions, as: 'maximumImpressionInteractions' - property :maximum_interaction_gap, as: 'maximumInteractionGap' - property :pivot_on_interaction_path, as: 'pivotOnInteractionPath' - end - end - end - - # @private - class ReachCriteria - class Representation < Google::Apis::Core::JsonRepresentation - property :activities, as: 'activities', class: Google::Apis::DfareportingV2_1::Activities, decorator: Google::Apis::DfareportingV2_1::Activities::Representation - - property :custom_rich_media_events, as: 'customRichMediaEvents', class: Google::Apis::DfareportingV2_1::CustomRichMediaEvents, decorator: Google::Apis::DfareportingV2_1::CustomRichMediaEvents::Representation - - property :date_range, as: 'dateRange', class: Google::Apis::DfareportingV2_1::DateRange, decorator: Google::Apis::DfareportingV2_1::DateRange::Representation - - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - collection :dimensions, as: 'dimensions', class: Google::Apis::DfareportingV2_1::SortedDimension, decorator: Google::Apis::DfareportingV2_1::SortedDimension::Representation - - property :enable_all_dimension_combinations, as: 'enableAllDimensionCombinations' - collection :metric_names, as: 'metricNames' - collection :reach_by_frequency_metric_names, as: 'reachByFrequencyMetricNames' - end - end - - # @private - class Schedule - class Representation < Google::Apis::Core::JsonRepresentation - property :active, as: 'active' - property :every, as: 'every' - property :expiration_date, as: 'expirationDate', type: Date - - property :repeats, as: 'repeats' - collection :repeats_on_week_days, as: 'repeatsOnWeekDays' - property :runs_on_day_of_month, as: 'runsOnDayOfMonth' - property :start_date, as: 'startDate', type: Date - - end - end - end - - # @private - class ReportCompatibleFields - class Representation < Google::Apis::Core::JsonRepresentation - collection :dimension_filters, as: 'dimensionFilters', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - collection :dimensions, as: 'dimensions', class: Google::Apis::DfareportingV2_1::Dimension, decorator: Google::Apis::DfareportingV2_1::Dimension::Representation - - property :kind, as: 'kind' - collection :metrics, as: 'metrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - collection :pivoted_activity_metrics, as: 'pivotedActivityMetrics', class: Google::Apis::DfareportingV2_1::Metric, decorator: Google::Apis::DfareportingV2_1::Metric::Representation - - end - end - - # @private - class ReportList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DfareportingV2_1::Report, decorator: Google::Apis::DfareportingV2_1::Report::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ReportsConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :exposure_to_conversion_enabled, as: 'exposureToConversionEnabled' - property :lookback_configuration, as: 'lookbackConfiguration', class: Google::Apis::DfareportingV2_1::LookbackConfiguration, decorator: Google::Apis::DfareportingV2_1::LookbackConfiguration::Representation - - property :report_generation_time_zone_id, as: 'reportGenerationTimeZoneId' - end - end - - # @private - class RichMediaExitOverride - class Representation < Google::Apis::Core::JsonRepresentation - property :custom_exit_url, as: 'customExitUrl' - property :exit_id, as: 'exitId' - property :use_custom_exit_url, as: 'useCustomExitUrl' - end - end - - # @private - class Site - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :approved, as: 'approved' - property :directory_site_id, as: 'directorySiteId' - property :directory_site_id_dimension_value, as: 'directorySiteIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :id, as: 'id' - property :id_dimension_value, as: 'idDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :key_name, as: 'keyName' - property :kind, as: 'kind' - property :name, as: 'name' - collection :site_contacts, as: 'siteContacts', class: Google::Apis::DfareportingV2_1::SiteContact, decorator: Google::Apis::DfareportingV2_1::SiteContact::Representation - - property :site_settings, as: 'siteSettings', class: Google::Apis::DfareportingV2_1::SiteSettings, decorator: Google::Apis::DfareportingV2_1::SiteSettings::Representation - - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class SiteContact - class Representation < Google::Apis::Core::JsonRepresentation - property :address, as: 'address' - property :contact_type, as: 'contactType' - property :email, as: 'email' - property :first_name, as: 'firstName' - property :id, as: 'id' - property :last_name, as: 'lastName' - property :phone, as: 'phone' - property :title, as: 'title' - end - end - - # @private - class SiteSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :active_view_opt_out, as: 'activeViewOptOut' - property :creative_settings, as: 'creativeSettings', class: Google::Apis::DfareportingV2_1::CreativeSettings, decorator: Google::Apis::DfareportingV2_1::CreativeSettings::Representation - - property :disable_brand_safe_ads, as: 'disableBrandSafeAds' - property :disable_new_cookie, as: 'disableNewCookie' - property :lookback_configuration, as: 'lookbackConfiguration', class: Google::Apis::DfareportingV2_1::LookbackConfiguration, decorator: Google::Apis::DfareportingV2_1::LookbackConfiguration::Representation - - property :tag_setting, as: 'tagSetting', class: Google::Apis::DfareportingV2_1::TagSetting, decorator: Google::Apis::DfareportingV2_1::TagSetting::Representation - - end - end - - # @private - class ListSitesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :sites, as: 'sites', class: Google::Apis::DfareportingV2_1::Site, decorator: Google::Apis::DfareportingV2_1::Site::Representation - - end - end - - # @private - class Size - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :iab, as: 'iab' - property :id, as: 'id' - property :kind, as: 'kind' - property :width, as: 'width' - end - end - - # @private - class ListSizesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :sizes, as: 'sizes', class: Google::Apis::DfareportingV2_1::Size, decorator: Google::Apis::DfareportingV2_1::Size::Representation - - end - end - - # @private - class SortedDimension - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :name, as: 'name' - property :sort_order, as: 'sortOrder' - end - end - - # @private - class Subaccount - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :available_permission_ids, as: 'availablePermissionIds' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListSubaccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :subaccounts, as: 'subaccounts', class: Google::Apis::DfareportingV2_1::Subaccount, decorator: Google::Apis::DfareportingV2_1::Subaccount::Representation - - end - end - - # @private - class TagData - class Representation < Google::Apis::Core::JsonRepresentation - property :ad_id, as: 'adId' - property :click_tag, as: 'clickTag' - property :creative_id, as: 'creativeId' - property :format, as: 'format' - property :impression_tag, as: 'impressionTag' - end - end - - # @private - class TagSetting - class Representation < Google::Apis::Core::JsonRepresentation - property :additional_key_values, as: 'additionalKeyValues' - property :include_click_through_urls, as: 'includeClickThroughUrls' - property :include_click_tracking, as: 'includeClickTracking' - property :keyword_option, as: 'keywordOption' - end - end - - # @private - class TagSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :dynamic_tag_enabled, as: 'dynamicTagEnabled' - property :image_tag_enabled, as: 'imageTagEnabled' - end - end - - # @private - class TargetWindow - class Representation < Google::Apis::Core::JsonRepresentation - property :custom_html, as: 'customHtml' - property :target_window_option, as: 'targetWindowOption' - end - end - - # @private - class TargetableRemarketingList - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :active, as: 'active' - property :advertiser_id, as: 'advertiserId' - property :advertiser_id_dimension_value, as: 'advertiserIdDimensionValue', class: Google::Apis::DfareportingV2_1::DimensionValue, decorator: Google::Apis::DfareportingV2_1::DimensionValue::Representation - - property :description, as: 'description' - property :id, as: 'id' - property :kind, as: 'kind' - property :life_span, as: 'lifeSpan' - property :list_size, as: 'listSize' - property :list_source, as: 'listSource' - property :name, as: 'name' - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class ListTargetableRemarketingListsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :targetable_remarketing_lists, as: 'targetableRemarketingLists', class: Google::Apis::DfareportingV2_1::TargetableRemarketingList, decorator: Google::Apis::DfareportingV2_1::TargetableRemarketingList::Representation - - end - end - - # @private - class TechnologyTargeting - class Representation < Google::Apis::Core::JsonRepresentation - collection :browsers, as: 'browsers', class: Google::Apis::DfareportingV2_1::Browser, decorator: Google::Apis::DfareportingV2_1::Browser::Representation - - collection :connection_types, as: 'connectionTypes', class: Google::Apis::DfareportingV2_1::ConnectionType, decorator: Google::Apis::DfareportingV2_1::ConnectionType::Representation - - collection :mobile_carriers, as: 'mobileCarriers', class: Google::Apis::DfareportingV2_1::MobileCarrier, decorator: Google::Apis::DfareportingV2_1::MobileCarrier::Representation - - collection :operating_system_versions, as: 'operatingSystemVersions', class: Google::Apis::DfareportingV2_1::OperatingSystemVersion, decorator: Google::Apis::DfareportingV2_1::OperatingSystemVersion::Representation - - collection :operating_systems, as: 'operatingSystems', class: Google::Apis::DfareportingV2_1::OperatingSystem, decorator: Google::Apis::DfareportingV2_1::OperatingSystem::Representation - - collection :platform_types, as: 'platformTypes', class: Google::Apis::DfareportingV2_1::PlatformType, decorator: Google::Apis::DfareportingV2_1::PlatformType::Representation - - end - end - - # @private - class ThirdPartyTrackingUrl - class Representation < Google::Apis::Core::JsonRepresentation - property :third_party_url_type, as: 'thirdPartyUrlType' - property :url, as: 'url' - end - end - - # @private - class UserDefinedVariableConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :data_type, as: 'dataType' - property :report_name, as: 'reportName' - property :variable_type, as: 'variableType' - end - end - - # @private - class UserProfile - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :account_name, as: 'accountName' - property :etag, as: 'etag' - property :kind, as: 'kind' - property :profile_id, as: 'profileId' - property :sub_account_id, as: 'subAccountId' - property :sub_account_name, as: 'subAccountName' - property :user_name, as: 'userName' - end - end - - # @private - class UserProfileList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DfareportingV2_1::UserProfile, decorator: Google::Apis::DfareportingV2_1::UserProfile::Representation - - property :kind, as: 'kind' - end - end - - # @private - class UserRole - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :default_user_role, as: 'defaultUserRole' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :parent_user_role_id, as: 'parentUserRoleId' - collection :permissions, as: 'permissions', class: Google::Apis::DfareportingV2_1::UserRolePermission, decorator: Google::Apis::DfareportingV2_1::UserRolePermission::Representation - - property :subaccount_id, as: 'subaccountId' - end - end - - # @private - class UserRolePermission - class Representation < Google::Apis::Core::JsonRepresentation - property :availability, as: 'availability' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :permission_group_id, as: 'permissionGroupId' - end - end - - # @private - class UserRolePermissionGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class ListUserRolePermissionGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :user_role_permission_groups, as: 'userRolePermissionGroups', class: Google::Apis::DfareportingV2_1::UserRolePermissionGroup, decorator: Google::Apis::DfareportingV2_1::UserRolePermissionGroup::Representation - - end - end - - # @private - class ListUserRolePermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :user_role_permissions, as: 'userRolePermissions', class: Google::Apis::DfareportingV2_1::UserRolePermission, decorator: Google::Apis::DfareportingV2_1::UserRolePermission::Representation - - end - end - - # @private - class ListUserRolesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :user_roles, as: 'userRoles', class: Google::Apis::DfareportingV2_1::UserRole, decorator: Google::Apis::DfareportingV2_1::UserRole::Representation - - end - end - end - end -end diff --git a/generated/google/apis/dfareporting_v2_1/service.rb b/generated/google/apis/dfareporting_v2_1/service.rb deleted file mode 100644 index 675980ebf..000000000 --- a/generated/google/apis/dfareporting_v2_1/service.rb +++ /dev/null @@ -1,8775 +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 DfareportingV2_1 - # DCM/DFA Reporting And Trafficking API - # - # Manage your DoubleClick Campaign Manager ad campaigns and reports. - # - # @example - # require 'google/apis/dfareporting_v2_1' - # - # Dfareporting = Google::Apis::DfareportingV2_1 # Alias the module - # service = Dfareporting::DfareportingService.new - # - # @see https://developers.google.com/doubleclick-advertisers/reporting/ - class DfareportingService < 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/', 'dfareporting/v2.1/') - end - - # Gets the account's active ad summary by account ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] summary_account_id - # 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::DfareportingV2_1::AccountActiveAdSummary] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AccountActiveAdSummary] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_active_ad_summary(profile_id, summary_account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::AccountActiveAdSummary::Representation - command.response_class = Google::Apis::DfareportingV2_1::AccountActiveAdSummary - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['summaryAccountId'] = summary_account_id unless summary_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 - - # Gets one account permission group by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Account permission group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::AccountPermissionGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AccountPermissionGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountPermissionGroups/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::AccountPermissionGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::AccountPermissionGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of account permission groups. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListAccountPermissionGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListAccountPermissionGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission_groups(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountPermissionGroups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListAccountPermissionGroupsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListAccountPermissionGroupsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one account permission by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Account permission 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::DfareportingV2_1::AccountPermission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AccountPermission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountPermissions/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::AccountPermission::Representation - command.response_class = Google::Apis::DfareportingV2_1::AccountPermission - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of account permissions. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListAccountPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListAccountPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permissions(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountPermissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListAccountPermissionsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListAccountPermissionsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one account user profile by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # User profile 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::DfareportingV2_1::AccountUserProfile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AccountUserProfile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_profile(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountUserProfiles/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - command.response_class = Google::Apis::DfareportingV2_1::AccountUserProfile - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new account user profile. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::AccountUserProfile] account_user_profile_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::DfareportingV2_1::AccountUserProfile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AccountUserProfile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_account_user_profile(profile_id, account_user_profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountUserProfiles' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - command.request_object = account_user_profile_object - command.response_representation = Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - command.response_class = Google::Apis::DfareportingV2_1::AccountUserProfile - command.params['profileId'] = profile_id unless profile_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 account user profiles, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] active - # Select only active user profiles. - # @param [Array, String] ids - # Select only user profiles with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name, ID or email. Wildcards (*) are allowed. - # For example, "user profile*2015" will return objects with names like "user - # profile June 2015", "user profile April 2015", or simply "user profile 2015". - # Most of the searches also add wildcards implicitly at the start and the end of - # the search string. For example, a search string of "user profile" will match - # objects with name "my user profile", "user profile 2015", or simply "user - # profile". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] subaccount_id - # Select only user profiles with the specified subaccount ID. - # @param [String] user_role_id - # Select only user profiles with the specified user role 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::DfareportingV2_1::ListAccountUserProfilesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListAccountUserProfilesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_profiles(profile_id, active: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, user_role_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountUserProfiles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListAccountUserProfilesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListAccountUserProfilesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['active'] = active unless active.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['subaccountId'] = subaccount_id unless subaccount_id.nil? - command.query['userRoleId'] = user_role_id unless user_role_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 user profile. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::AccountUserProfile] account_user_profile_object - # @param [String] id - # User profile 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::DfareportingV2_1::AccountUserProfile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AccountUserProfile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_profile(profile_id, account_user_profile_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountUserProfiles' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - command.request_object = account_user_profile_object - command.response_representation = Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - command.response_class = Google::Apis::DfareportingV2_1::AccountUserProfile - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 user profile. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::AccountUserProfile] account_user_profile_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::DfareportingV2_1::AccountUserProfile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AccountUserProfile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_profile(profile_id, account_user_profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accountUserProfiles' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - command.request_object = account_user_profile_object - command.response_representation = Google::Apis::DfareportingV2_1::AccountUserProfile::Representation - command.response_class = Google::Apis::DfareportingV2_1::AccountUserProfile - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one account by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # 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::DfareportingV2_1::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Account] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accounts/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Account::Representation - command.response_class = Google::Apis::DfareportingV2_1::Account - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the list of accounts, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] active - # Select only active accounts. Don't set this field to select both active and - # non-active accounts. - # @param [Array, String] ids - # Select only accounts with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "account*2015" will return objects with names like "account June 2015" - # , "account April 2015", or simply "account 2015". Most of the searches also - # add wildcards implicitly at the start and the end of the search string. For - # example, a search string of "account" will match objects with name "my account" - # , "account 2015", or simply "account". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListAccountsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListAccountsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(profile_id, active: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accounts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListAccountsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListAccountsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['active'] = active unless active.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Account] account_object - # @param [String] id - # 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::DfareportingV2_1::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Account] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_account(profile_id, account_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accounts' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::DfareportingV2_1::Account::Representation - command.response_class = Google::Apis::DfareportingV2_1::Account - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::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::DfareportingV2_1::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Account] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account(profile_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/accounts' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::DfareportingV2_1::Account::Representation - command.response_class = Google::Apis::DfareportingV2_1::Account - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one ad by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Ad 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::DfareportingV2_1::Ad] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Ad] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/ads/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Ad::Representation - command.response_class = Google::Apis::DfareportingV2_1::Ad - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new ad. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Ad] ad_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::DfareportingV2_1::Ad] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Ad] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad(profile_id, ad_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/ads' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Ad::Representation - command.request_object = ad_object - command.response_representation = Google::Apis::DfareportingV2_1::Ad::Representation - command.response_class = Google::Apis::DfareportingV2_1::Ad - command.params['profileId'] = profile_id unless profile_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 ads, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] active - # Select only active ads. - # @param [String] advertiser_id - # Select only ads with this advertiser ID. - # @param [Boolean] archived - # Select only archived ads. - # @param [Array, String] audience_segment_ids - # Select only ads with these audience segment IDs. - # @param [Array, String] campaign_ids - # Select only ads with these campaign IDs. - # @param [String] compatibility - # Select default ads with the specified compatibility. Applicable when type is - # AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL refer to rendering either on - # desktop or on mobile devices for regular or interstitial ads, respectively. - # APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO - # refers to rendering an in-stream video ads developed with the VAST standard. - # @param [Array, String] creative_ids - # Select only ads with these creative IDs assigned. - # @param [Array, String] creative_optimization_configuration_ids - # Select only ads with these creative optimization configuration IDs. - # @param [String] creative_type - # Select only ads with the specified creativeType. - # @param [Boolean] dynamic_click_tracker - # Select only dynamic click trackers. Applicable when type is - # AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, - # select static click trackers. Leave unset to select both. - # @param [Array, String] ids - # Select only ads with these IDs. - # @param [Array, String] landing_page_ids - # Select only ads with these landing page IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] overridden_event_tag_id - # Select only ads with this event tag override ID. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [Array, String] placement_ids - # Select only ads with these placement IDs assigned. - # @param [Array, String] remarketing_list_ids - # Select only ads whose list targeting expression use these remarketing list IDs. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "ad*2015" will return objects with names like "ad June 2015", "ad - # April 2015", or simply "ad 2015". Most of the searches also add wildcards - # implicitly at the start and the end of the search string. For example, a - # search string of "ad" will match objects with name "my ad", "ad 2015", or - # simply "ad". - # @param [Array, String] size_ids - # Select only ads with these size IDs. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [Boolean] ssl_compliant - # Select only ads that are SSL-compliant. - # @param [Boolean] ssl_required - # Select only ads that require SSL. - # @param [Array, String] type - # Select only ads with these types. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListAdsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListAdsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ads(profile_id, active: nil, advertiser_id: nil, archived: nil, audience_segment_ids: nil, campaign_ids: nil, compatibility: nil, creative_ids: nil, creative_optimization_configuration_ids: nil, creative_type: nil, dynamic_click_tracker: nil, ids: nil, landing_page_ids: nil, max_results: nil, overridden_event_tag_id: nil, page_token: nil, placement_ids: nil, remarketing_list_ids: nil, search_string: nil, size_ids: nil, sort_field: nil, sort_order: nil, ssl_compliant: nil, ssl_required: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/ads' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListAdsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListAdsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['active'] = active unless active.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['archived'] = archived unless archived.nil? - command.query['audienceSegmentIds'] = audience_segment_ids unless audience_segment_ids.nil? - command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? - command.query['compatibility'] = compatibility unless compatibility.nil? - command.query['creativeIds'] = creative_ids unless creative_ids.nil? - command.query['creativeOptimizationConfigurationIds'] = creative_optimization_configuration_ids unless creative_optimization_configuration_ids.nil? - command.query['creativeType'] = creative_type unless creative_type.nil? - command.query['dynamicClickTracker'] = dynamic_click_tracker unless dynamic_click_tracker.nil? - command.query['ids'] = ids unless ids.nil? - command.query['landingPageIds'] = landing_page_ids unless landing_page_ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['overriddenEventTagId'] = overridden_event_tag_id unless overridden_event_tag_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['placementIds'] = placement_ids unless placement_ids.nil? - command.query['remarketingListIds'] = remarketing_list_ids unless remarketing_list_ids.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sizeIds'] = size_ids unless size_ids.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['sslCompliant'] = ssl_compliant unless ssl_compliant.nil? - command.query['sslRequired'] = ssl_required unless ssl_required.nil? - command.query['type'] = type unless type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing ad. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Ad] ad_object - # @param [String] id - # Ad 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::DfareportingV2_1::Ad] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Ad] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad(profile_id, ad_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/ads' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Ad::Representation - command.request_object = ad_object - command.response_representation = Google::Apis::DfareportingV2_1::Ad::Representation - command.response_class = Google::Apis::DfareportingV2_1::Ad - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 ad. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Ad] ad_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::DfareportingV2_1::Ad] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Ad] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ad(profile_id, ad_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/ads' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Ad::Representation - command.request_object = ad_object - command.response_representation = Google::Apis::DfareportingV2_1::Ad::Representation - command.response_class = Google::Apis::DfareportingV2_1::Ad - command.params['profileId'] = profile_id unless profile_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 an existing advertiser group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Advertiser group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_advertiser_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertiserGroups/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one advertiser group by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Advertiser group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::AdvertiserGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AdvertiserGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertiserGroups/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::AdvertiserGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new advertiser group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::AdvertiserGroup] advertiser_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::AdvertiserGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AdvertiserGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser_group(profile_id, advertiser_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertiserGroups' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - command.request_object = advertiser_group_object - command.response_representation = Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::AdvertiserGroup - command.params['profileId'] = profile_id unless profile_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 advertiser groups, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] ids - # Select only advertiser groups with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "advertiser*2015" will return objects with names like "advertiser - # group June 2015", "advertiser group April 2015", or simply "advertiser group - # 2015". Most of the searches also add wildcards implicitly at the start and the - # end of the search string. For example, a search string of "advertisergroup" - # will match objects with name "my advertisergroup", "advertisergroup 2015", or - # simply "advertisergroup". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListAdvertiserGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListAdvertiserGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser_groups(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertiserGroups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListAdvertiserGroupsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListAdvertiserGroupsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 advertiser group. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::AdvertiserGroup] advertiser_group_object - # @param [String] id - # Advertiser group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::AdvertiserGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AdvertiserGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser_group(profile_id, advertiser_group_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertiserGroups' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - command.request_object = advertiser_group_object - command.response_representation = Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::AdvertiserGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 advertiser group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::AdvertiserGroup] advertiser_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::AdvertiserGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::AdvertiserGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser_group(profile_id, advertiser_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertiserGroups' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - command.request_object = advertiser_group_object - command.response_representation = Google::Apis::DfareportingV2_1::AdvertiserGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::AdvertiserGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one advertiser by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Advertiser 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::DfareportingV2_1::Advertiser] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Advertiser] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertisers/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Advertiser::Representation - command.response_class = Google::Apis::DfareportingV2_1::Advertiser - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new advertiser. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Advertiser] advertiser_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::DfareportingV2_1::Advertiser] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Advertiser] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser(profile_id, advertiser_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertisers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Advertiser::Representation - command.request_object = advertiser_object - command.response_representation = Google::Apis::DfareportingV2_1::Advertiser::Representation - command.response_class = Google::Apis::DfareportingV2_1::Advertiser - command.params['profileId'] = profile_id unless profile_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 advertisers, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] advertiser_group_ids - # Select only advertisers with these advertiser group IDs. - # @param [Array, String] floodlight_configuration_ids - # Select only advertisers with these floodlight configuration IDs. - # @param [Array, String] ids - # Select only advertisers with these IDs. - # @param [Boolean] include_advertisers_without_groups_only - # Select only advertisers which do not belong to any advertiser group. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [Boolean] only_parent - # Select only advertisers which use another advertiser's floodlight - # configuration. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "advertiser*2015" will return objects with names like "advertiser - # June 2015", "advertiser April 2015", or simply "advertiser 2015". Most of the - # searches also add wildcards implicitly at the start and the end of the search - # string. For example, a search string of "advertiser" will match objects with - # name "my advertiser", "advertiser 2015", or simply "advertiser". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] status - # Select only advertisers with the specified status. - # @param [String] subaccount_id - # Select only advertisers with these subaccount IDs. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListAdvertisersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListAdvertisersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertisers(profile_id, advertiser_group_ids: nil, floodlight_configuration_ids: nil, ids: nil, include_advertisers_without_groups_only: nil, max_results: nil, only_parent: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, status: nil, subaccount_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertisers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListAdvertisersResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListAdvertisersResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserGroupIds'] = advertiser_group_ids unless advertiser_group_ids.nil? - command.query['floodlightConfigurationIds'] = floodlight_configuration_ids unless floodlight_configuration_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['includeAdvertisersWithoutGroupsOnly'] = include_advertisers_without_groups_only unless include_advertisers_without_groups_only.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['onlyParent'] = only_parent unless only_parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['status'] = status unless status.nil? - command.query['subaccountId'] = subaccount_id unless subaccount_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 advertiser. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Advertiser] advertiser_object - # @param [String] id - # Advertiser 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::DfareportingV2_1::Advertiser] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Advertiser] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser(profile_id, advertiser_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertisers' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Advertiser::Representation - command.request_object = advertiser_object - command.response_representation = Google::Apis::DfareportingV2_1::Advertiser::Representation - command.response_class = Google::Apis::DfareportingV2_1::Advertiser - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 advertiser. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Advertiser] advertiser_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::DfareportingV2_1::Advertiser] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Advertiser] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser(profile_id, advertiser_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/advertisers' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Advertiser::Representation - command.request_object = advertiser_object - command.response_representation = Google::Apis::DfareportingV2_1::Advertiser::Representation - command.response_class = Google::Apis::DfareportingV2_1::Advertiser - command.params['profileId'] = profile_id unless profile_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 browsers. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListBrowsersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListBrowsersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_browsers(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/browsers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListBrowsersResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListBrowsersResponse - command.params['profileId'] = profile_id unless profile_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 - - # Associates a creative with the specified campaign. This method creates a - # default ad with dimensions matching the creative in the campaign if such a - # default ad does not exist already. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Campaign ID in this association. - # @param [Google::Apis::DfareportingV2_1::CampaignCreativeAssociation] campaign_creative_association_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::DfareportingV2_1::CampaignCreativeAssociation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CampaignCreativeAssociation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_campaign_creative_association(profile_id, campaign_id, campaign_creative_association_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CampaignCreativeAssociation::Representation - command.request_object = campaign_creative_association_object - command.response_representation = Google::Apis::DfareportingV2_1::CampaignCreativeAssociation::Representation - command.response_class = Google::Apis::DfareportingV2_1::CampaignCreativeAssociation - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_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 list of creative IDs associated with the specified campaign. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Campaign ID in this association. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListCampaignCreativeAssociationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCampaignCreativeAssociationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_campaign_creative_associations(profile_id, campaign_id, max_results: nil, page_token: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCampaignCreativeAssociationsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCampaignCreativeAssociationsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 campaign by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Campaign 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::DfareportingV2_1::Campaign] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Campaign] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_campaign(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Campaign::Representation - command.response_class = Google::Apis::DfareportingV2_1::Campaign - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new campaign. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Campaign] campaign_object - # @param [String] default_landing_page_name - # Default landing page name for this new campaign. Must be less than 256 - # characters long. - # @param [String] default_landing_page_url - # Default landing page URL for this new campaign. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::Campaign] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Campaign] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_campaign(profile_id, campaign_object = nil, default_landing_page_name: nil, default_landing_page_url: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Campaign::Representation - command.request_object = campaign_object - command.response_representation = Google::Apis::DfareportingV2_1::Campaign::Representation - command.response_class = Google::Apis::DfareportingV2_1::Campaign - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['defaultLandingPageName'] = default_landing_page_name unless default_landing_page_name.nil? - command.query['defaultLandingPageUrl'] = default_landing_page_url unless default_landing_page_url.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 campaigns, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] advertiser_group_ids - # Select only campaigns whose advertisers belong to these advertiser groups. - # @param [Array, String] advertiser_ids - # Select only campaigns that belong to these advertisers. - # @param [Boolean] archived - # Select only archived campaigns. Don't set this field to select both archived - # and non-archived campaigns. - # @param [Boolean] at_least_one_optimization_activity - # Select only campaigns that have at least one optimization activity. - # @param [Array, String] excluded_ids - # Exclude campaigns with these IDs. - # @param [Array, String] ids - # Select only campaigns with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] overridden_event_tag_id - # Select only campaigns that have overridden this event tag ID. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For - # example, "campaign*2015" will return campaigns with names like "campaign June - # 2015", "campaign April 2015", or simply "campaign 2015". Most of the searches - # also add wildcards implicitly at the start and the end of the search string. - # For example, a search string of "campaign" will match campaigns with name "my - # campaign", "campaign 2015", or simply "campaign". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] subaccount_id - # Select only campaigns that belong to this subaccount. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListCampaignsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCampaignsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_campaigns(profile_id, advertiser_group_ids: nil, advertiser_ids: nil, archived: nil, at_least_one_optimization_activity: nil, excluded_ids: nil, ids: nil, max_results: nil, overridden_event_tag_id: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCampaignsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCampaignsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserGroupIds'] = advertiser_group_ids unless advertiser_group_ids.nil? - command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? - command.query['archived'] = archived unless archived.nil? - command.query['atLeastOneOptimizationActivity'] = at_least_one_optimization_activity unless at_least_one_optimization_activity.nil? - command.query['excludedIds'] = excluded_ids unless excluded_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['overriddenEventTagId'] = overridden_event_tag_id unless overridden_event_tag_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['subaccountId'] = subaccount_id unless subaccount_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 campaign. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Campaign] campaign_object - # @param [String] id - # Campaign 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::DfareportingV2_1::Campaign] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Campaign] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_campaign(profile_id, campaign_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Campaign::Representation - command.request_object = campaign_object - command.response_representation = Google::Apis::DfareportingV2_1::Campaign::Representation - command.response_class = Google::Apis::DfareportingV2_1::Campaign - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 campaign. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Campaign] campaign_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::DfareportingV2_1::Campaign] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Campaign] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_campaign(profile_id, campaign_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Campaign::Representation - command.request_object = campaign_object - command.response_representation = Google::Apis::DfareportingV2_1::Campaign::Representation - command.response_class = Google::Apis::DfareportingV2_1::Campaign - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one change log by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Change log 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::DfareportingV2_1::ChangeLog] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ChangeLog] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_change_log(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/changeLogs/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ChangeLog::Representation - command.response_class = Google::Apis::DfareportingV2_1::ChangeLog - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of change logs. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] action - # Select only change logs with the specified action. - # @param [Array, String] ids - # Select only change logs with these IDs. - # @param [String] max_change_time - # Select only change logs whose change time is before the specified - # maxChangeTime.The time should be formatted as an RFC3339 date/time string. For - # example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, - # the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, - # day, the letter T, the hour (24-hour clock system), minute, second, and then - # the time zone offset. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] min_change_time - # Select only change logs whose change time is before the specified - # minChangeTime.The time should be formatted as an RFC3339 date/time string. For - # example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, - # the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, - # day, the letter T, the hour (24-hour clock system), minute, second, and then - # the time zone offset. - # @param [Array, String] object_ids - # Select only change logs with these object IDs. - # @param [String] object_type - # Select only change logs with the specified object type. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Select only change logs whose object ID, user name, old or new values match - # the search string. - # @param [Array, String] user_profile_ids - # Select only change logs with these user profile IDs. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListChangeLogsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListChangeLogsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_change_logs(profile_id, action: nil, ids: nil, max_change_time: nil, max_results: nil, min_change_time: nil, object_ids: nil, object_type: nil, page_token: nil, search_string: nil, user_profile_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/changeLogs' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListChangeLogsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListChangeLogsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['action'] = action unless action.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxChangeTime'] = max_change_time unless max_change_time.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['minChangeTime'] = min_change_time unless min_change_time.nil? - command.query['objectIds'] = object_ids unless object_ids.nil? - command.query['objectType'] = object_type unless object_type.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['userProfileIds'] = user_profile_ids unless user_profile_ids.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 cities, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] country_dart_ids - # Select only cities from these countries. - # @param [Array, String] dart_ids - # Select only cities with these DART IDs. - # @param [String] name_prefix - # Select only cities with names starting with this prefix. - # @param [Array, String] region_dart_ids - # Select only cities from these regions. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListCitiesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCitiesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_cities(profile_id, country_dart_ids: nil, dart_ids: nil, name_prefix: nil, region_dart_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/cities' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCitiesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCitiesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['countryDartIds'] = country_dart_ids unless country_dart_ids.nil? - command.query['dartIds'] = dart_ids unless dart_ids.nil? - command.query['namePrefix'] = name_prefix unless name_prefix.nil? - command.query['regionDartIds'] = region_dart_ids unless region_dart_ids.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 connection type by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Connection type 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::DfareportingV2_1::ConnectionType] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ConnectionType] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_connection_type(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/connectionTypes/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ConnectionType::Representation - command.response_class = Google::Apis::DfareportingV2_1::ConnectionType - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of connection types. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListConnectionTypesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListConnectionTypesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_connection_types(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/connectionTypes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListConnectionTypesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListConnectionTypesResponse - command.params['profileId'] = profile_id unless profile_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 an existing content category. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Content category 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 [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_content_category(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/contentCategories/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one content category by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Content category 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::DfareportingV2_1::ContentCategory] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ContentCategory] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_content_category(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/contentCategories/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ContentCategory::Representation - command.response_class = Google::Apis::DfareportingV2_1::ContentCategory - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new content category. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::ContentCategory] content_category_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::DfareportingV2_1::ContentCategory] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ContentCategory] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_content_category(profile_id, content_category_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/contentCategories' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::ContentCategory::Representation - command.request_object = content_category_object - command.response_representation = Google::Apis::DfareportingV2_1::ContentCategory::Representation - command.response_class = Google::Apis::DfareportingV2_1::ContentCategory - command.params['profileId'] = profile_id unless profile_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 content categories, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] ids - # Select only content categories with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "contentcategory*2015" will return objects with names like " - # contentcategory June 2015", "contentcategory April 2015", or simply " - # contentcategory 2015". Most of the searches also add wildcards implicitly at - # the start and the end of the search string. For example, a search string of " - # contentcategory" will match objects with name "my contentcategory", " - # contentcategory 2015", or simply "contentcategory". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListContentCategoriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListContentCategoriesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_content_categories(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/contentCategories' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListContentCategoriesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListContentCategoriesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 content category. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::ContentCategory] content_category_object - # @param [String] id - # Content category 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::DfareportingV2_1::ContentCategory] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ContentCategory] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_content_category(profile_id, content_category_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/contentCategories' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::ContentCategory::Representation - command.request_object = content_category_object - command.response_representation = Google::Apis::DfareportingV2_1::ContentCategory::Representation - command.response_class = Google::Apis::DfareportingV2_1::ContentCategory - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 content category. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::ContentCategory] content_category_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::DfareportingV2_1::ContentCategory] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ContentCategory] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_content_category(profile_id, content_category_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/contentCategories' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::ContentCategory::Representation - command.request_object = content_category_object - command.response_representation = Google::Apis::DfareportingV2_1::ContentCategory::Representation - command.response_class = Google::Apis::DfareportingV2_1::ContentCategory - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one country by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] dart_id - # Country DART 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::DfareportingV2_1::Country] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Country] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_country(profile_id, dart_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/countries/{dartId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Country::Representation - command.response_class = Google::Apis::DfareportingV2_1::Country - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['dartId'] = dart_id unless dart_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 countries. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListCountriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCountriesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_countries(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/countries' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCountriesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCountriesResponse - command.params['profileId'] = profile_id unless profile_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 creative asset. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] advertiser_id - # Advertiser ID of this creative. This is a required field. - # @param [Google::Apis::DfareportingV2_1::CreativeAssetMetadata] creative_asset_metadata_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::CreativeAssetMetadata] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeAssetMetadata] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_asset(profile_id, advertiser_id, creative_asset_metadata_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::DfareportingV2_1::CreativeAssetMetadata::Representation - command.request_object = creative_asset_metadata_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeAssetMetadata::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeAssetMetadata - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['advertiserId'] = advertiser_id unless advertiser_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 an existing creative field value. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] creative_field_id - # Creative field ID for this creative field value. - # @param [String] id - # Creative Field Value 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 [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_creative_field_value(profile_id, creative_field_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one creative field value by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] creative_field_id - # Creative field ID for this creative field value. - # @param [String] id - # Creative Field Value 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::DfareportingV2_1::CreativeFieldValue] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeFieldValue] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_field_value(profile_id, creative_field_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeFieldValue - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new creative field value. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] creative_field_id - # Creative field ID for this creative field value. - # @param [Google::Apis::DfareportingV2_1::CreativeFieldValue] creative_field_value_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::DfareportingV2_1::CreativeFieldValue] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeFieldValue] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_field_value(profile_id, creative_field_id, creative_field_value_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - command.request_object = creative_field_value_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeFieldValue - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['creativeFieldId'] = creative_field_id unless creative_field_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 creative field values, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] creative_field_id - # Creative field ID for this creative field value. - # @param [Array, String] ids - # Select only creative field values with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for creative field values by their values. Wildcards (e.g. *) - # are not allowed. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListCreativeFieldValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCreativeFieldValuesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_field_values(profile_id, creative_field_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCreativeFieldValuesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCreativeFieldValuesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 creative field value. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] creative_field_id - # Creative field ID for this creative field value. - # @param [Google::Apis::DfareportingV2_1::CreativeFieldValue] creative_field_value_object - # @param [String] id - # Creative Field Value 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::DfareportingV2_1::CreativeFieldValue] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeFieldValue] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_field_value(profile_id, creative_field_id, creative_field_value_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - command.request_object = creative_field_value_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeFieldValue - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? - command.query['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 creative field value. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] creative_field_id - # Creative field ID for this creative field value. - # @param [Google::Apis::DfareportingV2_1::CreativeFieldValue] creative_field_value_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::DfareportingV2_1::CreativeFieldValue] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeFieldValue] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_field_value(profile_id, creative_field_id, creative_field_value_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - command.request_object = creative_field_value_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeFieldValue::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeFieldValue - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['creativeFieldId'] = creative_field_id unless creative_field_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 an existing creative field. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Creative Field 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 [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_creative_field(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one creative field by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Creative Field 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::DfareportingV2_1::CreativeField] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeField] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_field(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::CreativeField::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeField - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new creative field. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::CreativeField] creative_field_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::DfareportingV2_1::CreativeField] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeField] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_field(profile_id, creative_field_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeField::Representation - command.request_object = creative_field_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeField::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeField - command.params['profileId'] = profile_id unless profile_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 creative fields, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] advertiser_ids - # Select only creative fields that belong to these advertisers. - # @param [Array, String] ids - # Select only creative fields with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for creative fields by name or ID. Wildcards (*) are allowed. - # For example, "creativefield*2015" will return creative fields with names like " - # creativefield June 2015", "creativefield April 2015", or simply "creativefield - # 2015". Most of the searches also add wild-cards implicitly at the start and - # the end of the search string. For example, a search string of "creativefield" - # will match creative fields with the name "my creativefield", "creativefield - # 2015", or simply "creativefield". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListCreativeFieldsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCreativeFieldsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_fields(profile_id, advertiser_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCreativeFieldsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCreativeFieldsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 creative field. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::CreativeField] creative_field_object - # @param [String] id - # Creative Field 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::DfareportingV2_1::CreativeField] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeField] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_field(profile_id, creative_field_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeField::Representation - command.request_object = creative_field_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeField::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeField - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 creative field. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::CreativeField] creative_field_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::DfareportingV2_1::CreativeField] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeField] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_field(profile_id, creative_field_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeFields' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeField::Representation - command.request_object = creative_field_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeField::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeField - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one creative group by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Creative group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::CreativeGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeGroups/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::CreativeGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new creative group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::CreativeGroup] creative_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::CreativeGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group(profile_id, creative_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeGroups' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeGroup::Representation - command.request_object = creative_group_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeGroup - command.params['profileId'] = profile_id unless profile_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 creative groups, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] advertiser_ids - # Select only creative groups that belong to these advertisers. - # @param [Fixnum] group_number - # Select only creative groups that belong to this subgroup. - # @param [Array, String] ids - # Select only creative groups with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for creative groups by name or ID. Wildcards (*) are allowed. - # For example, "creativegroup*2015" will return creative groups with names like " - # creativegroup June 2015", "creativegroup April 2015", or simply "creativegroup - # 2015". Most of the searches also add wild-cards implicitly at the start and - # the end of the search string. For example, a search string of "creativegroup" - # will match creative groups with the name "my creativegroup", "creativegroup - # 2015", or simply "creativegroup". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListCreativeGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCreativeGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_groups(profile_id, advertiser_ids: nil, group_number: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeGroups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCreativeGroupsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCreativeGroupsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? - command.query['groupNumber'] = group_number unless group_number.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 creative group. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::CreativeGroup] creative_group_object - # @param [String] id - # Creative group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::CreativeGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_group(profile_id, creative_group_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeGroups' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeGroup::Representation - command.request_object = creative_group_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 creative group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::CreativeGroup] creative_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::CreativeGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CreativeGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_creative_group(profile_id, creative_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creativeGroups' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::CreativeGroup::Representation - command.request_object = creative_group_object - command.response_representation = Google::Apis::DfareportingV2_1::CreativeGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::CreativeGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one creative by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Creative 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::DfareportingV2_1::Creative] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::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(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creatives/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Creative::Representation - command.response_class = Google::Apis::DfareportingV2_1::Creative - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new creative. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::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::DfareportingV2_1::Creative] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::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(profile_id, creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creatives' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Creative::Representation - command.request_object = creative_object - command.response_representation = Google::Apis::DfareportingV2_1::Creative::Representation - command.response_class = Google::Apis::DfareportingV2_1::Creative - command.params['profileId'] = profile_id unless profile_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 creatives, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] active - # Select only active creatives. Leave blank to select active and inactive - # creatives. - # @param [String] advertiser_id - # Select only creatives with this advertiser ID. - # @param [Boolean] archived - # Select only archived creatives. Leave blank to select archived and unarchived - # creatives. - # @param [String] campaign_id - # Select only creatives with this campaign ID. - # @param [Array, String] companion_creative_ids - # Select only in-stream video creatives with these companion IDs. - # @param [Array, String] creative_field_ids - # Select only creatives with these creative field IDs. - # @param [Array, String] ids - # Select only creatives with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [Array, String] rendering_ids - # Select only creatives with these rendering IDs. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "creative*2015" will return objects with names like "creative June - # 2015", "creative April 2015", or simply "creative 2015". Most of the searches - # also add wildcards implicitly at the start and the end of the search string. - # For example, a search string of "creative" will match objects with name "my - # creative", "creative 2015", or simply "creative". - # @param [Array, String] size_ids - # Select only creatives with these size IDs. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] studio_creative_id - # Select only creatives corresponding to this Studio creative ID. - # @param [Array, String] types - # Select only creatives with these creative types. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListCreativesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListCreativesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_creatives(profile_id, active: nil, advertiser_id: nil, archived: nil, campaign_id: nil, companion_creative_ids: nil, creative_field_ids: nil, ids: nil, max_results: nil, page_token: nil, rendering_ids: nil, search_string: nil, size_ids: nil, sort_field: nil, sort_order: nil, studio_creative_id: nil, types: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creatives' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListCreativesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListCreativesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['active'] = active unless active.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['archived'] = archived unless archived.nil? - command.query['campaignId'] = campaign_id unless campaign_id.nil? - command.query['companionCreativeIds'] = companion_creative_ids unless companion_creative_ids.nil? - command.query['creativeFieldIds'] = creative_field_ids unless creative_field_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['renderingIds'] = rendering_ids unless rendering_ids.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sizeIds'] = size_ids unless size_ids.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['studioCreativeId'] = studio_creative_id unless studio_creative_id.nil? - command.query['types'] = types unless types.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 creative. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Creative] creative_object - # @param [String] id - # Creative 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::DfareportingV2_1::Creative] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::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 patch_creative(profile_id, creative_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creatives' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Creative::Representation - command.request_object = creative_object - command.response_representation = Google::Apis::DfareportingV2_1::Creative::Representation - command.response_class = Google::Apis::DfareportingV2_1::Creative - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 creative. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::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::DfareportingV2_1::Creative] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Creative] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_creative(profile_id, creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/creatives' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Creative::Representation - command.request_object = creative_object - command.response_representation = Google::Apis::DfareportingV2_1::Creative::Representation - command.response_class = Google::Apis::DfareportingV2_1::Creative - command.params['profileId'] = profile_id unless profile_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 list of report dimension values for a list of filters. - # @param [String] profile_id - # The DFA user profile ID. - # @param [Google::Apis::DfareportingV2_1::DimensionValueRequest] dimension_value_request_object - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # The value of the nextToken from the previous result page. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::DimensionValueList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::DimensionValueList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dimension_value(profile_id, dimension_value_request_object = nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/dimensionvalues/query' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::DimensionValueRequest::Representation - command.request_object = dimension_value_request_object - command.response_representation = Google::Apis::DfareportingV2_1::DimensionValueList::Representation - command.response_class = Google::Apis::DfareportingV2_1::DimensionValueList - command.params['profileId'] = profile_id unless profile_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 - - # Gets one directory site contact by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Directory site contact 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::DfareportingV2_1::DirectorySiteContact] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::DirectorySiteContact] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_directory_site_contact(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/directorySiteContacts/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::DirectorySiteContact::Representation - command.response_class = Google::Apis::DfareportingV2_1::DirectorySiteContact - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of directory site contacts, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] directory_site_ids - # Select only directory site contacts with these directory site IDs. This is a - # required field. - # @param [Array, String] ids - # Select only directory site contacts with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name, ID or email. Wildcards (*) are allowed. - # For example, "directory site contact*2015" will return objects with names like - # "directory site contact June 2015", "directory site contact April 2015", or - # simply "directory site contact 2015". Most of the searches also add wildcards - # implicitly at the start and the end of the search string. For example, a - # search string of "directory site contact" will match objects with name "my - # directory site contact", "directory site contact 2015", or simply "directory - # site contact". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListDirectorySiteContactsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListDirectorySiteContactsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_directory_site_contacts(profile_id, directory_site_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/directorySiteContacts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListDirectorySiteContactsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListDirectorySiteContactsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 directory site by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Directory site 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::DfareportingV2_1::DirectorySite] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::DirectorySite] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_directory_site(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/directorySites/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::DirectorySite::Representation - command.response_class = Google::Apis::DfareportingV2_1::DirectorySite - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new directory site. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::DirectorySite] directory_site_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::DfareportingV2_1::DirectorySite] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::DirectorySite] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_directory_site(profile_id, directory_site_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/directorySites' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::DirectorySite::Representation - command.request_object = directory_site_object - command.response_representation = Google::Apis::DfareportingV2_1::DirectorySite::Representation - command.response_class = Google::Apis::DfareportingV2_1::DirectorySite - command.params['profileId'] = profile_id unless profile_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 directory sites, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] accepts_in_stream_video_placements - # This search filter is no longer supported and will have no effect on the - # results returned. - # @param [Boolean] accepts_interstitial_placements - # This search filter is no longer supported and will have no effect on the - # results returned. - # @param [Boolean] accepts_publisher_paid_placements - # Select only directory sites that accept publisher paid placements. This field - # can be left blank. - # @param [Boolean] active - # Select only active directory sites. Leave blank to retrieve both active and - # inactive directory sites. - # @param [String] country_id - # Select only directory sites with this country ID. - # @param [String] dfp_network_code - # Select only directory sites with this DFP network code. - # @param [Array, String] ids - # Select only directory sites with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] parent_id - # Select only directory sites with this parent ID. - # @param [String] search_string - # Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. - # For example, "directory site*2015" will return objects with names like " - # directory site June 2015", "directory site April 2015", or simply "directory - # site 2015". Most of the searches also add wildcards implicitly at the start - # and the end of the search string. For example, a search string of "directory - # site" will match objects with name "my directory site", "directory site 2015" - # or simply, "directory site". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListDirectorySitesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListDirectorySitesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_directory_sites(profile_id, accepts_in_stream_video_placements: nil, accepts_interstitial_placements: nil, accepts_publisher_paid_placements: nil, active: nil, country_id: nil, dfp_network_code: nil, ids: nil, max_results: nil, page_token: nil, parent_id: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/directorySites' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListDirectorySitesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListDirectorySitesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['acceptsInStreamVideoPlacements'] = accepts_in_stream_video_placements unless accepts_in_stream_video_placements.nil? - command.query['acceptsInterstitialPlacements'] = accepts_interstitial_placements unless accepts_interstitial_placements.nil? - command.query['acceptsPublisherPaidPlacements'] = accepts_publisher_paid_placements unless accepts_publisher_paid_placements.nil? - command.query['active'] = active unless active.nil? - command.query['countryId'] = country_id unless country_id.nil? - command.query['dfp_network_code'] = dfp_network_code unless dfp_network_code.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['parentId'] = parent_id unless parent_id.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 event tag. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Event tag 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 [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_event_tag(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/eventTags/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one event tag by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Event tag 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::DfareportingV2_1::EventTag] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::EventTag] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event_tag(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/eventTags/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::EventTag::Representation - command.response_class = Google::Apis::DfareportingV2_1::EventTag - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new event tag. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::EventTag] event_tag_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::DfareportingV2_1::EventTag] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::EventTag] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event_tag(profile_id, event_tag_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/eventTags' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::EventTag::Representation - command.request_object = event_tag_object - command.response_representation = Google::Apis::DfareportingV2_1::EventTag::Representation - command.response_class = Google::Apis::DfareportingV2_1::EventTag - command.params['profileId'] = profile_id unless profile_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 event tags, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] ad_id - # Select only event tags that belong to this ad. - # @param [String] advertiser_id - # Select only event tags that belong to this advertiser. - # @param [String] campaign_id - # Select only event tags that belong to this campaign. - # @param [Boolean] definitions_only - # Examine only the specified ad or campaign or advertiser's event tags for - # matching selector criteria. When set to false, the parent advertiser and - # parent campaign is examined as well. In addition, when set to false, the - # status field is examined as well along with the enabledByDefault field. - # @param [Boolean] enabled - # Select only enabled event tags. When definitionsOnly is set to true, only the - # specified advertiser or campaign's event tags' enabledByDefault field is - # examined. When definitionsOnly is set to false, the specified ad or specified - # campaign's parent advertiser's or parent campaign's event tags' - # enabledByDefault and status fields are examined as well. - # @param [Array, String] event_tag_types - # Select only event tags with the specified event tag types. Event tag types can - # be used to specify whether to use a third-party pixel, a third-party - # JavaScript URL, or a third-party click-through URL for either impression or - # click tracking. - # @param [Array, String] ids - # Select only event tags with these IDs. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "eventtag*2015" will return objects with names like "eventtag June - # 2015", "eventtag April 2015", or simply "eventtag 2015". Most of the searches - # also add wildcards implicitly at the start and the end of the search string. - # For example, a search string of "eventtag" will match objects with name "my - # eventtag", "eventtag 2015", or simply "eventtag". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListEventTagsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListEventTagsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event_tags(profile_id, ad_id: nil, advertiser_id: nil, campaign_id: nil, definitions_only: nil, enabled: nil, event_tag_types: nil, ids: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/eventTags' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListEventTagsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListEventTagsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['adId'] = ad_id unless ad_id.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['campaignId'] = campaign_id unless campaign_id.nil? - command.query['definitionsOnly'] = definitions_only unless definitions_only.nil? - command.query['enabled'] = enabled unless enabled.nil? - command.query['eventTagTypes'] = event_tag_types unless event_tag_types.nil? - command.query['ids'] = ids unless ids.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 event tag. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::EventTag] event_tag_object - # @param [String] id - # Event tag 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::DfareportingV2_1::EventTag] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::EventTag] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event_tag(profile_id, event_tag_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/eventTags' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::EventTag::Representation - command.request_object = event_tag_object - command.response_representation = Google::Apis::DfareportingV2_1::EventTag::Representation - command.response_class = Google::Apis::DfareportingV2_1::EventTag - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 event tag. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::EventTag] event_tag_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::DfareportingV2_1::EventTag] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::EventTag] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event_tag(profile_id, event_tag_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/eventTags' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::EventTag::Representation - command.request_object = event_tag_object - command.response_representation = Google::Apis::DfareportingV2_1::EventTag::Representation - command.response_class = Google::Apis::DfareportingV2_1::EventTag - command.params['profileId'] = profile_id unless profile_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 report file by its report ID and file ID. - # @param [String] report_id - # The ID of the report. - # @param [String] file_id - # The ID of the report file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_file(report_id, file_id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'reports/{reportId}/files/{fileId}' - 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::DfareportingV2_1::File::Representation - command.response_class = Google::Apis::DfareportingV2_1::File - command.params['reportId'] = report_id unless report_id.nil? - command.params['fileId'] = file_id unless file_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 files for a user profile. - # @param [String] profile_id - # The DFA profile ID. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # The value of the nextToken from the previous result page. - # @param [String] scope - # The scope that defines which results are returned, default is 'MINE'. - # @param [String] sort_field - # The field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is 'DESCENDING'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::FileList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FileList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_files(profile_id, max_results: nil, page_token: nil, scope: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/files' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::FileList::Representation - command.response_class = Google::Apis::DfareportingV2_1::FileList - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['scope'] = scope unless scope.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 floodlight activity. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Floodlight activity 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 [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_floodlight_activity(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivities/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Generates a tag for a floodlight activity. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] floodlight_activity_id - # Floodlight activity ID for which we want to generate a tag. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::FloodlightActivitiesGenerateTagResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivitiesGenerateTagResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity_tag(profile_id, floodlight_activity_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivities/generatetag' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivitiesGenerateTagResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivitiesGenerateTagResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['floodlightActivityId'] = floodlight_activity_id unless floodlight_activity_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one floodlight activity by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Floodlight activity 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::DfareportingV2_1::FloodlightActivity] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivity] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivities/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivity - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new floodlight activity. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightActivity] floodlight_activity_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::DfareportingV2_1::FloodlightActivity] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivity] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity(profile_id, floodlight_activity_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivities' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - command.request_object = floodlight_activity_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivity - command.params['profileId'] = profile_id unless profile_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 floodlight activities, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] advertiser_id - # Select only floodlight activities for the specified advertiser ID. Must - # specify either ids, advertiserId, or floodlightConfigurationId for a non-empty - # result. - # @param [Array, String] floodlight_activity_group_ids - # Select only floodlight activities with the specified floodlight activity group - # IDs. - # @param [String] floodlight_activity_group_name - # Select only floodlight activities with the specified floodlight activity group - # name. - # @param [String] floodlight_activity_group_tag_string - # Select only floodlight activities with the specified floodlight activity group - # tag string. - # @param [String] floodlight_activity_group_type - # Select only floodlight activities with the specified floodlight activity group - # type. - # @param [String] floodlight_configuration_id - # Select only floodlight activities for the specified floodlight configuration - # ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a - # non-empty result. - # @param [Array, String] ids - # Select only floodlight activities with the specified IDs. Must specify either - # ids, advertiserId, or floodlightConfigurationId for a non-empty result. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "floodlightactivity*2015" will return objects with names like " - # floodlightactivity June 2015", "floodlightactivity April 2015", or simply " - # floodlightactivity 2015". Most of the searches also add wildcards implicitly - # at the start and the end of the search string. For example, a search string of - # "floodlightactivity" will match objects with name "my floodlightactivity - # activity", "floodlightactivity 2015", or simply "floodlightactivity". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] tag_string - # Select only floodlight activities with the specified tag string. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListFloodlightActivitiesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListFloodlightActivitiesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activities(profile_id, advertiser_id: nil, floodlight_activity_group_ids: nil, floodlight_activity_group_name: nil, floodlight_activity_group_tag_string: nil, floodlight_activity_group_type: nil, floodlight_configuration_id: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, tag_string: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivities' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListFloodlightActivitiesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListFloodlightActivitiesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['floodlightActivityGroupIds'] = floodlight_activity_group_ids unless floodlight_activity_group_ids.nil? - command.query['floodlightActivityGroupName'] = floodlight_activity_group_name unless floodlight_activity_group_name.nil? - command.query['floodlightActivityGroupTagString'] = floodlight_activity_group_tag_string unless floodlight_activity_group_tag_string.nil? - command.query['floodlightActivityGroupType'] = floodlight_activity_group_type unless floodlight_activity_group_type.nil? - command.query['floodlightConfigurationId'] = floodlight_configuration_id unless floodlight_configuration_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['tagString'] = tag_string unless tag_string.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 floodlight activity. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightActivity] floodlight_activity_object - # @param [String] id - # Floodlight activity 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::DfareportingV2_1::FloodlightActivity] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivity] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity(profile_id, floodlight_activity_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivities' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - command.request_object = floodlight_activity_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivity - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 floodlight activity. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightActivity] floodlight_activity_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::DfareportingV2_1::FloodlightActivity] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivity] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity(profile_id, floodlight_activity_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivities' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - command.request_object = floodlight_activity_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivity::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivity - command.params['profileId'] = profile_id unless profile_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 an existing floodlight activity group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Floodlight activity Group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_floodlight_activity_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivityGroups/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one floodlight activity group by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Floodlight activity Group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::FloodlightActivityGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivityGroups/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivityGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new floodlight activity group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] floodlight_activity_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity_group(profile_id, floodlight_activity_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivityGroups' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - command.request_object = floodlight_activity_group_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivityGroup - command.params['profileId'] = profile_id unless profile_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 floodlight activity groups, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] advertiser_id - # Select only floodlight activity groups with the specified advertiser ID. Must - # specify either advertiserId or floodlightConfigurationId for a non-empty - # result. - # @param [String] floodlight_configuration_id - # Select only floodlight activity groups with the specified floodlight - # configuration ID. Must specify either advertiserId, or - # floodlightConfigurationId for a non-empty result. - # @param [Array, String] ids - # Select only floodlight activity groups with the specified IDs. Must specify - # either advertiserId or floodlightConfigurationId for a non-empty result. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "floodlightactivitygroup*2015" will return objects with names like " - # floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or - # simply "floodlightactivitygroup 2015". Most of the searches also add wildcards - # implicitly at the start and the end of the search string. For example, a - # search string of "floodlightactivitygroup" will match objects with name "my - # floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply " - # floodlightactivitygroup". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] type - # Select only floodlight activity groups with the specified floodlight activity - # group type. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListFloodlightActivityGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListFloodlightActivityGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity_groups(profile_id, advertiser_id: nil, floodlight_configuration_id: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivityGroups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListFloodlightActivityGroupsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListFloodlightActivityGroupsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['floodlightConfigurationId'] = floodlight_configuration_id unless floodlight_configuration_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['type'] = type unless type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing floodlight activity group. This method supports patch - # semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] floodlight_activity_group_object - # @param [String] id - # Floodlight activity Group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::FloodlightActivityGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity_group(profile_id, floodlight_activity_group_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivityGroups' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - command.request_object = floodlight_activity_group_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivityGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 floodlight activity group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] floodlight_activity_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightActivityGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_activity_group(profile_id, floodlight_activity_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightActivityGroups' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - command.request_object = floodlight_activity_group_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightActivityGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightActivityGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one floodlight configuration by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Floodlight configuration 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::DfareportingV2_1::FloodlightConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_configuration(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightConfigurations/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightConfiguration::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightConfiguration - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of floodlight configurations, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] ids - # Set of IDs of floodlight configurations to retrieve. Required field; otherwise - # an empty list 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::DfareportingV2_1::ListFloodlightConfigurationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListFloodlightConfigurationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_configurations(profile_id, ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightConfigurations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListFloodlightConfigurationsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListFloodlightConfigurationsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['ids'] = ids unless ids.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 floodlight configuration. This method supports patch - # semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightConfiguration] floodlight_configuration_object - # @param [String] id - # Floodlight configuration 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::DfareportingV2_1::FloodlightConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_configuration(profile_id, floodlight_configuration_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightConfigurations' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightConfiguration::Representation - command.request_object = floodlight_configuration_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightConfiguration::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightConfiguration - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 floodlight configuration. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::FloodlightConfiguration] floodlight_configuration_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::DfareportingV2_1::FloodlightConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FloodlightConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_floodlight_configuration(profile_id, floodlight_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/floodlightConfigurations' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::FloodlightConfiguration::Representation - command.request_object = floodlight_configuration_object - command.response_representation = Google::Apis::DfareportingV2_1::FloodlightConfiguration::Representation - command.response_class = Google::Apis::DfareportingV2_1::FloodlightConfiguration - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one inventory item by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] project_id - # Project ID for order documents. - # @param [String] id - # Inventory item 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::DfareportingV2_1::InventoryItem] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::InventoryItem] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_inventory_item(profile_id, project_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::InventoryItem::Representation - command.response_class = Google::Apis::DfareportingV2_1::InventoryItem - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['projectId'] = project_id unless project_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of inventory items, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] project_id - # Project ID for order documents. - # @param [Array, String] ids - # Select only inventory items with these IDs. - # @param [Boolean] in_plan - # Select only inventory items that are in plan. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [Array, String] order_id - # Select only inventory items that belong to specified orders. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [Array, String] site_id - # Select only inventory items that are associated with these sites. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListInventoryItemsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListInventoryItemsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_inventory_items(profile_id, project_id, ids: nil, in_plan: nil, max_results: nil, order_id: nil, page_token: nil, site_id: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects/{projectId}/inventoryItems' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListInventoryItemsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListInventoryItemsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['projectId'] = project_id unless project_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['inPlan'] = in_plan unless in_plan.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderId'] = order_id unless order_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['siteId'] = site_id unless site_id.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 campaign landing page. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Landing page campaign ID. - # @param [String] id - # Landing page 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 [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_landing_page(profile_id, campaign_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one campaign landing page by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Landing page campaign ID. - # @param [String] id - # Landing page 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::DfareportingV2_1::LandingPage] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::LandingPage] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_landing_page(profile_id, campaign_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::LandingPage::Representation - command.response_class = Google::Apis::DfareportingV2_1::LandingPage - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new landing page for the specified campaign. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Landing page campaign ID. - # @param [Google::Apis::DfareportingV2_1::LandingPage] landing_page_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::DfareportingV2_1::LandingPage] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::LandingPage] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_landing_page(profile_id, campaign_id, landing_page_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::LandingPage::Representation - command.request_object = landing_page_object - command.response_representation = Google::Apis::DfareportingV2_1::LandingPage::Representation - command.response_class = Google::Apis::DfareportingV2_1::LandingPage - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_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 list of landing pages for the specified campaign. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Landing page campaign 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::DfareportingV2_1::ListLandingPagesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListLandingPagesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_landing_pages(profile_id, campaign_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListLandingPagesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListLandingPagesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_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 campaign landing page. This method supports patch - # semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Landing page campaign ID. - # @param [Google::Apis::DfareportingV2_1::LandingPage] landing_page_object - # @param [String] id - # Landing page 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::DfareportingV2_1::LandingPage] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::LandingPage] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_landing_page(profile_id, campaign_id, landing_page_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::LandingPage::Representation - command.request_object = landing_page_object - command.response_representation = Google::Apis::DfareportingV2_1::LandingPage::Representation - command.response_class = Google::Apis::DfareportingV2_1::LandingPage - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_id.nil? - command.query['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 campaign landing page. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Landing page campaign ID. - # @param [Google::Apis::DfareportingV2_1::LandingPage] landing_page_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::DfareportingV2_1::LandingPage] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::LandingPage] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_landing_page(profile_id, campaign_id, landing_page_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::LandingPage::Representation - command.request_object = landing_page_object - command.response_representation = Google::Apis::DfareportingV2_1::LandingPage::Representation - command.response_class = Google::Apis::DfareportingV2_1::LandingPage - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['campaignId'] = campaign_id unless campaign_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 metros. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListMetrosResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListMetrosResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metros(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/metros' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListMetrosResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListMetrosResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one mobile carrier by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Mobile carrier 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::DfareportingV2_1::MobileCarrier] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::MobileCarrier] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mobile_carrier(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/mobileCarriers/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::MobileCarrier::Representation - command.response_class = Google::Apis::DfareportingV2_1::MobileCarrier - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of mobile carriers. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListMobileCarriersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListMobileCarriersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mobile_carriers(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/mobileCarriers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListMobileCarriersResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListMobileCarriersResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one operating system version by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Operating system version 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::DfareportingV2_1::OperatingSystemVersion] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::OperatingSystemVersion] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_operating_system_version(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/operatingSystemVersions/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::OperatingSystemVersion::Representation - command.response_class = Google::Apis::DfareportingV2_1::OperatingSystemVersion - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of operating system versions. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListOperatingSystemVersionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListOperatingSystemVersionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_operating_system_versions(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/operatingSystemVersions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListOperatingSystemVersionsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListOperatingSystemVersionsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one operating system by DART ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] dart_id - # Operating system DART 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::DfareportingV2_1::OperatingSystem] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::OperatingSystem] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_operating_system(profile_id, dart_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/operatingSystems/{dartId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::OperatingSystem::Representation - command.response_class = Google::Apis::DfareportingV2_1::OperatingSystem - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['dartId'] = dart_id unless dart_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 operating systems. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListOperatingSystemsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListOperatingSystemsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_operating_systems(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/operatingSystems' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListOperatingSystemsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListOperatingSystemsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one order document by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] project_id - # Project ID for order documents. - # @param [String] id - # Order document 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::DfareportingV2_1::OrderDocument] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::OrderDocument] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_order_document(profile_id, project_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::OrderDocument::Representation - command.response_class = Google::Apis::DfareportingV2_1::OrderDocument - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['projectId'] = project_id unless project_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of order documents, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] project_id - # Project ID for order documents. - # @param [Boolean] approved - # Select only order documents that have been approved by at least one user. - # @param [Array, String] ids - # Select only order documents with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [Array, String] order_id - # Select only order documents for specified orders. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for order documents by name or ID. Wildcards (*) are allowed. - # For example, "orderdocument*2015" will return order documents with names like " - # orderdocument June 2015", "orderdocument April 2015", or simply "orderdocument - # 2015". Most of the searches also add wildcards implicitly at the start and the - # end of the search string. For example, a search string of "orderdocument" will - # match order documents with name "my orderdocument", "orderdocument 2015", or - # simply "orderdocument". - # @param [Array, String] site_id - # Select only order documents that are associated with these sites. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListOrderDocumentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListOrderDocumentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_order_documents(profile_id, project_id, approved: nil, ids: nil, max_results: nil, order_id: nil, page_token: nil, search_string: nil, site_id: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects/{projectId}/orderDocuments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListOrderDocumentsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListOrderDocumentsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['projectId'] = project_id unless project_id.nil? - command.query['approved'] = approved unless approved.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderId'] = order_id unless order_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['siteId'] = site_id unless site_id.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 order by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] project_id - # Project ID for orders. - # @param [String] id - # Order 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::DfareportingV2_1::Order] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Order] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_order(profile_id, project_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects/{projectId}/orders/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Order::Representation - command.response_class = Google::Apis::DfareportingV2_1::Order - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['projectId'] = project_id unless project_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of orders, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] project_id - # Project ID for orders. - # @param [Array, String] ids - # Select only orders with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for orders by name or ID. Wildcards (*) are allowed. For - # example, "order*2015" will return orders with names like "order June 2015", " - # order April 2015", or simply "order 2015". Most of the searches also add - # wildcards implicitly at the start and the end of the search string. For - # example, a search string of "order" will match orders with name "my order", " - # order 2015", or simply "order". - # @param [Array, String] site_id - # Select only orders that are associated with these site IDs. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListOrdersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListOrdersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_orders(profile_id, project_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, site_id: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects/{projectId}/orders' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListOrdersResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListOrdersResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['projectId'] = project_id unless project_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['siteId'] = site_id unless site_id.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 placement group by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Placement group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::PlacementGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementGroups/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::PlacementGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new placement group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::PlacementGroup] placement_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::PlacementGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_group(profile_id, placement_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementGroups' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::PlacementGroup::Representation - command.request_object = placement_group_object - command.response_representation = Google::Apis::DfareportingV2_1::PlacementGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementGroup - command.params['profileId'] = profile_id unless profile_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 placement groups, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] advertiser_ids - # Select only placement groups that belong to these advertisers. - # @param [Boolean] archived - # Select only archived placements. Don't set this field to select both archived - # and non-archived placements. - # @param [Array, String] campaign_ids - # Select only placement groups that belong to these campaigns. - # @param [Array, String] content_category_ids - # Select only placement groups that are associated with these content categories. - # @param [Array, String] directory_site_ids - # Select only placement groups that are associated with these directory sites. - # @param [Array, String] ids - # Select only placement groups with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] placement_group_type - # Select only placement groups belonging with this group type. A package is a - # simple group of placements that acts as a single pricing point for a group of - # tags. A roadblock is a group of placements that not only acts as a single - # pricing point but also assumes that all the tags in it will be served at the - # same time. A roadblock requires one of its assigned placements to be marked as - # primary for reporting. - # @param [Array, String] placement_strategy_ids - # Select only placement groups that are associated with these placement - # strategies. - # @param [Array, String] pricing_types - # Select only placement groups with these pricing types. - # @param [String] search_string - # Allows searching for placement groups by name or ID. Wildcards (*) are allowed. - # For example, "placement*2015" will return placement groups with names like " - # placement group June 2015", "placement group May 2015", or simply "placements - # 2015". Most of the searches also add wildcards implicitly at the start and the - # end of the search string. For example, a search string of "placementgroup" - # will match placement groups with name "my placementgroup", "placementgroup - # 2015", or simply "placementgroup". - # @param [Array, String] site_ids - # Select only placement groups that are associated with these sites. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListPlacementGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListPlacementGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_groups(profile_id, advertiser_ids: nil, archived: nil, campaign_ids: nil, content_category_ids: nil, directory_site_ids: nil, ids: nil, max_results: nil, page_token: nil, placement_group_type: nil, placement_strategy_ids: nil, pricing_types: nil, search_string: nil, site_ids: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementGroups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListPlacementGroupsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListPlacementGroupsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? - command.query['archived'] = archived unless archived.nil? - command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? - command.query['contentCategoryIds'] = content_category_ids unless content_category_ids.nil? - command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['placementGroupType'] = placement_group_type unless placement_group_type.nil? - command.query['placementStrategyIds'] = placement_strategy_ids unless placement_strategy_ids.nil? - command.query['pricingTypes'] = pricing_types unless pricing_types.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['siteIds'] = site_ids unless site_ids.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 placement group. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::PlacementGroup] placement_group_object - # @param [String] id - # Placement group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::PlacementGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_group(profile_id, placement_group_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementGroups' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::PlacementGroup::Representation - command.request_object = placement_group_object - command.response_representation = Google::Apis::DfareportingV2_1::PlacementGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 placement group. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::PlacementGroup] placement_group_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DfareportingV2_1::PlacementGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_group(profile_id, placement_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementGroups' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::PlacementGroup::Representation - command.request_object = placement_group_object - command.response_representation = Google::Apis::DfareportingV2_1::PlacementGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementGroup - command.params['profileId'] = profile_id unless profile_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 an existing placement strategy. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Placement strategy 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 [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_placement_strategy(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementStrategies/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one placement strategy by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Placement strategy 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::DfareportingV2_1::PlacementStrategy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementStrategy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_strategy(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementStrategies/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementStrategy - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new placement strategy. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::PlacementStrategy] placement_strategy_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::DfareportingV2_1::PlacementStrategy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementStrategy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_strategy(profile_id, placement_strategy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementStrategies' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - command.request_object = placement_strategy_object - command.response_representation = Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementStrategy - command.params['profileId'] = profile_id unless profile_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 placement strategies, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] ids - # Select only placement strategies with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "placementstrategy*2015" will return objects with names like " - # placementstrategy June 2015", "placementstrategy April 2015", or simply " - # placementstrategy 2015". Most of the searches also add wildcards implicitly at - # the start and the end of the search string. For example, a search string of " - # placementstrategy" will match objects with name "my placementstrategy", " - # placementstrategy 2015", or simply "placementstrategy". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListPlacementStrategiesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListPlacementStrategiesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_strategies(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementStrategies' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListPlacementStrategiesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListPlacementStrategiesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 placement strategy. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::PlacementStrategy] placement_strategy_object - # @param [String] id - # Placement strategy 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::DfareportingV2_1::PlacementStrategy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementStrategy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_strategy(profile_id, placement_strategy_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementStrategies' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - command.request_object = placement_strategy_object - command.response_representation = Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementStrategy - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 placement strategy. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::PlacementStrategy] placement_strategy_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::DfareportingV2_1::PlacementStrategy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlacementStrategy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_strategy(profile_id, placement_strategy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placementStrategies' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - command.request_object = placement_strategy_object - command.response_representation = Google::Apis::DfareportingV2_1::PlacementStrategy::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlacementStrategy - command.params['profileId'] = profile_id unless profile_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 - - # Generates tags for a placement. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] campaign_id - # Generate placements belonging to this campaign. This is a required field. - # @param [Array, String] placement_ids - # Generate tags for these placements. - # @param [Array, String] tag_formats - # Tag formats to generate for these placements. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::GeneratePlacementsTagsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::GeneratePlacementsTagsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement_tags(profile_id, campaign_id: nil, placement_ids: nil, tag_formats: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placements/generatetags' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::GeneratePlacementsTagsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::GeneratePlacementsTagsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['campaignId'] = campaign_id unless campaign_id.nil? - command.query['placementIds'] = placement_ids unless placement_ids.nil? - command.query['tagFormats'] = tag_formats unless tag_formats.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 placement by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Placement 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::DfareportingV2_1::Placement] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Placement] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placements/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Placement::Representation - command.response_class = Google::Apis::DfareportingV2_1::Placement - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new placement. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Placement] placement_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::DfareportingV2_1::Placement] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Placement] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement(profile_id, placement_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placements' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Placement::Representation - command.request_object = placement_object - command.response_representation = Google::Apis::DfareportingV2_1::Placement::Representation - command.response_class = Google::Apis::DfareportingV2_1::Placement - command.params['profileId'] = profile_id unless profile_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 placements, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] advertiser_ids - # Select only placements that belong to these advertisers. - # @param [Boolean] archived - # Select only archived placements. Don't set this field to select both archived - # and non-archived placements. - # @param [Array, String] campaign_ids - # Select only placements that belong to these campaigns. - # @param [Array, String] compatibilities - # Select only placements that are associated with these compatibilities. WEB and - # WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for - # regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for - # rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream - # video ads developed with the VAST standard. - # @param [Array, String] content_category_ids - # Select only placements that are associated with these content categories. - # @param [Array, String] directory_site_ids - # Select only placements that are associated with these directory sites. - # @param [Array, String] group_ids - # Select only placements that belong to these placement groups. - # @param [Array, String] ids - # Select only placements with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] payment_source - # Select only placements with this payment source. - # @param [Array, String] placement_strategy_ids - # Select only placements that are associated with these placement strategies. - # @param [Array, String] pricing_types - # Select only placements with these pricing types. - # @param [String] search_string - # Allows searching for placements by name or ID. Wildcards (*) are allowed. For - # example, "placement*2015" will return placements with names like "placement - # June 2015", "placement May 2015", or simply "placements 2015". Most of the - # searches also add wildcards implicitly at the start and the end of the search - # string. For example, a search string of "placement" will match placements with - # name "my placement", "placement 2015", or simply "placement". - # @param [Array, String] site_ids - # Select only placements that are associated with these sites. - # @param [Array, String] size_ids - # Select only placements that are associated with these sizes. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListPlacementsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListPlacementsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placements(profile_id, advertiser_ids: nil, archived: nil, campaign_ids: nil, compatibilities: nil, content_category_ids: nil, directory_site_ids: nil, group_ids: nil, ids: nil, max_results: nil, page_token: nil, payment_source: nil, placement_strategy_ids: nil, pricing_types: nil, search_string: nil, site_ids: nil, size_ids: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placements' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListPlacementsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListPlacementsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? - command.query['archived'] = archived unless archived.nil? - command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? - command.query['compatibilities'] = compatibilities unless compatibilities.nil? - command.query['contentCategoryIds'] = content_category_ids unless content_category_ids.nil? - command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? - command.query['groupIds'] = group_ids unless group_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['paymentSource'] = payment_source unless payment_source.nil? - command.query['placementStrategyIds'] = placement_strategy_ids unless placement_strategy_ids.nil? - command.query['pricingTypes'] = pricing_types unless pricing_types.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['siteIds'] = site_ids unless site_ids.nil? - command.query['sizeIds'] = size_ids unless size_ids.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 placement. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Placement] placement_object - # @param [String] id - # Placement 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::DfareportingV2_1::Placement] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Placement] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement(profile_id, placement_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placements' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Placement::Representation - command.request_object = placement_object - command.response_representation = Google::Apis::DfareportingV2_1::Placement::Representation - command.response_class = Google::Apis::DfareportingV2_1::Placement - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 placement. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Placement] placement_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::DfareportingV2_1::Placement] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Placement] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_placement(profile_id, placement_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/placements' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Placement::Representation - command.request_object = placement_object - command.response_representation = Google::Apis::DfareportingV2_1::Placement::Representation - command.response_class = Google::Apis::DfareportingV2_1::Placement - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one platform type by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Platform type 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::DfareportingV2_1::PlatformType] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PlatformType] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_platform_type(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/platformTypes/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::PlatformType::Representation - command.response_class = Google::Apis::DfareportingV2_1::PlatformType - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of platform types. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListPlatformTypesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListPlatformTypesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_platform_types(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/platformTypes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListPlatformTypesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListPlatformTypesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one postal code by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] code - # Postal code 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::DfareportingV2_1::PostalCode] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::PostalCode] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_postal_code(profile_id, code, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/postalCodes/{code}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::PostalCode::Representation - command.response_class = Google::Apis::DfareportingV2_1::PostalCode - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['code'] = code unless code.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 postal codes. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListPostalCodesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListPostalCodesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_postal_codes(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/postalCodes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListPostalCodesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListPostalCodesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one project by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Project 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::DfareportingV2_1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::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(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Project::Representation - command.response_class = Google::Apis::DfareportingV2_1::Project - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of projects, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] advertiser_ids - # Select only projects with these advertiser IDs. - # @param [Array, String] ids - # Select only projects with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for projects by name or ID. Wildcards (*) are allowed. For - # example, "project*2015" will return projects with names like "project June - # 2015", "project April 2015", or simply "project 2015". Most of the searches - # also add wildcards implicitly at the start and the end of the search string. - # For example, a search string of "project" will match projects with name "my - # project", "project 2015", or simply "project". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListProjectsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::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(profile_id, advertiser_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/projects' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListProjectsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListProjectsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 regions. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListRegionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListRegionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_regions(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/regions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListRegionsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListRegionsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one remarketing list share by remarketing list ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] remarketing_list_id - # Remarketing list 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::DfareportingV2_1::RemarketingListShare] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::RemarketingListShare] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_list_share(profile_id, remarketing_list_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingListShares/{remarketingListId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::RemarketingListShare::Representation - command.response_class = Google::Apis::DfareportingV2_1::RemarketingListShare - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['remarketingListId'] = remarketing_list_id unless remarketing_list_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 remarketing list share. This method supports patch - # semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::RemarketingListShare] remarketing_list_share_object - # @param [String] remarketing_list_id - # Remarketing list 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::DfareportingV2_1::RemarketingListShare] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::RemarketingListShare] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_list_share(profile_id, remarketing_list_share_object = nil, remarketing_list_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingListShares' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::RemarketingListShare::Representation - command.request_object = remarketing_list_share_object - command.response_representation = Google::Apis::DfareportingV2_1::RemarketingListShare::Representation - command.response_class = Google::Apis::DfareportingV2_1::RemarketingListShare - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['remarketingListId'] = remarketing_list_id unless remarketing_list_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 remarketing list share. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::RemarketingListShare] remarketing_list_share_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::DfareportingV2_1::RemarketingListShare] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::RemarketingListShare] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_list_share(profile_id, remarketing_list_share_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingListShares' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::RemarketingListShare::Representation - command.request_object = remarketing_list_share_object - command.response_representation = Google::Apis::DfareportingV2_1::RemarketingListShare::Representation - command.response_class = Google::Apis::DfareportingV2_1::RemarketingListShare - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one remarketing list by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Remarketing list 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::DfareportingV2_1::RemarketingList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::RemarketingList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_list(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingLists/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::RemarketingList::Representation - command.response_class = Google::Apis::DfareportingV2_1::RemarketingList - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new remarketing list. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::RemarketingList] remarketing_list_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::DfareportingV2_1::RemarketingList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::RemarketingList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_list(profile_id, remarketing_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingLists' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::RemarketingList::Representation - command.request_object = remarketing_list_object - command.response_representation = Google::Apis::DfareportingV2_1::RemarketingList::Representation - command.response_class = Google::Apis::DfareportingV2_1::RemarketingList - command.params['profileId'] = profile_id unless profile_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 remarketing lists, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] active - # Select only active or only inactive remarketing lists. - # @param [String] advertiser_id - # Select only remarketing lists owned by this advertiser. - # @param [String] floodlight_activity_id - # Select only remarketing lists that have this floodlight activity ID. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] name - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "remarketing list*2015" will return objects with names like " - # remarketing list June 2015", "remarketing list April 2015", or simply " - # remarketing list 2015". Most of the searches also add wildcards implicitly at - # the start and the end of the search string. For example, a search string of " - # remarketing list" will match objects with name "my remarketing list", " - # remarketing list 2015", or simply "remarketing list". - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListRemarketingListsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListRemarketingListsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_lists(profile_id, active: nil, advertiser_id: nil, floodlight_activity_id: nil, max_results: nil, name: nil, page_token: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingLists' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListRemarketingListsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListRemarketingListsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['active'] = active unless active.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['floodlightActivityId'] = floodlight_activity_id unless floodlight_activity_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 remarketing list. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::RemarketingList] remarketing_list_object - # @param [String] id - # Remarketing list 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::DfareportingV2_1::RemarketingList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::RemarketingList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_list(profile_id, remarketing_list_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingLists' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::RemarketingList::Representation - command.request_object = remarketing_list_object - command.response_representation = Google::Apis::DfareportingV2_1::RemarketingList::Representation - command.response_class = Google::Apis::DfareportingV2_1::RemarketingList - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 remarketing list. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::RemarketingList] remarketing_list_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::DfareportingV2_1::RemarketingList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::RemarketingList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_remarketing_list(profile_id, remarketing_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/remarketingLists' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::RemarketingList::Representation - command.request_object = remarketing_list_object - command.response_representation = Google::Apis::DfareportingV2_1::RemarketingList::Representation - command.response_class = Google::Apis::DfareportingV2_1::RemarketingList - command.params['profileId'] = profile_id unless profile_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 a report by its ID. - # @param [String] profile_id - # The DFA user profile ID. - # @param [String] report_id - # The ID of the report. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_report(profile_id, report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/{reportId}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['reportId'] = report_id unless report_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 report by its ID. - # @param [String] profile_id - # The DFA user profile ID. - # @param [String] report_id - # The ID of the report. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_report(profile_id, report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/{reportId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.response_class = Google::Apis::DfareportingV2_1::Report - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['reportId'] = report_id unless report_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 report. - # @param [String] profile_id - # The DFA user profile ID. - # @param [Google::Apis::DfareportingV2_1::Report] report_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::DfareportingV2_1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_report(profile_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.request_object = report_object - command.response_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.response_class = Google::Apis::DfareportingV2_1::Report - command.params['profileId'] = profile_id unless profile_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 list of reports. - # @param [String] profile_id - # The DFA user profile ID. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # The value of the nextToken from the previous result page. - # @param [String] scope - # The scope that defines which results are returned, default is 'MINE'. - # @param [String] sort_field - # The field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is 'DESCENDING'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ReportList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ReportList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reports(profile_id, max_results: nil, page_token: nil, scope: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ReportList::Representation - command.response_class = Google::Apis::DfareportingV2_1::ReportList - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['scope'] = scope unless scope.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 report. This method supports patch semantics. - # @param [String] profile_id - # The DFA user profile ID. - # @param [String] report_id - # The ID of the report. - # @param [Google::Apis::DfareportingV2_1::Report] report_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::DfareportingV2_1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_report(profile_id, report_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/{reportId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.request_object = report_object - command.response_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.response_class = Google::Apis::DfareportingV2_1::Report - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['reportId'] = report_id unless report_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 - - # Runs a report. - # @param [String] profile_id - # The DFA profile ID. - # @param [String] report_id - # The ID of the report. - # @param [Boolean] synchronous - # If set and true, tries to run the report synchronously. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def run_report(profile_id, report_id, synchronous: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/{reportId}/run' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::File::Representation - command.response_class = Google::Apis::DfareportingV2_1::File - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['reportId'] = report_id unless report_id.nil? - command.query['synchronous'] = synchronous unless synchronous.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 report. - # @param [String] profile_id - # The DFA user profile ID. - # @param [String] report_id - # The ID of the report. - # @param [Google::Apis::DfareportingV2_1::Report] report_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::DfareportingV2_1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_report(profile_id, report_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/{reportId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.request_object = report_object - command.response_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.response_class = Google::Apis::DfareportingV2_1::Report - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['reportId'] = report_id unless report_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 fields that are compatible to be selected in the respective - # sections of a report criteria, given the fields already selected in the input - # report and user permissions. - # @param [String] profile_id - # The DFA user profile ID. - # @param [Google::Apis::DfareportingV2_1::Report] report_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::DfareportingV2_1::CompatibleFields] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::CompatibleFields] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_report_compatible_field(profile_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/compatiblefields/query' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Report::Representation - command.request_object = report_object - command.response_representation = Google::Apis::DfareportingV2_1::CompatibleFields::Representation - command.response_class = Google::Apis::DfareportingV2_1::CompatibleFields - command.params['profileId'] = profile_id unless profile_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 report file. - # @param [String] profile_id - # The DFA profile ID. - # @param [String] report_id - # The ID of the report. - # @param [String] file_id - # The ID of the report file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_report_file(profile_id, report_id, file_id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/{reportId}/files/{fileId}' - 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::DfareportingV2_1::File::Representation - command.response_class = Google::Apis::DfareportingV2_1::File - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['reportId'] = report_id unless report_id.nil? - command.params['fileId'] = file_id unless file_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 files for a report. - # @param [String] profile_id - # The DFA profile ID. - # @param [String] report_id - # The ID of the parent report. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # The value of the nextToken from the previous result page. - # @param [String] sort_field - # The field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is 'DESCENDING'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::FileList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::FileList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_report_files(profile_id, report_id, max_results: nil, page_token: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/reports/{reportId}/files' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::FileList::Representation - command.response_class = Google::Apis::DfareportingV2_1::FileList - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['reportId'] = report_id unless report_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 site by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Site 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::DfareportingV2_1::Site] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Site] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_site(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sites/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Site::Representation - command.response_class = Google::Apis::DfareportingV2_1::Site - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new site. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Site] site_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::DfareportingV2_1::Site] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Site] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_site(profile_id, site_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sites' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Site::Representation - command.request_object = site_object - command.response_representation = Google::Apis::DfareportingV2_1::Site::Representation - command.response_class = Google::Apis::DfareportingV2_1::Site - command.params['profileId'] = profile_id unless profile_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 sites, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] accepts_in_stream_video_placements - # This search filter is no longer supported and will have no effect on the - # results returned. - # @param [Boolean] accepts_interstitial_placements - # This search filter is no longer supported and will have no effect on the - # results returned. - # @param [Boolean] accepts_publisher_paid_placements - # Select only sites that accept publisher paid placements. - # @param [Boolean] ad_words_site - # Select only AdWords sites. - # @param [Boolean] approved - # Select only approved sites. - # @param [Array, String] campaign_ids - # Select only sites with these campaign IDs. - # @param [Array, String] directory_site_ids - # Select only sites with these directory site IDs. - # @param [Array, String] ids - # Select only sites with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. - # For example, "site*2015" will return objects with names like "site June 2015", - # "site April 2015", or simply "site 2015". Most of the searches also add - # wildcards implicitly at the start and the end of the search string. For - # example, a search string of "site" will match objects with name "my site", " - # site 2015", or simply "site". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] subaccount_id - # Select only sites with this subaccount ID. - # @param [Boolean] unmapped_site - # Select only sites that have not been mapped to a directory site. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListSitesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListSitesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_sites(profile_id, accepts_in_stream_video_placements: nil, accepts_interstitial_placements: nil, accepts_publisher_paid_placements: nil, ad_words_site: nil, approved: nil, campaign_ids: nil, directory_site_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, unmapped_site: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sites' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListSitesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListSitesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['acceptsInStreamVideoPlacements'] = accepts_in_stream_video_placements unless accepts_in_stream_video_placements.nil? - command.query['acceptsInterstitialPlacements'] = accepts_interstitial_placements unless accepts_interstitial_placements.nil? - command.query['acceptsPublisherPaidPlacements'] = accepts_publisher_paid_placements unless accepts_publisher_paid_placements.nil? - command.query['adWordsSite'] = ad_words_site unless ad_words_site.nil? - command.query['approved'] = approved unless approved.nil? - command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? - command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['subaccountId'] = subaccount_id unless subaccount_id.nil? - command.query['unmappedSite'] = unmapped_site unless unmapped_site.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 site. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Site] site_object - # @param [String] id - # Site 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::DfareportingV2_1::Site] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Site] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_site(profile_id, site_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sites' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Site::Representation - command.request_object = site_object - command.response_representation = Google::Apis::DfareportingV2_1::Site::Representation - command.response_class = Google::Apis::DfareportingV2_1::Site - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 site. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Site] site_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::DfareportingV2_1::Site] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Site] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_site(profile_id, site_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sites' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Site::Representation - command.request_object = site_object - command.response_representation = Google::Apis::DfareportingV2_1::Site::Representation - command.response_class = Google::Apis::DfareportingV2_1::Site - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one size by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Size 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::DfareportingV2_1::Size] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Size] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_size(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sizes/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Size::Representation - command.response_class = Google::Apis::DfareportingV2_1::Size - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new size. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Size] size_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::DfareportingV2_1::Size] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Size] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_size(profile_id, size_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sizes' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Size::Representation - command.request_object = size_object - command.response_representation = Google::Apis::DfareportingV2_1::Size::Representation - command.response_class = Google::Apis::DfareportingV2_1::Size - command.params['profileId'] = profile_id unless profile_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 sizes, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Fixnum] height - # Select only sizes with this height. - # @param [Boolean] iab_standard - # Select only IAB standard sizes. - # @param [Array, String] ids - # Select only sizes with these IDs. - # @param [Fixnum] width - # Select only sizes with this width. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListSizesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListSizesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_sizes(profile_id, height: nil, iab_standard: nil, ids: nil, width: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/sizes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListSizesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListSizesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['height'] = height unless height.nil? - command.query['iabStandard'] = iab_standard unless iab_standard.nil? - command.query['ids'] = ids unless ids.nil? - command.query['width'] = width unless width.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 subaccount by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Subaccount 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::DfareportingV2_1::Subaccount] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Subaccount] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subaccount(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/subaccounts/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::Subaccount::Representation - command.response_class = Google::Apis::DfareportingV2_1::Subaccount - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new subaccount. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Subaccount] subaccount_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::DfareportingV2_1::Subaccount] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Subaccount] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subaccount(profile_id, subaccount_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/subaccounts' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Subaccount::Representation - command.request_object = subaccount_object - command.response_representation = Google::Apis::DfareportingV2_1::Subaccount::Representation - command.response_class = Google::Apis::DfareportingV2_1::Subaccount - command.params['profileId'] = profile_id unless profile_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 list of subaccounts, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] ids - # Select only subaccounts with these IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "subaccount*2015" will return objects with names like "subaccount - # June 2015", "subaccount April 2015", or simply "subaccount 2015". Most of the - # searches also add wildcards implicitly at the start and the end of the search - # string. For example, a search string of "subaccount" will match objects with - # name "my subaccount", "subaccount 2015", or simply "subaccount". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListSubaccountsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListSubaccountsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subaccounts(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/subaccounts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListSubaccountsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListSubaccountsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 subaccount. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Subaccount] subaccount_object - # @param [String] id - # Subaccount 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::DfareportingV2_1::Subaccount] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Subaccount] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subaccount(profile_id, subaccount_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/subaccounts' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Subaccount::Representation - command.request_object = subaccount_object - command.response_representation = Google::Apis::DfareportingV2_1::Subaccount::Representation - command.response_class = Google::Apis::DfareportingV2_1::Subaccount - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 subaccount. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::Subaccount] subaccount_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::DfareportingV2_1::Subaccount] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::Subaccount] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subaccount(profile_id, subaccount_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/subaccounts' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::Subaccount::Representation - command.request_object = subaccount_object - command.response_representation = Google::Apis::DfareportingV2_1::Subaccount::Representation - command.response_class = Google::Apis::DfareportingV2_1::Subaccount - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one remarketing list by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # Remarketing list 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::DfareportingV2_1::TargetableRemarketingList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::TargetableRemarketingList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_targetable_remarketing_list(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/targetableRemarketingLists/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::TargetableRemarketingList::Representation - command.response_class = Google::Apis::DfareportingV2_1::TargetableRemarketingList - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of targetable remarketing lists, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] active - # Select only active or only inactive targetable remarketing lists. - # @param [String] advertiser_id - # Select only targetable remarketing lists targetable by these advertisers. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] name - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "remarketing list*2015" will return objects with names like " - # remarketing list June 2015", "remarketing list April 2015", or simply " - # remarketing list 2015". Most of the searches also add wildcards implicitly at - # the start and the end of the search string. For example, a search string of " - # remarketing list" will match objects with name "my remarketing list", " - # remarketing list 2015", or simply "remarketing list". - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListTargetableRemarketingListsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListTargetableRemarketingListsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_targetable_remarketing_lists(profile_id, active: nil, advertiser_id: nil, max_results: nil, name: nil, page_token: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/targetableRemarketingLists' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListTargetableRemarketingListsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListTargetableRemarketingListsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['active'] = active unless active.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one user profile by ID. - # @param [String] profile_id - # The user profile 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::DfareportingV2_1::UserProfile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserProfile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::UserProfile::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserProfile - command.params['profileId'] = profile_id unless profile_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 list of user profiles for a 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::DfareportingV2_1::UserProfileList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserProfileList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_profiles(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::UserProfileList::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserProfileList - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one user role permission group by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # User role permission group ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::UserRolePermissionGroup] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserRolePermissionGroup] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_role_permission_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRolePermissionGroups/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::UserRolePermissionGroup::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserRolePermissionGroup - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of all supported user role permission groups. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DfareportingV2_1::ListUserRolePermissionGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListUserRolePermissionGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_role_permission_groups(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRolePermissionGroups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListUserRolePermissionGroupsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListUserRolePermissionGroupsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one user role permission by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # User role permission 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::DfareportingV2_1::UserRolePermission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserRolePermission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_role_permission(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRolePermissions/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::UserRolePermission::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserRolePermission - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of user role permissions, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Array, String] ids - # Select only user role permissions with these IDs. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListUserRolePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListUserRolePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_role_permissions(profile_id, ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRolePermissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListUserRolePermissionsResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListUserRolePermissionsResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['ids'] = ids unless ids.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 user role. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # User role 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 [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_user_role(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRoles/{id}' - command = make_simple_command(:delete, path, options) - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets one user role by ID. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [String] id - # User role 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::DfareportingV2_1::UserRole] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserRole] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_role(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRoles/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::UserRole::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserRole - command.params['profileId'] = profile_id unless profile_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a new user role. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::UserRole] user_role_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::DfareportingV2_1::UserRole] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserRole] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_user_role(profile_id, user_role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRoles' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::UserRole::Representation - command.request_object = user_role_object - command.response_representation = Google::Apis::DfareportingV2_1::UserRole::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserRole - command.params['profileId'] = profile_id unless profile_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 user roles, possibly filtered. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Boolean] account_user_role_only - # Select only account level user roles not associated with any specific - # subaccount. - # @param [Array, String] ids - # Select only user roles with the specified IDs. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Value of the nextPageToken from the previous result page. - # @param [String] search_string - # Allows searching for objects by name or ID. Wildcards (*) are allowed. For - # example, "userrole*2015" will return objects with names like "userrole June - # 2015", "userrole April 2015", or simply "userrole 2015". Most of the searches - # also add wildcards implicitly at the start and the end of the search string. - # For example, a search string of "userrole" will match objects with name "my - # userrole", "userrole 2015", or simply "userrole". - # @param [String] sort_field - # Field by which to sort the list. - # @param [String] sort_order - # Order of sorted results, default is ASCENDING. - # @param [String] subaccount_id - # Select only user roles that belong to this subaccount. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DfareportingV2_1::ListUserRolesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::ListUserRolesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_roles(profile_id, account_user_role_only: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRoles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DfareportingV2_1::ListUserRolesResponse::Representation - command.response_class = Google::Apis::DfareportingV2_1::ListUserRolesResponse - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['accountUserRoleOnly'] = account_user_role_only unless account_user_role_only.nil? - command.query['ids'] = ids unless ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['searchString'] = search_string unless search_string.nil? - command.query['sortField'] = sort_field unless sort_field.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? - command.query['subaccountId'] = subaccount_id unless subaccount_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 user role. This method supports patch semantics. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::UserRole] user_role_object - # @param [String] id - # User role 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::DfareportingV2_1::UserRole] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserRole] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_role(profile_id, user_role_object = nil, id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRoles' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::UserRole::Representation - command.request_object = user_role_object - command.response_representation = Google::Apis::DfareportingV2_1::UserRole::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserRole - command.params['profileId'] = profile_id unless profile_id.nil? - command.query['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 user role. - # @param [String] profile_id - # User profile ID associated with this request. - # @param [Google::Apis::DfareportingV2_1::UserRole] user_role_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::DfareportingV2_1::UserRole] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DfareportingV2_1::UserRole] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_role(profile_id, user_role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userprofiles/{profileId}/userRoles' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DfareportingV2_1::UserRole::Representation - command.request_object = user_role_object - command.response_representation = Google::Apis::DfareportingV2_1::UserRole::Representation - command.response_class = Google::Apis::DfareportingV2_1::UserRole - command.params['profileId'] = profile_id unless profile_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 diff --git a/generated/google/apis/dns_v1.rb b/generated/google/apis/dns_v1.rb deleted file mode 100644 index 034ca953a..000000000 --- a/generated/google/apis/dns_v1.rb +++ /dev/null @@ -1,41 +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/dns_v1/service.rb' -require 'google/apis/dns_v1/classes.rb' -require 'google/apis/dns_v1/representations.rb' - -module Google - module Apis - # Google Cloud DNS API - # - # The Google Cloud DNS API provides services for configuring and serving - # authoritative DNS records. - # - # @see https://developers.google.com/cloud-dns - module DnsV1 - VERSION = 'V1' - REVISION = '20150218' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # View your DNS records hosted by Google Cloud DNS - AUTH_NDEV_CLOUDDNS_READONLY = 'https://www.googleapis.com/auth/ndev.clouddns.readonly' - - # View and manage your DNS records hosted by Google Cloud DNS - AUTH_NDEV_CLOUDDNS_READWRITE = 'https://www.googleapis.com/auth/ndev.clouddns.readwrite' - end - end -end diff --git a/generated/google/apis/dns_v1/classes.rb b/generated/google/apis/dns_v1/classes.rb deleted file mode 100644 index 70b6ed26d..000000000 --- a/generated/google/apis/dns_v1/classes.rb +++ /dev/null @@ -1,406 +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 DnsV1 - - # An atomic update to a collection of ResourceRecordSets. - class Change - include Google::Apis::Core::Hashable - - # Which ResourceRecordSets to add? - # Corresponds to the JSON property `additions` - # @return [Array] - attr_accessor :additions - - # Which ResourceRecordSets to remove? Must match existing data exactly. - # Corresponds to the JSON property `deletions` - # @return [Array] - attr_accessor :deletions - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "dns#change". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The time that this operation was started by the server. This is in RFC3339 - # text format. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Status of the operation (output only). - # 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) - @additions = args[:additions] unless args[:additions].nil? - @deletions = args[:deletions] unless args[:deletions].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? - @status = args[:status] unless args[:status].nil? - end - end - - # The response to a request to enumerate Changes to a ResourceRecordSets - # collection. - class ListChangesResponse - include Google::Apis::Core::Hashable - - # The requested changes. - # Corresponds to the JSON property `changes` - # @return [Array] - attr_accessor :changes - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The presence of this field indicates that there exist more results following - # your last page of results in pagination order. To fetch them, make another - # list request using this value as your pagination token. - # In this way you can retrieve the complete contents of even very large - # collections one page at a time. However, if the contents of the collection - # change between the first and last paginated list request, the set of all - # elements returned will be an inconsistent view of the collection. There is no - # way to retrieve a "snapshot" of collections larger than the maximum page size. - # 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) - @changes = args[:changes] unless args[:changes].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # A zone is a subtree of the DNS namespace under one administrative - # responsibility. A ManagedZone is a resource that represents a DNS zone hosted - # by the Cloud DNS service. - class ManagedZone - include Google::Apis::Core::Hashable - - # The time that this resource was created on the server. This is in RFC3339 text - # format. Output only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # A mutable string of at most 1024 characters associated with this resource for - # the user's convenience. Has no effect on the managed zone's function. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The DNS name of this managed zone, for instance "example.com.". - # Corresponds to the JSON property `dnsName` - # @return [String] - attr_accessor :dns_name - - # Unique identifier for the resource; defined by the server (output only) - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "dns# - # managedZone". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # User assigned name for this resource. Must be unique within the project. The - # name must be 1-32 characters long, must begin with a letter, end with a letter - # or digit, and only contain lowercase letters, digits or dashes. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet - # is a set of DNS name servers that all host the same ManagedZones. Most users - # will leave this field unset. - # Corresponds to the JSON property `nameServerSet` - # @return [String] - attr_accessor :name_server_set - - # Delegate your managed_zone to these virtual name servers; defined by the - # server (output only) - # Corresponds to the JSON property `nameServers` - # @return [Array] - attr_accessor :name_servers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @description = args[:description] unless args[:description].nil? - @dns_name = args[:dns_name] unless args[:dns_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @name_server_set = args[:name_server_set] unless args[:name_server_set].nil? - @name_servers = args[:name_servers] unless args[:name_servers].nil? - end - end - - # - class ListManagedZonesResponse - include Google::Apis::Core::Hashable - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The managed zone resources. - # Corresponds to the JSON property `managedZones` - # @return [Array] - attr_accessor :managed_zones - - # The presence of this field indicates that there exist more results following - # your last page of results in pagination order. To fetch them, make another - # list request using this value as your page token. - # In this way you can retrieve the complete contents of even very large - # collections one page at a time. However, if the contents of the collection - # change between the first and last paginated list request, the set of all - # elements returned will be an inconsistent view of the collection. There is no - # way to retrieve a consistent snapshot of a collection larger than the maximum - # page size. - # 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? - @managed_zones = args[:managed_zones] unless args[:managed_zones].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # A project resource. The project is a top level container for resources - # including Cloud DNS ManagedZones. Projects can be created only in the APIs - # console. - class Project - include Google::Apis::Core::Hashable - - # User assigned unique identifier for the resource (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "dns#project" - # . - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Unique numeric identifier for the resource; defined by the server (output only) - # . - # Corresponds to the JSON property `number` - # @return [String] - attr_accessor :number - - # Limits associated with a Project. - # Corresponds to the JSON property `quota` - # @return [Google::Apis::DnsV1::Quota] - attr_accessor :quota - - 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? - @number = args[:number] unless args[:number].nil? - @quota = args[:quota] unless args[:quota].nil? - end - end - - # Limits associated with a Project. - class Quota - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "dns#quota". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Maximum allowed number of managed zones in the project. - # Corresponds to the JSON property `managedZones` - # @return [Fixnum] - attr_accessor :managed_zones - - # Maximum allowed number of ResourceRecords per ResourceRecordSet. - # Corresponds to the JSON property `resourceRecordsPerRrset` - # @return [Fixnum] - attr_accessor :resource_records_per_rrset - - # Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest. - # Corresponds to the JSON property `rrsetAdditionsPerChange` - # @return [Fixnum] - attr_accessor :rrset_additions_per_change - - # Maximum allowed number of ResourceRecordSets to delete per - # ChangesCreateRequest. - # Corresponds to the JSON property `rrsetDeletionsPerChange` - # @return [Fixnum] - attr_accessor :rrset_deletions_per_change - - # Maximum allowed number of ResourceRecordSets per zone in the project. - # Corresponds to the JSON property `rrsetsPerManagedZone` - # @return [Fixnum] - attr_accessor :rrsets_per_managed_zone - - # Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes. - # Corresponds to the JSON property `totalRrdataSizePerChange` - # @return [Fixnum] - attr_accessor :total_rrdata_size_per_change - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @managed_zones = args[:managed_zones] unless args[:managed_zones].nil? - @resource_records_per_rrset = args[:resource_records_per_rrset] unless args[:resource_records_per_rrset].nil? - @rrset_additions_per_change = args[:rrset_additions_per_change] unless args[:rrset_additions_per_change].nil? - @rrset_deletions_per_change = args[:rrset_deletions_per_change] unless args[:rrset_deletions_per_change].nil? - @rrsets_per_managed_zone = args[:rrsets_per_managed_zone] unless args[:rrsets_per_managed_zone].nil? - @total_rrdata_size_per_change = args[:total_rrdata_size_per_change] unless args[:total_rrdata_size_per_change].nil? - end - end - - # A unit of data that will be returned by the DNS servers. - class ResourceRecordSet - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string "dns# - # resourceRecordSet". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # For example, www.example.com. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). - # Corresponds to the JSON property `rrdatas` - # @return [Array] - attr_accessor :rrdatas - - # Number of seconds that this ResourceRecordSet can be cached by resolvers. - # Corresponds to the JSON property `ttl` - # @return [Fixnum] - attr_accessor :ttl - - # The identifier of a supported record type, for example, A, AAAA, MX, TXT, and - # so on. - # 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) - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @rrdatas = args[:rrdatas] unless args[:rrdatas].nil? - @ttl = args[:ttl] unless args[:ttl].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class ListResourceRecordSetsResponse - include Google::Apis::Core::Hashable - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The presence of this field indicates that there exist more results following - # your last page of results in pagination order. To fetch them, make another - # list request using this value as your pagination token. - # In this way you can retrieve the complete contents of even very large - # collections one page at a time. However, if the contents of the collection - # change between the first and last paginated list request, the set of all - # elements returned will be an inconsistent view of the collection. There is no - # way to retrieve a consistent snapshot of a collection larger than the maximum - # page size. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The resource record set resources. - # Corresponds to the JSON property `rrsets` - # @return [Array] - attr_accessor :rrsets - - 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? - @rrsets = args[:rrsets] unless args[:rrsets].nil? - end - end - end - end -end diff --git a/generated/google/apis/dns_v1/representations.rb b/generated/google/apis/dns_v1/representations.rb deleted file mode 100644 index e19282ae6..000000000 --- a/generated/google/apis/dns_v1/representations.rb +++ /dev/null @@ -1,151 +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 DnsV1 - - class Change - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListChangesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ManagedZone - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListManagedZonesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Project - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Quota - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ResourceRecordSet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListResourceRecordSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Change - class Representation < Google::Apis::Core::JsonRepresentation - collection :additions, as: 'additions', class: Google::Apis::DnsV1::ResourceRecordSet, decorator: Google::Apis::DnsV1::ResourceRecordSet::Representation - - collection :deletions, as: 'deletions', class: Google::Apis::DnsV1::ResourceRecordSet, decorator: Google::Apis::DnsV1::ResourceRecordSet::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :start_time, as: 'startTime' - property :status, as: 'status' - end - end - - # @private - class ListChangesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :changes, as: 'changes', class: Google::Apis::DnsV1::Change, decorator: Google::Apis::DnsV1::Change::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ManagedZone - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_time, as: 'creationTime' - property :description, as: 'description' - property :dns_name, as: 'dnsName' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :name_server_set, as: 'nameServerSet' - collection :name_servers, as: 'nameServers' - end - end - - # @private - class ListManagedZonesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :managed_zones, as: 'managedZones', class: Google::Apis::DnsV1::ManagedZone, decorator: Google::Apis::DnsV1::ManagedZone::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Project - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :number, as: 'number' - property :quota, as: 'quota', class: Google::Apis::DnsV1::Quota, decorator: Google::Apis::DnsV1::Quota::Representation - - end - end - - # @private - class Quota - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :managed_zones, as: 'managedZones' - property :resource_records_per_rrset, as: 'resourceRecordsPerRrset' - property :rrset_additions_per_change, as: 'rrsetAdditionsPerChange' - property :rrset_deletions_per_change, as: 'rrsetDeletionsPerChange' - property :rrsets_per_managed_zone, as: 'rrsetsPerManagedZone' - property :total_rrdata_size_per_change, as: 'totalRrdataSizePerChange' - end - end - - # @private - class ResourceRecordSet - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :name, as: 'name' - collection :rrdatas, as: 'rrdatas' - property :ttl, as: 'ttl' - property :type, as: 'type' - end - end - - # @private - class ListResourceRecordSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :rrsets, as: 'rrsets', class: Google::Apis::DnsV1::ResourceRecordSet, decorator: Google::Apis::DnsV1::ResourceRecordSet::Representation - - end - end - end - end -end diff --git a/generated/google/apis/dns_v1/service.rb b/generated/google/apis/dns_v1/service.rb deleted file mode 100644 index d218a5969..000000000 --- a/generated/google/apis/dns_v1/service.rb +++ /dev/null @@ -1,460 +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 DnsV1 - # Google Cloud DNS API - # - # The Google Cloud DNS API provides services for configuring and serving - # authoritative DNS records. - # - # @example - # require 'google/apis/dns_v1' - # - # Dns = Google::Apis::DnsV1 # Alias the module - # service = Dns::DnsService.new - # - # @see https://developers.google.com/cloud-dns - class DnsService < 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/', 'dns/v1/projects/') - end - - # Atomically update the ResourceRecordSet collection. - # @param [String] project - # Identifies the project addressed by this request. - # @param [String] managed_zone - # Identifies the managed zone addressed by this request. Can be the managed zone - # name or id. - # @param [Google::Apis::DnsV1::Change] change_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::DnsV1::Change] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::Change] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_change(project, managed_zone, change_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones/{managedZone}/changes' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DnsV1::Change::Representation - command.request_object = change_object - command.response_representation = Google::Apis::DnsV1::Change::Representation - command.response_class = Google::Apis::DnsV1::Change - command.params['project'] = project unless project.nil? - command.params['managedZone'] = managed_zone unless managed_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 - - # Fetch the representation of an existing Change. - # @param [String] project - # Identifies the project addressed by this request. - # @param [String] managed_zone - # Identifies the managed zone addressed by this request. Can be the managed zone - # name or id. - # @param [String] change_id - # The identifier of the requested change, from a previous - # ResourceRecordSetsChangeResponse. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DnsV1::Change] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::Change] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_change(project, managed_zone, change_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones/{managedZone}/changes/{changeId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DnsV1::Change::Representation - command.response_class = Google::Apis::DnsV1::Change - command.params['project'] = project unless project.nil? - command.params['managedZone'] = managed_zone unless managed_zone.nil? - command.params['changeId'] = change_id unless change_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 - - # Enumerate Changes to a ResourceRecordSet collection. - # @param [String] project - # Identifies the project addressed by this request. - # @param [String] managed_zone - # Identifies the managed zone addressed by this request. Can be the managed zone - # name or id. - # @param [Fixnum] max_results - # Optional. Maximum number of results to be returned. If unspecified, the server - # will decide how many results to return. - # @param [String] page_token - # Optional. A tag returned by a previous list request that was truncated. Use - # this parameter to continue a previous list request. - # @param [String] sort_by - # Sorting criterion. The only supported value is change sequence. - # @param [String] sort_order - # Sorting order direction: 'ascending' or 'descending'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DnsV1::ListChangesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::ListChangesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_changes(project, managed_zone, max_results: nil, page_token: nil, sort_by: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones/{managedZone}/changes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DnsV1::ListChangesResponse::Representation - command.response_class = Google::Apis::DnsV1::ListChangesResponse - command.params['project'] = project unless project.nil? - command.params['managedZone'] = managed_zone unless managed_zone.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['sortBy'] = sort_by unless sort_by.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 - - # Create a new ManagedZone. - # @param [String] project - # Identifies the project addressed by this request. - # @param [Google::Apis::DnsV1::ManagedZone] managed_zone_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::DnsV1::ManagedZone] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::ManagedZone] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_managed_zone(project, managed_zone_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DnsV1::ManagedZone::Representation - command.request_object = managed_zone_object - command.response_representation = Google::Apis::DnsV1::ManagedZone::Representation - command.response_class = Google::Apis::DnsV1::ManagedZone - 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 a previously created ManagedZone. - # @param [String] project - # Identifies the project addressed by this request. - # @param [String] managed_zone - # Identifies the managed zone addressed by this request. Can be the managed zone - # name or 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 [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_managed_zone(project, managed_zone, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones/{managedZone}' - command = make_simple_command(:delete, path, options) - command.params['project'] = project unless project.nil? - command.params['managedZone'] = managed_zone unless managed_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 - - # Fetch the representation of an existing ManagedZone. - # @param [String] project - # Identifies the project addressed by this request. - # @param [String] managed_zone - # Identifies the managed zone addressed by this request. Can be the managed zone - # name or 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::DnsV1::ManagedZone] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::ManagedZone] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_managed_zone(project, managed_zone, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones/{managedZone}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DnsV1::ManagedZone::Representation - command.response_class = Google::Apis::DnsV1::ManagedZone - command.params['project'] = project unless project.nil? - command.params['managedZone'] = managed_zone unless managed_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 - - # Enumerate ManagedZones that have been created but not yet deleted. - # @param [String] project - # Identifies the project addressed by this request. - # @param [Fixnum] max_results - # Optional. Maximum number of results to be returned. If unspecified, the server - # will decide how many results to return. - # @param [String] page_token - # Optional. A tag returned by a previous list request that was truncated. Use - # this parameter to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DnsV1::ListManagedZonesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::ListManagedZonesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_managed_zones(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DnsV1::ListManagedZonesResponse::Representation - command.response_class = Google::Apis::DnsV1::ListManagedZonesResponse - command.params['project'] = project unless project.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 - - # Fetch the representation of an existing Project. - # @param [String] project - # Identifies the project addressed by this request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::DnsV1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::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, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DnsV1::Project::Representation - command.response_class = Google::Apis::DnsV1::Project - 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 - - # Enumerate ResourceRecordSets that have been created but not yet deleted. - # @param [String] project - # Identifies the project addressed by this request. - # @param [String] managed_zone - # Identifies the managed zone addressed by this request. Can be the managed zone - # name or id. - # @param [Fixnum] max_results - # Optional. Maximum number of results to be returned. If unspecified, the server - # will decide how many results to return. - # @param [String] name - # Restricts the list to return only records with this fully qualified domain - # name. - # @param [String] page_token - # Optional. A tag returned by a previous list request that was truncated. Use - # this parameter to continue a previous list request. - # @param [String] type - # Restricts the list to return only records of this type. If present, the "name" - # parameter must also be present. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DnsV1::ListResourceRecordSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DnsV1::ListResourceRecordSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_resource_record_sets(project, managed_zone, max_results: nil, name: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/managedZones/{managedZone}/rrsets' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DnsV1::ListResourceRecordSetsResponse::Representation - command.response_class = Google::Apis::DnsV1::ListResourceRecordSetsResponse - command.params['project'] = project unless project.nil? - command.params['managedZone'] = managed_zone unless managed_zone.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['type'] = type unless type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - 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 diff --git a/generated/google/apis/doubleclickbidmanager_v1.rb b/generated/google/apis/doubleclickbidmanager_v1.rb deleted file mode 100644 index 605ccc498..000000000 --- a/generated/google/apis/doubleclickbidmanager_v1.rb +++ /dev/null @@ -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/doubleclickbidmanager_v1/service.rb' -require 'google/apis/doubleclickbidmanager_v1/classes.rb' -require 'google/apis/doubleclickbidmanager_v1/representations.rb' - -module Google - module Apis - # DoubleClick Bid Manager API - # - # API for viewing and managing your reports in DoubleClick Bid Manager. - # - # @see https://developers.google.com/bid-manager/ - module DoubleclickbidmanagerV1 - VERSION = 'V1' - REVISION = '20150326' - end - end -end diff --git a/generated/google/apis/doubleclickbidmanager_v1/classes.rb b/generated/google/apis/doubleclickbidmanager_v1/classes.rb deleted file mode 100644 index a7ae73c9d..000000000 --- a/generated/google/apis/doubleclickbidmanager_v1/classes.rb +++ /dev/null @@ -1,709 +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 DoubleclickbidmanagerV1 - - # Request to fetch stored line items. - class DownloadLineItemsRequest - include Google::Apis::Core::Hashable - - # Ids of the specified filter type used to filter line items to fetch. If - # omitted, all the line items will be returned. - # Corresponds to the JSON property `filterIds` - # @return [Array] - attr_accessor :filter_ids - - # Filter type used to filter line items to fetch. - # Corresponds to the JSON property `filterType` - # @return [String] - attr_accessor :filter_type - - # Format in which the line items will be returned. Default to CSV. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter_ids = args[:filter_ids] unless args[:filter_ids].nil? - @filter_type = args[:filter_type] unless args[:filter_type].nil? - @format = args[:format] unless args[:format].nil? - end - end - - # Download line items response. - class DownloadLineItemsResponse - include Google::Apis::Core::Hashable - - # Retrieved line items in CSV format. Refer to Entity Write File Format for - # more information on file format. - # Corresponds to the JSON property `lineItems` - # @return [String] - attr_accessor :line_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @line_items = args[:line_items] unless args[:line_items].nil? - end - end - - # Filter used to match traffic data in your report. - class FilterPair - include Google::Apis::Core::Hashable - - # Filter type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Filter value. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # List queries response. - class ListQueriesResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # doubleclickbidmanager#listQueriesResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Retrieved queries. - # Corresponds to the JSON property `queries` - # @return [Array] - attr_accessor :queries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @queries = args[:queries] unless args[:queries].nil? - end - end - - # List reports response. - class ListReportsResponse - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # doubleclickbidmanager#listReportsResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Retrieved reports. - # Corresponds to the JSON property `reports` - # @return [Array] - attr_accessor :reports - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @reports = args[:reports] unless args[:reports].nil? - end - end - - # Parameters of a query or report. - class Parameters - include Google::Apis::Core::Hashable - - # Filters used to match traffic data in your report. - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - # Data is grouped by the filters listed in this field. - # Corresponds to the JSON property `groupBys` - # @return [Array] - attr_accessor :group_bys - - # Whether to include data from Invite Media. - # Corresponds to the JSON property `includeInviteData` - # @return [Boolean] - attr_accessor :include_invite_data - alias_method :include_invite_data?, :include_invite_data - - # Metrics to include as columns in your report. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # Report 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) - @filters = args[:filters] unless args[:filters].nil? - @group_bys = args[:group_bys] unless args[:group_bys].nil? - @include_invite_data = args[:include_invite_data] unless args[:include_invite_data].nil? - @metrics = args[:metrics] unless args[:metrics].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a query. - class Query - include Google::Apis::Core::Hashable - - # Identifies what kind of resource this is. Value: the fixed string " - # doubleclickbidmanager#query". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Query metadata. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::DoubleclickbidmanagerV1::QueryMetadata] - attr_accessor :metadata - - # Parameters of a query or report. - # Corresponds to the JSON property `params` - # @return [Google::Apis::DoubleclickbidmanagerV1::Parameters] - attr_accessor :params - - # Query ID. - # Corresponds to the JSON property `queryId` - # @return [String] - attr_accessor :query_id - - # The ending time for the data that is shown in the report. Note, - # reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and - # ignored otherwise. - # Corresponds to the JSON property `reportDataEndTimeMs` - # @return [String] - attr_accessor :report_data_end_time_ms - - # The starting time for the data that is shown in the report. Note, - # reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES and - # ignored otherwise. - # Corresponds to the JSON property `reportDataStartTimeMs` - # @return [String] - attr_accessor :report_data_start_time_ms - - # Information on how frequently and when to run a query. - # Corresponds to the JSON property `schedule` - # @return [Google::Apis::DoubleclickbidmanagerV1::QuerySchedule] - attr_accessor :schedule - - # Canonical timezone code for report data time. Defaults to America/New_York. - # Corresponds to the JSON property `timezoneCode` - # @return [String] - attr_accessor :timezone_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @params = args[:params] unless args[:params].nil? - @query_id = args[:query_id] unless args[:query_id].nil? - @report_data_end_time_ms = args[:report_data_end_time_ms] unless args[:report_data_end_time_ms].nil? - @report_data_start_time_ms = args[:report_data_start_time_ms] unless args[:report_data_start_time_ms].nil? - @schedule = args[:schedule] unless args[:schedule].nil? - @timezone_code = args[:timezone_code] unless args[:timezone_code].nil? - end - end - - # Query metadata. - class QueryMetadata - include Google::Apis::Core::Hashable - - # Range of report data. - # Corresponds to the JSON property `dataRange` - # @return [String] - attr_accessor :data_range - - # Format of the generated report. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # The path to the location in Google Cloud Storage where the latest report is - # stored. - # Corresponds to the JSON property `googleCloudStoragePathForLatestReport` - # @return [String] - attr_accessor :google_cloud_storage_path_for_latest_report - - # The path in Google Drive for the latest report. - # Corresponds to the JSON property `googleDrivePathForLatestReport` - # @return [String] - attr_accessor :google_drive_path_for_latest_report - - # The time when the latest report started to run. - # Corresponds to the JSON property `latestReportRunTimeMs` - # @return [String] - attr_accessor :latest_report_run_time_ms - - # Locale of the generated reports. Valid values are cs CZECH de GERMAN en - # ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH pt-BR - # BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk UKRAINIAN zh-CN CHINA_CHINESE zh- - # TW TAIWAN_CHINESE - # An locale string not in the list above will generate reports in English. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Number of reports that have been generated for the query. - # Corresponds to the JSON property `reportCount` - # @return [Fixnum] - attr_accessor :report_count - - # Whether the latest report is currently running. - # Corresponds to the JSON property `running` - # @return [Boolean] - attr_accessor :running - alias_method :running?, :running - - # Whether to send an email notification when a report is ready. Default to false. - # Corresponds to the JSON property `sendNotification` - # @return [Boolean] - attr_accessor :send_notification - alias_method :send_notification?, :send_notification - - # List of email addresses which are sent email notifications when the report is - # finished. Separate from sendNotification. - # Corresponds to the JSON property `shareEmailAddress` - # @return [Array] - attr_accessor :share_email_address - - # Query title. It is used to name the reports generated from this query. - # 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) - @data_range = args[:data_range] unless args[:data_range].nil? - @format = args[:format] unless args[:format].nil? - @google_cloud_storage_path_for_latest_report = args[:google_cloud_storage_path_for_latest_report] unless args[:google_cloud_storage_path_for_latest_report].nil? - @google_drive_path_for_latest_report = args[:google_drive_path_for_latest_report] unless args[:google_drive_path_for_latest_report].nil? - @latest_report_run_time_ms = args[:latest_report_run_time_ms] unless args[:latest_report_run_time_ms].nil? - @locale = args[:locale] unless args[:locale].nil? - @report_count = args[:report_count] unless args[:report_count].nil? - @running = args[:running] unless args[:running].nil? - @send_notification = args[:send_notification] unless args[:send_notification].nil? - @share_email_address = args[:share_email_address] unless args[:share_email_address].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # Information on how frequently and when to run a query. - class QuerySchedule - include Google::Apis::Core::Hashable - - # Datetime to periodically run the query until. - # Corresponds to the JSON property `endTimeMs` - # @return [String] - attr_accessor :end_time_ms - - # How often the query is run. - # Corresponds to the JSON property `frequency` - # @return [String] - attr_accessor :frequency - - # Time of day at which a new report will be generated, represented as minutes - # past midnight. Range is 0 to 1439. Only applies to scheduled reports. - # Corresponds to the JSON property `nextRunMinuteOfDay` - # @return [Fixnum] - attr_accessor :next_run_minute_of_day - - # Canonical timezone code for report generation time. Defaults to America/ - # New_York. - # Corresponds to the JSON property `nextRunTimezoneCode` - # @return [String] - attr_accessor :next_run_timezone_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time_ms = args[:end_time_ms] unless args[:end_time_ms].nil? - @frequency = args[:frequency] unless args[:frequency].nil? - @next_run_minute_of_day = args[:next_run_minute_of_day] unless args[:next_run_minute_of_day].nil? - @next_run_timezone_code = args[:next_run_timezone_code] unless args[:next_run_timezone_code].nil? - end - end - - # Represents a report. - class Report - include Google::Apis::Core::Hashable - - # Key used to identify a report. - # Corresponds to the JSON property `key` - # @return [Google::Apis::DoubleclickbidmanagerV1::ReportKey] - attr_accessor :key - - # Report metadata. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::DoubleclickbidmanagerV1::ReportMetadata] - attr_accessor :metadata - - # Parameters of a query or report. - # Corresponds to the JSON property `params` - # @return [Google::Apis::DoubleclickbidmanagerV1::Parameters] - attr_accessor :params - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] unless args[:key].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @params = args[:params] unless args[:params].nil? - end - end - - # An explanation of a report failure. - class ReportFailure - include Google::Apis::Core::Hashable - - # Error code that shows why the report was not created. - # Corresponds to the JSON property `errorCode` - # @return [String] - attr_accessor :error_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_code = args[:error_code] unless args[:error_code].nil? - end - end - - # Key used to identify a report. - class ReportKey - include Google::Apis::Core::Hashable - - # Query ID. - # Corresponds to the JSON property `queryId` - # @return [String] - attr_accessor :query_id - - # Report ID. - # Corresponds to the JSON property `reportId` - # @return [String] - attr_accessor :report_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @query_id = args[:query_id] unless args[:query_id].nil? - @report_id = args[:report_id] unless args[:report_id].nil? - end - end - - # Report metadata. - class ReportMetadata - include Google::Apis::Core::Hashable - - # The path to the location in Google Cloud Storage where the report is stored. - # Corresponds to the JSON property `googleCloudStoragePath` - # @return [String] - attr_accessor :google_cloud_storage_path - - # The ending time for the data that is shown in the report. - # Corresponds to the JSON property `reportDataEndTimeMs` - # @return [String] - attr_accessor :report_data_end_time_ms - - # The starting time for the data that is shown in the report. - # Corresponds to the JSON property `reportDataStartTimeMs` - # @return [String] - attr_accessor :report_data_start_time_ms - - # Report status. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DoubleclickbidmanagerV1::ReportStatus] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @google_cloud_storage_path = args[:google_cloud_storage_path] unless args[:google_cloud_storage_path].nil? - @report_data_end_time_ms = args[:report_data_end_time_ms] unless args[:report_data_end_time_ms].nil? - @report_data_start_time_ms = args[:report_data_start_time_ms] unless args[:report_data_start_time_ms].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # Report status. - class ReportStatus - include Google::Apis::Core::Hashable - - # An explanation of a report failure. - # Corresponds to the JSON property `failure` - # @return [Google::Apis::DoubleclickbidmanagerV1::ReportFailure] - attr_accessor :failure - - # The time when this report either completed successfully or failed. - # Corresponds to the JSON property `finishTimeMs` - # @return [String] - attr_accessor :finish_time_ms - - # The file type of the report. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # The state of the report. - # 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) - @failure = args[:failure] unless args[:failure].nil? - @finish_time_ms = args[:finish_time_ms] unless args[:finish_time_ms].nil? - @format = args[:format] unless args[:format].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # Represents the upload status of a row in the request. - class RowStatus - include Google::Apis::Core::Hashable - - # Whether the stored entity is changed as a result of upload. - # Corresponds to the JSON property `changed` - # @return [Boolean] - attr_accessor :changed - alias_method :changed?, :changed - - # Entity Id. - # Corresponds to the JSON property `entityId` - # @return [String] - attr_accessor :entity_id - - # Entity name. - # Corresponds to the JSON property `entityName` - # @return [String] - attr_accessor :entity_name - - # Reasons why the entity can't be uploaded. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # Whether the entity is persisted. - # Corresponds to the JSON property `persisted` - # @return [Boolean] - attr_accessor :persisted - alias_method :persisted?, :persisted - - # Row number. - # Corresponds to the JSON property `rowNumber` - # @return [Fixnum] - attr_accessor :row_number - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @changed = args[:changed] unless args[:changed].nil? - @entity_id = args[:entity_id] unless args[:entity_id].nil? - @entity_name = args[:entity_name] unless args[:entity_name].nil? - @errors = args[:errors] unless args[:errors].nil? - @persisted = args[:persisted] unless args[:persisted].nil? - @row_number = args[:row_number] unless args[:row_number].nil? - end - end - - # Request to run a stored query to generate a report. - class RunQueryRequest - include Google::Apis::Core::Hashable - - # Report data range used to generate the report. - # Corresponds to the JSON property `dataRange` - # @return [String] - attr_accessor :data_range - - # The ending time for the data that is shown in the report. Note, - # reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored - # otherwise. - # Corresponds to the JSON property `reportDataEndTimeMs` - # @return [String] - attr_accessor :report_data_end_time_ms - - # The starting time for the data that is shown in the report. Note, - # reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and ignored - # otherwise. - # Corresponds to the JSON property `reportDataStartTimeMs` - # @return [String] - attr_accessor :report_data_start_time_ms - - # Canonical timezone code for report data time. Defaults to America/New_York. - # Corresponds to the JSON property `timezoneCode` - # @return [String] - attr_accessor :timezone_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_range = args[:data_range] unless args[:data_range].nil? - @report_data_end_time_ms = args[:report_data_end_time_ms] unless args[:report_data_end_time_ms].nil? - @report_data_start_time_ms = args[:report_data_start_time_ms] unless args[:report_data_start_time_ms].nil? - @timezone_code = args[:timezone_code] unless args[:timezone_code].nil? - end - end - - # Request to upload line items. - class UploadLineItemsRequest - include Google::Apis::Core::Hashable - - # Set to true to get upload status without actually persisting the line items. - # Corresponds to the JSON property `dryRun` - # @return [Boolean] - attr_accessor :dry_run - alias_method :dry_run?, :dry_run - - # Format the line items are in. Default to CSV. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Line items in CSV to upload. Refer to Entity Write File Format for more - # information on file format. - # Corresponds to the JSON property `lineItems` - # @return [String] - attr_accessor :line_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dry_run = args[:dry_run] unless args[:dry_run].nil? - @format = args[:format] unless args[:format].nil? - @line_items = args[:line_items] unless args[:line_items].nil? - end - end - - # Upload line items response. - class UploadLineItemsResponse - include Google::Apis::Core::Hashable - - # Represents the status of upload. - # Corresponds to the JSON property `uploadStatus` - # @return [Google::Apis::DoubleclickbidmanagerV1::UploadStatus] - attr_accessor :upload_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @upload_status = args[:upload_status] unless args[:upload_status].nil? - end - end - - # Represents the status of upload. - class UploadStatus - include Google::Apis::Core::Hashable - - # Reasons why upload can't be completed. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # Per-row upload status. - # Corresponds to the JSON property `rowStatus` - # @return [Array] - attr_accessor :row_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @errors = args[:errors] unless args[:errors].nil? - @row_status = args[:row_status] unless args[:row_status].nil? - end - end - end - end -end diff --git a/generated/google/apis/doubleclickbidmanager_v1/representations.rb b/generated/google/apis/doubleclickbidmanager_v1/representations.rb deleted file mode 100644 index 85b1e673c..000000000 --- a/generated/google/apis/doubleclickbidmanager_v1/representations.rb +++ /dev/null @@ -1,297 +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 DoubleclickbidmanagerV1 - - class DownloadLineItemsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DownloadLineItemsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FilterPair - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListQueriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListReportsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Parameters - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Query - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QueryMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QuerySchedule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Report - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportFailure - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportKey - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RowStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RunQueryRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UploadLineItemsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UploadLineItemsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UploadStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class DownloadLineItemsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :filter_ids, as: 'filterIds' - property :filter_type, as: 'filterType' - property :format, as: 'format' - end - end - - # @private - class DownloadLineItemsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :line_items, as: 'lineItems' - end - end - - # @private - class FilterPair - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - - # @private - class ListQueriesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :queries, as: 'queries', class: Google::Apis::DoubleclickbidmanagerV1::Query, decorator: Google::Apis::DoubleclickbidmanagerV1::Query::Representation - - end - end - - # @private - class ListReportsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :reports, as: 'reports', class: Google::Apis::DoubleclickbidmanagerV1::Report, decorator: Google::Apis::DoubleclickbidmanagerV1::Report::Representation - - end - end - - # @private - class Parameters - class Representation < Google::Apis::Core::JsonRepresentation - collection :filters, as: 'filters', class: Google::Apis::DoubleclickbidmanagerV1::FilterPair, decorator: Google::Apis::DoubleclickbidmanagerV1::FilterPair::Representation - - collection :group_bys, as: 'groupBys' - property :include_invite_data, as: 'includeInviteData' - collection :metrics, as: 'metrics' - property :type, as: 'type' - end - end - - # @private - class Query - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :metadata, as: 'metadata', class: Google::Apis::DoubleclickbidmanagerV1::QueryMetadata, decorator: Google::Apis::DoubleclickbidmanagerV1::QueryMetadata::Representation - - property :params, as: 'params', class: Google::Apis::DoubleclickbidmanagerV1::Parameters, decorator: Google::Apis::DoubleclickbidmanagerV1::Parameters::Representation - - property :query_id, as: 'queryId' - property :report_data_end_time_ms, as: 'reportDataEndTimeMs' - property :report_data_start_time_ms, as: 'reportDataStartTimeMs' - property :schedule, as: 'schedule', class: Google::Apis::DoubleclickbidmanagerV1::QuerySchedule, decorator: Google::Apis::DoubleclickbidmanagerV1::QuerySchedule::Representation - - property :timezone_code, as: 'timezoneCode' - end - end - - # @private - class QueryMetadata - class Representation < Google::Apis::Core::JsonRepresentation - property :data_range, as: 'dataRange' - property :format, as: 'format' - property :google_cloud_storage_path_for_latest_report, as: 'googleCloudStoragePathForLatestReport' - property :google_drive_path_for_latest_report, as: 'googleDrivePathForLatestReport' - property :latest_report_run_time_ms, as: 'latestReportRunTimeMs' - property :locale, as: 'locale' - property :report_count, as: 'reportCount' - property :running, as: 'running' - property :send_notification, as: 'sendNotification' - collection :share_email_address, as: 'shareEmailAddress' - property :title, as: 'title' - end - end - - # @private - class QuerySchedule - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time_ms, as: 'endTimeMs' - property :frequency, as: 'frequency' - property :next_run_minute_of_day, as: 'nextRunMinuteOfDay' - property :next_run_timezone_code, as: 'nextRunTimezoneCode' - end - end - - # @private - class Report - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key', class: Google::Apis::DoubleclickbidmanagerV1::ReportKey, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportKey::Representation - - property :metadata, as: 'metadata', class: Google::Apis::DoubleclickbidmanagerV1::ReportMetadata, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportMetadata::Representation - - property :params, as: 'params', class: Google::Apis::DoubleclickbidmanagerV1::Parameters, decorator: Google::Apis::DoubleclickbidmanagerV1::Parameters::Representation - - end - end - - # @private - class ReportFailure - class Representation < Google::Apis::Core::JsonRepresentation - property :error_code, as: 'errorCode' - end - end - - # @private - class ReportKey - class Representation < Google::Apis::Core::JsonRepresentation - property :query_id, as: 'queryId' - property :report_id, as: 'reportId' - end - end - - # @private - class ReportMetadata - class Representation < Google::Apis::Core::JsonRepresentation - property :google_cloud_storage_path, as: 'googleCloudStoragePath' - property :report_data_end_time_ms, as: 'reportDataEndTimeMs' - property :report_data_start_time_ms, as: 'reportDataStartTimeMs' - property :status, as: 'status', class: Google::Apis::DoubleclickbidmanagerV1::ReportStatus, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportStatus::Representation - - end - end - - # @private - class ReportStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :failure, as: 'failure', class: Google::Apis::DoubleclickbidmanagerV1::ReportFailure, decorator: Google::Apis::DoubleclickbidmanagerV1::ReportFailure::Representation - - property :finish_time_ms, as: 'finishTimeMs' - property :format, as: 'format' - property :state, as: 'state' - end - end - - # @private - class RowStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :changed, as: 'changed' - property :entity_id, as: 'entityId' - property :entity_name, as: 'entityName' - collection :errors, as: 'errors' - property :persisted, as: 'persisted' - property :row_number, as: 'rowNumber' - end - end - - # @private - class RunQueryRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :data_range, as: 'dataRange' - property :report_data_end_time_ms, as: 'reportDataEndTimeMs' - property :report_data_start_time_ms, as: 'reportDataStartTimeMs' - property :timezone_code, as: 'timezoneCode' - end - end - - # @private - class UploadLineItemsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :dry_run, as: 'dryRun' - property :format, as: 'format' - property :line_items, as: 'lineItems' - end - end - - # @private - class UploadLineItemsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :upload_status, as: 'uploadStatus', class: Google::Apis::DoubleclickbidmanagerV1::UploadStatus, decorator: Google::Apis::DoubleclickbidmanagerV1::UploadStatus::Representation - - end - end - - # @private - class UploadStatus - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors' - collection :row_status, as: 'rowStatus', class: Google::Apis::DoubleclickbidmanagerV1::RowStatus, decorator: Google::Apis::DoubleclickbidmanagerV1::RowStatus::Representation - - end - end - end - end -end diff --git a/generated/google/apis/doubleclickbidmanager_v1/service.rb b/generated/google/apis/doubleclickbidmanager_v1/service.rb deleted file mode 100644 index e813e7500..000000000 --- a/generated/google/apis/doubleclickbidmanager_v1/service.rb +++ /dev/null @@ -1,349 +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 DoubleclickbidmanagerV1 - # DoubleClick Bid Manager API - # - # API for viewing and managing your reports in DoubleClick Bid Manager. - # - # @example - # require 'google/apis/doubleclickbidmanager_v1' - # - # Doubleclickbidmanager = Google::Apis::DoubleclickbidmanagerV1 # Alias the module - # service = Doubleclickbidmanager::DoubleClickBidManagerService.new - # - # @see https://developers.google.com/bid-manager/ - class DoubleClickBidManagerService < 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/', 'doubleclickbidmanager/v1/') - end - - # Retrieves line items in CSV format. - # @param [Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsRequest] download_line_items_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def download_line_items(download_line_items_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lineitems/downloadlineitems' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsRequest::Representation - command.request_object = download_line_items_request_object - command.response_representation = Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse::Representation - command.response_class = Google::Apis::DoubleclickbidmanagerV1::DownloadLineItemsResponse - 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 - - # Uploads line items in CSV format. - # @param [Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsRequest] upload_line_items_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_line_items(upload_line_items_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lineitems/uploadlineitems' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsRequest::Representation - command.request_object = upload_line_items_request_object - command.response_representation = Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse::Representation - command.response_class = Google::Apis::DoubleclickbidmanagerV1::UploadLineItemsResponse - 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 query. - # @param [Google::Apis::DoubleclickbidmanagerV1::Query] query_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::DoubleclickbidmanagerV1::Query] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclickbidmanagerV1::Query] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_query(query_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'query' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclickbidmanagerV1::Query::Representation - command.request_object = query_object - command.response_representation = Google::Apis::DoubleclickbidmanagerV1::Query::Representation - command.response_class = Google::Apis::DoubleclickbidmanagerV1::Query - 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 stored query as well as the associated stored reports. - # @param [String] query_id - # Query ID 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 deletequery(query_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'query/{queryId}' - command = make_simple_command(:delete, path, options) - command.params['queryId'] = query_id unless query_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 stored query. - # @param [String] query_id - # Query ID 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::DoubleclickbidmanagerV1::Query] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclickbidmanagerV1::Query] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_query(query_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'query/{queryId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DoubleclickbidmanagerV1::Query::Representation - command.response_class = Google::Apis::DoubleclickbidmanagerV1::Query - command.params['queryId'] = query_id unless query_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 stored queries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DoubleclickbidmanagerV1::ListQueriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclickbidmanagerV1::ListQueriesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_queries(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'queries' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DoubleclickbidmanagerV1::ListQueriesResponse::Representation - command.response_class = Google::Apis::DoubleclickbidmanagerV1::ListQueriesResponse - 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 - - # Runs a stored query to generate a report. - # @param [String] query_id - # Query ID to run. - # @param [Google::Apis::DoubleclickbidmanagerV1::RunQueryRequest] run_query_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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 run_query(query_id, run_query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'query/{queryId}' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclickbidmanagerV1::RunQueryRequest::Representation - command.request_object = run_query_request_object - command.params['queryId'] = query_id unless query_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 stored reports. - # @param [String] query_id - # Query ID with which the reports are associated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DoubleclickbidmanagerV1::ListReportsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclickbidmanagerV1::ListReportsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reports(query_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'queries/{queryId}/reports' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DoubleclickbidmanagerV1::ListReportsResponse::Representation - command.response_class = Google::Apis::DoubleclickbidmanagerV1::ListReportsResponse - command.params['queryId'] = query_id unless query_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 diff --git a/generated/google/apis/doubleclicksearch_v2.rb b/generated/google/apis/doubleclicksearch_v2.rb deleted file mode 100644 index c628f3368..000000000 --- a/generated/google/apis/doubleclicksearch_v2.rb +++ /dev/null @@ -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/doubleclicksearch_v2/service.rb' -require 'google/apis/doubleclicksearch_v2/classes.rb' -require 'google/apis/doubleclicksearch_v2/representations.rb' - -module Google - module Apis - # DoubleClick Search API - # - # Report and modify your advertising data in DoubleClick Search (for example, - # campaigns, ad groups, keywords, and conversions). - # - # @see https://developers.google.com/doubleclick-search/ - module DoubleclicksearchV2 - VERSION = 'V2' - REVISION = '20150526' - - # View and manage your advertising data in DoubleClick Search - AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch' - end - end -end diff --git a/generated/google/apis/doubleclicksearch_v2/classes.rb b/generated/google/apis/doubleclicksearch_v2/classes.rb deleted file mode 100644 index 3940c704d..000000000 --- a/generated/google/apis/doubleclicksearch_v2/classes.rb +++ /dev/null @@ -1,947 +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 DoubleclicksearchV2 - - # A message containing availability data relevant to DoubleClick Search. - class Availability - include Google::Apis::Core::Hashable - - # DS advertiser ID. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # DS agency ID. - # Corresponds to the JSON property `agencyId` - # @return [String] - attr_accessor :agency_id - - # The time by which all conversions have been uploaded, in epoch millis UTC. - # Corresponds to the JSON property `availabilityTimestamp` - # @return [String] - attr_accessor :availability_timestamp - - # The numeric segmentation identifier (for example, DoubleClick Search - # Floodlight activity ID). - # Corresponds to the JSON property `segmentationId` - # @return [String] - attr_accessor :segmentation_id - - # The friendly segmentation identifier (for example, DoubleClick Search - # Floodlight activity name). - # Corresponds to the JSON property `segmentationName` - # @return [String] - attr_accessor :segmentation_name - - # The segmentation type that this availability is for (its default value is - # FLOODLIGHT). - # Corresponds to the JSON property `segmentationType` - # @return [String] - attr_accessor :segmentation_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @agency_id = args[:agency_id] unless args[:agency_id].nil? - @availability_timestamp = args[:availability_timestamp] unless args[:availability_timestamp].nil? - @segmentation_id = args[:segmentation_id] unless args[:segmentation_id].nil? - @segmentation_name = args[:segmentation_name] unless args[:segmentation_name].nil? - @segmentation_type = args[:segmentation_type] unless args[:segmentation_type].nil? - end - end - - # A conversion containing data relevant to DoubleClick Search. - class Conversion - include Google::Apis::Core::Hashable - - # DS ad group ID. - # Corresponds to the JSON property `adGroupId` - # @return [String] - attr_accessor :ad_group_id - - # DS ad ID. - # Corresponds to the JSON property `adId` - # @return [String] - attr_accessor :ad_id - - # DS advertiser ID. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # DS agency ID. - # Corresponds to the JSON property `agencyId` - # @return [String] - attr_accessor :agency_id - - # This field is ignored. - # Corresponds to the JSON property `attributionModel` - # @return [String] - attr_accessor :attribution_model - - # DS campaign ID. - # Corresponds to the JSON property `campaignId` - # @return [String] - attr_accessor :campaign_id - - # Sales channel for the product. Acceptable values are: - # - "local": a physical store - # - "online": an online store - # Corresponds to the JSON property `channel` - # @return [String] - attr_accessor :channel - - # DS click ID for the conversion. - # Corresponds to the JSON property `clickId` - # @return [String] - attr_accessor :click_id - - # For offline conversions, this is an ID provided by advertisers. Advertisers - # can use this property to specify an ID that is meaningful to them. If an - # advertiser doesn't specify a conversionId, DoubleClick Search generates one. - # For online conversions, DS copies the dsConversionId or floodlightOrderId into - # this property depending on the advertiser's Floodlight instructions. - # Corresponds to the JSON property `conversionId` - # @return [String] - attr_accessor :conversion_id - - # The time at which the conversion was last modified, in epoch millis UTC. - # Corresponds to the JSON property `conversionModifiedTimestamp` - # @return [String] - attr_accessor :conversion_modified_timestamp - - # The time at which the conversion took place, in epoch millis UTC. - # Corresponds to the JSON property `conversionTimestamp` - # @return [String] - attr_accessor :conversion_timestamp - - # This field is ignored. - # Corresponds to the JSON property `countMillis` - # @return [String] - attr_accessor :count_millis - - # DS criterion (keyword) ID. - # Corresponds to the JSON property `criterionId` - # @return [String] - attr_accessor :criterion_id - - # The currency code for the conversion's revenue. Should be in ISO 4217 - # alphabetic (3-char) format. - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - # Custom dimensions for the conversion, which can be used to filter data in a - # report. - # Corresponds to the JSON property `customDimension` - # @return [Array] - attr_accessor :custom_dimension - - # Custom metrics for the conversion. - # Corresponds to the JSON property `customMetric` - # @return [Array] - attr_accessor :custom_metric - - # The type of device on which the conversion occurred. - # Corresponds to the JSON property `deviceType` - # @return [String] - attr_accessor :device_type - - # ID that DoubleClick Search generates for each conversion. - # Corresponds to the JSON property `dsConversionId` - # @return [String] - attr_accessor :ds_conversion_id - - # DS engine account ID. - # Corresponds to the JSON property `engineAccountId` - # @return [String] - attr_accessor :engine_account_id - - # The Floodlight order ID provided by the advertiser for the conversion. - # Corresponds to the JSON property `floodlightOrderId` - # @return [String] - attr_accessor :floodlight_order_id - - # ID that DS generates and uses to uniquely identify the inventory account that - # contains the product. - # Corresponds to the JSON property `inventoryAccountId` - # @return [String] - attr_accessor :inventory_account_id - - # The country registered for the Merchant Center feed that contains the product. - # Use an ISO 3166 code to specify a country. - # Corresponds to the JSON property `productCountry` - # @return [String] - attr_accessor :product_country - - # DS product group ID. - # Corresponds to the JSON property `productGroupId` - # @return [String] - attr_accessor :product_group_id - - # The product ID (SKU). - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # The language registered for the Merchant Center feed that contains the product. - # Use an ISO 639 code to specify a language. - # Corresponds to the JSON property `productLanguage` - # @return [String] - attr_accessor :product_language - - # The quantity of this conversion, in millis. - # Corresponds to the JSON property `quantityMillis` - # @return [String] - attr_accessor :quantity_millis - - # The revenue amount of this TRANSACTION conversion, in micros. - # Corresponds to the JSON property `revenueMicros` - # @return [String] - attr_accessor :revenue_micros - - # The numeric segmentation identifier (for example, DoubleClick Search - # Floodlight activity ID). - # Corresponds to the JSON property `segmentationId` - # @return [String] - attr_accessor :segmentation_id - - # The friendly segmentation identifier (for example, DoubleClick Search - # Floodlight activity name). - # Corresponds to the JSON property `segmentationName` - # @return [String] - attr_accessor :segmentation_name - - # The segmentation type of this conversion (for example, FLOODLIGHT). - # Corresponds to the JSON property `segmentationType` - # @return [String] - attr_accessor :segmentation_type - - # The state of the conversion, that is, either ACTIVE or REMOVED. Note: state - # DELETED is deprecated. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # The ID of the local store for which the product was advertised. Applicable - # only when the channel is "local". - # Corresponds to the JSON property `storeId` - # @return [String] - attr_accessor :store_id - - # The type of the conversion, that is, either ACTION or TRANSACTION. An ACTION - # conversion is an action by the user that has no monetarily quantifiable value, - # while a TRANSACTION conversion is an action that does have a monetarily - # quantifiable value. Examples are email list signups (ACTION) versus ecommerce - # purchases (TRANSACTION). - # 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) - @ad_group_id = args[:ad_group_id] unless args[:ad_group_id].nil? - @ad_id = args[:ad_id] unless args[:ad_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @agency_id = args[:agency_id] unless args[:agency_id].nil? - @attribution_model = args[:attribution_model] unless args[:attribution_model].nil? - @campaign_id = args[:campaign_id] unless args[:campaign_id].nil? - @channel = args[:channel] unless args[:channel].nil? - @click_id = args[:click_id] unless args[:click_id].nil? - @conversion_id = args[:conversion_id] unless args[:conversion_id].nil? - @conversion_modified_timestamp = args[:conversion_modified_timestamp] unless args[:conversion_modified_timestamp].nil? - @conversion_timestamp = args[:conversion_timestamp] unless args[:conversion_timestamp].nil? - @count_millis = args[:count_millis] unless args[:count_millis].nil? - @criterion_id = args[:criterion_id] unless args[:criterion_id].nil? - @currency_code = args[:currency_code] unless args[:currency_code].nil? - @custom_dimension = args[:custom_dimension] unless args[:custom_dimension].nil? - @custom_metric = args[:custom_metric] unless args[:custom_metric].nil? - @device_type = args[:device_type] unless args[:device_type].nil? - @ds_conversion_id = args[:ds_conversion_id] unless args[:ds_conversion_id].nil? - @engine_account_id = args[:engine_account_id] unless args[:engine_account_id].nil? - @floodlight_order_id = args[:floodlight_order_id] unless args[:floodlight_order_id].nil? - @inventory_account_id = args[:inventory_account_id] unless args[:inventory_account_id].nil? - @product_country = args[:product_country] unless args[:product_country].nil? - @product_group_id = args[:product_group_id] unless args[:product_group_id].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @product_language = args[:product_language] unless args[:product_language].nil? - @quantity_millis = args[:quantity_millis] unless args[:quantity_millis].nil? - @revenue_micros = args[:revenue_micros] unless args[:revenue_micros].nil? - @segmentation_id = args[:segmentation_id] unless args[:segmentation_id].nil? - @segmentation_name = args[:segmentation_name] unless args[:segmentation_name].nil? - @segmentation_type = args[:segmentation_type] unless args[:segmentation_type].nil? - @state = args[:state] unless args[:state].nil? - @store_id = args[:store_id] unless args[:store_id].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A list of conversions. - class ConversionList - include Google::Apis::Core::Hashable - - # The conversions being requested. - # Corresponds to the JSON property `conversion` - # @return [Array] - attr_accessor :conversion - - # Identifies this as a ConversionList resource. Value: the fixed string - # doubleclicksearch#conversionList. - # 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) - @conversion = args[:conversion] unless args[:conversion].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A message containing the custome dimension. - class CustomDimension - include Google::Apis::Core::Hashable - - # Custom dimension name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Custom dimension 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) - @name = args[:name] unless args[:name].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # A message containing the custome metric. - class CustomMetric - include Google::Apis::Core::Hashable - - # Custom metric name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Custom metric numeric value. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # A DoubleClick Search report. This object contains the report request, some - # report metadata such as currency code, and the generated report rows or report - # files. - class Report - include Google::Apis::Core::Hashable - - # Asynchronous report only. Contains a list of generated report files once the - # report has succesfully completed. - # Corresponds to the JSON property `files` - # @return [Array] - attr_accessor :files - - # Asynchronous report only. Id of the report. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Asynchronous report only. True if and only if the report has completed - # successfully and the report files are ready to be downloaded. - # Corresponds to the JSON property `isReportReady` - # @return [Boolean] - attr_accessor :is_report_ready - alias_method :is_report_ready?, :is_report_ready - - # Identifies this as a Report resource. Value: the fixed string - # doubleclicksearch#report. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A request object used to create a DoubleClick Search report. - # Corresponds to the JSON property `request` - # @return [Google::Apis::DoubleclicksearchV2::ReportRequest] - attr_accessor :request - - # The number of report rows generated by the report, not including headers. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - # Synchronous report only. Generated report rows. - # Corresponds to the JSON property `rows` - # @return [Array>] - attr_accessor :rows - - # The currency code of all monetary values produced in the report, including - # values that are set by users (e.g., keyword bid settings) and metrics (e.g., - # cost and revenue). The currency code of a report is determined by the - # statisticsCurrency field of the report request. - # Corresponds to the JSON property `statisticsCurrencyCode` - # @return [String] - attr_accessor :statistics_currency_code - - # If all statistics of the report are sourced from the same time zone, this - # would be it. Otherwise the field is unset. - # Corresponds to the JSON property `statisticsTimeZone` - # @return [String] - attr_accessor :statistics_time_zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @files = args[:files] unless args[:files].nil? - @id = args[:id] unless args[:id].nil? - @is_report_ready = args[:is_report_ready] unless args[:is_report_ready].nil? - @kind = args[:kind] unless args[:kind].nil? - @request = args[:request] unless args[:request].nil? - @row_count = args[:row_count] unless args[:row_count].nil? - @rows = args[:rows] unless args[:rows].nil? - @statistics_currency_code = args[:statistics_currency_code] unless args[:statistics_currency_code].nil? - @statistics_time_zone = args[:statistics_time_zone] unless args[:statistics_time_zone].nil? - end - - # - class File - include Google::Apis::Core::Hashable - - # The size of this report file in bytes. - # Corresponds to the JSON property `byteCount` - # @return [String] - attr_accessor :byte_count - - # Use this url to download the report file. - # 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) - @byte_count = args[:byte_count] unless args[:byte_count].nil? - @url = args[:url] unless args[:url].nil? - end - end - end - - # A request object used to create a DoubleClick Search report. - class ReportApiColumnSpec - include Google::Apis::Core::Hashable - - # Name of a DoubleClick Search column to include in the report. - # Corresponds to the JSON property `columnName` - # @return [String] - attr_accessor :column_name - - # Segments a report by a custom dimension. The report must be scoped to an - # advertiser or lower, and the custom dimension must already be set up in - # DoubleClick Search. The custom dimension name, which appears in DoubleClick - # Search, is case sensitive. - # If used in a conversion report, returns the value of the specified custom - # dimension for the given conversion, if set. This column does not segment the - # conversion report. - # Corresponds to the JSON property `customDimensionName` - # @return [String] - attr_accessor :custom_dimension_name - - # Name of a custom metric to include in the report. The report must be scoped to - # an advertiser or lower, and the custom metric must already be set up in - # DoubleClick Search. The custom metric name, which appears in DoubleClick - # Search, is case sensitive. - # Corresponds to the JSON property `customMetricName` - # @return [String] - attr_accessor :custom_metric_name - - # Inclusive day in YYYY-MM-DD format. When provided, this overrides the overall - # time range of the report for this column only. Must be provided together with - # startDate. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - # Synchronous report only. Set to true to group by this column. Defaults to - # false. - # Corresponds to the JSON property `groupByColumn` - # @return [Boolean] - attr_accessor :group_by_column - alias_method :group_by_column?, :group_by_column - - # Text used to identify this column in the report output; defaults to columnName - # or savedColumnName when not specified. This can be used to prevent collisions - # between DoubleClick Search columns and saved columns with the same name. - # Corresponds to the JSON property `headerText` - # @return [String] - attr_accessor :header_text - - # The platform that is used to provide data for the custom dimension. Acceptable - # values are "Floodlight". - # Corresponds to the JSON property `platformSource` - # @return [String] - attr_accessor :platform_source - - # Name of a saved column to include in the report. The report must be scoped at - # advertiser or lower, and this saved column must already be created in the - # DoubleClick Search UI. - # Corresponds to the JSON property `savedColumnName` - # @return [String] - attr_accessor :saved_column_name - - # Inclusive date in YYYY-MM-DD format. When provided, this overrides the overall - # time range of the report for this column only. Must be provided together with - # endDate. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_name = args[:column_name] unless args[:column_name].nil? - @custom_dimension_name = args[:custom_dimension_name] unless args[:custom_dimension_name].nil? - @custom_metric_name = args[:custom_metric_name] unless args[:custom_metric_name].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @group_by_column = args[:group_by_column] unless args[:group_by_column].nil? - @header_text = args[:header_text] unless args[:header_text].nil? - @platform_source = args[:platform_source] unless args[:platform_source].nil? - @saved_column_name = args[:saved_column_name] unless args[:saved_column_name].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - end - end - - # A request object used to create a DoubleClick Search report. - class ReportRequest - include Google::Apis::Core::Hashable - - # The columns to include in the report. This includes both DoubleClick Search - # columns and saved columns. For DoubleClick Search columns, only the columnName - # parameter is required. For saved columns only the savedColumnName parameter is - # required. Both columnName and savedColumnName cannot be set in the same stanza. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # Format that the report should be returned in. Currently csv or tsv is - # supported. - # Corresponds to the JSON property `downloadFormat` - # @return [String] - attr_accessor :download_format - - # A list of filters to be applied to the report. - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - # Determines if removed entities should be included in the report. Defaults to - # false. Deprecated, please use includeRemovedEntities instead. - # Corresponds to the JSON property `includeDeletedEntities` - # @return [Boolean] - attr_accessor :include_deleted_entities - alias_method :include_deleted_entities?, :include_deleted_entities - - # Determines if removed entities should be included in the report. Defaults to - # false. - # Corresponds to the JSON property `includeRemovedEntities` - # @return [Boolean] - attr_accessor :include_removed_entities - alias_method :include_removed_entities?, :include_removed_entities - - # Asynchronous report only. The maximum number of rows per report file. A large - # report is split into many files based on this field. Acceptable values are - # 1000000 to 100000000, inclusive. - # Corresponds to the JSON property `maxRowsPerFile` - # @return [Fixnum] - attr_accessor :max_rows_per_file - - # Synchronous report only. A list of columns and directions defining sorting to - # be performed on the report rows. - # Corresponds to the JSON property `orderBy` - # @return [Array] - attr_accessor :order_by - - # The reportScope is a set of IDs that are used to determine which subset of - # entities will be returned in the report. The full lineage of IDs from the - # lowest scoped level desired up through agency is required. - # Corresponds to the JSON property `reportScope` - # @return [Google::Apis::DoubleclicksearchV2::ReportRequest::ReportScope] - attr_accessor :report_scope - - # Determines the type of rows that are returned in the report. For example, if - # you specify reportType: keyword, each row in the report will contain data - # about a keyword. See the Types of Reports reference for the columns that are - # available for each type. - # Corresponds to the JSON property `reportType` - # @return [String] - attr_accessor :report_type - - # Synchronous report only. The maxinum number of rows to return; additional rows - # are dropped. Acceptable values are 0 to 10000, inclusive. Defaults to 10000. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - # Synchronous report only. Zero-based index of the first row to return. - # Acceptable values are 0 to 50000, inclusive. Defaults to 0. - # Corresponds to the JSON property `startRow` - # @return [Fixnum] - attr_accessor :start_row - - # Specifies the currency in which monetary will be returned. Possible values are: - # usd, agency (valid if the report is scoped to agency or lower), advertiser ( - # valid if the report is scoped to * advertiser or lower), or account (valid if - # the report is scoped to engine account or lower). - # Corresponds to the JSON property `statisticsCurrency` - # @return [String] - attr_accessor :statistics_currency - - # If metrics are requested in a report, this argument will be used to restrict - # the metrics to a specific time range. - # Corresponds to the JSON property `timeRange` - # @return [Google::Apis::DoubleclicksearchV2::ReportRequest::TimeRange] - attr_accessor :time_range - - # If true, the report would only be created if all the requested stat data are - # sourced from a single timezone. Defaults to false. - # Corresponds to the JSON property `verifySingleTimeZone` - # @return [Boolean] - attr_accessor :verify_single_time_zone - alias_method :verify_single_time_zone?, :verify_single_time_zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @columns = args[:columns] unless args[:columns].nil? - @download_format = args[:download_format] unless args[:download_format].nil? - @filters = args[:filters] unless args[:filters].nil? - @include_deleted_entities = args[:include_deleted_entities] unless args[:include_deleted_entities].nil? - @include_removed_entities = args[:include_removed_entities] unless args[:include_removed_entities].nil? - @max_rows_per_file = args[:max_rows_per_file] unless args[:max_rows_per_file].nil? - @order_by = args[:order_by] unless args[:order_by].nil? - @report_scope = args[:report_scope] unless args[:report_scope].nil? - @report_type = args[:report_type] unless args[:report_type].nil? - @row_count = args[:row_count] unless args[:row_count].nil? - @start_row = args[:start_row] unless args[:start_row].nil? - @statistics_currency = args[:statistics_currency] unless args[:statistics_currency].nil? - @time_range = args[:time_range] unless args[:time_range].nil? - @verify_single_time_zone = args[:verify_single_time_zone] unless args[:verify_single_time_zone].nil? - end - - # - class Filter - include Google::Apis::Core::Hashable - - # A request object used to create a DoubleClick Search report. - # Corresponds to the JSON property `column` - # @return [Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec] - attr_accessor :column - - # Operator to use in the filter. See the filter reference for a list of - # available operators. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # A list of values to filter the column value against. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column = args[:column] unless args[:column].nil? - @operator = args[:operator] unless args[:operator].nil? - @values = args[:values] unless args[:values].nil? - end - end - - # - class OrderBy - include Google::Apis::Core::Hashable - - # A request object used to create a DoubleClick Search report. - # Corresponds to the JSON property `column` - # @return [Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec] - attr_accessor :column - - # The sort direction, which is either ascending or descending. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column = args[:column] unless args[:column].nil? - @sort_order = args[:sort_order] unless args[:sort_order].nil? - end - end - - # The reportScope is a set of IDs that are used to determine which subset of - # entities will be returned in the report. The full lineage of IDs from the - # lowest scoped level desired up through agency is required. - class ReportScope - include Google::Apis::Core::Hashable - - # DS ad group ID. - # Corresponds to the JSON property `adGroupId` - # @return [String] - attr_accessor :ad_group_id - - # DS ad ID. - # Corresponds to the JSON property `adId` - # @return [String] - attr_accessor :ad_id - - # DS advertiser ID. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # DS agency ID. - # Corresponds to the JSON property `agencyId` - # @return [String] - attr_accessor :agency_id - - # DS campaign ID. - # Corresponds to the JSON property `campaignId` - # @return [String] - attr_accessor :campaign_id - - # DS engine account ID. - # Corresponds to the JSON property `engineAccountId` - # @return [String] - attr_accessor :engine_account_id - - # DS keyword ID. - # Corresponds to the JSON property `keywordId` - # @return [String] - attr_accessor :keyword_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ad_group_id = args[:ad_group_id] unless args[:ad_group_id].nil? - @ad_id = args[:ad_id] unless args[:ad_id].nil? - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @agency_id = args[:agency_id] unless args[:agency_id].nil? - @campaign_id = args[:campaign_id] unless args[:campaign_id].nil? - @engine_account_id = args[:engine_account_id] unless args[:engine_account_id].nil? - @keyword_id = args[:keyword_id] unless args[:keyword_id].nil? - end - end - - # If metrics are requested in a report, this argument will be used to restrict - # the metrics to a specific time range. - class TimeRange - include Google::Apis::Core::Hashable - - # Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See - # additional references on how changed attribute reports work. - # Corresponds to the JSON property `changedAttributesSinceTimestamp` - # @return [DateTime] - attr_accessor :changed_attributes_since_timestamp - - # Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See - # additional references on how changed metrics reports work. - # Corresponds to the JSON property `changedMetricsSinceTimestamp` - # @return [DateTime] - attr_accessor :changed_metrics_since_timestamp - - # Inclusive date in YYYY-MM-DD format. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - # Inclusive date in YYYY-MM-DD format. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @changed_attributes_since_timestamp = args[:changed_attributes_since_timestamp] unless args[:changed_attributes_since_timestamp].nil? - @changed_metrics_since_timestamp = args[:changed_metrics_since_timestamp] unless args[:changed_metrics_since_timestamp].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - end - end - end - - # A saved column - class SavedColumn - include Google::Apis::Core::Hashable - - # Identifies this as a SavedColumn resource. Value: the fixed string - # doubleclicksearch#savedColumn. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the saved column. - # Corresponds to the JSON property `savedColumnName` - # @return [String] - attr_accessor :saved_column_name - - # The type of data this saved column will produce. - # 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) - @kind = args[:kind] unless args[:kind].nil? - @saved_column_name = args[:saved_column_name] unless args[:saved_column_name].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A list of saved columns. Advertisers create saved columns to report on - # Floodlight activities, Google Analytics goals, or custom KPIs. To request - # reports with saved columns, you'll need the saved column names that are - # available from this list. - class SavedColumnList - include Google::Apis::Core::Hashable - - # The saved columns being requested. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this as a SavedColumnList resource. Value: the fixed string - # doubleclicksearch#savedColumnList. - # 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 - - # The request to update availability. - class UpdateAvailabilityRequest - include Google::Apis::Core::Hashable - - # The availabilities being requested. - # Corresponds to the JSON property `availabilities` - # @return [Array] - attr_accessor :availabilities - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @availabilities = args[:availabilities] unless args[:availabilities].nil? - end - end - - # The response to a update availability request. - class UpdateAvailabilityResponse - include Google::Apis::Core::Hashable - - # The availabilities being returned. - # Corresponds to the JSON property `availabilities` - # @return [Array] - attr_accessor :availabilities - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @availabilities = args[:availabilities] unless args[:availabilities].nil? - end - end - end - end -end diff --git a/generated/google/apis/doubleclicksearch_v2/representations.rb b/generated/google/apis/doubleclicksearch_v2/representations.rb deleted file mode 100644 index 453fc5207..000000000 --- a/generated/google/apis/doubleclicksearch_v2/representations.rb +++ /dev/null @@ -1,315 +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 DoubleclicksearchV2 - - class Availability - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Conversion - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ConversionList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CustomDimension - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CustomMetric - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Report - class Representation < Google::Apis::Core::JsonRepresentation; end - - class File - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ReportApiColumnSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Filter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OrderBy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReportScope - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TimeRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class SavedColumn - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SavedColumnList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UpdateAvailabilityRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UpdateAvailabilityResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Availability - class Representation < Google::Apis::Core::JsonRepresentation - property :advertiser_id, as: 'advertiserId' - property :agency_id, as: 'agencyId' - property :availability_timestamp, as: 'availabilityTimestamp' - property :segmentation_id, as: 'segmentationId' - property :segmentation_name, as: 'segmentationName' - property :segmentation_type, as: 'segmentationType' - end - end - - # @private - class Conversion - class Representation < Google::Apis::Core::JsonRepresentation - property :ad_group_id, as: 'adGroupId' - property :ad_id, as: 'adId' - property :advertiser_id, as: 'advertiserId' - property :agency_id, as: 'agencyId' - property :attribution_model, as: 'attributionModel' - property :campaign_id, as: 'campaignId' - property :channel, as: 'channel' - property :click_id, as: 'clickId' - property :conversion_id, as: 'conversionId' - property :conversion_modified_timestamp, as: 'conversionModifiedTimestamp' - property :conversion_timestamp, as: 'conversionTimestamp' - property :count_millis, as: 'countMillis' - property :criterion_id, as: 'criterionId' - property :currency_code, as: 'currencyCode' - collection :custom_dimension, as: 'customDimension', class: Google::Apis::DoubleclicksearchV2::CustomDimension, decorator: Google::Apis::DoubleclicksearchV2::CustomDimension::Representation - - collection :custom_metric, as: 'customMetric', class: Google::Apis::DoubleclicksearchV2::CustomMetric, decorator: Google::Apis::DoubleclicksearchV2::CustomMetric::Representation - - property :device_type, as: 'deviceType' - property :ds_conversion_id, as: 'dsConversionId' - property :engine_account_id, as: 'engineAccountId' - property :floodlight_order_id, as: 'floodlightOrderId' - property :inventory_account_id, as: 'inventoryAccountId' - property :product_country, as: 'productCountry' - property :product_group_id, as: 'productGroupId' - property :product_id, as: 'productId' - property :product_language, as: 'productLanguage' - property :quantity_millis, as: 'quantityMillis' - property :revenue_micros, as: 'revenueMicros' - property :segmentation_id, as: 'segmentationId' - property :segmentation_name, as: 'segmentationName' - property :segmentation_type, as: 'segmentationType' - property :state, as: 'state' - property :store_id, as: 'storeId' - property :type, as: 'type' - end - end - - # @private - class ConversionList - class Representation < Google::Apis::Core::JsonRepresentation - collection :conversion, as: 'conversion', class: Google::Apis::DoubleclicksearchV2::Conversion, decorator: Google::Apis::DoubleclicksearchV2::Conversion::Representation - - property :kind, as: 'kind' - end - end - - # @private - class CustomDimension - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :value, as: 'value' - end - end - - # @private - class CustomMetric - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :value, as: 'value' - end - end - - # @private - class Report - class Representation < Google::Apis::Core::JsonRepresentation - collection :files, as: 'files', class: Google::Apis::DoubleclicksearchV2::Report::File, decorator: Google::Apis::DoubleclicksearchV2::Report::File::Representation - - property :id, as: 'id' - property :is_report_ready, as: 'isReportReady' - property :kind, as: 'kind' - property :request, as: 'request', class: Google::Apis::DoubleclicksearchV2::ReportRequest, decorator: Google::Apis::DoubleclicksearchV2::ReportRequest::Representation - - property :row_count, as: 'rowCount' - collection :rows, as: 'rows' - property :statistics_currency_code, as: 'statisticsCurrencyCode' - property :statistics_time_zone, as: 'statisticsTimeZone' - end - - # @private - class File - class Representation < Google::Apis::Core::JsonRepresentation - property :byte_count, as: 'byteCount' - property :url, as: 'url' - end - end - end - - # @private - class ReportApiColumnSpec - class Representation < Google::Apis::Core::JsonRepresentation - property :column_name, as: 'columnName' - property :custom_dimension_name, as: 'customDimensionName' - property :custom_metric_name, as: 'customMetricName' - property :end_date, as: 'endDate' - property :group_by_column, as: 'groupByColumn' - property :header_text, as: 'headerText' - property :platform_source, as: 'platformSource' - property :saved_column_name, as: 'savedColumnName' - property :start_date, as: 'startDate' - end - end - - # @private - class ReportRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :columns, as: 'columns', class: Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec, decorator: Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec::Representation - - property :download_format, as: 'downloadFormat' - collection :filters, as: 'filters', class: Google::Apis::DoubleclicksearchV2::ReportRequest::Filter, decorator: Google::Apis::DoubleclicksearchV2::ReportRequest::Filter::Representation - - property :include_deleted_entities, as: 'includeDeletedEntities' - property :include_removed_entities, as: 'includeRemovedEntities' - property :max_rows_per_file, as: 'maxRowsPerFile' - collection :order_by, as: 'orderBy', class: Google::Apis::DoubleclicksearchV2::ReportRequest::OrderBy, decorator: Google::Apis::DoubleclicksearchV2::ReportRequest::OrderBy::Representation - - property :report_scope, as: 'reportScope', class: Google::Apis::DoubleclicksearchV2::ReportRequest::ReportScope, decorator: Google::Apis::DoubleclicksearchV2::ReportRequest::ReportScope::Representation - - property :report_type, as: 'reportType' - property :row_count, as: 'rowCount' - property :start_row, as: 'startRow' - property :statistics_currency, as: 'statisticsCurrency' - property :time_range, as: 'timeRange', class: Google::Apis::DoubleclicksearchV2::ReportRequest::TimeRange, decorator: Google::Apis::DoubleclicksearchV2::ReportRequest::TimeRange::Representation - - property :verify_single_time_zone, as: 'verifySingleTimeZone' - end - - # @private - class Filter - class Representation < Google::Apis::Core::JsonRepresentation - property :column, as: 'column', class: Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec, decorator: Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec::Representation - - property :operator, as: 'operator' - collection :values, as: 'values' - end - end - - # @private - class OrderBy - class Representation < Google::Apis::Core::JsonRepresentation - property :column, as: 'column', class: Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec, decorator: Google::Apis::DoubleclicksearchV2::ReportApiColumnSpec::Representation - - property :sort_order, as: 'sortOrder' - end - end - - # @private - class ReportScope - class Representation < Google::Apis::Core::JsonRepresentation - property :ad_group_id, as: 'adGroupId' - property :ad_id, as: 'adId' - property :advertiser_id, as: 'advertiserId' - property :agency_id, as: 'agencyId' - property :campaign_id, as: 'campaignId' - property :engine_account_id, as: 'engineAccountId' - property :keyword_id, as: 'keywordId' - end - end - - # @private - class TimeRange - class Representation < Google::Apis::Core::JsonRepresentation - property :changed_attributes_since_timestamp, as: 'changedAttributesSinceTimestamp', type: DateTime - - property :changed_metrics_since_timestamp, as: 'changedMetricsSinceTimestamp', type: DateTime - - property :end_date, as: 'endDate' - property :start_date, as: 'startDate' - end - end - end - - # @private - class SavedColumn - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :saved_column_name, as: 'savedColumnName' - property :type, as: 'type' - end - end - - # @private - class SavedColumnList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::DoubleclicksearchV2::SavedColumn, decorator: Google::Apis::DoubleclicksearchV2::SavedColumn::Representation - - property :kind, as: 'kind' - end - end - - # @private - class UpdateAvailabilityRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :availabilities, as: 'availabilities', class: Google::Apis::DoubleclicksearchV2::Availability, decorator: Google::Apis::DoubleclicksearchV2::Availability::Representation - - end - end - - # @private - class UpdateAvailabilityResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :availabilities, as: 'availabilities', class: Google::Apis::DoubleclicksearchV2::Availability, decorator: Google::Apis::DoubleclicksearchV2::Availability::Representation - - end - end - end - end -end diff --git a/generated/google/apis/doubleclicksearch_v2/service.rb b/generated/google/apis/doubleclicksearch_v2/service.rb deleted file mode 100644 index 6869c21af..000000000 --- a/generated/google/apis/doubleclicksearch_v2/service.rb +++ /dev/null @@ -1,490 +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 DoubleclicksearchV2 - # DoubleClick Search API - # - # Report and modify your advertising data in DoubleClick Search (for example, - # campaigns, ad groups, keywords, and conversions). - # - # @example - # require 'google/apis/doubleclicksearch_v2' - # - # Doubleclicksearch = Google::Apis::DoubleclicksearchV2 # Alias the module - # service = Doubleclicksearch::DoubleclicksearchService.new - # - # @see https://developers.google.com/doubleclick-search/ - class DoubleclicksearchService < 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/', 'doubleclicksearch/v2/') - end - - # Retrieves a list of conversions from a DoubleClick Search engine account. - # @param [String] agency_id - # Numeric ID of the agency. - # @param [String] advertiser_id - # Numeric ID of the advertiser. - # @param [String] engine_account_id - # Numeric ID of the engine account. - # @param [String] ad_group_id - # Numeric ID of the ad group. - # @param [String] ad_id - # Numeric ID of the ad. - # @param [String] campaign_id - # Numeric ID of the campaign. - # @param [String] criterion_id - # Numeric ID of the criterion. - # @param [Fixnum] end_date - # Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. - # @param [Fixnum] row_count - # The number of conversions to return per call. - # @param [Fixnum] start_date - # First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. - # @param [Fixnum] start_row - # The 0-based starting index for retrieving conversions results. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DoubleclicksearchV2::ConversionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::ConversionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_conversion(agency_id, advertiser_id, engine_account_id, ad_group_id: nil, ad_id: nil, campaign_id: nil, criterion_id: nil, end_date: nil, row_count: nil, start_date: nil, start_row: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList - command.params['agencyId'] = agency_id unless agency_id.nil? - command.params['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.params['engineAccountId'] = engine_account_id unless engine_account_id.nil? - command.query['adGroupId'] = ad_group_id unless ad_group_id.nil? - command.query['adId'] = ad_id unless ad_id.nil? - command.query['campaignId'] = campaign_id unless campaign_id.nil? - command.query['criterionId'] = criterion_id unless criterion_id.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['rowCount'] = row_count unless row_count.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['startRow'] = start_row unless start_row.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 batch of new conversions into DoubleClick Search. - # @param [Google::Apis::DoubleclicksearchV2::ConversionList] conversion_list_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::DoubleclicksearchV2::ConversionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::ConversionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'conversion' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation - command.request_object = conversion_list_object - command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList - 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 batch of conversions in DoubleClick Search. This method supports - # patch semantics. - # @param [Google::Apis::DoubleclicksearchV2::ConversionList] conversion_list_object - # @param [String] advertiser_id - # Numeric ID of the advertiser. - # @param [String] agency_id - # Numeric ID of the agency. - # @param [Fixnum] end_date - # Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. - # @param [String] engine_account_id - # Numeric ID of the engine account. - # @param [Fixnum] row_count - # The number of conversions to return per call. - # @param [Fixnum] start_date - # First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. - # @param [Fixnum] start_row - # The 0-based starting index for retrieving conversions results. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DoubleclicksearchV2::ConversionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::ConversionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_conversion(conversion_list_object = nil, advertiser_id: nil, agency_id: nil, end_date: nil, engine_account_id: nil, row_count: nil, start_date: nil, start_row: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'conversion' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation - command.request_object = conversion_list_object - command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['agencyId'] = agency_id unless agency_id.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['engineAccountId'] = engine_account_id unless engine_account_id.nil? - command.query['rowCount'] = row_count unless row_count.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['startRow'] = start_row unless start_row.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 batch of conversions in DoubleClick Search. - # @param [Google::Apis::DoubleclicksearchV2::ConversionList] conversion_list_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::DoubleclicksearchV2::ConversionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::ConversionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_conversion(conversion_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'conversion' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation - command.request_object = conversion_list_object - command.response_representation = Google::Apis::DoubleclicksearchV2::ConversionList::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::ConversionList - 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 availabilities of a batch of floodlight activities in DoubleClick - # Search. - # @param [Google::Apis::DoubleclicksearchV2::UpdateAvailabilityRequest] update_availability_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::DoubleclicksearchV2::UpdateAvailabilityResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_availability(update_availability_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'conversion/updateAvailability' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclicksearchV2::UpdateAvailabilityRequest::Representation - command.request_object = update_availability_request_object - command.response_representation = Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::UpdateAvailabilityResponse - 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 - - # Generates and returns a report immediately. - # @param [Google::Apis::DoubleclicksearchV2::ReportRequest] report_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::DoubleclicksearchV2::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def generate_report(report_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reports/generate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclicksearchV2::ReportRequest::Representation - command.request_object = report_request_object - command.response_representation = Google::Apis::DoubleclicksearchV2::Report::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::Report - 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 - - # Polls for the status of a report request. - # @param [String] report_id - # ID of the report request being polled. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DoubleclicksearchV2::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::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 get_report(report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reports/{reportId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DoubleclicksearchV2::Report::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::Report - command.params['reportId'] = report_id unless report_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 - - # Downloads a report file encoded in UTF-8. - # @param [String] report_id - # ID of the report. - # @param [Fixnum] report_fragment - # The index of the report fragment to download. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_file_report(report_id, report_fragment, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'reports/{reportId}/files/{reportFragment}' - 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.params['reportId'] = report_id unless report_id.nil? - command.params['reportFragment'] = report_fragment unless report_fragment.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 report request into the reporting system. - # @param [Google::Apis::DoubleclicksearchV2::ReportRequest] report_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::DoubleclicksearchV2::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::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 request_report(report_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reports' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DoubleclicksearchV2::ReportRequest::Representation - command.request_object = report_request_object - command.response_representation = Google::Apis::DoubleclicksearchV2::Report::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::Report - 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 - - # Retrieve the list of saved columns for a specified advertiser. - # @param [String] agency_id - # DS ID of the agency. - # @param [String] advertiser_id - # DS ID of the advertiser. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DoubleclicksearchV2::SavedColumnList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DoubleclicksearchV2::SavedColumnList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_saved_columns(agency_id, advertiser_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'agency/{agencyId}/advertiser/{advertiserId}/savedcolumns' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DoubleclicksearchV2::SavedColumnList::Representation - command.response_class = Google::Apis::DoubleclicksearchV2::SavedColumnList - command.params['agencyId'] = agency_id unless agency_id.nil? - command.params['advertiserId'] = advertiser_id unless advertiser_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 diff --git a/generated/google/apis/drive_v2.rb b/generated/google/apis/drive_v2.rb deleted file mode 100644 index 643dbded1..000000000 --- a/generated/google/apis/drive_v2.rb +++ /dev/null @@ -1,55 +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/drive_v2/service.rb' -require 'google/apis/drive_v2/classes.rb' -require 'google/apis/drive_v2/representations.rb' - -module Google - module Apis - # Drive API - # - # The API to interact with Drive. - # - # @see https://developers.google.com/drive/ - module DriveV2 - VERSION = 'V2' - REVISION = '20150305' - - # View and manage the files in your Google Drive - AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' - - # View and manage its own configuration data in your Google Drive - AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata' - - # View your Google Drive apps - AUTH_DRIVE_APPS_READONLY = 'https://www.googleapis.com/auth/drive.apps.readonly' - - # View and manage Google Drive files and folders that you have opened or created with this app - AUTH_DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file' - - # 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' - - # Modify your Google Apps Script scripts' behavior - AUTH_DRIVE_SCRIPTS = 'https://www.googleapis.com/auth/drive.scripts' - end - end -end diff --git a/generated/google/apis/drive_v2/classes.rb b/generated/google/apis/drive_v2/classes.rb deleted file mode 100644 index b5868d8fa..000000000 --- a/generated/google/apis/drive_v2/classes.rb +++ /dev/null @@ -1,2499 +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 DriveV2 - - # An item with user information and settings. - class About - include Google::Apis::Core::Hashable - - # Information about supported additional roles per file type. The most specific - # type takes precedence. - # Corresponds to the JSON property `additionalRoleInfo` - # @return [Array] - attr_accessor :additional_role_info - - # The domain sharing policy for the current user. Possible values are: - # - ALLOWED - # - ALLOWED_WITH_WARNING - # - INCOMING_ONLY - # - DISALLOWED - # Corresponds to the JSON property `domainSharingPolicy` - # @return [String] - attr_accessor :domain_sharing_policy - - # The ETag of the item. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The allowable export formats. - # Corresponds to the JSON property `exportFormats` - # @return [Array] - attr_accessor :export_formats - - # List of additional features enabled on this account. - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # The palette of allowable folder colors as RGB hex strings. - # Corresponds to the JSON property `folderColorPalette` - # @return [Array] - attr_accessor :folder_color_palette - - # The allowable import formats. - # Corresponds to the JSON property `importFormats` - # @return [Array] - attr_accessor :import_formats - - # A boolean indicating whether the authenticated app is installed by the - # authenticated user. - # Corresponds to the JSON property `isCurrentAppInstalled` - # @return [Boolean] - attr_accessor :is_current_app_installed - alias_method :is_current_app_installed?, :is_current_app_installed - - # This is always drive#about. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The user's language or locale code, as defined by BCP 47, with some extensions - # from Unicode's LDML format (http://www.unicode.org/reports/tr35/). - # Corresponds to the JSON property `languageCode` - # @return [String] - attr_accessor :language_code - - # The largest change id. - # Corresponds to the JSON property `largestChangeId` - # @return [String] - attr_accessor :largest_change_id - - # List of max upload sizes for each file type. The most specific type takes - # precedence. - # Corresponds to the JSON property `maxUploadSizes` - # @return [Array] - attr_accessor :max_upload_sizes - - # The name of the current user. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The current user's ID as visible in the permissions collection. - # Corresponds to the JSON property `permissionId` - # @return [String] - attr_accessor :permission_id - - # The amount of storage quota used by different Google services. - # Corresponds to the JSON property `quotaBytesByService` - # @return [Array] - attr_accessor :quota_bytes_by_service - - # The total number of quota bytes. - # Corresponds to the JSON property `quotaBytesTotal` - # @return [String] - attr_accessor :quota_bytes_total - - # The number of quota bytes used by Google Drive. - # Corresponds to the JSON property `quotaBytesUsed` - # @return [String] - attr_accessor :quota_bytes_used - - # The number of quota bytes used by all Google apps (Drive, Picasa, etc.). - # Corresponds to the JSON property `quotaBytesUsedAggregate` - # @return [String] - attr_accessor :quota_bytes_used_aggregate - - # The number of quota bytes used by trashed items. - # Corresponds to the JSON property `quotaBytesUsedInTrash` - # @return [String] - attr_accessor :quota_bytes_used_in_trash - - # The type of the user's storage quota. Possible values are: - # - LIMITED - # - UNLIMITED - # Corresponds to the JSON property `quotaType` - # @return [String] - attr_accessor :quota_type - - # The number of remaining change ids. - # Corresponds to the JSON property `remainingChangeIds` - # @return [String] - attr_accessor :remaining_change_ids - - # The id of the root folder. - # Corresponds to the JSON property `rootFolderId` - # @return [String] - attr_accessor :root_folder_id - - # A link back to this item. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The JSON template for a user. - # Corresponds to the JSON property `user` - # @return [Google::Apis::DriveV2::User] - attr_accessor :user - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_role_info = args[:additional_role_info] unless args[:additional_role_info].nil? - @domain_sharing_policy = args[:domain_sharing_policy] unless args[:domain_sharing_policy].nil? - @etag = args[:etag] unless args[:etag].nil? - @export_formats = args[:export_formats] unless args[:export_formats].nil? - @features = args[:features] unless args[:features].nil? - @folder_color_palette = args[:folder_color_palette] unless args[:folder_color_palette].nil? - @import_formats = args[:import_formats] unless args[:import_formats].nil? - @is_current_app_installed = args[:is_current_app_installed] unless args[:is_current_app_installed].nil? - @kind = args[:kind] unless args[:kind].nil? - @language_code = args[:language_code] unless args[:language_code].nil? - @largest_change_id = args[:largest_change_id] unless args[:largest_change_id].nil? - @max_upload_sizes = args[:max_upload_sizes] unless args[:max_upload_sizes].nil? - @name = args[:name] unless args[:name].nil? - @permission_id = args[:permission_id] unless args[:permission_id].nil? - @quota_bytes_by_service = args[:quota_bytes_by_service] unless args[:quota_bytes_by_service].nil? - @quota_bytes_total = args[:quota_bytes_total] unless args[:quota_bytes_total].nil? - @quota_bytes_used = args[:quota_bytes_used] unless args[:quota_bytes_used].nil? - @quota_bytes_used_aggregate = args[:quota_bytes_used_aggregate] unless args[:quota_bytes_used_aggregate].nil? - @quota_bytes_used_in_trash = args[:quota_bytes_used_in_trash] unless args[:quota_bytes_used_in_trash].nil? - @quota_type = args[:quota_type] unless args[:quota_type].nil? - @remaining_change_ids = args[:remaining_change_ids] unless args[:remaining_change_ids].nil? - @root_folder_id = args[:root_folder_id] unless args[:root_folder_id].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @user = args[:user] unless args[:user].nil? - end - - # - class AdditionalRoleInfo - include Google::Apis::Core::Hashable - - # The supported additional roles per primary role. - # Corresponds to the JSON property `roleSets` - # @return [Array] - attr_accessor :role_sets - - # The content type that this additional role info applies to. - # 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) - @role_sets = args[:role_sets] unless args[:role_sets].nil? - @type = args[:type] unless args[:type].nil? - end - - # - class RoleSet - include Google::Apis::Core::Hashable - - # The supported additional roles with the primary role. - # Corresponds to the JSON property `additionalRoles` - # @return [Array] - attr_accessor :additional_roles - - # A primary permission role. - # Corresponds to the JSON property `primaryRole` - # @return [String] - attr_accessor :primary_role - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_roles = args[:additional_roles] unless args[:additional_roles].nil? - @primary_role = args[:primary_role] unless args[:primary_role].nil? - end - end - end - - # - class ExportFormat - include Google::Apis::Core::Hashable - - # The content type to convert from. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - # The possible content types to convert to. - # Corresponds to the JSON property `targets` - # @return [Array] - attr_accessor :targets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] unless args[:source].nil? - @targets = args[:targets] unless args[:targets].nil? - end - end - - # - class Feature - include Google::Apis::Core::Hashable - - # The name of the feature. - # Corresponds to the JSON property `featureName` - # @return [String] - attr_accessor :feature_name - - # The request limit rate for this feature, in queries per second. - # Corresponds to the JSON property `featureRate` - # @return [Float] - attr_accessor :feature_rate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @feature_name = args[:feature_name] unless args[:feature_name].nil? - @feature_rate = args[:feature_rate] unless args[:feature_rate].nil? - end - end - - # - class ImportFormat - include Google::Apis::Core::Hashable - - # The imported file's content type to convert from. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - # The possible content types to convert to. - # Corresponds to the JSON property `targets` - # @return [Array] - attr_accessor :targets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] unless args[:source].nil? - @targets = args[:targets] unless args[:targets].nil? - end - end - - # - class MaxUploadSize - include Google::Apis::Core::Hashable - - # The max upload size for this type. - # Corresponds to the JSON property `size` - # @return [String] - attr_accessor :size - - # The file 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) - @size = args[:size] unless args[:size].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class QuotaBytesByService - include Google::Apis::Core::Hashable - - # The storage quota bytes used by the service. - # Corresponds to the JSON property `bytesUsed` - # @return [String] - attr_accessor :bytes_used - - # The service's name, e.g. DRIVE, GMAIL, or PHOTOS. - # Corresponds to the JSON property `serviceName` - # @return [String] - attr_accessor :service_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bytes_used = args[:bytes_used] unless args[:bytes_used].nil? - @service_name = args[:service_name] unless args[:service_name].nil? - end - end - end - - # The apps resource provides a list of the apps that a user has installed, with - # information about each app's supported MIME types, file extensions, and other - # details. - class App - include Google::Apis::Core::Hashable - - # Whether the app is authorized to access data on the user's Drive. - # Corresponds to the JSON property `authorized` - # @return [Boolean] - attr_accessor :authorized - alias_method :authorized?, :authorized - - # The template url to create a new file with this app in a given folder. The - # template will contain `folderId` to be replaced by the folder to create the - # new file in. - # Corresponds to the JSON property `createInFolderTemplate` - # @return [String] - attr_accessor :create_in_folder_template - - # The url to create a new file with this app. - # Corresponds to the JSON property `createUrl` - # @return [String] - attr_accessor :create_url - - # Whether the app has drive-wide scope. An app with drive-wide scope can access - # all files in the user's drive. - # Corresponds to the JSON property `hasDriveWideScope` - # @return [Boolean] - attr_accessor :has_drive_wide_scope - alias_method :has_drive_wide_scope?, :has_drive_wide_scope - - # The various icons for the app. - # Corresponds to the JSON property `icons` - # @return [Array] - attr_accessor :icons - - # The ID of the app. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Whether the app is installed. - # Corresponds to the JSON property `installed` - # @return [Boolean] - attr_accessor :installed - alias_method :installed?, :installed - - # This is always drive#app. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A long description of the app. - # Corresponds to the JSON property `longDescription` - # @return [String] - attr_accessor :long_description - - # The name of the app. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of object this app creates (e.g. Chart). If empty, the app name - # should be used instead. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # The template url for opening files with this app. The template will contain ` - # ids` and/or `exportIds` to be replaced by the actual file ids. See Open Files - # for the full documentation. - # Corresponds to the JSON property `openUrlTemplate` - # @return [String] - attr_accessor :open_url_template - - # The list of primary file extensions. - # Corresponds to the JSON property `primaryFileExtensions` - # @return [Array] - attr_accessor :primary_file_extensions - - # The list of primary mime types. - # Corresponds to the JSON property `primaryMimeTypes` - # @return [Array] - attr_accessor :primary_mime_types - - # The ID of the product listing for this app. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # A link to the product listing for this app. - # Corresponds to the JSON property `productUrl` - # @return [String] - attr_accessor :product_url - - # The list of secondary file extensions. - # Corresponds to the JSON property `secondaryFileExtensions` - # @return [Array] - attr_accessor :secondary_file_extensions - - # The list of secondary mime types. - # Corresponds to the JSON property `secondaryMimeTypes` - # @return [Array] - attr_accessor :secondary_mime_types - - # A short description of the app. - # Corresponds to the JSON property `shortDescription` - # @return [String] - attr_accessor :short_description - - # Whether this app supports creating new objects. - # Corresponds to the JSON property `supportsCreate` - # @return [Boolean] - attr_accessor :supports_create - alias_method :supports_create?, :supports_create - - # Whether this app supports importing Google Docs. - # Corresponds to the JSON property `supportsImport` - # @return [Boolean] - attr_accessor :supports_import - alias_method :supports_import?, :supports_import - - # Whether this app supports opening more than one file. - # Corresponds to the JSON property `supportsMultiOpen` - # @return [Boolean] - attr_accessor :supports_multi_open - alias_method :supports_multi_open?, :supports_multi_open - - # Whether this app supports creating new files when offline. - # Corresponds to the JSON property `supportsOfflineCreate` - # @return [Boolean] - attr_accessor :supports_offline_create - alias_method :supports_offline_create?, :supports_offline_create - - # Whether the app is selected as the default handler for the types it supports. - # Corresponds to the JSON property `useByDefault` - # @return [Boolean] - attr_accessor :use_by_default - alias_method :use_by_default?, :use_by_default - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @authorized = args[:authorized] unless args[:authorized].nil? - @create_in_folder_template = args[:create_in_folder_template] unless args[:create_in_folder_template].nil? - @create_url = args[:create_url] unless args[:create_url].nil? - @has_drive_wide_scope = args[:has_drive_wide_scope] unless args[:has_drive_wide_scope].nil? - @icons = args[:icons] unless args[:icons].nil? - @id = args[:id] unless args[:id].nil? - @installed = args[:installed] unless args[:installed].nil? - @kind = args[:kind] unless args[:kind].nil? - @long_description = args[:long_description] unless args[:long_description].nil? - @name = args[:name] unless args[:name].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @open_url_template = args[:open_url_template] unless args[:open_url_template].nil? - @primary_file_extensions = args[:primary_file_extensions] unless args[:primary_file_extensions].nil? - @primary_mime_types = args[:primary_mime_types] unless args[:primary_mime_types].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @product_url = args[:product_url] unless args[:product_url].nil? - @secondary_file_extensions = args[:secondary_file_extensions] unless args[:secondary_file_extensions].nil? - @secondary_mime_types = args[:secondary_mime_types] unless args[:secondary_mime_types].nil? - @short_description = args[:short_description] unless args[:short_description].nil? - @supports_create = args[:supports_create] unless args[:supports_create].nil? - @supports_import = args[:supports_import] unless args[:supports_import].nil? - @supports_multi_open = args[:supports_multi_open] unless args[:supports_multi_open].nil? - @supports_offline_create = args[:supports_offline_create] unless args[:supports_offline_create].nil? - @use_by_default = args[:use_by_default] unless args[:use_by_default].nil? - end - - # - class Icon - include Google::Apis::Core::Hashable - - # Category of the icon. Allowed values are: - # - application - icon for the application - # - document - icon for a file associated with the app - # - documentShared - icon for a shared file associated with the app - # Corresponds to the JSON property `category` - # @return [String] - attr_accessor :category - - # URL for the icon. - # Corresponds to the JSON property `iconUrl` - # @return [String] - attr_accessor :icon_url - - # Size of the icon. Represented as the maximum of the width and height. - # Corresponds to the JSON property `size` - # @return [Fixnum] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @category = args[:category] unless args[:category].nil? - @icon_url = args[:icon_url] unless args[:icon_url].nil? - @size = args[:size] unless args[:size].nil? - end - end - end - - # A list of third-party applications which the user has installed or given - # access to Google Drive. - class AppList - include Google::Apis::Core::Hashable - - # List of app IDs that the user has specified to use by default. The list is in - # reverse-priority order (lowest to highest). - # Corresponds to the JSON property `defaultAppIds` - # @return [Array] - attr_accessor :default_app_ids - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The actual list of apps. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#appList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link back to this list. - # 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) - @default_app_ids = args[:default_app_ids] unless args[:default_app_ids].nil? - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # Representation of a change to a file. - class Change - include Google::Apis::Core::Hashable - - # Whether the file has been deleted. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # The metadata for a file. - # Corresponds to the JSON property `file` - # @return [Google::Apis::DriveV2::File] - attr_accessor :file - - # The ID of the file associated with this change. - # Corresponds to the JSON property `fileId` - # @return [String] - attr_accessor :file_id - - # The ID of the change. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # This is always drive#change. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The time of this modification. - # Corresponds to the JSON property `modificationDate` - # @return [DateTime] - attr_accessor :modification_date - - # A link back to this change. - # 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) - @deleted = args[:deleted] unless args[:deleted].nil? - @file = args[:file] unless args[:file].nil? - @file_id = args[:file_id] unless args[:file_id].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @modification_date = args[:modification_date] unless args[:modification_date].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A list of changes for a user. - class ChangeList - include Google::Apis::Core::Hashable - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The actual list of changes. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#changeList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The current largest change ID. - # Corresponds to the JSON property `largestChangeId` - # @return [String] - attr_accessor :largest_change_id - - # A link to the next page of changes. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The page token for the next page of changes. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A link back to this list. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @largest_change_id = args[:largest_change_id] unless args[:largest_change_id].nil? - @next_link = args[:next_link] unless args[:next_link].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 - - # 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] - 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 - - # A list of children of a file. - class ChildList - include Google::Apis::Core::Hashable - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The actual list of children. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#childList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link to the next page of children. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The page token for the next page of children. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A link back to this list. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].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 - - # A reference to a folder's child. - class ChildReference - include Google::Apis::Core::Hashable - - # A link to the child. - # Corresponds to the JSON property `childLink` - # @return [String] - attr_accessor :child_link - - # The ID of the child. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # This is always drive#childReference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link back to this reference. - # 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) - @child_link = args[:child_link] unless args[:child_link].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A JSON representation of a comment on a file in Google Drive. - class Comment - include Google::Apis::Core::Hashable - - # A region of the document represented as a JSON string. See anchor - # documentation for details on how to define and interpret anchor properties. - # Corresponds to the JSON property `anchor` - # @return [String] - attr_accessor :anchor - - # The JSON template for a user. - # Corresponds to the JSON property `author` - # @return [Google::Apis::DriveV2::User] - attr_accessor :author - - # The ID of the comment. - # Corresponds to the JSON property `commentId` - # @return [String] - attr_accessor :comment_id - - # The plain text content used to create this comment. This is not HTML safe and - # should only be used as a starting point to make edits to a comment's content. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The context of the file which is being commented on. - # Corresponds to the JSON property `context` - # @return [Google::Apis::DriveV2::Comment::Context] - attr_accessor :context - - # The date when this comment was first created. - # Corresponds to the JSON property `createdDate` - # @return [DateTime] - attr_accessor :created_date - - # Whether this comment has been deleted. If a comment has been deleted the - # content will be cleared and this will only represent a comment that once - # existed. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # The file which this comment is addressing. - # Corresponds to the JSON property `fileId` - # @return [String] - attr_accessor :file_id - - # The title of the file which this comment is addressing. - # Corresponds to the JSON property `fileTitle` - # @return [String] - attr_accessor :file_title - - # HTML formatted content for this comment. - # Corresponds to the JSON property `htmlContent` - # @return [String] - attr_accessor :html_content - - # This is always drive#comment. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The date when this comment or any of its replies were last modified. - # Corresponds to the JSON property `modifiedDate` - # @return [DateTime] - attr_accessor :modified_date - - # Replies to this post. - # Corresponds to the JSON property `replies` - # @return [Array] - attr_accessor :replies - - # A link back to this comment. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The status of this comment. Status can be changed by posting a reply to a - # comment with the desired status. - # - "open" - The comment is still open. - # - "resolved" - The comment has been resolved by one of its replies. - # 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) - @anchor = args[:anchor] unless args[:anchor].nil? - @author = args[:author] unless args[:author].nil? - @comment_id = args[:comment_id] unless args[:comment_id].nil? - @content = args[:content] unless args[:content].nil? - @context = args[:context] unless args[:context].nil? - @created_date = args[:created_date] unless args[:created_date].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @file_id = args[:file_id] unless args[:file_id].nil? - @file_title = args[:file_title] unless args[:file_title].nil? - @html_content = args[:html_content] unless args[:html_content].nil? - @kind = args[:kind] unless args[:kind].nil? - @modified_date = args[:modified_date] unless args[:modified_date].nil? - @replies = args[:replies] unless args[:replies].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - end - - # The context of the file which is being commented on. - class Context - include Google::Apis::Core::Hashable - - # The MIME type of the context snippet. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Data representation of the segment of the file being commented on. In the case - # of a text file for example, this would be the actual text that the comment is - # about. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - - # A JSON representation of a list of comments on a file in Google Drive. - class CommentList - include Google::Apis::Core::Hashable - - # List of comments. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#commentList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link to the next page of comments. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The token to use to request the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A link back to this list. - # 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) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].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 - - # A JSON representation of a reply to a comment on a file in Google Drive. - class CommentReply - include Google::Apis::Core::Hashable - - # The JSON template for a user. - # Corresponds to the JSON property `author` - # @return [Google::Apis::DriveV2::User] - attr_accessor :author - - # The plain text content used to create this reply. This is not HTML safe and - # should only be used as a starting point to make edits to a reply's content. - # This field is required on inserts if no verb is specified (resolve/reopen). - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The date when this reply was first created. - # Corresponds to the JSON property `createdDate` - # @return [DateTime] - attr_accessor :created_date - - # Whether this reply has been deleted. If a reply has been deleted the content - # will be cleared and this will only represent a reply that once existed. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # HTML formatted content for this reply. - # Corresponds to the JSON property `htmlContent` - # @return [String] - attr_accessor :html_content - - # This is always drive#commentReply. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The date when this reply was last modified. - # Corresponds to the JSON property `modifiedDate` - # @return [DateTime] - attr_accessor :modified_date - - # The ID of the reply. - # Corresponds to the JSON property `replyId` - # @return [String] - attr_accessor :reply_id - - # The action this reply performed to the parent comment. When creating a new - # reply this is the action to be perform to the parent comment. Possible values - # are: - # - "resolve" - To resolve a comment. - # - "reopen" - To reopen (un-resolve) a comment. - # Corresponds to the JSON property `verb` - # @return [String] - attr_accessor :verb - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author = args[:author] unless args[:author].nil? - @content = args[:content] unless args[:content].nil? - @created_date = args[:created_date] unless args[:created_date].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @html_content = args[:html_content] unless args[:html_content].nil? - @kind = args[:kind] unless args[:kind].nil? - @modified_date = args[:modified_date] unless args[:modified_date].nil? - @reply_id = args[:reply_id] unless args[:reply_id].nil? - @verb = args[:verb] unless args[:verb].nil? - end - end - - # A JSON representation of a list of replies to a comment on a file in Google - # Drive. - class CommentReplyList - include Google::Apis::Core::Hashable - - # List of reply. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#commentReplyList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link to the next page of replies. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The token to use to request the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A link back to this list. - # 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) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].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 - - # The metadata for a file. - class File - include Google::Apis::Core::Hashable - - # A link for opening the file in a relevant Google editor or viewer. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # Whether this file is in the Application Data folder. - # Corresponds to the JSON property `appDataContents` - # @return [Boolean] - attr_accessor :app_data_contents - alias_method :app_data_contents?, :app_data_contents - - # Whether the file can be copied by the current user. - # Corresponds to the JSON property `copyable` - # @return [Boolean] - attr_accessor :copyable - alias_method :copyable?, :copyable - - # Create time for this file (formatted RFC 3339 timestamp). - # Corresponds to the JSON property `createdDate` - # @return [DateTime] - attr_accessor :created_date - - # A link to open this file with the user's default app for this file. Only - # populated when the drive.apps.readonly scope is used. - # Corresponds to the JSON property `defaultOpenWithLink` - # @return [String] - attr_accessor :default_open_with_link - - # A short description of the file. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Short lived download URL for the file. This is only populated for files with - # content stored in Drive. - # Corresponds to the JSON property `downloadUrl` - # @return [String] - attr_accessor :download_url - - # Whether the file can be edited by the current user. - # Corresponds to the JSON property `editable` - # @return [Boolean] - attr_accessor :editable - alias_method :editable?, :editable - - # A link for embedding the file. - # Corresponds to the JSON property `embedLink` - # @return [String] - attr_accessor :embed_link - - # ETag of the file. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Whether this file has been explicitly trashed, as opposed to recursively - # trashed. This will only be populated if the file is trashed. - # Corresponds to the JSON property `explicitlyTrashed` - # @return [Boolean] - attr_accessor :explicitly_trashed - alias_method :explicitly_trashed?, :explicitly_trashed - - # Links for exporting Google Docs to specific formats. - # Corresponds to the JSON property `exportLinks` - # @return [Hash] - attr_accessor :export_links - - # The file extension used when downloading this file. This field is read only. - # To set the extension, include it in the title when creating the file. This is - # only populated for files with content stored in Drive. - # Corresponds to the JSON property `fileExtension` - # @return [String] - attr_accessor :file_extension - - # The size of the file in bytes. This is only populated for files with content - # stored in Drive. - # Corresponds to the JSON property `fileSize` - # @return [String] - attr_accessor :file_size - - # Folder color as an RGB hex string if the file is a folder. The list of - # supported colors is available in the folderColorPalette field of the About - # resource. If an unsupported color is specified, it will be changed to the - # closest color in the palette. - # Corresponds to the JSON property `folderColorRgb` - # @return [String] - attr_accessor :folder_color_rgb - - # The ID of the file's head revision. This will only be populated for files with - # content stored in Drive. - # Corresponds to the JSON property `headRevisionId` - # @return [String] - attr_accessor :head_revision_id - - # A link to the file's icon. - # Corresponds to the JSON property `iconLink` - # @return [String] - attr_accessor :icon_link - - # The ID of the file. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Metadata about image media. This will only be present for image types, and its - # contents will depend on what can be parsed from the image content. - # Corresponds to the JSON property `imageMediaMetadata` - # @return [Google::Apis::DriveV2::File::ImageMediaMetadata] - attr_accessor :image_media_metadata - - # Indexable text attributes for the file (can only be written) - # Corresponds to the JSON property `indexableText` - # @return [Google::Apis::DriveV2::File::IndexableText] - attr_accessor :indexable_text - - # The type of file. This is always drive#file. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A group of labels for the file. - # Corresponds to the JSON property `labels` - # @return [Google::Apis::DriveV2::File::Labels] - attr_accessor :labels - - # The JSON template for a user. - # Corresponds to the JSON property `lastModifyingUser` - # @return [Google::Apis::DriveV2::User] - attr_accessor :last_modifying_user - - # Name of the last user to modify this file. - # Corresponds to the JSON property `lastModifyingUserName` - # @return [String] - attr_accessor :last_modifying_user_name - - # Last time this file was viewed by the user (formatted RFC 3339 timestamp). - # Corresponds to the JSON property `lastViewedByMeDate` - # @return [DateTime] - attr_accessor :last_viewed_by_me_date - - # Time this file was explicitly marked viewed by the user (formatted RFC 3339 - # timestamp). - # Corresponds to the JSON property `markedViewedByMeDate` - # @return [DateTime] - attr_accessor :marked_viewed_by_me_date - - # An MD5 checksum for the content of this file. This is populated only for files - # with content stored in Drive. - # Corresponds to the JSON property `md5Checksum` - # @return [String] - attr_accessor :md5_checksum - - # The MIME type of the file. This is only mutable on update when uploading new - # content. This field can be left blank, and the mimetype will be determined - # from the uploaded content's MIME type. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # Last time this file was modified by the user (formatted RFC 3339 timestamp). - # Note that setting modifiedDate will also update the modifiedByMe date for the - # user which set the date. - # Corresponds to the JSON property `modifiedByMeDate` - # @return [DateTime] - attr_accessor :modified_by_me_date - - # Last time this file was modified by anyone (formatted RFC 3339 timestamp). - # This is only mutable on update when the setModifiedDate parameter is set. - # Corresponds to the JSON property `modifiedDate` - # @return [DateTime] - attr_accessor :modified_date - - # A map of the id of each of the user's apps to a link to open this file with - # that app. Only populated when the drive.apps.readonly scope is used. - # Corresponds to the JSON property `openWithLinks` - # @return [Hash] - attr_accessor :open_with_links - - # The original filename if the file was uploaded manually, or the original title - # if the file was inserted through the API. Note that renames of the title will - # not change the original filename. This will only be populated on files with - # content stored in Drive. - # Corresponds to the JSON property `originalFilename` - # @return [String] - attr_accessor :original_filename - - # Name(s) of the owner(s) of this file. - # Corresponds to the JSON property `ownerNames` - # @return [Array] - attr_accessor :owner_names - - # The owner(s) of this file. - # Corresponds to the JSON property `owners` - # @return [Array] - attr_accessor :owners - - # Collection of parent folders which contain this file. - # Setting this field will put the file in all of the provided folders. On insert, - # if no folders are provided, the file will be placed in the default root - # folder. - # Corresponds to the JSON property `parents` - # @return [Array] - attr_accessor :parents - - # The list of permissions for users with access to this file. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - # The list of properties. - # Corresponds to the JSON property `properties` - # @return [Array] - attr_accessor :properties - - # The number of quota bytes used by this file. - # Corresponds to the JSON property `quotaBytesUsed` - # @return [String] - attr_accessor :quota_bytes_used - - # A link back to this file. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Whether the file has been shared. - # Corresponds to the JSON property `shared` - # @return [Boolean] - attr_accessor :shared - alias_method :shared?, :shared - - # Time at which this file was shared with the user (formatted RFC 3339 timestamp) - # . - # Corresponds to the JSON property `sharedWithMeDate` - # @return [DateTime] - attr_accessor :shared_with_me_date - - # The JSON template for a user. - # Corresponds to the JSON property `sharingUser` - # @return [Google::Apis::DriveV2::User] - attr_accessor :sharing_user - - # The list of spaces which contain the file. Supported values are 'drive' and ' - # appDataFolder'. - # Corresponds to the JSON property `spaces` - # @return [Array] - attr_accessor :spaces - - # Thumbnail for the file. Only accepted on upload and for files that are not - # already thumbnailed by Google. - # Corresponds to the JSON property `thumbnail` - # @return [Google::Apis::DriveV2::File::Thumbnail] - attr_accessor :thumbnail - - # A short-lived link to the file's thumbnail. Typically lasts on the order of - # hours. - # Corresponds to the JSON property `thumbnailLink` - # @return [String] - attr_accessor :thumbnail_link - - # The title of this file. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A permission for a file. - # Corresponds to the JSON property `userPermission` - # @return [Google::Apis::DriveV2::Permission] - attr_accessor :user_permission - - # A monotonically increasing version number for the file. This reflects every - # change made to the file on the server, even those not visible to the - # requesting user. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - # Metadata about video media. This will only be present for video types. - # Corresponds to the JSON property `videoMediaMetadata` - # @return [Google::Apis::DriveV2::File::VideoMediaMetadata] - attr_accessor :video_media_metadata - - # A link for downloading the content of the file in a browser using cookie based - # authentication. In cases where the content is shared publicly, the content can - # be downloaded without any credentials. - # Corresponds to the JSON property `webContentLink` - # @return [String] - attr_accessor :web_content_link - - # A link only available on public folders for viewing their static web assets ( - # HTML, CSS, JS, etc) via Google Drive's Website Hosting. - # Corresponds to the JSON property `webViewLink` - # @return [String] - attr_accessor :web_view_link - - # Whether writers can share the document with other users. - # Corresponds to the JSON property `writersCanShare` - # @return [Boolean] - attr_accessor :writers_can_share - alias_method :writers_can_share?, :writers_can_share - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alternate_link = args[:alternate_link] unless args[:alternate_link].nil? - @app_data_contents = args[:app_data_contents] unless args[:app_data_contents].nil? - @copyable = args[:copyable] unless args[:copyable].nil? - @created_date = args[:created_date] unless args[:created_date].nil? - @default_open_with_link = args[:default_open_with_link] unless args[:default_open_with_link].nil? - @description = args[:description] unless args[:description].nil? - @download_url = args[:download_url] unless args[:download_url].nil? - @editable = args[:editable] unless args[:editable].nil? - @embed_link = args[:embed_link] unless args[:embed_link].nil? - @etag = args[:etag] unless args[:etag].nil? - @explicitly_trashed = args[:explicitly_trashed] unless args[:explicitly_trashed].nil? - @export_links = args[:export_links] unless args[:export_links].nil? - @file_extension = args[:file_extension] unless args[:file_extension].nil? - @file_size = args[:file_size] unless args[:file_size].nil? - @folder_color_rgb = args[:folder_color_rgb] unless args[:folder_color_rgb].nil? - @head_revision_id = args[:head_revision_id] unless args[:head_revision_id].nil? - @icon_link = args[:icon_link] unless args[:icon_link].nil? - @id = args[:id] unless args[:id].nil? - @image_media_metadata = args[:image_media_metadata] unless args[:image_media_metadata].nil? - @indexable_text = args[:indexable_text] unless args[:indexable_text].nil? - @kind = args[:kind] unless args[:kind].nil? - @labels = args[:labels] unless args[:labels].nil? - @last_modifying_user = args[:last_modifying_user] unless args[:last_modifying_user].nil? - @last_modifying_user_name = args[:last_modifying_user_name] unless args[:last_modifying_user_name].nil? - @last_viewed_by_me_date = args[:last_viewed_by_me_date] unless args[:last_viewed_by_me_date].nil? - @marked_viewed_by_me_date = args[:marked_viewed_by_me_date] unless args[:marked_viewed_by_me_date].nil? - @md5_checksum = args[:md5_checksum] unless args[:md5_checksum].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - @modified_by_me_date = args[:modified_by_me_date] unless args[:modified_by_me_date].nil? - @modified_date = args[:modified_date] unless args[:modified_date].nil? - @open_with_links = args[:open_with_links] unless args[:open_with_links].nil? - @original_filename = args[:original_filename] unless args[:original_filename].nil? - @owner_names = args[:owner_names] unless args[:owner_names].nil? - @owners = args[:owners] unless args[:owners].nil? - @parents = args[:parents] unless args[:parents].nil? - @permissions = args[:permissions] unless args[:permissions].nil? - @properties = args[:properties] unless args[:properties].nil? - @quota_bytes_used = args[:quota_bytes_used] unless args[:quota_bytes_used].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @shared = args[:shared] unless args[:shared].nil? - @shared_with_me_date = args[:shared_with_me_date] unless args[:shared_with_me_date].nil? - @sharing_user = args[:sharing_user] unless args[:sharing_user].nil? - @spaces = args[:spaces] unless args[:spaces].nil? - @thumbnail = args[:thumbnail] unless args[:thumbnail].nil? - @thumbnail_link = args[:thumbnail_link] unless args[:thumbnail_link].nil? - @title = args[:title] unless args[:title].nil? - @user_permission = args[:user_permission] unless args[:user_permission].nil? - @version = args[:version] unless args[:version].nil? - @video_media_metadata = args[:video_media_metadata] unless args[:video_media_metadata].nil? - @web_content_link = args[:web_content_link] unless args[:web_content_link].nil? - @web_view_link = args[:web_view_link] unless args[:web_view_link].nil? - @writers_can_share = args[:writers_can_share] unless args[:writers_can_share].nil? - end - - # Metadata about image media. This will only be present for image types, and its - # contents will depend on what can be parsed from the image content. - class ImageMediaMetadata - include Google::Apis::Core::Hashable - - # The aperture used to create the photo (f-number). - # Corresponds to the JSON property `aperture` - # @return [Float] - attr_accessor :aperture - - # The make of the camera used to create the photo. - # Corresponds to the JSON property `cameraMake` - # @return [String] - attr_accessor :camera_make - - # The model of the camera used to create the photo. - # Corresponds to the JSON property `cameraModel` - # @return [String] - attr_accessor :camera_model - - # The color space of the photo. - # Corresponds to the JSON property `colorSpace` - # @return [String] - attr_accessor :color_space - - # The date and time the photo was taken (EXIF format timestamp). - # Corresponds to the JSON property `date` - # @return [String] - attr_accessor :date - - # The exposure bias of the photo (APEX value). - # Corresponds to the JSON property `exposureBias` - # @return [Float] - attr_accessor :exposure_bias - - # The exposure mode used to create the photo. - # Corresponds to the JSON property `exposureMode` - # @return [String] - attr_accessor :exposure_mode - - # The length of the exposure, in seconds. - # Corresponds to the JSON property `exposureTime` - # @return [Float] - attr_accessor :exposure_time - - # Whether a flash was used to create the photo. - # Corresponds to the JSON property `flashUsed` - # @return [Boolean] - attr_accessor :flash_used - alias_method :flash_used?, :flash_used - - # The focal length used to create the photo, in millimeters. - # Corresponds to the JSON property `focalLength` - # @return [Float] - attr_accessor :focal_length - - # The height of the image in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The ISO speed used to create the photo. - # Corresponds to the JSON property `isoSpeed` - # @return [Fixnum] - attr_accessor :iso_speed - - # The lens used to create the photo. - # Corresponds to the JSON property `lens` - # @return [String] - attr_accessor :lens - - # Geographic location information stored in the image. - # Corresponds to the JSON property `location` - # @return [Google::Apis::DriveV2::File::ImageMediaMetadata::Location] - attr_accessor :location - - # The smallest f-number of the lens at the focal length used to create the photo - # (APEX value). - # Corresponds to the JSON property `maxApertureValue` - # @return [Float] - attr_accessor :max_aperture_value - - # The metering mode used to create the photo. - # Corresponds to the JSON property `meteringMode` - # @return [String] - attr_accessor :metering_mode - - # The rotation in clockwise degrees from the image's original orientation. - # Corresponds to the JSON property `rotation` - # @return [Fixnum] - attr_accessor :rotation - - # The type of sensor used to create the photo. - # Corresponds to the JSON property `sensor` - # @return [String] - attr_accessor :sensor - - # The distance to the subject of the photo, in meters. - # Corresponds to the JSON property `subjectDistance` - # @return [Fixnum] - attr_accessor :subject_distance - - # The white balance mode used to create the photo. - # Corresponds to the JSON property `whiteBalance` - # @return [String] - attr_accessor :white_balance - - # The width of the image in pixels. - # 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) - @aperture = args[:aperture] unless args[:aperture].nil? - @camera_make = args[:camera_make] unless args[:camera_make].nil? - @camera_model = args[:camera_model] unless args[:camera_model].nil? - @color_space = args[:color_space] unless args[:color_space].nil? - @date = args[:date] unless args[:date].nil? - @exposure_bias = args[:exposure_bias] unless args[:exposure_bias].nil? - @exposure_mode = args[:exposure_mode] unless args[:exposure_mode].nil? - @exposure_time = args[:exposure_time] unless args[:exposure_time].nil? - @flash_used = args[:flash_used] unless args[:flash_used].nil? - @focal_length = args[:focal_length] unless args[:focal_length].nil? - @height = args[:height] unless args[:height].nil? - @iso_speed = args[:iso_speed] unless args[:iso_speed].nil? - @lens = args[:lens] unless args[:lens].nil? - @location = args[:location] unless args[:location].nil? - @max_aperture_value = args[:max_aperture_value] unless args[:max_aperture_value].nil? - @metering_mode = args[:metering_mode] unless args[:metering_mode].nil? - @rotation = args[:rotation] unless args[:rotation].nil? - @sensor = args[:sensor] unless args[:sensor].nil? - @subject_distance = args[:subject_distance] unless args[:subject_distance].nil? - @white_balance = args[:white_balance] unless args[:white_balance].nil? - @width = args[:width] unless args[:width].nil? - end - - # Geographic location information stored in the image. - class Location - include Google::Apis::Core::Hashable - - # The altitude stored in the image. - # Corresponds to the JSON property `altitude` - # @return [Float] - attr_accessor :altitude - - # The latitude stored in the image. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude stored in the image. - # 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) - @altitude = args[:altitude] unless args[:altitude].nil? - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - end - end - end - - # Indexable text attributes for the file (can only be written) - class IndexableText - include Google::Apis::Core::Hashable - - # The text to be indexed for this file. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] unless args[:text].nil? - end - end - - # A group of labels for the file. - class Labels - include Google::Apis::Core::Hashable - - # Deprecated. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # Whether viewers are prevented from downloading this file. - # Corresponds to the JSON property `restricted` - # @return [Boolean] - attr_accessor :restricted - alias_method :restricted?, :restricted - - # Whether this file is starred by the user. - # Corresponds to the JSON property `starred` - # @return [Boolean] - attr_accessor :starred - alias_method :starred?, :starred - - # Whether this file has been trashed. This label applies to all users accessing - # the file; however, only owners are allowed to see and untrash files. - # Corresponds to the JSON property `trashed` - # @return [Boolean] - attr_accessor :trashed - alias_method :trashed?, :trashed - - # Whether this file has been viewed by this user. - # Corresponds to the JSON property `viewed` - # @return [Boolean] - attr_accessor :viewed - alias_method :viewed?, :viewed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hidden = args[:hidden] unless args[:hidden].nil? - @restricted = args[:restricted] unless args[:restricted].nil? - @starred = args[:starred] unless args[:starred].nil? - @trashed = args[:trashed] unless args[:trashed].nil? - @viewed = args[:viewed] unless args[:viewed].nil? - end - end - - # Thumbnail for the file. Only accepted on upload and for files that are not - # already thumbnailed by Google. - class Thumbnail - include Google::Apis::Core::Hashable - - # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to - # RFC 4648 section 5. - # Corresponds to the JSON property `image` - # @return [String] - attr_accessor :image - - # The MIME type of the thumbnail. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @image = args[:image] unless args[:image].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - end - end - - # Metadata about video media. This will only be present for video types. - class VideoMediaMetadata - include Google::Apis::Core::Hashable - - # The duration of the video in milliseconds. - # Corresponds to the JSON property `durationMillis` - # @return [String] - attr_accessor :duration_millis - - # The height of the video in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The width of the video in pixels. - # 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) - @duration_millis = args[:duration_millis] unless args[:duration_millis].nil? - @height = args[:height] unless args[:height].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - - # A list of files. - class FileList - include Google::Apis::Core::Hashable - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The actual list of files. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#fileList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link to the next page of files. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The page token for the next page of files. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A link back to this list. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].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 - - # A list of a file's parents. - class ParentList - include Google::Apis::Core::Hashable - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The actual list of parents. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#parentList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link back to this list. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A reference to a file's parent. - class ParentReference - include Google::Apis::Core::Hashable - - # The ID of the parent. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Whether or not the parent is the root folder. - # Corresponds to the JSON property `isRoot` - # @return [Boolean] - attr_accessor :is_root - alias_method :is_root?, :is_root - - # This is always drive#parentReference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link to the parent. - # Corresponds to the JSON property `parentLink` - # @return [String] - attr_accessor :parent_link - - # A link back to this reference. - # 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? - @is_root = args[:is_root] unless args[:is_root].nil? - @kind = args[:kind] unless args[:kind].nil? - @parent_link = args[:parent_link] unless args[:parent_link].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A permission for a file. - class Permission - include Google::Apis::Core::Hashable - - # Additional roles for this user. Only commenter is currently allowed. - # Corresponds to the JSON property `additionalRoles` - # @return [Array] - attr_accessor :additional_roles - - # The authkey parameter required for this permission. - # Corresponds to the JSON property `authKey` - # @return [String] - attr_accessor :auth_key - - # The domain name of the entity this permission refers to. This is an output- - # only field which is present when the permission type is user, group or domain. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # The email address of the user or group this permission refers to. This is an - # output-only field which is present when the permission type is user or group. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # The ETag of the permission. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of the user this permission refers to, and identical to the - # permissionId in the About and Files resources. When making a drive.permissions. - # insert request, exactly one of the id or value fields must be specified. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # This is always drive#permission. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name for this permission. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A link to the profile photo, if available. - # Corresponds to the JSON property `photoLink` - # @return [String] - attr_accessor :photo_link - - # The primary role for this user. Allowed values are: - # - owner - # - reader - # - writer - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # A link back to this permission. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The account type. Allowed values are: - # - user - # - group - # - domain - # - anyone - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The email address or domain name for the entity. This is used during inserts - # and is not populated in responses. When making a drive.permissions.insert - # request, exactly one of the id or value fields must be specified. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Whether the link is required for this permission. - # 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) - @additional_roles = args[:additional_roles] unless args[:additional_roles].nil? - @auth_key = args[:auth_key] unless args[:auth_key].nil? - @domain = args[:domain] unless args[:domain].nil? - @email_address = args[:email_address] unless args[:email_address].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @photo_link = args[:photo_link] unless args[:photo_link].nil? - @role = args[:role] unless args[:role].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - @with_link = args[:with_link] unless args[:with_link].nil? - end - end - - # An ID for a user or group as seen in Permission items. - class PermissionId - include Google::Apis::Core::Hashable - - # The permission ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # This is always drive#permissionId. - # 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 - - # A list of permissions associated with a file. - class PermissionList - include Google::Apis::Core::Hashable - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The actual list of permissions. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#permissionList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link back to this list. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A key-value pair attached to a file that is either public or private to an - # application. - # The following limits apply to file properties: - # - Maximum of 100 properties total per file - # - Maximum of 30 private properties per app - # - Maximum of 30 public properties - # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding - # for a single property. - class Property - include Google::Apis::Core::Hashable - - # ETag of the property. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The key of this property. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # This is always drive#property. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The link back to this property. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The value of this property. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The visibility of this property. - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @key = args[:key] unless args[:key].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @value = args[:value] unless args[:value].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # A collection of properties, key-value pairs that are either public or private - # to an application. - class PropertyList - include Google::Apis::Core::Hashable - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The list of properties. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#propertyList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The link back to this list. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A revision of a file. - class Revision - include Google::Apis::Core::Hashable - - # Short term download URL for the file. This will only be populated on files - # with content stored in Drive. - # Corresponds to the JSON property `downloadUrl` - # @return [String] - attr_accessor :download_url - - # The ETag of the revision. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Links for exporting Google Docs to specific formats. - # Corresponds to the JSON property `exportLinks` - # @return [Hash] - attr_accessor :export_links - - # The size of the revision in bytes. This will only be populated on files with - # content stored in Drive. - # Corresponds to the JSON property `fileSize` - # @return [String] - attr_accessor :file_size - - # The ID of the revision. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # This is always drive#revision. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The JSON template for a user. - # Corresponds to the JSON property `lastModifyingUser` - # @return [Google::Apis::DriveV2::User] - attr_accessor :last_modifying_user - - # Name of the last user to modify this revision. - # Corresponds to the JSON property `lastModifyingUserName` - # @return [String] - attr_accessor :last_modifying_user_name - - # An MD5 checksum for the content of this revision. This will only be populated - # on files with content stored in Drive. - # Corresponds to the JSON property `md5Checksum` - # @return [String] - attr_accessor :md5_checksum - - # The MIME type of the revision. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # Last time this revision was modified (formatted RFC 3339 timestamp). - # Corresponds to the JSON property `modifiedDate` - # @return [DateTime] - attr_accessor :modified_date - - # The original filename when this revision was created. This will only be - # populated on files with content stored in Drive. - # Corresponds to the JSON property `originalFilename` - # @return [String] - attr_accessor :original_filename - - # Whether this revision is pinned to prevent automatic purging. This will only - # be populated and can only be modified on files with content stored in Drive - # which are not Google Docs. Revisions can also be pinned when they are created - # through the drive.files.insert/update/copy by using the pinned query parameter. - # Corresponds to the JSON property `pinned` - # @return [Boolean] - attr_accessor :pinned - alias_method :pinned?, :pinned - - # Whether subsequent revisions will be automatically republished. This is only - # populated and can only be modified for Google Docs. - # Corresponds to the JSON property `publishAuto` - # @return [Boolean] - attr_accessor :publish_auto - alias_method :publish_auto?, :publish_auto - - # Whether this revision is published. This is only populated and can only be - # modified for Google Docs. - # Corresponds to the JSON property `published` - # @return [Boolean] - attr_accessor :published - alias_method :published?, :published - - # A link to the published revision. - # Corresponds to the JSON property `publishedLink` - # @return [String] - attr_accessor :published_link - - # Whether this revision is published outside the domain. This is only populated - # and can only be modified for Google Docs. - # Corresponds to the JSON property `publishedOutsideDomain` - # @return [Boolean] - attr_accessor :published_outside_domain - alias_method :published_outside_domain?, :published_outside_domain - - # A link back to this revision. - # 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) - @download_url = args[:download_url] unless args[:download_url].nil? - @etag = args[:etag] unless args[:etag].nil? - @export_links = args[:export_links] unless args[:export_links].nil? - @file_size = args[:file_size] unless args[:file_size].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modifying_user = args[:last_modifying_user] unless args[:last_modifying_user].nil? - @last_modifying_user_name = args[:last_modifying_user_name] unless args[:last_modifying_user_name].nil? - @md5_checksum = args[:md5_checksum] unless args[:md5_checksum].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - @modified_date = args[:modified_date] unless args[:modified_date].nil? - @original_filename = args[:original_filename] unless args[:original_filename].nil? - @pinned = args[:pinned] unless args[:pinned].nil? - @publish_auto = args[:publish_auto] unless args[:publish_auto].nil? - @published = args[:published] unless args[:published].nil? - @published_link = args[:published_link] unless args[:published_link].nil? - @published_outside_domain = args[:published_outside_domain] unless args[:published_outside_domain].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # A list of revisions of a file. - class RevisionList - include Google::Apis::Core::Hashable - - # The ETag of the list. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The actual list of revisions. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always drive#revisionList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A link back to this list. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # The JSON template for a user. - class User - include Google::Apis::Core::Hashable - - # A plain text displayable name for this user. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The email address of the user. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # Whether this user is the same as the authenticated user for whom the request - # was made. - # Corresponds to the JSON property `isAuthenticatedUser` - # @return [Boolean] - attr_accessor :is_authenticated_user - alias_method :is_authenticated_user?, :is_authenticated_user - - # This is always drive#user. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The user's ID as visible in the permissions collection. - # Corresponds to the JSON property `permissionId` - # @return [String] - attr_accessor :permission_id - - # The user's profile picture. - # Corresponds to the JSON property `picture` - # @return [Google::Apis::DriveV2::User::Picture] - attr_accessor :picture - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @email_address = args[:email_address] unless args[:email_address].nil? - @is_authenticated_user = args[:is_authenticated_user] unless args[:is_authenticated_user].nil? - @kind = args[:kind] unless args[:kind].nil? - @permission_id = args[:permission_id] unless args[:permission_id].nil? - @picture = args[:picture] unless args[:picture].nil? - end - - # The user's profile picture. - class Picture - include Google::Apis::Core::Hashable - - # A URL that points to a profile picture of this user. - # 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 - end - end - end -end diff --git a/generated/google/apis/drive_v2/representations.rb b/generated/google/apis/drive_v2/representations.rb deleted file mode 100644 index d0e0479cd..000000000 --- a/generated/google/apis/drive_v2/representations.rb +++ /dev/null @@ -1,778 +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 DriveV2 - - class About - class Representation < Google::Apis::Core::JsonRepresentation; end - - class AdditionalRoleInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class RoleSet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ExportFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Feature - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MaxUploadSize - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QuotaBytesByService - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class App - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Icon - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class AppList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Change - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ChangeList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Channel - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ChildList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ChildReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Comment - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Context - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CommentList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CommentReply - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CommentReplyList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class File - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ImageMediaMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Location - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class IndexableText - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Labels - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Thumbnail - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VideoMediaMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class FileList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParentList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParentReference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Permission - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PermissionId - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PermissionList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Property - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PropertyList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Revision - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RevisionList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class User - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Picture - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - # @private - class About - class Representation < Google::Apis::Core::JsonRepresentation - collection :additional_role_info, as: 'additionalRoleInfo', class: Google::Apis::DriveV2::About::AdditionalRoleInfo, decorator: Google::Apis::DriveV2::About::AdditionalRoleInfo::Representation - - property :domain_sharing_policy, as: 'domainSharingPolicy' - property :etag, as: 'etag' - collection :export_formats, as: 'exportFormats', class: Google::Apis::DriveV2::About::ExportFormat, decorator: Google::Apis::DriveV2::About::ExportFormat::Representation - - collection :features, as: 'features', class: Google::Apis::DriveV2::About::Feature, decorator: Google::Apis::DriveV2::About::Feature::Representation - - collection :folder_color_palette, as: 'folderColorPalette' - collection :import_formats, as: 'importFormats', class: Google::Apis::DriveV2::About::ImportFormat, decorator: Google::Apis::DriveV2::About::ImportFormat::Representation - - property :is_current_app_installed, as: 'isCurrentAppInstalled' - property :kind, as: 'kind' - property :language_code, as: 'languageCode' - property :largest_change_id, as: 'largestChangeId' - collection :max_upload_sizes, as: 'maxUploadSizes', class: Google::Apis::DriveV2::About::MaxUploadSize, decorator: Google::Apis::DriveV2::About::MaxUploadSize::Representation - - property :name, as: 'name' - property :permission_id, as: 'permissionId' - collection :quota_bytes_by_service, as: 'quotaBytesByService', class: Google::Apis::DriveV2::About::QuotaBytesByService, decorator: Google::Apis::DriveV2::About::QuotaBytesByService::Representation - - property :quota_bytes_total, as: 'quotaBytesTotal' - property :quota_bytes_used, as: 'quotaBytesUsed' - property :quota_bytes_used_aggregate, as: 'quotaBytesUsedAggregate' - property :quota_bytes_used_in_trash, as: 'quotaBytesUsedInTrash' - property :quota_type, as: 'quotaType' - property :remaining_change_ids, as: 'remainingChangeIds' - property :root_folder_id, as: 'rootFolderId' - property :self_link, as: 'selfLink' - property :user, as: 'user', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation - - end - - # @private - class AdditionalRoleInfo - class Representation < Google::Apis::Core::JsonRepresentation - collection :role_sets, as: 'roleSets', class: Google::Apis::DriveV2::About::AdditionalRoleInfo::RoleSet, decorator: Google::Apis::DriveV2::About::AdditionalRoleInfo::RoleSet::Representation - - property :type, as: 'type' - end - - # @private - class RoleSet - class Representation < Google::Apis::Core::JsonRepresentation - collection :additional_roles, as: 'additionalRoles' - property :primary_role, as: 'primaryRole' - end - end - end - - # @private - class ExportFormat - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source' - collection :targets, as: 'targets' - end - end - - # @private - class Feature - class Representation < Google::Apis::Core::JsonRepresentation - property :feature_name, as: 'featureName' - property :feature_rate, as: 'featureRate' - end - end - - # @private - class ImportFormat - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source' - collection :targets, as: 'targets' - end - end - - # @private - class MaxUploadSize - class Representation < Google::Apis::Core::JsonRepresentation - property :size, as: 'size' - property :type, as: 'type' - end - end - - # @private - class QuotaBytesByService - class Representation < Google::Apis::Core::JsonRepresentation - property :bytes_used, as: 'bytesUsed' - property :service_name, as: 'serviceName' - end - end - end - - # @private - class App - class Representation < Google::Apis::Core::JsonRepresentation - property :authorized, as: 'authorized' - property :create_in_folder_template, as: 'createInFolderTemplate' - property :create_url, as: 'createUrl' - property :has_drive_wide_scope, as: 'hasDriveWideScope' - collection :icons, as: 'icons', class: Google::Apis::DriveV2::App::Icon, decorator: Google::Apis::DriveV2::App::Icon::Representation - - property :id, as: 'id' - property :installed, as: 'installed' - property :kind, as: 'kind' - property :long_description, as: 'longDescription' - property :name, as: 'name' - property :object_type, as: 'objectType' - property :open_url_template, as: 'openUrlTemplate' - collection :primary_file_extensions, as: 'primaryFileExtensions' - collection :primary_mime_types, as: 'primaryMimeTypes' - property :product_id, as: 'productId' - property :product_url, as: 'productUrl' - collection :secondary_file_extensions, as: 'secondaryFileExtensions' - collection :secondary_mime_types, as: 'secondaryMimeTypes' - property :short_description, as: 'shortDescription' - property :supports_create, as: 'supportsCreate' - property :supports_import, as: 'supportsImport' - property :supports_multi_open, as: 'supportsMultiOpen' - property :supports_offline_create, as: 'supportsOfflineCreate' - property :use_by_default, as: 'useByDefault' - end - - # @private - class Icon - class Representation < Google::Apis::Core::JsonRepresentation - property :category, as: 'category' - property :icon_url, as: 'iconUrl' - property :size, as: 'size' - end - end - end - - # @private - class AppList - class Representation < Google::Apis::Core::JsonRepresentation - collection :default_app_ids, as: 'defaultAppIds' - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::App, decorator: Google::Apis::DriveV2::App::Representation - - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - end - end - - # @private - class Change - class Representation < Google::Apis::Core::JsonRepresentation - property :deleted, as: 'deleted' - property :file, as: 'file', class: Google::Apis::DriveV2::File, decorator: Google::Apis::DriveV2::File::Representation - - property :file_id, as: 'fileId' - property :id, as: 'id' - property :kind, as: 'kind' - property :modification_date, as: 'modificationDate', type: DateTime - - property :self_link, as: 'selfLink' - end - end - - # @private - class ChangeList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::Change, decorator: Google::Apis::DriveV2::Change::Representation - - property :kind, as: 'kind' - property :largest_change_id, as: 'largestChangeId' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - 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 ChildList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::ChildReference, decorator: Google::Apis::DriveV2::ChildReference::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ChildReference - class Representation < Google::Apis::Core::JsonRepresentation - property :child_link, as: 'childLink' - property :id, as: 'id' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - end - end - - # @private - class Comment - class Representation < Google::Apis::Core::JsonRepresentation - property :anchor, as: 'anchor' - property :author, as: 'author', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation - - property :comment_id, as: 'commentId' - property :content, as: 'content' - property :context, as: 'context', class: Google::Apis::DriveV2::Comment::Context, decorator: Google::Apis::DriveV2::Comment::Context::Representation - - property :created_date, as: 'createdDate', type: DateTime - - property :deleted, as: 'deleted' - property :file_id, as: 'fileId' - property :file_title, as: 'fileTitle' - property :html_content, as: 'htmlContent' - property :kind, as: 'kind' - property :modified_date, as: 'modifiedDate', type: DateTime - - collection :replies, as: 'replies', class: Google::Apis::DriveV2::CommentReply, decorator: Google::Apis::DriveV2::CommentReply::Representation - - property :self_link, as: 'selfLink' - property :status, as: 'status' - end - - # @private - class Context - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - end - - # @private - class CommentList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::DriveV2::Comment, decorator: Google::Apis::DriveV2::Comment::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class CommentReply - class Representation < Google::Apis::Core::JsonRepresentation - property :author, as: 'author', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation - - property :content, as: 'content' - property :created_date, as: 'createdDate', type: DateTime - - property :deleted, as: 'deleted' - property :html_content, as: 'htmlContent' - property :kind, as: 'kind' - property :modified_date, as: 'modifiedDate', type: DateTime - - property :reply_id, as: 'replyId' - property :verb, as: 'verb' - end - end - - # @private - class CommentReplyList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::DriveV2::CommentReply, decorator: Google::Apis::DriveV2::CommentReply::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class File - class Representation < Google::Apis::Core::JsonRepresentation - property :alternate_link, as: 'alternateLink' - property :app_data_contents, as: 'appDataContents' - property :copyable, as: 'copyable' - property :created_date, as: 'createdDate', type: DateTime - - property :default_open_with_link, as: 'defaultOpenWithLink' - property :description, as: 'description' - property :download_url, as: 'downloadUrl' - property :editable, as: 'editable' - property :embed_link, as: 'embedLink' - property :etag, as: 'etag' - property :explicitly_trashed, as: 'explicitlyTrashed' - hash :export_links, as: 'exportLinks' - property :file_extension, as: 'fileExtension' - property :file_size, as: 'fileSize' - property :folder_color_rgb, as: 'folderColorRgb' - property :head_revision_id, as: 'headRevisionId' - property :icon_link, as: 'iconLink' - property :id, as: 'id' - property :image_media_metadata, as: 'imageMediaMetadata', class: Google::Apis::DriveV2::File::ImageMediaMetadata, decorator: Google::Apis::DriveV2::File::ImageMediaMetadata::Representation - - property :indexable_text, as: 'indexableText', class: Google::Apis::DriveV2::File::IndexableText, decorator: Google::Apis::DriveV2::File::IndexableText::Representation - - property :kind, as: 'kind' - property :labels, as: 'labels', class: Google::Apis::DriveV2::File::Labels, decorator: Google::Apis::DriveV2::File::Labels::Representation - - property :last_modifying_user, as: 'lastModifyingUser', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation - - property :last_modifying_user_name, as: 'lastModifyingUserName' - property :last_viewed_by_me_date, as: 'lastViewedByMeDate', type: DateTime - - property :marked_viewed_by_me_date, as: 'markedViewedByMeDate', type: DateTime - - property :md5_checksum, as: 'md5Checksum' - property :mime_type, as: 'mimeType' - property :modified_by_me_date, as: 'modifiedByMeDate', type: DateTime - - property :modified_date, as: 'modifiedDate', type: DateTime - - hash :open_with_links, as: 'openWithLinks' - property :original_filename, as: 'originalFilename' - collection :owner_names, as: 'ownerNames' - collection :owners, as: 'owners', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation - - collection :parents, as: 'parents', class: Google::Apis::DriveV2::ParentReference, decorator: Google::Apis::DriveV2::ParentReference::Representation - - collection :permissions, as: 'permissions', class: Google::Apis::DriveV2::Permission, decorator: Google::Apis::DriveV2::Permission::Representation - - collection :properties, as: 'properties', class: Google::Apis::DriveV2::Property, decorator: Google::Apis::DriveV2::Property::Representation - - property :quota_bytes_used, as: 'quotaBytesUsed' - property :self_link, as: 'selfLink' - property :shared, as: 'shared' - property :shared_with_me_date, as: 'sharedWithMeDate', type: DateTime - - property :sharing_user, as: 'sharingUser', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation - - collection :spaces, as: 'spaces' - property :thumbnail, as: 'thumbnail', class: Google::Apis::DriveV2::File::Thumbnail, decorator: Google::Apis::DriveV2::File::Thumbnail::Representation - - property :thumbnail_link, as: 'thumbnailLink' - property :title, as: 'title' - property :user_permission, as: 'userPermission', class: Google::Apis::DriveV2::Permission, decorator: Google::Apis::DriveV2::Permission::Representation - - property :version, as: 'version' - property :video_media_metadata, as: 'videoMediaMetadata', class: Google::Apis::DriveV2::File::VideoMediaMetadata, decorator: Google::Apis::DriveV2::File::VideoMediaMetadata::Representation - - property :web_content_link, as: 'webContentLink' - property :web_view_link, as: 'webViewLink' - property :writers_can_share, as: 'writersCanShare' - end - - # @private - class ImageMediaMetadata - class Representation < Google::Apis::Core::JsonRepresentation - property :aperture, as: 'aperture' - property :camera_make, as: 'cameraMake' - property :camera_model, as: 'cameraModel' - property :color_space, as: 'colorSpace' - property :date, as: 'date' - property :exposure_bias, as: 'exposureBias' - property :exposure_mode, as: 'exposureMode' - property :exposure_time, as: 'exposureTime' - property :flash_used, as: 'flashUsed' - property :focal_length, as: 'focalLength' - property :height, as: 'height' - property :iso_speed, as: 'isoSpeed' - property :lens, as: 'lens' - property :location, as: 'location', class: Google::Apis::DriveV2::File::ImageMediaMetadata::Location, decorator: Google::Apis::DriveV2::File::ImageMediaMetadata::Location::Representation - - property :max_aperture_value, as: 'maxApertureValue' - property :metering_mode, as: 'meteringMode' - property :rotation, as: 'rotation' - property :sensor, as: 'sensor' - property :subject_distance, as: 'subjectDistance' - property :white_balance, as: 'whiteBalance' - property :width, as: 'width' - end - - # @private - class Location - class Representation < Google::Apis::Core::JsonRepresentation - property :altitude, as: 'altitude' - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - end - - # @private - class IndexableText - class Representation < Google::Apis::Core::JsonRepresentation - property :text, as: 'text' - end - end - - # @private - class Labels - class Representation < Google::Apis::Core::JsonRepresentation - property :hidden, as: 'hidden' - property :restricted, as: 'restricted' - property :starred, as: 'starred' - property :trashed, as: 'trashed' - property :viewed, as: 'viewed' - end - end - - # @private - class Thumbnail - class Representation < Google::Apis::Core::JsonRepresentation - property :image, :base64 => true, as: 'image' - property :mime_type, as: 'mimeType' - end - end - - # @private - class VideoMediaMetadata - class Representation < Google::Apis::Core::JsonRepresentation - property :duration_millis, as: 'durationMillis' - property :height, as: 'height' - property :width, as: 'width' - end - end - end - - # @private - class FileList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::File, decorator: Google::Apis::DriveV2::File::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ParentList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::ParentReference, decorator: Google::Apis::DriveV2::ParentReference::Representation - - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - end - end - - # @private - class ParentReference - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :is_root, as: 'isRoot' - property :kind, as: 'kind' - property :parent_link, as: 'parentLink' - property :self_link, as: 'selfLink' - end - end - - # @private - class Permission - class Representation < Google::Apis::Core::JsonRepresentation - collection :additional_roles, as: 'additionalRoles' - property :auth_key, as: 'authKey' - property :domain, as: 'domain' - property :email_address, as: 'emailAddress' - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :photo_link, as: 'photoLink' - property :role, as: 'role' - property :self_link, as: 'selfLink' - property :type, as: 'type' - property :value, as: 'value' - property :with_link, as: 'withLink' - end - end - - # @private - class PermissionId - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - end - end - - # @private - class PermissionList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::Permission, decorator: Google::Apis::DriveV2::Permission::Representation - - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - end - end - - # @private - class Property - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :key, as: 'key' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - property :value, as: 'value' - property :visibility, as: 'visibility' - end - end - - # @private - class PropertyList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::Property, decorator: Google::Apis::DriveV2::Property::Representation - - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - end - end - - # @private - class Revision - class Representation < Google::Apis::Core::JsonRepresentation - property :download_url, as: 'downloadUrl' - property :etag, as: 'etag' - hash :export_links, as: 'exportLinks' - property :file_size, as: 'fileSize' - property :id, as: 'id' - property :kind, as: 'kind' - property :last_modifying_user, as: 'lastModifyingUser', class: Google::Apis::DriveV2::User, decorator: Google::Apis::DriveV2::User::Representation - - property :last_modifying_user_name, as: 'lastModifyingUserName' - property :md5_checksum, as: 'md5Checksum' - property :mime_type, as: 'mimeType' - property :modified_date, as: 'modifiedDate', type: DateTime - - property :original_filename, as: 'originalFilename' - property :pinned, as: 'pinned' - property :publish_auto, as: 'publishAuto' - property :published, as: 'published' - property :published_link, as: 'publishedLink' - property :published_outside_domain, as: 'publishedOutsideDomain' - property :self_link, as: 'selfLink' - end - end - - # @private - class RevisionList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::DriveV2::Revision, decorator: Google::Apis::DriveV2::Revision::Representation - - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - end - end - - # @private - class User - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :email_address, as: 'emailAddress' - property :is_authenticated_user, as: 'isAuthenticatedUser' - property :kind, as: 'kind' - property :permission_id, as: 'permissionId' - property :picture, as: 'picture', class: Google::Apis::DriveV2::User::Picture, decorator: Google::Apis::DriveV2::User::Picture::Representation - - end - - # @private - class Picture - class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' - end - end - end - end - end -end diff --git a/generated/google/apis/drive_v2/service.rb b/generated/google/apis/drive_v2/service.rb deleted file mode 100644 index 8531aa552..000000000 --- a/generated/google/apis/drive_v2/service.rb +++ /dev/null @@ -1,2685 +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 DriveV2 - # Drive API - # - # The API to interact with Drive. - # - # @example - # require 'google/apis/drive_v2' - # - # Drive = Google::Apis::DriveV2 # Alias the module - # service = Drive::DriveService.new - # - # @see https://developers.google.com/drive/ - class DriveService < 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/', 'drive/v2/') - end - - # Gets the information about the current user along with Drive API settings - # @param [Boolean] include_subscribed - # When calculating the number of remaining change IDs, whether to include public - # files the user has opened and shared files. When set to false, this counts - # only change IDs for owned files and any shared or public files that the user - # has explicitly added to a folder they own. - # @param [String] max_change_id_count - # Maximum number of remaining change IDs to count - # @param [String] start_change_id - # Change ID to start counting from when calculating number of remaining change - # IDs - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::About] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::About] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'about' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::About::Representation - command.response_class = Google::Apis::DriveV2::About - command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil? - command.query['maxChangeIdCount'] = max_change_id_count unless max_change_id_count.nil? - command.query['startChangeId'] = start_change_id unless start_change_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 app. - # @param [String] app_id - # The ID of the app. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::App] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::App] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'apps/{appId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::App::Representation - command.response_class = Google::Apis::DriveV2::App - command.params['appId'] = app_id unless app_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 a user's installed apps. - # @param [String] app_filter_extensions - # A comma-separated list of file extensions for open with filtering. All apps - # within the given app query scope which can open any of the given file - # extensions will be included in the response. If appFilterMimeTypes are - # provided as well, the result is a union of the two resulting app lists. - # @param [String] app_filter_mime_types - # A comma-separated list of MIME types for open with filtering. All apps within - # the given app query scope which can open any of the given MIME types will be - # included in the response. If appFilterExtensions are provided as well, the - # result is a union of the two resulting app lists. - # @param [String] language_code - # A language or locale code, as defined by BCP 47, with some extensions from - # Unicode's LDML format (http://www.unicode.org/reports/tr35/). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::AppList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::AppList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'apps' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::AppList::Representation - command.response_class = Google::Apis::DriveV2::AppList - command.query['appFilterExtensions'] = app_filter_extensions unless app_filter_extensions.nil? - command.query['appFilterMimeTypes'] = app_filter_mime_types unless app_filter_mime_types.nil? - command.query['languageCode'] = language_code unless language_code.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 change. - # @param [String] change_id - # The ID of the change. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Change] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Change] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_change(change_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'changes/{changeId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::Change::Representation - command.response_class = Google::Apis::DriveV2::Change - command.params['changeId'] = change_id unless change_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 the changes for a user. - # @param [Boolean] include_deleted - # Whether to include deleted items. - # @param [Boolean] include_subscribed - # Whether to include public files the user has opened and shared files. When set - # to false, the list only includes owned files plus any shared or public files - # the user has explicitly added to a folder they own. - # @param [Fixnum] max_results - # Maximum number of changes to return. - # @param [String] page_token - # Page token for changes. - # @param [String] spaces - # A comma-separated list of spaces to query. Supported values are 'drive' and ' - # appDataFolder'. - # @param [String] start_change_id - # Change ID to start listing changes from. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::ChangeList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::ChangeList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_changes(include_deleted: nil, include_subscribed: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'changes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::ChangeList::Representation - command.response_class = Google::Apis::DriveV2::ChangeList - command.query['includeDeleted'] = include_deleted unless include_deleted.nil? - command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['spaces'] = spaces unless spaces.nil? - command.query['startChangeId'] = start_change_id unless start_change_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 - - # Subscribe to changes for a user. - # @param [Google::Apis::DriveV2::Channel] channel_object - # @param [Boolean] include_deleted - # Whether to include deleted items. - # @param [Boolean] include_subscribed - # Whether to include public files the user has opened and shared files. When set - # to false, the list only includes owned files plus any shared or public files - # the user has explicitly added to a folder they own. - # @param [Fixnum] max_results - # Maximum number of changes to return. - # @param [String] page_token - # Page token for changes. - # @param [String] spaces - # A comma-separated list of spaces to query. Supported values are 'drive' and ' - # appDataFolder'. - # @param [String] start_change_id - # Change ID to start listing changes from. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::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_change(channel_object = nil, include_deleted: nil, include_subscribed: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'changes/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::DriveV2::Channel::Representation - command.response_class = Google::Apis::DriveV2::Channel - command.query['includeDeleted'] = include_deleted unless include_deleted.nil? - command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['spaces'] = spaces unless spaces.nil? - command.query['startChangeId'] = start_change_id unless start_change_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 - - # Stop watching resources through this channel - # @param [Google::Apis::DriveV2::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 = 'channels/stop' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::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 - - # Removes a child from a folder. - # @param [String] folder_id - # The ID of the folder. - # @param [String] child_id - # The ID of the child. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{folderId}/children/{childId}' - command = make_simple_command(:delete, path, options) - command.params['folderId'] = folder_id unless folder_id.nil? - command.params['childId'] = child_id unless child_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 child reference. - # @param [String] folder_id - # The ID of the folder. - # @param [String] child_id - # The ID of the child. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::ChildReference] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::ChildReference] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{folderId}/children/{childId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::ChildReference::Representation - command.response_class = Google::Apis::DriveV2::ChildReference - command.params['folderId'] = folder_id unless folder_id.nil? - command.params['childId'] = child_id unless child_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 file into a folder. - # @param [String] folder_id - # The ID of the folder. - # @param [Google::Apis::DriveV2::ChildReference] child_reference_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::DriveV2::ChildReference] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::ChildReference] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_child(folder_id, child_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{folderId}/children' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::ChildReference::Representation - command.request_object = child_reference_object - command.response_representation = Google::Apis::DriveV2::ChildReference::Representation - command.response_class = Google::Apis::DriveV2::ChildReference - command.params['folderId'] = folder_id unless folder_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 a folder's children. - # @param [String] folder_id - # The ID of the folder. - # @param [Fixnum] max_results - # Maximum number of children to return. - # @param [String] page_token - # Page token for children. - # @param [String] q - # Query string for searching children. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::ChildList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::ChildList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_children(folder_id, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{folderId}/children' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::ChildList::Representation - command.response_class = Google::Apis::DriveV2::ChildList - command.params['folderId'] = folder_id unless folder_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['q'] = q unless q.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 comment. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}' - command = make_simple_command(:delete, path, options) - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a comment by ID. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [Boolean] include_deleted - # If set, this will succeed when retrieving a deleted comment, and will include - # any deleted replies. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::Comment::Representation - command.response_class = Google::Apis::DriveV2::Comment - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['includeDeleted'] = include_deleted unless include_deleted.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 new comment on the given file. - # @param [String] file_id - # The ID of the file. - # @param [Google::Apis::DriveV2::Comment] comment_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::DriveV2::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::Comment::Representation - command.request_object = comment_object - command.response_representation = Google::Apis::DriveV2::Comment::Representation - command.response_class = Google::Apis::DriveV2::Comment - command.params['fileId'] = file_id unless file_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 a file's comments. - # @param [String] file_id - # The ID of the file. - # @param [Boolean] include_deleted - # If set, all comments and replies, including deleted comments and replies (with - # content stripped) will be returned. - # @param [Fixnum] max_results - # The maximum number of discussions to include in the response, used for paging. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of "nextPageToken" from - # the previous response. - # @param [String] updated_min - # Only discussions that were updated after this timestamp will be returned. - # Formatted 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::DriveV2::CommentList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::CommentList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::CommentList::Representation - command.response_class = Google::Apis::DriveV2::CommentList - command.params['fileId'] = file_id unless file_id.nil? - command.query['includeDeleted'] = include_deleted unless include_deleted.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['updatedMin'] = updated_min unless updated_min.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 comment. This method supports patch semantics. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [Google::Apis::DriveV2::Comment] comment_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::DriveV2::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DriveV2::Comment::Representation - command.request_object = comment_object - command.response_representation = Google::Apis::DriveV2::Comment::Representation - command.response_class = Google::Apis::DriveV2::Comment - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing comment. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [Google::Apis::DriveV2::Comment] comment_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::DriveV2::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DriveV2::Comment::Representation - command.request_object = comment_object - command.response_representation = Google::Apis::DriveV2::Comment::Representation - command.response_class = Google::Apis::DriveV2::Comment - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a copy of the specified file. - # @param [String] file_id - # The ID of the file to copy. - # @param [Google::Apis::DriveV2::File] file_object - # @param [Boolean] convert - # Whether to convert this file to the corresponding Google Docs format. - # @param [Boolean] ocr - # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - # @param [String] ocr_language - # If ocr is true, hints at the language to use. Valid values are BCP 47 codes. - # @param [Boolean] pinned - # Whether to pin the head revision of the new copy. A file can have a maximum of - # 200 pinned revisions. - # @param [String] timed_text_language - # The language of the timed text. - # @param [String] timed_text_track_name - # The timed text track name. - # @param [String] visibility - # The visibility of the new file. This parameter is only relevant when the - # source is not a native Google Doc and convert=false. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/copy' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::File::Representation - command.request_object = file_object - command.response_representation = Google::Apis::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.params['fileId'] = file_id unless file_id.nil? - command.query['convert'] = convert unless convert.nil? - command.query['ocr'] = ocr unless ocr.nil? - command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? - command.query['pinned'] = pinned unless pinned.nil? - command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? - command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? - command.query['visibility'] = visibility unless visibility.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 - - # Permanently deletes a file by ID. Skips the trash. The currently authenticated - # user must own the file. - # @param [String] file_id - # The ID of the file 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_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}' - command = make_simple_command(:delete, path, options) - command.params['fileId'] = file_id unless file_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 - - # Permanently deletes all of the user's trashed files. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/trash' - command = make_simple_command(:delete, path, options) - 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 file's metadata by ID. - # @param [String] file_id - # The ID for the file in question. - # @param [Boolean] acknowledge_abuse - # Whether the user is acknowledging the risk of downloading known malware or - # other abusive files. - # @param [String] projection - # This parameter is deprecated and has no function. - # @param [String] revision_id - # Specifies the Revision ID that should be downloaded. Ignored unless alt=media - # is specified. - # @param [Boolean] update_viewed_date - # Whether to update the view date after successfully retrieving the file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'files/{fileId}' - 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::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.params['fileId'] = file_id unless file_id.nil? - command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? - command.query['projection'] = projection unless projection.nil? - command.query['revisionId'] = revision_id unless revision_id.nil? - command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Insert a new file. - # @param [Google::Apis::DriveV2::File] file_object - # @param [Boolean] convert - # Whether to convert this file to the corresponding Google Docs format. - # @param [Boolean] ocr - # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - # @param [String] ocr_language - # If ocr is true, hints at the language to use. Valid values are BCP 47 codes. - # @param [Boolean] pinned - # Whether to pin the head revision of the uploaded file. A file can have a - # maximum of 200 pinned revisions. - # @param [String] timed_text_language - # The language of the timed text. - # @param [String] timed_text_track_name - # The timed text track name. - # @param [Boolean] use_content_as_indexable_text - # Whether to use the content as indexable text. - # @param [String] visibility - # The visibility of the new file. This parameter is only relevant when convert= - # false. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'files' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::DriveV2::File::Representation - command.request_object = file_object - command.response_representation = Google::Apis::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.query['convert'] = convert unless convert.nil? - command.query['ocr'] = ocr unless ocr.nil? - command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? - command.query['pinned'] = pinned unless pinned.nil? - command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? - command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? - command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil? - command.query['visibility'] = visibility unless visibility.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the user's files. - # @param [String] corpus - # The body of items (files/documents) to which the query applies. - # @param [Fixnum] max_results - # Maximum number of files to return. - # @param [String] page_token - # Page token for files. - # @param [String] projection - # This parameter is deprecated and has no function. - # @param [String] q - # Query string for searching files. - # @param [String] spaces - # A comma-separated list of spaces to query. Supported values are 'drive' and ' - # appDataFolder'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::FileList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::FileList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_files(corpus: nil, max_results: nil, page_token: nil, projection: nil, q: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::FileList::Representation - command.response_class = Google::Apis::DriveV2::FileList - command.query['corpus'] = corpus unless corpus.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projection'] = projection unless projection.nil? - command.query['q'] = q unless q.nil? - command.query['spaces'] = spaces unless spaces.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 file metadata and/or content. This method supports patch semantics. - # @param [String] file_id - # The ID of the file to update. - # @param [Google::Apis::DriveV2::File] file_object - # @param [String] add_parents - # Comma-separated list of parent IDs to add. - # @param [Boolean] convert - # Whether to convert this file to the corresponding Google Docs format. - # @param [Boolean] new_revision - # Whether a blob upload should create a new revision. If false, the blob data in - # the current head revision is replaced. If true or not set, a new blob is - # created as head revision, and previous unpinned revisions are preserved for a - # short period of time. Pinned revisions are stored indefinitely, using - # additional storage quota, up to a maximum of 200 revisions. - # @param [Boolean] ocr - # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - # @param [String] ocr_language - # If ocr is true, hints at the language to use. Valid values are BCP 47 codes. - # @param [Boolean] pinned - # Whether to pin the new revision. A file can have a maximum of 200 pinned - # revisions. - # @param [String] remove_parents - # Comma-separated list of parent IDs to remove. - # @param [Boolean] set_modified_date - # Whether to set the modified date with the supplied modified date. - # @param [String] timed_text_language - # The language of the timed text. - # @param [String] timed_text_track_name - # The timed text track name. - # @param [Boolean] update_viewed_date - # Whether to update the view date after successfully updating the file. - # @param [Boolean] use_content_as_indexable_text - # Whether to use the content as indexable text. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_file(file_id, file_object = nil, add_parents: nil, convert: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DriveV2::File::Representation - command.request_object = file_object - command.response_representation = Google::Apis::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.params['fileId'] = file_id unless file_id.nil? - command.query['addParents'] = add_parents unless add_parents.nil? - command.query['convert'] = convert unless convert.nil? - command.query['newRevision'] = new_revision unless new_revision.nil? - command.query['ocr'] = ocr unless ocr.nil? - command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? - command.query['pinned'] = pinned unless pinned.nil? - command.query['removeParents'] = remove_parents unless remove_parents.nil? - command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil? - command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? - command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? - command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil? - command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.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 - - # Set the file's updated time to the current server time. - # @param [String] file_id - # The ID of the file to update. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def touch_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/touch' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.params['fileId'] = file_id unless file_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 - - # Moves a file to the trash. - # @param [String] file_id - # The ID of the file to trash. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def trash_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/trash' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.params['fileId'] = file_id unless file_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 - - # Restores a file from the trash. - # @param [String] file_id - # The ID of the file to untrash. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def untrash_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/untrash' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.params['fileId'] = file_id unless file_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 file metadata and/or content. - # @param [String] file_id - # The ID of the file to update. - # @param [Google::Apis::DriveV2::File] file_object - # @param [String] add_parents - # Comma-separated list of parent IDs to add. - # @param [Boolean] convert - # Whether to convert this file to the corresponding Google Docs format. - # @param [Boolean] new_revision - # Whether a blob upload should create a new revision. If false, the blob data in - # the current head revision is replaced. If true or not set, a new blob is - # created as head revision, and previous unpinned revisions are preserved for a - # short period of time. Pinned revisions are stored indefinitely, using - # additional storage quota, up to a maximum of 200 revisions. - # @param [Boolean] ocr - # Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. - # @param [String] ocr_language - # If ocr is true, hints at the language to use. Valid values are BCP 47 codes. - # @param [Boolean] pinned - # Whether to pin the new revision. A file can have a maximum of 200 pinned - # revisions. - # @param [String] remove_parents - # Comma-separated list of parent IDs to remove. - # @param [Boolean] set_modified_date - # Whether to set the modified date with the supplied modified date. - # @param [String] timed_text_language - # The language of the timed text. - # @param [String] timed_text_track_name - # The timed text track name. - # @param [Boolean] update_viewed_date - # Whether to update the view date after successfully updating the file. - # @param [Boolean] use_content_as_indexable_text - # Whether to use the content as indexable text. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DriveV2::File] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::File] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_file(file_id, file_object = nil, add_parents: nil, convert: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'files/{fileId}' - if upload_source.nil? - command = make_simple_command(:put, path, options) - else - command = make_upload_command(:put, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::DriveV2::File::Representation - command.request_object = file_object - command.response_representation = Google::Apis::DriveV2::File::Representation - command.response_class = Google::Apis::DriveV2::File - command.params['fileId'] = file_id unless file_id.nil? - command.query['addParents'] = add_parents unless add_parents.nil? - command.query['convert'] = convert unless convert.nil? - command.query['newRevision'] = new_revision unless new_revision.nil? - command.query['ocr'] = ocr unless ocr.nil? - command.query['ocrLanguage'] = ocr_language unless ocr_language.nil? - command.query['pinned'] = pinned unless pinned.nil? - command.query['removeParents'] = remove_parents unless remove_parents.nil? - command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil? - command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil? - command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil? - command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil? - command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.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 - - # Subscribe to changes on a file - # @param [String] file_id - # The ID for the file in question. - # @param [Google::Apis::DriveV2::Channel] channel_object - # @param [Boolean] acknowledge_abuse - # Whether the user is acknowledging the risk of downloading known malware or - # other abusive files. - # @param [String] projection - # This parameter is deprecated and has no function. - # @param [String] revision_id - # Specifies the Revision ID that should be downloaded. Ignored unless alt=media - # is specified. - # @param [Boolean] update_viewed_date - # Whether to update the view date after successfully retrieving the file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::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_file(file_id, channel_object = nil, acknowledge_abuse: nil, projection: nil, revision_id: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'files/{fileId}/watch' - if download_dest.nil? - command = make_simple_command(:post, path, options) - else - command = make_download_command(:post, path, options) - command.download_dest = download_dest - end - command.request_representation = Google::Apis::DriveV2::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::DriveV2::Channel::Representation - command.response_class = Google::Apis::DriveV2::Channel - command.params['fileId'] = file_id unless file_id.nil? - command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil? - command.query['projection'] = projection unless projection.nil? - command.query['revisionId'] = revision_id unless revision_id.nil? - command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes a parent from a file. - # @param [String] file_id - # The ID of the file. - # @param [String] parent_id - # The ID of the parent. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/parents/{parentId}' - command = make_simple_command(:delete, path, options) - command.params['fileId'] = file_id unless file_id.nil? - command.params['parentId'] = parent_id unless parent_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 parent reference. - # @param [String] file_id - # The ID of the file. - # @param [String] parent_id - # The ID of the parent. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::ParentReference] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::ParentReference] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/parents/{parentId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::ParentReference::Representation - command.response_class = Google::Apis::DriveV2::ParentReference - command.params['fileId'] = file_id unless file_id.nil? - command.params['parentId'] = parent_id unless parent_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 - - # Adds a parent folder for a file. - # @param [String] file_id - # The ID of the file. - # @param [Google::Apis::DriveV2::ParentReference] parent_reference_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::DriveV2::ParentReference] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::ParentReference] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_parent(file_id, parent_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/parents' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::ParentReference::Representation - command.request_object = parent_reference_object - command.response_representation = Google::Apis::DriveV2::ParentReference::Representation - command.response_class = Google::Apis::DriveV2::ParentReference - command.params['fileId'] = file_id unless file_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 a file's parents. - # @param [String] file_id - # The ID of the file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::ParentList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::ParentList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/parents' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::ParentList::Representation - command.response_class = Google::Apis::DriveV2::ParentList - command.params['fileId'] = file_id unless file_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 a permission from a file. - # @param [String] file_id - # The ID for the file. - # @param [String] permission_id - # The ID for the permission. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/permissions/{permissionId}' - command = make_simple_command(:delete, path, options) - command.params['fileId'] = file_id unless file_id.nil? - command.params['permissionId'] = permission_id unless permission_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 permission by ID. - # @param [String] file_id - # The ID for the file. - # @param [String] permission_id - # The ID for the permission. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Permission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Permission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/permissions/{permissionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::Permission::Representation - command.response_class = Google::Apis::DriveV2::Permission - command.params['fileId'] = file_id unless file_id.nil? - command.params['permissionId'] = permission_id unless permission_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 permission ID for an email address. - # @param [String] email - # The email address for which to return a permission 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::DriveV2::PermissionId] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::PermissionId] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'permissionIds/{email}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::PermissionId::Representation - command.response_class = Google::Apis::DriveV2::PermissionId - command.params['email'] = email unless email.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 permission for a file. - # @param [String] file_id - # The ID for the file. - # @param [Google::Apis::DriveV2::Permission] permission_object - # @param [String] email_message - # A custom message to include in notification emails. - # @param [Boolean] send_notification_emails - # Whether to send notification emails when sharing to users or groups. This - # parameter is ignored and an email is sent if the role is owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Permission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Permission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(file_id, permission_object = nil, email_message: nil, send_notification_emails: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/permissions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::Permission::Representation - command.request_object = permission_object - command.response_representation = Google::Apis::DriveV2::Permission::Representation - command.response_class = Google::Apis::DriveV2::Permission - command.params['fileId'] = file_id unless file_id.nil? - command.query['emailMessage'] = email_message unless email_message.nil? - command.query['sendNotificationEmails'] = send_notification_emails unless send_notification_emails.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 a file's permissions. - # @param [String] file_id - # The ID for the file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::PermissionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::PermissionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permissions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::PermissionList::Representation - command.response_class = Google::Apis::DriveV2::PermissionList - command.params['fileId'] = file_id unless file_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a permission. This method supports patch semantics. - # @param [String] file_id - # The ID for the file. - # @param [String] permission_id - # The ID for the permission. - # @param [Google::Apis::DriveV2::Permission] permission_object - # @param [Boolean] transfer_ownership - # Whether changing a role to 'owner' downgrades the current owners to writers. - # Does nothing if the specified role is not 'owner'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Permission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Permission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/permissions/{permissionId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DriveV2::Permission::Representation - command.request_object = permission_object - command.response_representation = Google::Apis::DriveV2::Permission::Representation - command.response_class = Google::Apis::DriveV2::Permission - command.params['fileId'] = file_id unless file_id.nil? - command.params['permissionId'] = permission_id unless permission_id.nil? - command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.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 permission. - # @param [String] file_id - # The ID for the file. - # @param [String] permission_id - # The ID for the permission. - # @param [Google::Apis::DriveV2::Permission] permission_object - # @param [Boolean] transfer_ownership - # Whether changing a role to 'owner' downgrades the current owners to writers. - # Does nothing if the specified role is not 'owner'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Permission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Permission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/permissions/{permissionId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DriveV2::Permission::Representation - command.request_object = permission_object - command.response_representation = Google::Apis::DriveV2::Permission::Representation - command.response_class = Google::Apis::DriveV2::Permission - command.params['fileId'] = file_id unless file_id.nil? - command.params['permissionId'] = permission_id unless permission_id.nil? - command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.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 property. - # @param [String] file_id - # The ID of the file. - # @param [String] property_key - # The key of the property. - # @param [String] visibility - # The visibility of the property. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/properties/{propertyKey}' - command = make_simple_command(:delete, path, options) - command.params['fileId'] = file_id unless file_id.nil? - command.params['propertyKey'] = property_key unless property_key.nil? - command.query['visibility'] = visibility unless visibility.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 property by its key. - # @param [String] file_id - # The ID of the file. - # @param [String] property_key - # The key of the property. - # @param [String] visibility - # The visibility of the property. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Property] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Property] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/properties/{propertyKey}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::Property::Representation - command.response_class = Google::Apis::DriveV2::Property - command.params['fileId'] = file_id unless file_id.nil? - command.params['propertyKey'] = property_key unless property_key.nil? - command.query['visibility'] = visibility unless visibility.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Adds a property to a file. - # @param [String] file_id - # The ID of the file. - # @param [Google::Apis::DriveV2::Property] property_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::DriveV2::Property] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Property] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/properties' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::Property::Representation - command.request_object = property_object - command.response_representation = Google::Apis::DriveV2::Property::Representation - command.response_class = Google::Apis::DriveV2::Property - command.params['fileId'] = file_id unless file_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 a file's properties. - # @param [String] file_id - # The ID of the file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::PropertyList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::PropertyList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/properties' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::PropertyList::Representation - command.response_class = Google::Apis::DriveV2::PropertyList - command.params['fileId'] = file_id unless file_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a property. This method supports patch semantics. - # @param [String] file_id - # The ID of the file. - # @param [String] property_key - # The key of the property. - # @param [Google::Apis::DriveV2::Property] property_object - # @param [String] visibility - # The visibility of the property. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Property] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Property] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/properties/{propertyKey}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DriveV2::Property::Representation - command.request_object = property_object - command.response_representation = Google::Apis::DriveV2::Property::Representation - command.response_class = Google::Apis::DriveV2::Property - command.params['fileId'] = file_id unless file_id.nil? - command.params['propertyKey'] = property_key unless property_key.nil? - command.query['visibility'] = visibility unless visibility.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 property. - # @param [String] file_id - # The ID of the file. - # @param [String] property_key - # The key of the property. - # @param [Google::Apis::DriveV2::Property] property_object - # @param [String] visibility - # The visibility of the property. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Property] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Property] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/properties/{propertyKey}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DriveV2::Property::Representation - command.request_object = property_object - command.response_representation = Google::Apis::DriveV2::Property::Representation - command.response_class = Google::Apis::DriveV2::Property - command.params['fileId'] = file_id unless file_id.nil? - command.params['propertyKey'] = property_key unless property_key.nil? - command.query['visibility'] = visibility unless visibility.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 - - # Exports the contents of the Realtime API data model associated with this file - # as JSON. - # @param [String] file_id - # The ID of the file that the Realtime API data model is associated with. - # @param [Fixnum] revision - # The revision of the Realtime API data model to export. Revisions start at 1 ( - # the initial empty data model) and are incremented with each change. If this - # parameter is excluded, the most recent data model 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 [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 [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_realtime(file_id, revision: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'files/{fileId}/realtime' - 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.params['fileId'] = file_id unless file_id.nil? - command.query['revision'] = revision unless revision.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 - - # Overwrites the Realtime API data model associated with this file with the - # provided JSON data model. - # @param [String] file_id - # The ID of the file that the Realtime API data model is associated with. - # @param [String] base_revision - # The revision of the model to diff the uploaded model against. If set, the - # uploaded model is diffed against the provided revision and those differences - # are merged with any changes made to the model after the provided revision. If - # not set, the uploaded model replaces the current model on 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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @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 update_realtime(file_id, base_revision: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'files/{fileId}/realtime' - if upload_source.nil? - command = make_simple_command(:put, path, options) - else - command = make_upload_command(:put, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.params['fileId'] = file_id unless file_id.nil? - command.query['baseRevision'] = base_revision unless base_revision.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 reply. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [String] reply_id - # The ID of the reply. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}/replies/{replyId}' - command = make_simple_command(:delete, path, options) - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.params['replyId'] = reply_id unless reply_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 reply. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [String] reply_id - # The ID of the reply. - # @param [Boolean] include_deleted - # If set, this will succeed when retrieving a deleted reply. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::CommentReply] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::CommentReply] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}/replies/{replyId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::CommentReply::Representation - command.response_class = Google::Apis::DriveV2::CommentReply - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.params['replyId'] = reply_id unless reply_id.nil? - command.query['includeDeleted'] = include_deleted unless include_deleted.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 new reply to the given comment. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [Google::Apis::DriveV2::CommentReply] comment_reply_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::DriveV2::CommentReply] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::CommentReply] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}/replies' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::DriveV2::CommentReply::Representation - command.request_object = comment_reply_object - command.response_representation = Google::Apis::DriveV2::CommentReply::Representation - command.response_class = Google::Apis::DriveV2::CommentReply - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all of the replies to a comment. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [Boolean] include_deleted - # If set, all replies, including deleted replies (with content stripped) will be - # returned. - # @param [Fixnum] max_results - # The maximum number of replies to include in the response, used for paging. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, 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::DriveV2::CommentReplyList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::CommentReplyList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}/replies' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::CommentReplyList::Representation - command.response_class = Google::Apis::DriveV2::CommentReplyList - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['includeDeleted'] = include_deleted unless include_deleted.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 - - # Updates an existing reply. This method supports patch semantics. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [String] reply_id - # The ID of the reply. - # @param [Google::Apis::DriveV2::CommentReply] comment_reply_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::DriveV2::CommentReply] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::CommentReply] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}/replies/{replyId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DriveV2::CommentReply::Representation - command.request_object = comment_reply_object - command.response_representation = Google::Apis::DriveV2::CommentReply::Representation - command.response_class = Google::Apis::DriveV2::CommentReply - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.params['replyId'] = reply_id unless reply_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 reply. - # @param [String] file_id - # The ID of the file. - # @param [String] comment_id - # The ID of the comment. - # @param [String] reply_id - # The ID of the reply. - # @param [Google::Apis::DriveV2::CommentReply] comment_reply_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::DriveV2::CommentReply] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::CommentReply] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/comments/{commentId}/replies/{replyId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DriveV2::CommentReply::Representation - command.request_object = comment_reply_object - command.response_representation = Google::Apis::DriveV2::CommentReply::Representation - command.response_class = Google::Apis::DriveV2::CommentReply - command.params['fileId'] = file_id unless file_id.nil? - command.params['commentId'] = comment_id unless comment_id.nil? - command.params['replyId'] = reply_id unless reply_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 - - # Removes a revision. - # @param [String] file_id - # The ID of the file. - # @param [String] revision_id - # The ID of the revision. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/revisions/{revisionId}' - command = make_simple_command(:delete, path, options) - command.params['fileId'] = file_id unless file_id.nil? - command.params['revisionId'] = revision_id unless revision_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 revision. - # @param [String] file_id - # The ID of the file. - # @param [String] revision_id - # The ID of the revision. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::Revision] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Revision] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/revisions/{revisionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::Revision::Representation - command.response_class = Google::Apis::DriveV2::Revision - command.params['fileId'] = file_id unless file_id.nil? - command.params['revisionId'] = revision_id unless revision_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 a file's revisions. - # @param [String] file_id - # The ID of the file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::DriveV2::RevisionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::RevisionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_revisions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/revisions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::DriveV2::RevisionList::Representation - command.response_class = Google::Apis::DriveV2::RevisionList - command.params['fileId'] = file_id unless file_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a revision. This method supports patch semantics. - # @param [String] file_id - # The ID for the file. - # @param [String] revision_id - # The ID for the revision. - # @param [Google::Apis::DriveV2::Revision] revision_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::DriveV2::Revision] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Revision] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/revisions/{revisionId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::DriveV2::Revision::Representation - command.request_object = revision_object - command.response_representation = Google::Apis::DriveV2::Revision::Representation - command.response_class = Google::Apis::DriveV2::Revision - command.params['fileId'] = file_id unless file_id.nil? - command.params['revisionId'] = revision_id unless revision_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a revision. - # @param [String] file_id - # The ID for the file. - # @param [String] revision_id - # The ID for the revision. - # @param [Google::Apis::DriveV2::Revision] revision_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::DriveV2::Revision] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DriveV2::Revision] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'files/{fileId}/revisions/{revisionId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::DriveV2::Revision::Representation - command.request_object = revision_object - command.response_representation = Google::Apis::DriveV2::Revision::Representation - command.response_class = Google::Apis::DriveV2::Revision - command.params['fileId'] = file_id unless file_id.nil? - command.params['revisionId'] = revision_id unless revision_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 diff --git a/generated/google/apis/fitness_v1.rb b/generated/google/apis/fitness_v1.rb deleted file mode 100644 index 3c4eb1c5b..000000000 --- a/generated/google/apis/fitness_v1.rb +++ /dev/null @@ -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/fitness_v1/service.rb' -require 'google/apis/fitness_v1/classes.rb' -require 'google/apis/fitness_v1/representations.rb' - -module Google - module Apis - # Fitness - # - # Google Fit API - # - # @see https://developers.google.com/fit/rest/ - module FitnessV1 - VERSION = 'V1' - REVISION = '20150527' - - # View your activity information in Google Fit - AUTH_FITNESS_ACTIVITY_READ = 'https://www.googleapis.com/auth/fitness.activity.read' - - # View and store your activity information in Google Fit - AUTH_FITNESS_ACTIVITY_WRITE = 'https://www.googleapis.com/auth/fitness.activity.write' - - # View body sensor information in Google Fit - AUTH_FITNESS_BODY_READ = 'https://www.googleapis.com/auth/fitness.body.read' - - # View and store body sensor data in Google Fit - AUTH_FITNESS_BODY_WRITE = 'https://www.googleapis.com/auth/fitness.body.write' - - # View your stored location data in Google Fit - AUTH_FITNESS_LOCATION_READ = 'https://www.googleapis.com/auth/fitness.location.read' - - # View and store your location data in Google Fit - AUTH_FITNESS_LOCATION_WRITE = 'https://www.googleapis.com/auth/fitness.location.write' - end - end -end diff --git a/generated/google/apis/fitness_v1/classes.rb b/generated/google/apis/fitness_v1/classes.rb deleted file mode 100644 index c5fb3794b..000000000 --- a/generated/google/apis/fitness_v1/classes.rb +++ /dev/null @@ -1,809 +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 FitnessV1 - - # - class AggregateBucket - include Google::Apis::Core::Hashable - - # available for Bucket.Type.ACTIVITY_TYPE, Bucket.Type.ACTIVITY_SEGMENT - # Corresponds to the JSON property `activity` - # @return [Fixnum] - attr_accessor :activity - - # There will be one dataset per datatype/datasource - # Corresponds to the JSON property `dataset` - # @return [Array] - attr_accessor :dataset - - # - # Corresponds to the JSON property `endTimeMillis` - # @return [String] - attr_accessor :end_time_millis - - # Sessions contain metadata, such as a user-friendly name and time interval - # information. - # Corresponds to the JSON property `session` - # @return [Google::Apis::FitnessV1::Session] - attr_accessor :session - - # - # Corresponds to the JSON property `startTimeMillis` - # @return [String] - attr_accessor :start_time_millis - - # The type of a bucket signifies how the data aggregation is performed in the - # bucket. - # 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) - @activity = args[:activity] unless args[:activity].nil? - @dataset = args[:dataset] unless args[:dataset].nil? - @end_time_millis = args[:end_time_millis] unless args[:end_time_millis].nil? - @session = args[:session] unless args[:session].nil? - @start_time_millis = args[:start_time_millis] unless args[:start_time_millis].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class AggregateBy - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `dataSourceId` - # @return [String] - attr_accessor :data_source_id - - # by dataype or by datasource - # Corresponds to the JSON property `dataTypeName` - # @return [String] - attr_accessor :data_type_name - - # - # Corresponds to the JSON property `outputDataSourceId` - # @return [String] - attr_accessor :output_data_source_id - - # - # Corresponds to the JSON property `outputDataTypeName` - # @return [String] - attr_accessor :output_data_type_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_source_id = args[:data_source_id] unless args[:data_source_id].nil? - @data_type_name = args[:data_type_name] unless args[:data_type_name].nil? - @output_data_source_id = args[:output_data_source_id] unless args[:output_data_source_id].nil? - @output_data_type_name = args[:output_data_type_name] unless args[:output_data_type_name].nil? - end - end - - # - class AggregateRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `aggregateBy` - # @return [Array] - attr_accessor :aggregate_by - - # - # Corresponds to the JSON property `bucketByActivitySegment` - # @return [Google::Apis::FitnessV1::BucketByActivity] - attr_accessor :bucket_by_activity_segment - - # - # Corresponds to the JSON property `bucketByActivityType` - # @return [Google::Apis::FitnessV1::BucketByActivity] - attr_accessor :bucket_by_activity_type - - # - # Corresponds to the JSON property `bucketBySession` - # @return [Google::Apis::FitnessV1::BucketBySession] - attr_accessor :bucket_by_session - - # apparently oneof is not supported by reduced_nano_proto - # Corresponds to the JSON property `bucketByTime` - # @return [Google::Apis::FitnessV1::BucketByTime] - attr_accessor :bucket_by_time - - # - # Corresponds to the JSON property `endTimeMillis` - # @return [String] - attr_accessor :end_time_millis - - # required time range - # Corresponds to the JSON property `startTimeMillis` - # @return [String] - attr_accessor :start_time_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aggregate_by = args[:aggregate_by] unless args[:aggregate_by].nil? - @bucket_by_activity_segment = args[:bucket_by_activity_segment] unless args[:bucket_by_activity_segment].nil? - @bucket_by_activity_type = args[:bucket_by_activity_type] unless args[:bucket_by_activity_type].nil? - @bucket_by_session = args[:bucket_by_session] unless args[:bucket_by_session].nil? - @bucket_by_time = args[:bucket_by_time] unless args[:bucket_by_time].nil? - @end_time_millis = args[:end_time_millis] unless args[:end_time_millis].nil? - @start_time_millis = args[:start_time_millis] unless args[:start_time_millis].nil? - end - end - - # - class AggregateResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `bucket` - # @return [Array] - attr_accessor :bucket - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket = args[:bucket] unless args[:bucket].nil? - end - end - - # See: google3/java/com/google/android/apps/heart/platform/api/Application.java - class Application - include Google::Apis::Core::Hashable - - # An optional URI that can be used to link back to the application. - # Corresponds to the JSON property `detailsUrl` - # @return [String] - attr_accessor :details_url - - # The name of this application. This is required for REST clients, but we do not - # enforce uniqueness of this name. It is provided as a matter of convenience for - # other developers who would like to identify which REST created an Application - # or Data Source. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Package name for this application. This is used as a unique identifier when - # created by Android applications, but cannot be specified by REST clients. REST - # clients will have their developer project number reflected into the Data - # Source data stream IDs, instead of the packageName. - # Corresponds to the JSON property `packageName` - # @return [String] - attr_accessor :package_name - - # Version of the application. You should update this field whenever the - # application changes in a way that affects the computation of the data. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details_url = args[:details_url] unless args[:details_url].nil? - @name = args[:name] unless args[:name].nil? - @package_name = args[:package_name] unless args[:package_name].nil? - @version = args[:version] unless args[:version].nil? - end - end - - # - class BucketByActivity - include Google::Apis::Core::Hashable - - # default activity stream will be used if not specified - # Corresponds to the JSON property `activityDataSourceId` - # @return [String] - attr_accessor :activity_data_source_id - - # Only activity segments of duration longer than this is used - # Corresponds to the JSON property `minDurationMillis` - # @return [String] - attr_accessor :min_duration_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @activity_data_source_id = args[:activity_data_source_id] unless args[:activity_data_source_id].nil? - @min_duration_millis = args[:min_duration_millis] unless args[:min_duration_millis].nil? - end - end - - # - class BucketBySession - include Google::Apis::Core::Hashable - - # Only sessions of duration longer than this is used - # Corresponds to the JSON property `minDurationMillis` - # @return [String] - attr_accessor :min_duration_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @min_duration_millis = args[:min_duration_millis] unless args[:min_duration_millis].nil? - end - end - - # - class BucketByTime - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `durationMillis` - # @return [String] - attr_accessor :duration_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @duration_millis = args[:duration_millis] unless args[:duration_millis].nil? - end - end - - # Represents a single data point, generated by a particular data source. A data - # point holds a value for each field, an end timestamp and an optional start - # time. The exact semantics of each of these attributes are specified in the - # documentation for the particular data type. - # A data point can represent an instantaneous measurement, reading or input - # observation, as well as averages or aggregates over a time interval. Check the - # data type documentation to determine which is the case for a particular data - # type. - # Data points always contain one value for each field of the data type. - class DataPoint - include Google::Apis::Core::Hashable - - # Used for version checking during transformation; that is, a datapoint can only - # replace another datapoint that has an older computation time stamp. - # Corresponds to the JSON property `computationTimeMillis` - # @return [String] - attr_accessor :computation_time_millis - - # The data type defining the format of the values in this data point. - # Corresponds to the JSON property `dataTypeName` - # @return [String] - attr_accessor :data_type_name - - # The end time of the interval represented by this data point, in nanoseconds - # since epoch. - # Corresponds to the JSON property `endTimeNanos` - # @return [String] - attr_accessor :end_time_nanos - - # Indicates the last time this data point was modified. Useful only in contexts - # where we are listing the data changes, rather than representing the current - # state of the data. - # Corresponds to the JSON property `modifiedTimeMillis` - # @return [String] - attr_accessor :modified_time_millis - - # If the data point is contained in a dataset for a derived data source, this - # field will be populated with the data source stream ID that created the data - # point originally. - # Corresponds to the JSON property `originDataSourceId` - # @return [String] - attr_accessor :origin_data_source_id - - # The raw timestamp from the original SensorEvent. - # Corresponds to the JSON property `rawTimestampNanos` - # @return [String] - attr_accessor :raw_timestamp_nanos - - # The start time of the interval represented by this data point, in nanoseconds - # since epoch. - # Corresponds to the JSON property `startTimeNanos` - # @return [String] - attr_accessor :start_time_nanos - - # Values of each data type field for the data point. It is expected that each - # value corresponding to a data type field will occur in the same order that the - # field is listed with in the data type specified in a data source. - # Only one of integer and floating point fields will be populated, depending on - # the format enum value within data source's type field. - # Corresponds to the JSON property `value` - # @return [Array] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @computation_time_millis = args[:computation_time_millis] unless args[:computation_time_millis].nil? - @data_type_name = args[:data_type_name] unless args[:data_type_name].nil? - @end_time_nanos = args[:end_time_nanos] unless args[:end_time_nanos].nil? - @modified_time_millis = args[:modified_time_millis] unless args[:modified_time_millis].nil? - @origin_data_source_id = args[:origin_data_source_id] unless args[:origin_data_source_id].nil? - @raw_timestamp_nanos = args[:raw_timestamp_nanos] unless args[:raw_timestamp_nanos].nil? - @start_time_nanos = args[:start_time_nanos] unless args[:start_time_nanos].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Definition of a unique source of sensor data. Data sources can expose raw data - # coming from hardware sensors on local or companion devices. They can also - # expose derived data, created by transforming or merging other data sources. - # Multiple data sources can exist for the same data type. Every data point - # inserted into or read from this service has an associated data source. - # The data source contains enough information to uniquely identify its data, - # including the hardware device and the application that collected and/or - # transformed the data. It also holds useful metadata, such as the hardware and - # application versions, and the device type. - # Each data source produces a unique stream of data, with a unique identifier. - # Not all changes to data source affect the stream identifier, so that data - # collected by updated versions of the same application/device can still be - # considered to belong to the same data stream. - class DataSource - include Google::Apis::Core::Hashable - - # See: google3/java/com/google/android/apps/heart/platform/api/Application.java - # Corresponds to the JSON property `application` - # @return [Google::Apis::FitnessV1::Application] - attr_accessor :application - - # A unique identifier for the data stream produced by this data source. The - # identifier includes: - # - # - The physical device's manufacturer, model, and serial number (UID). - # - The application's package name or name. Package name is used when the data - # source was created by an Android application. The developer project number is - # used when the data source was created by a REST client. - # - The data source's type. - # - The data source's stream name. Note that not all attributes of the data - # source are used as part of the stream identifier. In particular, the version - # of the hardware/the application isn't used. This allows us to preserve the - # same stream through version updates. This also means that two DataSource - # objects may represent the same data stream even if they're not equal. - # The exact format of the data stream ID created by an Android application is: - # type:dataType.name:application.packageName:device.manufacturer:device.model: - # device.uid:dataStreamName - # The exact format of the data stream ID created by a REST client is: type: - # dataType.name:developer project number:device.manufacturer:device.model:device. - # uid:dataStreamName - # When any of the optional fields that comprise of the data stream ID are blank, - # they will be omitted from the data stream ID. The minnimum viable data stream - # ID would be: type:dataType.name:developer project number - # Finally, the developer project number is obfuscated when read by any REST or - # Android client that did not create the data source. Only the data source - # creator will see the developer project number in clear and normal form. - # Corresponds to the JSON property `dataStreamId` - # @return [String] - attr_accessor :data_stream_id - - # The stream name uniquely identifies this particular data source among other - # data sources of the same type from the same underlying producer. Setting the - # stream name is optional, but should be done whenever an application exposes - # two streams for the same data type, or when a device has two equivalent - # sensors. - # Corresponds to the JSON property `dataStreamName` - # @return [String] - attr_accessor :data_stream_name - - # See: google3/java/com/google/android/apps/heart/platform/api/DataType.java - # Corresponds to the JSON property `dataType` - # @return [Google::Apis::FitnessV1::DataType] - attr_accessor :data_type - - # Representation of an integrated device (such as a phone or a wearable) that - # can hold sensors. Each sensor is exposed as a data source. - # The main purpose of the device information contained in this class is to - # identify the hardware of a particular data source. This can be useful in - # different ways, including: - # - Distinguishing two similar sensors on different devices (the step counter on - # two nexus 5 phones, for instance) - # - Display the source of data to the user (by using the device make / model) - # - Treat data differently depending on sensor type (accelerometers on a watch - # may give different patterns than those on a phone) - # - Build different analysis models for each device/version. - # Corresponds to the JSON property `device` - # @return [Google::Apis::FitnessV1::Device] - attr_accessor :device - - # An end-user visible name for this data source. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A constant describing the type of this data source. Indicates whether this - # data source produces raw or derived data. - # 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) - @application = args[:application] unless args[:application].nil? - @data_stream_id = args[:data_stream_id] unless args[:data_stream_id].nil? - @data_stream_name = args[:data_stream_name] unless args[:data_stream_name].nil? - @data_type = args[:data_type] unless args[:data_type].nil? - @device = args[:device] unless args[:device].nil? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # See: google3/java/com/google/android/apps/heart/platform/api/DataType.java - class DataType - include Google::Apis::Core::Hashable - - # A field represents one dimension of a data type. - # Corresponds to the JSON property `field` - # @return [Array] - attr_accessor :field - - # Each data type has a unique, namespaced, name. All data types in the com. - # google namespace are shared as part of the platform. - # 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) - @field = args[:field] unless args[:field].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # In case of multi-dimensional data (such as an accelerometer with x, y, and z - # axes) each field represents one dimension. Each data type field has a unique - # name which identifies it. The field also defines the format of the data (int, - # float, etc.). - # This message is only instantiated in code and not used for wire comms or - # stored in any way. - class DataTypeField - include Google::Apis::Core::Hashable - - # The different supported formats for each field in a data type. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Defines the name and format of data. Unlike data type names, field names are - # not namespaced, and only need to be unique within the data type. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # - # Corresponds to the JSON property `optional` - # @return [Boolean] - attr_accessor :optional - alias_method :optional?, :optional - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @format = args[:format] unless args[:format].nil? - @name = args[:name] unless args[:name].nil? - @optional = args[:optional] unless args[:optional].nil? - end - end - - # A dataset represents a projection container for data points. They do not carry - # any info of their own. Datasets represent a set of data points from a - # particular data source. A data point can be found in more than one dataset. - class Dataset - include Google::Apis::Core::Hashable - - # The data stream ID of the data source that created the points in this dataset. - # Corresponds to the JSON property `dataSourceId` - # @return [String] - attr_accessor :data_source_id - - # The largest end time of all data points in this possibly partial - # representation of the dataset. Time is in nanoseconds from epoch. This should - # also match the first part of the dataset identifier. - # Corresponds to the JSON property `maxEndTimeNs` - # @return [String] - attr_accessor :max_end_time_ns - - # The smallest start time of all data points in this possibly partial - # representation of the dataset. Time is in nanoseconds from epoch. This should - # also match the first part of the dataset identifier. - # Corresponds to the JSON property `minStartTimeNs` - # @return [String] - attr_accessor :min_start_time_ns - - # This token will be set when a dataset is received in response to a GET request - # and the dataset is too large to be included in a single response. Provide this - # value in a subsequent GET request to return the next page of data points - # within this dataset. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A partial list of data points contained in the dataset, ordered by largest - # endTimeNanos first. This list is considered complete when retrieving a small - # dataset and partial when patching a dataset or retrieving a dataset that is - # too large to include in a single response. - # Corresponds to the JSON property `point` - # @return [Array] - attr_accessor :point - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_source_id = args[:data_source_id] unless args[:data_source_id].nil? - @max_end_time_ns = args[:max_end_time_ns] unless args[:max_end_time_ns].nil? - @min_start_time_ns = args[:min_start_time_ns] unless args[:min_start_time_ns].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @point = args[:point] unless args[:point].nil? - end - end - - # Representation of an integrated device (such as a phone or a wearable) that - # can hold sensors. Each sensor is exposed as a data source. - # The main purpose of the device information contained in this class is to - # identify the hardware of a particular data source. This can be useful in - # different ways, including: - # - Distinguishing two similar sensors on different devices (the step counter on - # two nexus 5 phones, for instance) - # - Display the source of data to the user (by using the device make / model) - # - Treat data differently depending on sensor type (accelerometers on a watch - # may give different patterns than those on a phone) - # - Build different analysis models for each device/version. - class Device - include Google::Apis::Core::Hashable - - # Manufacturer of the product/hardware. - # Corresponds to the JSON property `manufacturer` - # @return [String] - attr_accessor :manufacturer - - # End-user visible model name for the device. - # Corresponds to the JSON property `model` - # @return [String] - attr_accessor :model - - # A constant representing the type of the device. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The serial number or other unique ID for the hardware. This field is - # obfuscated when read by any REST or Android client that did not create the - # data source. Only the data source creator will see the uid field in clear and - # normal form. - # Corresponds to the JSON property `uid` - # @return [String] - attr_accessor :uid - - # Version string for the device hardware/software. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @manufacturer = args[:manufacturer] unless args[:manufacturer].nil? - @model = args[:model] unless args[:model].nil? - @type = args[:type] unless args[:type].nil? - @uid = args[:uid] unless args[:uid].nil? - @version = args[:version] unless args[:version].nil? - end - end - - # - class ListDataSourcesResponse - include Google::Apis::Core::Hashable - - # A previously created data source. - # Corresponds to the JSON property `dataSource` - # @return [Array] - attr_accessor :data_source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_source = args[:data_source] unless args[:data_source].nil? - end - end - - # - class ListSessionsResponse - include Google::Apis::Core::Hashable - - # If includeDeleted is set to true in the request, this list will contain - # sessions deleted with original end times that are within the startTime and - # endTime frame. - # Corresponds to the JSON property `deletedSession` - # @return [Array] - attr_accessor :deleted_session - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Sessions with an end time that is between startTime and endTime of the request. - # Corresponds to the JSON property `session` - # @return [Array] - attr_accessor :session - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deleted_session = args[:deleted_session] unless args[:deleted_session].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @session = args[:session] unless args[:session].nil? - end - end - - # Sessions contain metadata, such as a user-friendly name and time interval - # information. - class Session - include Google::Apis::Core::Hashable - - # Session active time. While start_time_millis and end_time_millis define the - # full session time, the active time can be shorter and specified by - # active_time_millis. If the inactive time during the session is known, it - # should also be inserted via a com.google.activity.segment data point with a - # STILL activity value - # Corresponds to the JSON property `activeTimeMillis` - # @return [String] - attr_accessor :active_time_millis - - # The type of activity this session represents. - # Corresponds to the JSON property `activityType` - # @return [Fixnum] - attr_accessor :activity_type - - # See: google3/java/com/google/android/apps/heart/platform/api/Application.java - # Corresponds to the JSON property `application` - # @return [Google::Apis::FitnessV1::Application] - attr_accessor :application - - # A description for this session. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # An end time, in milliseconds since epoch, inclusive. - # Corresponds to the JSON property `endTimeMillis` - # @return [String] - attr_accessor :end_time_millis - - # A client-generated identifier that is unique across all sessions owned by this - # particular user. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A timestamp that indicates when the session was last modified. - # Corresponds to the JSON property `modifiedTimeMillis` - # @return [String] - attr_accessor :modified_time_millis - - # A human readable name of the session. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A start time, in milliseconds since epoch, inclusive. - # Corresponds to the JSON property `startTimeMillis` - # @return [String] - attr_accessor :start_time_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active_time_millis = args[:active_time_millis] unless args[:active_time_millis].nil? - @activity_type = args[:activity_type] unless args[:activity_type].nil? - @application = args[:application] unless args[:application].nil? - @description = args[:description] unless args[:description].nil? - @end_time_millis = args[:end_time_millis] unless args[:end_time_millis].nil? - @id = args[:id] unless args[:id].nil? - @modified_time_millis = args[:modified_time_millis] unless args[:modified_time_millis].nil? - @name = args[:name] unless args[:name].nil? - @start_time_millis = args[:start_time_millis] unless args[:start_time_millis].nil? - end - end - - # Holder object for the value of a single field in a data point. - # A field value has a particular format and is only ever set to one of an - # integer or a floating point value. - class Value - include Google::Apis::Core::Hashable - - # Floating point value. When this is set, intVal must not be set. - # Corresponds to the JSON property `fpVal` - # @return [Float] - attr_accessor :fp_val - - # Integer value. When this is set, fpVal must not be set. - # Corresponds to the JSON property `intVal` - # @return [Fixnum] - attr_accessor :int_val - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fp_val = args[:fp_val] unless args[:fp_val].nil? - @int_val = args[:int_val] unless args[:int_val].nil? - end - end - end - end -end diff --git a/generated/google/apis/fitness_v1/representations.rb b/generated/google/apis/fitness_v1/representations.rb deleted file mode 100644 index 4dd067a70..000000000 --- a/generated/google/apis/fitness_v1/representations.rb +++ /dev/null @@ -1,295 +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 FitnessV1 - - class AggregateBucket - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AggregateBy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AggregateRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AggregateResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Application - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BucketByActivity - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BucketBySession - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BucketByTime - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DataPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DataSource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DataType - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DataTypeField - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Dataset - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Device - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDataSourcesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSessionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Session - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Value - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AggregateBucket - class Representation < Google::Apis::Core::JsonRepresentation - property :activity, as: 'activity' - collection :dataset, as: 'dataset', class: Google::Apis::FitnessV1::Dataset, decorator: Google::Apis::FitnessV1::Dataset::Representation - - property :end_time_millis, as: 'endTimeMillis' - property :session, as: 'session', class: Google::Apis::FitnessV1::Session, decorator: Google::Apis::FitnessV1::Session::Representation - - property :start_time_millis, as: 'startTimeMillis' - property :type, as: 'type' - end - end - - # @private - class AggregateBy - class Representation < Google::Apis::Core::JsonRepresentation - property :data_source_id, as: 'dataSourceId' - property :data_type_name, as: 'dataTypeName' - property :output_data_source_id, as: 'outputDataSourceId' - property :output_data_type_name, as: 'outputDataTypeName' - end - end - - # @private - class AggregateRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :aggregate_by, as: 'aggregateBy', class: Google::Apis::FitnessV1::AggregateBy, decorator: Google::Apis::FitnessV1::AggregateBy::Representation - - property :bucket_by_activity_segment, as: 'bucketByActivitySegment', class: Google::Apis::FitnessV1::BucketByActivity, decorator: Google::Apis::FitnessV1::BucketByActivity::Representation - - property :bucket_by_activity_type, as: 'bucketByActivityType', class: Google::Apis::FitnessV1::BucketByActivity, decorator: Google::Apis::FitnessV1::BucketByActivity::Representation - - property :bucket_by_session, as: 'bucketBySession', class: Google::Apis::FitnessV1::BucketBySession, decorator: Google::Apis::FitnessV1::BucketBySession::Representation - - property :bucket_by_time, as: 'bucketByTime', class: Google::Apis::FitnessV1::BucketByTime, decorator: Google::Apis::FitnessV1::BucketByTime::Representation - - property :end_time_millis, as: 'endTimeMillis' - property :start_time_millis, as: 'startTimeMillis' - end - end - - # @private - class AggregateResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :bucket, as: 'bucket', class: Google::Apis::FitnessV1::AggregateBucket, decorator: Google::Apis::FitnessV1::AggregateBucket::Representation - - end - end - - # @private - class Application - class Representation < Google::Apis::Core::JsonRepresentation - property :details_url, as: 'detailsUrl' - property :name, as: 'name' - property :package_name, as: 'packageName' - property :version, as: 'version' - end - end - - # @private - class BucketByActivity - class Representation < Google::Apis::Core::JsonRepresentation - property :activity_data_source_id, as: 'activityDataSourceId' - property :min_duration_millis, as: 'minDurationMillis' - end - end - - # @private - class BucketBySession - class Representation < Google::Apis::Core::JsonRepresentation - property :min_duration_millis, as: 'minDurationMillis' - end - end - - # @private - class BucketByTime - class Representation < Google::Apis::Core::JsonRepresentation - property :duration_millis, as: 'durationMillis' - end - end - - # @private - class DataPoint - class Representation < Google::Apis::Core::JsonRepresentation - property :computation_time_millis, as: 'computationTimeMillis' - property :data_type_name, as: 'dataTypeName' - property :end_time_nanos, as: 'endTimeNanos' - property :modified_time_millis, as: 'modifiedTimeMillis' - property :origin_data_source_id, as: 'originDataSourceId' - property :raw_timestamp_nanos, as: 'rawTimestampNanos' - property :start_time_nanos, as: 'startTimeNanos' - collection :value, as: 'value', class: Google::Apis::FitnessV1::Value, decorator: Google::Apis::FitnessV1::Value::Representation - - end - end - - # @private - class DataSource - class Representation < Google::Apis::Core::JsonRepresentation - property :application, as: 'application', class: Google::Apis::FitnessV1::Application, decorator: Google::Apis::FitnessV1::Application::Representation - - property :data_stream_id, as: 'dataStreamId' - property :data_stream_name, as: 'dataStreamName' - property :data_type, as: 'dataType', class: Google::Apis::FitnessV1::DataType, decorator: Google::Apis::FitnessV1::DataType::Representation - - property :device, as: 'device', class: Google::Apis::FitnessV1::Device, decorator: Google::Apis::FitnessV1::Device::Representation - - property :name, as: 'name' - property :type, as: 'type' - end - end - - # @private - class DataType - class Representation < Google::Apis::Core::JsonRepresentation - collection :field, as: 'field', class: Google::Apis::FitnessV1::DataTypeField, decorator: Google::Apis::FitnessV1::DataTypeField::Representation - - property :name, as: 'name' - end - end - - # @private - class DataTypeField - class Representation < Google::Apis::Core::JsonRepresentation - property :format, as: 'format' - property :name, as: 'name' - property :optional, as: 'optional' - end - end - - # @private - class Dataset - class Representation < Google::Apis::Core::JsonRepresentation - property :data_source_id, as: 'dataSourceId' - property :max_end_time_ns, as: 'maxEndTimeNs' - property :min_start_time_ns, as: 'minStartTimeNs' - property :next_page_token, as: 'nextPageToken' - collection :point, as: 'point', class: Google::Apis::FitnessV1::DataPoint, decorator: Google::Apis::FitnessV1::DataPoint::Representation - - end - end - - # @private - class Device - class Representation < Google::Apis::Core::JsonRepresentation - property :manufacturer, as: 'manufacturer' - property :model, as: 'model' - property :type, as: 'type' - property :uid, as: 'uid' - property :version, as: 'version' - end - end - - # @private - class ListDataSourcesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :data_source, as: 'dataSource', class: Google::Apis::FitnessV1::DataSource, decorator: Google::Apis::FitnessV1::DataSource::Representation - - end - end - - # @private - class ListSessionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :deleted_session, as: 'deletedSession', class: Google::Apis::FitnessV1::Session, decorator: Google::Apis::FitnessV1::Session::Representation - - property :next_page_token, as: 'nextPageToken' - collection :session, as: 'session', class: Google::Apis::FitnessV1::Session, decorator: Google::Apis::FitnessV1::Session::Representation - - end - end - - # @private - class Session - class Representation < Google::Apis::Core::JsonRepresentation - property :active_time_millis, as: 'activeTimeMillis' - property :activity_type, as: 'activityType' - property :application, as: 'application', class: Google::Apis::FitnessV1::Application, decorator: Google::Apis::FitnessV1::Application::Representation - - property :description, as: 'description' - property :end_time_millis, as: 'endTimeMillis' - property :id, as: 'id' - property :modified_time_millis, as: 'modifiedTimeMillis' - property :name, as: 'name' - property :start_time_millis, as: 'startTimeMillis' - end - end - - # @private - class Value - class Representation < Google::Apis::Core::JsonRepresentation - property :fp_val, as: 'fpVal' - property :int_val, as: 'intVal' - end - end - end - end -end diff --git a/generated/google/apis/fitness_v1/service.rb b/generated/google/apis/fitness_v1/service.rb deleted file mode 100644 index 8ae5fe66e..000000000 --- a/generated/google/apis/fitness_v1/service.rb +++ /dev/null @@ -1,684 +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 FitnessV1 - # Fitness - # - # Google Fit API - # - # @example - # require 'google/apis/fitness_v1' - # - # Fitness = Google::Apis::FitnessV1 # Alias the module - # service = Fitness::FitnessService.new - # - # @see https://developers.google.com/fit/rest/ - class FitnessService < 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/', 'fitness/v1/users/') - end - - # Creates a new data source that is unique across all data sources belonging to - # this user. The data stream ID field can be omitted and will be generated by - # the server with the correct format. The data stream ID is an ordered - # combination of some fields from the data source. In addition to the data - # source fields reflected into the data source ID, the developer project number - # that is authenticated when creating the data source is included. This - # developer project number is obfuscated when read by any other developer - # reading public data types. - # @param [String] user_id - # Create the data source for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [Google::Apis::FitnessV1::DataSource] data_source_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::FitnessV1::DataSource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::DataSource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_data_source(user_id, data_source_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::FitnessV1::DataSource::Representation - command.request_object = data_source_object - command.response_representation = Google::Apis::FitnessV1::DataSource::Representation - command.response_class = Google::Apis::FitnessV1::DataSource - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete the data source if there are no datapoints associated with it - # @param [String] user_id - # Retrieve a data source for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] data_source_id - # The data stream ID of the data source 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::FitnessV1::DataSource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::DataSource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_user_data_source(user_id, data_source_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources/{dataSourceId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::FitnessV1::DataSource::Representation - command.response_class = Google::Apis::FitnessV1::DataSource - command.params['userId'] = user_id unless user_id.nil? - command.params['dataSourceId'] = data_source_id unless data_source_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a data source identified by a data stream ID. - # @param [String] user_id - # Retrieve a data source for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] data_source_id - # The data stream ID of the data source 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::FitnessV1::DataSource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::DataSource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_data_source(user_id, data_source_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources/{dataSourceId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FitnessV1::DataSource::Representation - command.response_class = Google::Apis::FitnessV1::DataSource - command.params['userId'] = user_id unless user_id.nil? - command.params['dataSourceId'] = data_source_id unless data_source_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 data sources that are visible to the developer, using the OAuth - # scopes provided. The list is not exhaustive: the user may have private data - # sources that are only visible to other developers or calls using other scopes. - # @param [String] user_id - # List data sources for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [Array, String] data_type_name - # The names of data types to include in the list. If not specified, all data - # 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::FitnessV1::ListDataSourcesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::ListDataSourcesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_data_sources(user_id, data_type_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FitnessV1::ListDataSourcesResponse::Representation - command.response_class = Google::Apis::FitnessV1::ListDataSourcesResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['dataTypeName'] = data_type_name unless data_type_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a given data source. It is an error to modify the data source's data - # stream ID, data type, type, stream name or device information apart from the - # device version. Changing these fields would require a new unique data stream - # ID and separate data source. - # Data sources are identified by their data stream ID. This method supports - # patch semantics. - # @param [String] user_id - # Update the data source for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] data_source_id - # The data stream ID of the data source to update. - # @param [Google::Apis::FitnessV1::DataSource] data_source_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::FitnessV1::DataSource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::DataSource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_data_source(user_id, data_source_id, data_source_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources/{dataSourceId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::FitnessV1::DataSource::Representation - command.request_object = data_source_object - command.response_representation = Google::Apis::FitnessV1::DataSource::Representation - command.response_class = Google::Apis::FitnessV1::DataSource - command.params['userId'] = user_id unless user_id.nil? - command.params['dataSourceId'] = data_source_id unless data_source_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a given data source. It is an error to modify the data source's data - # stream ID, data type, type, stream name or device information apart from the - # device version. Changing these fields would require a new unique data stream - # ID and separate data source. - # Data sources are identified by their data stream ID. - # @param [String] user_id - # Update the data source for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] data_source_id - # The data stream ID of the data source to update. - # @param [Google::Apis::FitnessV1::DataSource] data_source_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::FitnessV1::DataSource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::DataSource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_data_source(user_id, data_source_id, data_source_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources/{dataSourceId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::FitnessV1::DataSource::Representation - command.request_object = data_source_object - command.response_representation = Google::Apis::FitnessV1::DataSource::Representation - command.response_class = Google::Apis::FitnessV1::DataSource - command.params['userId'] = user_id unless user_id.nil? - command.params['dataSourceId'] = data_source_id unless data_source_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 - - # Performs an inclusive delete of all data points whose start and end times have - # any overlap with the time range specified by the dataset ID. For most data - # types, the entire data point will be deleted. For data types where the time - # span represents a consistent value (such as com.google.activity.segment), and - # a data point straddles either end point of the dataset, only the overlapping - # portion of the data point will be deleted. - # @param [String] user_id - # Delete a dataset for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] data_source_id - # The data stream ID of the data source that created the dataset. - # @param [String] dataset_id - # Dataset identifier that is a composite of the minimum data point start time - # and maximum data point end time represented as nanoseconds from the epoch. The - # ID is formatted like: "startTime-endTime" where startTime and endTime are 64 - # bit integers. - # @param [String] current_time_millis - # The client's current time in milliseconds since epoch. - # @param [String] modified_time_millis - # When the operation was performed on the client. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_user_data_source_dataset(user_id, data_source_id, dataset_id, current_time_millis: nil, modified_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}' - command = make_simple_command(:delete, path, options) - command.params['userId'] = user_id unless user_id.nil? - command.params['dataSourceId'] = data_source_id unless data_source_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.nil? - command.query['modifiedTimeMillis'] = modified_time_millis unless modified_time_millis.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a dataset containing all data points whose start and end times overlap - # with the specified range of the dataset minimum start time and maximum end - # time. Specifically, any data point whose start time is less than or equal to - # the dataset end time and whose end time is greater than or equal to the - # dataset start time. - # @param [String] user_id - # Retrieve a dataset for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] data_source_id - # The data stream ID of the data source that created the dataset. - # @param [String] dataset_id - # Dataset identifier that is a composite of the minimum data point start time - # and maximum data point end time represented as nanoseconds from the epoch. The - # ID is formatted like: "startTime-endTime" where startTime and endTime are 64 - # bit integers. - # @param [Fixnum] limit - # If specified, no more than this many data points will be included in the - # dataset. If the there are more data points in the dataset, nextPageToken will - # be set in the dataset response. - # @param [String] page_token - # The continuation token, which is used to page through large datasets. To get - # the next page of a dataset, set this parameter to the value of nextPageToken - # from the previous response. Each subsequent call will yield a partial dataset - # with data point end timestamps that are strictly smaller than those in the - # previous partial 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::FitnessV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_data_source_dataset(user_id, data_source_id, dataset_id, limit: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FitnessV1::Dataset::Representation - command.response_class = Google::Apis::FitnessV1::Dataset - command.params['userId'] = user_id unless user_id.nil? - command.params['dataSourceId'] = data_source_id unless data_source_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['limit'] = limit unless limit.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Adds data points to a dataset. The dataset need not be previously created. All - # points within the given dataset will be returned with subsquent calls to - # retrieve this dataset. Data points can belong to more than one dataset. This - # method does not use patch semantics. - # @param [String] user_id - # Patch a dataset for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] data_source_id - # The data stream ID of the data source that created the dataset. - # @param [String] dataset_id - # Dataset identifier that is a composite of the minimum data point start time - # and maximum data point end time represented as nanoseconds from the epoch. The - # ID is formatted like: "startTime-endTime" where startTime and endTime are 64 - # bit integers. - # @param [Google::Apis::FitnessV1::Dataset] dataset_object - # @param [String] current_time_millis - # The client's current time in milliseconds since epoch. Note that the - # minStartTimeNs and maxEndTimeNs properties in the request body are in - # nanoseconds instead of milliseconds. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FitnessV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_data_source_dataset(user_id, data_source_id, dataset_id, dataset_object = nil, current_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::FitnessV1::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::FitnessV1::Dataset::Representation - command.response_class = Google::Apis::FitnessV1::Dataset - command.params['userId'] = user_id unless user_id.nil? - command.params['dataSourceId'] = data_source_id unless data_source_id.nil? - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.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] user_id - # @param [Google::Apis::FitnessV1::AggregateRequest] aggregate_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::FitnessV1::AggregateResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::AggregateResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def aggregate(user_id, aggregate_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/dataset:aggregate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::FitnessV1::AggregateRequest::Representation - command.request_object = aggregate_request_object - command.response_representation = Google::Apis::FitnessV1::AggregateResponse::Representation - command.response_class = Google::Apis::FitnessV1::AggregateResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a session specified by the given session ID. - # @param [String] user_id - # Delete a session for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] session_id - # The ID of the session to be deleted. - # @param [String] current_time_millis - # The client's current 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 [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_user_session(user_id, session_id, current_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/sessions/{sessionId}' - command = make_simple_command(:delete, path, options) - command.params['userId'] = user_id unless user_id.nil? - command.params['sessionId'] = session_id unless session_id.nil? - command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.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 sessions previously created. - # @param [String] user_id - # List sessions for the person identified. Use me to indicate the authenticated - # user. Only me is supported at this time. - # @param [String] end_time - # An RFC3339 timestamp. Only sessions ending between the start and end times - # will be included in the response. - # @param [Boolean] include_deleted - # If true, deleted sessions will be returned. When set to true, sessions - # returned in this response will only have an ID and will not have any other - # fields. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # @param [String] start_time - # An RFC3339 timestamp. Only sessions ending between the start and end times - # will be included in the 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::FitnessV1::ListSessionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::ListSessionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_sessions(user_id, end_time: nil, include_deleted: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/sessions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FitnessV1::ListSessionsResponse::Representation - command.response_class = Google::Apis::FitnessV1::ListSessionsResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['endTime'] = end_time unless end_time.nil? - command.query['includeDeleted'] = include_deleted unless include_deleted.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 - - # Updates or insert a given session. - # @param [String] user_id - # Create sessions for the person identified. Use me to indicate the - # authenticated user. Only me is supported at this time. - # @param [String] session_id - # The ID of the session to be created. - # @param [Google::Apis::FitnessV1::Session] session_object - # @param [String] current_time_millis - # The client's current 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::FitnessV1::Session] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FitnessV1::Session] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_session(user_id, session_id, session_object = nil, current_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/sessions/{sessionId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::FitnessV1::Session::Representation - command.request_object = session_object - command.response_representation = Google::Apis::FitnessV1::Session::Representation - command.response_class = Google::Apis::FitnessV1::Session - command.params['userId'] = user_id unless user_id.nil? - command.params['sessionId'] = session_id unless session_id.nil? - command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.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 diff --git a/generated/google/apis/freebase_v1.rb b/generated/google/apis/freebase_v1.rb deleted file mode 100644 index 9b35b5166..000000000 --- a/generated/google/apis/freebase_v1.rb +++ /dev/null @@ -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/freebase_v1/service.rb' -require 'google/apis/freebase_v1/classes.rb' -require 'google/apis/freebase_v1/representations.rb' - -module Google - module Apis - # Freebase Search - # - # Find Freebase entities using textual queries and other constraints. - # - # @see https://developers.google.com/freebase/ - module FreebaseV1 - VERSION = 'V1' - REVISION = '20150330' - end - end -end \ No newline at end of file diff --git a/generated/google/apis/freebase_v1/classes.rb b/generated/google/apis/freebase_v1/classes.rb deleted file mode 100644 index 1c49f55f2..000000000 --- a/generated/google/apis/freebase_v1/classes.rb +++ /dev/null @@ -1,167 +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 FreebaseV1 - - # - class ReconcileCandidate - include Google::Apis::Core::Hashable - - # Percentage likelihood that this candidate is the unique matching entity. Value - # will be between 0.0 and 1.0 - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # Language code that candidate and notable names are displayed in. - # Corresponds to the JSON property `lang` - # @return [String] - attr_accessor :lang - - # Freebase MID of candidate entity. - # Corresponds to the JSON property `mid` - # @return [String] - attr_accessor :mid - - # Freebase name of matching entity in specified language. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Type or profession the candidate is notable for. - # Corresponds to the JSON property `notable` - # @return [Google::Apis::FreebaseV1::ReconcileCandidate::Notable] - attr_accessor :notable - - def initialize(**args) - @confidence = args[:confidence] unless args[:confidence].nil? - @lang = args[:lang] unless args[:lang].nil? - @mid = args[:mid] unless args[:mid].nil? - @name = args[:name] unless args[:name].nil? - @notable = args[:notable] unless args[:notable].nil? - end - # Type or profession the candidate is notable for. - class Notable - include Google::Apis::Core::Hashable - - # MID of notable category. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Name of notable category in specified language. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - end - end - end - - # - class ReconcileGet - include Google::Apis::Core::Hashable - - # If filled, then the listed candidates are potential matches, and such should - # be evaluated by a more discerning algorithm or human. The matches are ordered - # by confidence. - # Corresponds to the JSON property `candidate` - # @return [Array] - attr_accessor :candidate - - # Server costs for reconciling. - # Corresponds to the JSON property `costs` - # @return [Google::Apis::FreebaseV1::ReconcileGet::Costs] - attr_accessor :costs - - # If filled, this entity is guaranteed to match at requested confidence - # probability (default 99%). - # Corresponds to the JSON property `match` - # @return [Google::Apis::FreebaseV1::ReconcileCandidate] - attr_accessor :match - - # If filled, then there were recoverable problems that affected the request. For - # example, some of the properties were ignored because they either are not valid - # Freebase predicates or are not indexed for reconciliation. The candidates - # returned should be considered valid results, with the caveat that sections of - # the request were ignored as specified by the warning text. - # Corresponds to the JSON property `warning` - # @return [Array] - attr_accessor :warning - - def initialize(**args) - @candidate = args[:candidate] unless args[:candidate].nil? - @costs = args[:costs] unless args[:costs].nil? - @match = args[:match] unless args[:match].nil? - @warning = args[:warning] unless args[:warning].nil? - end - # Server costs for reconciling. - class Costs - include Google::Apis::Core::Hashable - - # Total number of hits found. - # Corresponds to the JSON property `hits` - # @return [Fixnum] - attr_accessor :hits - - # Total milliseconds spent. - # Corresponds to the JSON property `ms` - # @return [Fixnum] - attr_accessor :ms - - def initialize(**args) - @hits = args[:hits] unless args[:hits].nil? - @ms = args[:ms] unless args[:ms].nil? - end - end - # - class Warning - include Google::Apis::Core::Hashable - - # Location of warning in the request e.g. invalid predicate. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # Warning message to display to the user. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # Code for identifying classes of warnings. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - @location = args[:location] unless args[:location].nil? - @message = args[:message] unless args[:message].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - end - end - end -end diff --git a/generated/google/apis/freebase_v1/representations.rb b/generated/google/apis/freebase_v1/representations.rb deleted file mode 100644 index 1369162c0..000000000 --- a/generated/google/apis/freebase_v1/representations.rb +++ /dev/null @@ -1,59 +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 FreebaseV1 - class ReconcileCandidateRepresentation < Google::Apis::Core::JsonRepresentation; end - class ReconcileGetRepresentation < Google::Apis::Core::JsonRepresentation; end - - # @private - class ReconcileCandidateRepresentation < Google::Apis::Core::JsonRepresentation - property :confidence, as: 'confidence' - property :lang, as: 'lang' - property :mid, as: 'mid' - property :name, as: 'name' - property :notable, as: 'notable', class: Google::Apis::FreebaseV1::ReconcileCandidate::Notable do - property :id, as: 'id' - property :name, as: 'name' - end - end - - # @private - class ReconcileGetRepresentation < Google::Apis::Core::JsonRepresentation - collection :candidate, as: 'candidate', class: Google::Apis::FreebaseV1::ReconcileCandidate, decorator: Google::Apis::FreebaseV1::ReconcileCandidateRepresentation - - - property :costs, as: 'costs', class: Google::Apis::FreebaseV1::ReconcileGet::Costs do - property :hits, as: 'hits' - property :ms, as: 'ms' - end - - property :match, as: 'match', class: Google::Apis::FreebaseV1::ReconcileCandidate, decorator: Google::Apis::FreebaseV1::ReconcileCandidateRepresentation - - collection :warning, as: 'warning', class: Google::Apis::FreebaseV1::ReconcileGet::Warning do - property :location, as: 'location' - property :message, as: 'message' - property :reason, as: 'reason' - end - end - end - end -end diff --git a/generated/google/apis/freebase_v1/service.rb b/generated/google/apis/freebase_v1/service.rb deleted file mode 100644 index 41dfb730b..000000000 --- a/generated/google/apis/freebase_v1/service.rb +++ /dev/null @@ -1,227 +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 FreebaseV1 - # Freebase Search - # - # Find Freebase entities using textual queries and other constraints. - # - # @example - # require 'google/apis/freebase_v1' - # - # Freebase = Google::Apis::FreebaseV1 # Alias the module - # service = Freebase::FreebaseService.new - # - # @see https://developers.google.com/freebase/ - class FreebaseService < 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/', 'freebase/v1/') - end - - # Reconcile entities to Freebase open data. - # @param [Float] confidence - # Required confidence for a candidate to match. Must be between .5 and 1.0 - # @param [Array, String] kind - # Classifications of entity e.g. type, category, title. - # @param [Array, String] lang - # Languages for names and values. First language is used for display. Default is - # 'en'. - # @param [Fixnum] limit - # Maximum number of candidates to return. - # @param [String] name - # Name of entity. - # @param [Array, String] prop - # Property values for entity formatted as - # : - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FreebaseV1::ReconcileGet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FreebaseV1::ReconcileGet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reconcile(confidence: nil, kind: nil, lang: nil, limit: nil, name: nil, prop: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reconcile' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FreebaseV1::ReconcileGetRepresentation - command.response_class = Google::Apis::FreebaseV1::ReconcileGet - command.query['confidence'] = confidence unless confidence.nil? - command.query['kind'] = kind unless kind.nil? - command.query['lang'] = lang unless lang.nil? - command.query['limit'] = limit unless limit.nil? - command.query['name'] = name unless name.nil? - command.query['prop'] = prop unless prop.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 - - # Search Freebase open data. - # @param [String] as_of_time - # A mql as_of_time value to use with mql_output queries. - # @param [String] callback - # JS method name for JSONP callbacks. - # @param [Fixnum] cursor - # The cursor value to use for the next page of results. - # @param [Array, String] domain - # Restrict to topics with this Freebase domain id. - # @param [String] encode - # The encoding of the response. You can use this parameter to enable html - # encoding. - # @param [Boolean] exact - # Query on exact name and keys only. - # @param [Array, String] filter - # A filter to apply to the query. - # @param [String] format - # Structural format of the json response. - # @param [String] help - # The keyword to request help on. - # @param [Boolean] indent - # Whether to indent the json results or not. - # @param [Array, String] lang - # The code of the language to run the query with. Default is 'en'. - # @param [Fixnum] limit - # Maximum number of results to return. - # @param [Array, String] mid - # A mid to use instead of a query. - # @param [String] mql_output - # The MQL query to run againist the results to extract more data. - # @param [String] output - # An output expression to request data from matches. - # @param [Boolean] prefixed - # Prefix match against names and aliases. - # @param [String] query - # Query term to search for. - # @param [String] scoring - # Relevance scoring algorithm to use. - # @param [String] spell - # Request 'did you mean' suggestions - # @param [Boolean] stemmed - # Query on stemmed names and aliases. May not be used with prefixed. - # @param [Array, String] type - # Restrict to topics with this Freebase type id. - # @param [Array, String] with - # A rule to match against. - # @param [Array, String] without - # A rule to not match against. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::Api::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 search(as_of_time: nil, callback: nil, cursor: nil, domain: nil, encode: nil, exact: nil, filter: nil, format: nil, help: nil, indent: nil, lang: nil, limit: nil, mid: nil, mql_output: nil, output: nil, prefixed: nil, query: nil, scoring: nil, spell: nil, stemmed: nil, type: nil, with: nil, without: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'search' - 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.query['as_of_time'] = as_of_time unless as_of_time.nil? - command.query['callback'] = callback unless callback.nil? - command.query['cursor'] = cursor unless cursor.nil? - command.query['domain'] = domain unless domain.nil? - command.query['encode'] = encode unless encode.nil? - command.query['exact'] = exact unless exact.nil? - command.query['filter'] = filter unless filter.nil? - command.query['format'] = format unless format.nil? - command.query['help'] = help unless help.nil? - command.query['indent'] = indent unless indent.nil? - command.query['lang'] = lang unless lang.nil? - command.query['limit'] = limit unless limit.nil? - command.query['mid'] = mid unless mid.nil? - command.query['mql_output'] = mql_output unless mql_output.nil? - command.query['output'] = output unless output.nil? - command.query['prefixed'] = prefixed unless prefixed.nil? - command.query['query'] = query unless query.nil? - command.query['scoring'] = scoring unless scoring.nil? - command.query['spell'] = spell unless spell.nil? - command.query['stemmed'] = stemmed unless stemmed.nil? - command.query['type'] = type unless type.nil? - command.query['with'] = with unless with.nil? - command.query['without'] = without unless without.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 diff --git a/generated/google/apis/fusiontables_v2.rb b/generated/google/apis/fusiontables_v2.rb deleted file mode 100644 index 762991fe2..000000000 --- a/generated/google/apis/fusiontables_v2.rb +++ /dev/null @@ -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/fusiontables_v2/service.rb' -require 'google/apis/fusiontables_v2/classes.rb' -require 'google/apis/fusiontables_v2/representations.rb' - -module Google - module Apis - # Fusion Tables API - # - # API for working with Fusion Tables data. - # - # @see https://developers.google.com/fusiontables - module FusiontablesV2 - VERSION = 'V2' - REVISION = '20150326' - - # Manage your Fusion Tables - AUTH_FUSIONTABLES = 'https://www.googleapis.com/auth/fusiontables' - - # View your Fusion Tables - AUTH_FUSIONTABLES_READONLY = 'https://www.googleapis.com/auth/fusiontables.readonly' - end - end -end diff --git a/generated/google/apis/fusiontables_v2/classes.rb b/generated/google/apis/fusiontables_v2/classes.rb deleted file mode 100644 index fe0284be7..000000000 --- a/generated/google/apis/fusiontables_v2/classes.rb +++ /dev/null @@ -1,1048 +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 FusiontablesV2 - - # Specifies the minimum and maximum values, the color, opacity, icon and weight - # of a bucket within a StyleSetting. - class Bucket - include Google::Apis::Core::Hashable - - # Color of line or the interior of a polygon in #RRGGBB format. - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # Icon name used for a point. - # Corresponds to the JSON property `icon` - # @return [String] - attr_accessor :icon - - # Maximum value in the selected column for a row to be styled according to the - # bucket color, opacity, icon, or weight. - # Corresponds to the JSON property `max` - # @return [Float] - attr_accessor :max - - # Minimum value in the selected column for a row to be styled according to the - # bucket color, opacity, icon, or weight. - # Corresponds to the JSON property `min` - # @return [Float] - attr_accessor :min - - # Opacity of the color: 0.0 (transparent) to 1.0 (opaque). - # Corresponds to the JSON property `opacity` - # @return [Float] - attr_accessor :opacity - - # Width of a line (in pixels). - # Corresponds to the JSON property `weight` - # @return [Fixnum] - attr_accessor :weight - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] unless args[:color].nil? - @icon = args[:icon] unless args[:icon].nil? - @max = args[:max] unless args[:max].nil? - @min = args[:min] unless args[:min].nil? - @opacity = args[:opacity] unless args[:opacity].nil? - @weight = args[:weight] unless args[:weight].nil? - end - end - - # Specifies the details of a column in a table. - class Column - include Google::Apis::Core::Hashable - - # Identifier of the base column. If present, this column is derived from the - # specified base column. - # Corresponds to the JSON property `baseColumn` - # @return [Google::Apis::FusiontablesV2::Column::BaseColumn] - attr_accessor :base_column - - # Identifier for the column. - # Corresponds to the JSON property `columnId` - # @return [Fixnum] - attr_accessor :column_id - - # JSON schema for interpreting JSON in this column. - # Corresponds to the JSON property `columnJsonSchema` - # @return [String] - attr_accessor :column_json_schema - - # JSON object containing custom column properties. - # Corresponds to the JSON property `columnPropertiesJson` - # @return [String] - attr_accessor :column_properties_json - - # Column description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Format pattern. - # Acceptable values are DT_DATE_MEDIUMe.g Dec 24, 2008 DT_DATE_SHORTfor example - # 12/24/08 DT_DATE_TIME_MEDIUMfor example Dec 24, 2008 8:30:45 PM - # DT_DATE_TIME_SHORTfor example 12/24/08 8:30 PM DT_DAY_MONTH_2_DIGIT_YEARfor - # example 24/12/08 DT_DAY_MONTH_2_DIGIT_YEAR_TIMEfor example 24/12/08 20:30 - # DT_DAY_MONTH_2_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/08 8:30 PM - # DT_DAY_MONTH_4_DIGIT_YEARfor example 24/12/2008 - # DT_DAY_MONTH_4_DIGIT_YEAR_TIMEfor example 24/12/2008 20:30 - # DT_DAY_MONTH_4_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/2008 8:30 PM - # DT_ISO_YEAR_MONTH_DAYfor example 2008-12-24 DT_ISO_YEAR_MONTH_DAY_TIMEfor - # example 2008-12-24 20:30:45 DT_MONTH_DAY_4_DIGIT_YEARfor example 12/24/2008 - # DT_TIME_LONGfor example 8:30:45 PM UTC-6 DT_TIME_MEDIUMfor example 8:30:45 PM - # DT_TIME_SHORTfor example 8:30 PM DT_YEAR_ONLYfor example 2008 - # HIGHLIGHT_UNTYPED_CELLSHighlight cell data that does not match the data type - # NONENo formatting (default) NUMBER_CURRENCYfor example $1234.56 - # NUMBER_DEFAULTfor example 1,234.56 NUMBER_INTEGERfor example 1235 - # NUMBER_NO_SEPARATORfor example 1234.56 NUMBER_PERCENTfor example 123,456% - # NUMBER_SCIENTIFICfor example 1E3 STRING_EIGHT_LINE_IMAGEDisplays thumbnail - # images as tall as eight lines of text STRING_FOUR_LINE_IMAGEDisplays thumbnail - # images as tall as four lines of text STRING_JSON_TEXTAllows JSON editing of - # text in UI STRING_LINKTreats cell as a link (must start with http:// or https:/ - # /) STRING_ONE_LINE_IMAGEDisplays thumbnail images as tall as one line of text - # STRING_VIDEO_OR_MAPDisplay a video or map thumbnail - # Corresponds to the JSON property `formatPattern` - # @return [String] - attr_accessor :format_pattern - - # Column graph predicate. - # Used to map table to graph data model (subject,predicate,object) - # See W3C Graph-based Data Model. - # Corresponds to the JSON property `graphPredicate` - # @return [String] - attr_accessor :graph_predicate - - # The kind of item this is. For a column, this is always fusiontables#column. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the column. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Type of the column. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # List of valid values used to validate data and supply a drop-down list of - # values in the web application. - # Corresponds to the JSON property `validValues` - # @return [Array] - attr_accessor :valid_values - - # If true, data entered via the web application is validated. - # Corresponds to the JSON property `validateData` - # @return [Boolean] - attr_accessor :validate_data - alias_method :validate_data?, :validate_data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @base_column = args[:base_column] unless args[:base_column].nil? - @column_id = args[:column_id] unless args[:column_id].nil? - @column_json_schema = args[:column_json_schema] unless args[:column_json_schema].nil? - @column_properties_json = args[:column_properties_json] unless args[:column_properties_json].nil? - @description = args[:description] unless args[:description].nil? - @format_pattern = args[:format_pattern] unless args[:format_pattern].nil? - @graph_predicate = args[:graph_predicate] unless args[:graph_predicate].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - @valid_values = args[:valid_values] unless args[:valid_values].nil? - @validate_data = args[:validate_data] unless args[:validate_data].nil? - end - - # Identifier of the base column. If present, this column is derived from the - # specified base column. - class BaseColumn - include Google::Apis::Core::Hashable - - # The id of the column in the base table from which this column is derived. - # Corresponds to the JSON property `columnId` - # @return [Fixnum] - attr_accessor :column_id - - # Offset to the entry in the list of base tables in the table definition. - # Corresponds to the JSON property `tableIndex` - # @return [Fixnum] - attr_accessor :table_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_id = args[:column_id] unless args[:column_id].nil? - @table_index = args[:table_index] unless args[:table_index].nil? - end - end - end - - # Represents a list of columns in a table. - class ColumnList - include Google::Apis::Core::Hashable - - # List of all requested columns. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For a column list, this is always fusiontables# - # columnList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. No token is displayed if - # there are no more pages left. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Total number of columns for the table. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # Represents a Geometry object. - class Geometry - include Google::Apis::Core::Hashable - - # The list of geometries in this geometry collection. - # Corresponds to the JSON property `geometries` - # @return [Array] - attr_accessor :geometries - - # - # Corresponds to the JSON property `geometry` - # @return [Object] - attr_accessor :geometry - - # Type: A collection of geometries. - # 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) - @geometries = args[:geometries] unless args[:geometries].nil? - @geometry = args[:geometry] unless args[:geometry].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents an import request. - class Import - include Google::Apis::Core::Hashable - - # The kind of item this is. For an import, this is always fusiontables#import. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of rows received from the import request. - # Corresponds to the JSON property `numRowsReceived` - # @return [String] - attr_accessor :num_rows_received - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @num_rows_received = args[:num_rows_received] unless args[:num_rows_received].nil? - end - end - - # Represents a line geometry. - class Line - include Google::Apis::Core::Hashable - - # The coordinates that define the line. - # Corresponds to the JSON property `coordinates` - # @return [Array>] - attr_accessor :coordinates - - # Type: A line geometry. - # 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) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a LineStyle within a StyleSetting - class LineStyle - include Google::Apis::Core::Hashable - - # Color of the line in #RRGGBB format. - # Corresponds to the JSON property `strokeColor` - # @return [String] - attr_accessor :stroke_color - - # Represents a StyleFunction within a StyleSetting - # Corresponds to the JSON property `strokeColorStyler` - # @return [Google::Apis::FusiontablesV2::StyleFunction] - attr_accessor :stroke_color_styler - - # Opacity of the line : 0.0 (transparent) to 1.0 (opaque). - # Corresponds to the JSON property `strokeOpacity` - # @return [Float] - attr_accessor :stroke_opacity - - # Width of the line in pixels. - # Corresponds to the JSON property `strokeWeight` - # @return [Fixnum] - attr_accessor :stroke_weight - - # Represents a StyleFunction within a StyleSetting - # Corresponds to the JSON property `strokeWeightStyler` - # @return [Google::Apis::FusiontablesV2::StyleFunction] - attr_accessor :stroke_weight_styler - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @stroke_color = args[:stroke_color] unless args[:stroke_color].nil? - @stroke_color_styler = args[:stroke_color_styler] unless args[:stroke_color_styler].nil? - @stroke_opacity = args[:stroke_opacity] unless args[:stroke_opacity].nil? - @stroke_weight = args[:stroke_weight] unless args[:stroke_weight].nil? - @stroke_weight_styler = args[:stroke_weight_styler] unless args[:stroke_weight_styler].nil? - end - end - - # Represents a point object. - class Point - include Google::Apis::Core::Hashable - - # The coordinates that define the point. - # Corresponds to the JSON property `coordinates` - # @return [Array] - attr_accessor :coordinates - - # Point: A point geometry. - # 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) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a PointStyle within a StyleSetting - class PointStyle - include Google::Apis::Core::Hashable - - # Name of the icon. Use values defined in http://www.google.com/fusiontables/ - # DataSource?dsrcid=308519 - # Corresponds to the JSON property `iconName` - # @return [String] - attr_accessor :icon_name - - # Represents a StyleFunction within a StyleSetting - # Corresponds to the JSON property `iconStyler` - # @return [Google::Apis::FusiontablesV2::StyleFunction] - attr_accessor :icon_styler - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @icon_name = args[:icon_name] unless args[:icon_name].nil? - @icon_styler = args[:icon_styler] unless args[:icon_styler].nil? - end - end - - # Represents a polygon object. - class Polygon - include Google::Apis::Core::Hashable - - # The coordinates that define the polygon. - # Corresponds to the JSON property `coordinates` - # @return [Array>>] - attr_accessor :coordinates - - # Type: A polygon geometry. - # 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) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a PolygonStyle within a StyleSetting - class PolygonStyle - include Google::Apis::Core::Hashable - - # Color of the interior of the polygon in #RRGGBB format. - # Corresponds to the JSON property `fillColor` - # @return [String] - attr_accessor :fill_color - - # Represents a StyleFunction within a StyleSetting - # Corresponds to the JSON property `fillColorStyler` - # @return [Google::Apis::FusiontablesV2::StyleFunction] - attr_accessor :fill_color_styler - - # Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 (opaque). - # Corresponds to the JSON property `fillOpacity` - # @return [Float] - attr_accessor :fill_opacity - - # Color of the polygon border in #RRGGBB format. - # Corresponds to the JSON property `strokeColor` - # @return [String] - attr_accessor :stroke_color - - # Represents a StyleFunction within a StyleSetting - # Corresponds to the JSON property `strokeColorStyler` - # @return [Google::Apis::FusiontablesV2::StyleFunction] - attr_accessor :stroke_color_styler - - # Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque). - # Corresponds to the JSON property `strokeOpacity` - # @return [Float] - attr_accessor :stroke_opacity - - # Width of the polyon border in pixels. - # Corresponds to the JSON property `strokeWeight` - # @return [Fixnum] - attr_accessor :stroke_weight - - # Represents a StyleFunction within a StyleSetting - # Corresponds to the JSON property `strokeWeightStyler` - # @return [Google::Apis::FusiontablesV2::StyleFunction] - attr_accessor :stroke_weight_styler - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fill_color = args[:fill_color] unless args[:fill_color].nil? - @fill_color_styler = args[:fill_color_styler] unless args[:fill_color_styler].nil? - @fill_opacity = args[:fill_opacity] unless args[:fill_opacity].nil? - @stroke_color = args[:stroke_color] unless args[:stroke_color].nil? - @stroke_color_styler = args[:stroke_color_styler] unless args[:stroke_color_styler].nil? - @stroke_opacity = args[:stroke_opacity] unless args[:stroke_opacity].nil? - @stroke_weight = args[:stroke_weight] unless args[:stroke_weight].nil? - @stroke_weight_styler = args[:stroke_weight_styler] unless args[:stroke_weight_styler].nil? - end - end - - # Represents a response to a SQL statement. - class Sqlresponse - include Google::Apis::Core::Hashable - - # Columns in the table. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # The kind of item this is. For responses to SQL queries, this is always - # fusiontables#sqlresponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The rows in the table. For each cell we print out whatever cell value (e.g., - # numeric, string) exists. Thus it is important that each cell contains only one - # value. - # Corresponds to the JSON property `rows` - # @return [Array>] - attr_accessor :rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @columns = args[:columns] unless args[:columns].nil? - @kind = args[:kind] unless args[:kind].nil? - @rows = args[:rows] unless args[:rows].nil? - end - end - - # Represents a StyleFunction within a StyleSetting - class StyleFunction - include Google::Apis::Core::Hashable - - # Bucket function that assigns a style based on the range a column value falls - # into. - # Corresponds to the JSON property `buckets` - # @return [Array] - attr_accessor :buckets - - # Name of the column whose value is used in the style. - # Corresponds to the JSON property `columnName` - # @return [String] - attr_accessor :column_name - - # Gradient function that interpolates a range of colors based on column value. - # Corresponds to the JSON property `gradient` - # @return [Google::Apis::FusiontablesV2::StyleFunction::Gradient] - attr_accessor :gradient - - # Stylers can be one of three kinds: "fusiontables#fromColumn if the column - # value is to be used as is, i.e., the column values can have colors in # - # RRGGBBAA format or integer line widths or icon names; fusiontables#gradient if - # the styling of the row is to be based on applying the gradient function on the - # column value; or fusiontables#buckets if the styling is to based on the bucket - # into which the the column value falls. - # 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) - @buckets = args[:buckets] unless args[:buckets].nil? - @column_name = args[:column_name] unless args[:column_name].nil? - @gradient = args[:gradient] unless args[:gradient].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # Gradient function that interpolates a range of colors based on column value. - class Gradient - include Google::Apis::Core::Hashable - - # Array with two or more colors. - # Corresponds to the JSON property `colors` - # @return [Array] - attr_accessor :colors - - # Higher-end of the interpolation range: rows with this value will be assigned - # to colors[n-1]. - # Corresponds to the JSON property `max` - # @return [Float] - attr_accessor :max - - # Lower-end of the interpolation range: rows with this value will be assigned to - # colors[0]. - # Corresponds to the JSON property `min` - # @return [Float] - attr_accessor :min - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @colors = args[:colors] unless args[:colors].nil? - @max = args[:max] unless args[:max].nil? - @min = args[:min] unless args[:min].nil? - end - - # - class Color - include Google::Apis::Core::Hashable - - # Color in #RRGGBB format. - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # Opacity of the color: 0.0 (transparent) to 1.0 (opaque). - # Corresponds to the JSON property `opacity` - # @return [Float] - attr_accessor :opacity - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] unless args[:color].nil? - @opacity = args[:opacity] unless args[:opacity].nil? - end - end - end - end - - # Represents a complete StyleSettings object. The primary key is a combination - # of the tableId and a styleId. - class StyleSetting - include Google::Apis::Core::Hashable - - # The kind of item this is. A StyleSetting contains the style definitions for - # points, lines, and polygons in a table. Since a table can have any one or all - # of them, a style definition can have point, line and polygon style definitions. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Represents a PointStyle within a StyleSetting - # Corresponds to the JSON property `markerOptions` - # @return [Google::Apis::FusiontablesV2::PointStyle] - attr_accessor :marker_options - - # Optional name for the style setting. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Represents a PolygonStyle within a StyleSetting - # Corresponds to the JSON property `polygonOptions` - # @return [Google::Apis::FusiontablesV2::PolygonStyle] - attr_accessor :polygon_options - - # Represents a LineStyle within a StyleSetting - # Corresponds to the JSON property `polylineOptions` - # @return [Google::Apis::FusiontablesV2::LineStyle] - attr_accessor :polyline_options - - # Identifier for the style setting (unique only within tables). - # Corresponds to the JSON property `styleId` - # @return [Fixnum] - attr_accessor :style_id - - # Identifier for the table. - # Corresponds to the JSON property `tableId` - # @return [String] - attr_accessor :table_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @marker_options = args[:marker_options] unless args[:marker_options].nil? - @name = args[:name] unless args[:name].nil? - @polygon_options = args[:polygon_options] unless args[:polygon_options].nil? - @polyline_options = args[:polyline_options] unless args[:polyline_options].nil? - @style_id = args[:style_id] unless args[:style_id].nil? - @table_id = args[:table_id] unless args[:table_id].nil? - end - end - - # Represents a list of styles for a given table. - class StyleSettingList - include Google::Apis::Core::Hashable - - # All requested style settings. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For a style list, this is always fusiontables# - # styleSettingList . - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. No token is displayed if - # there are no more styles left. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Total number of styles for the table. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # Represents a table. - class Table - include Google::Apis::Core::Hashable - - # Attribution assigned to the table. - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # Optional link for attribution. - # Corresponds to the JSON property `attributionLink` - # @return [String] - attr_accessor :attribution_link - - # Base table identifier if this table is a view or merged table. - # Corresponds to the JSON property `baseTableIds` - # @return [Array] - attr_accessor :base_table_ids - - # Default JSON schema for validating all JSON column properties. - # Corresponds to the JSON property `columnPropertiesJsonSchema` - # @return [String] - attr_accessor :column_properties_json_schema - - # Columns in the table. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # Description assigned to the table. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Variable for whether table is exportable. - # Corresponds to the JSON property `isExportable` - # @return [Boolean] - attr_accessor :is_exportable - alias_method :is_exportable?, :is_exportable - - # The kind of item this is. For a table, this is always fusiontables#table. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name assigned to a table. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # SQL that encodes the table definition for derived tables. - # Corresponds to the JSON property `sql` - # @return [String] - attr_accessor :sql - - # Encrypted unique alphanumeric identifier for the table. - # Corresponds to the JSON property `tableId` - # @return [String] - attr_accessor :table_id - - # JSON object containing custom table properties. - # Corresponds to the JSON property `tablePropertiesJson` - # @return [String] - attr_accessor :table_properties_json - - # JSON schema for validating the JSON table properties. - # Corresponds to the JSON property `tablePropertiesJsonSchema` - # @return [String] - attr_accessor :table_properties_json_schema - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attribution = args[:attribution] unless args[:attribution].nil? - @attribution_link = args[:attribution_link] unless args[:attribution_link].nil? - @base_table_ids = args[:base_table_ids] unless args[:base_table_ids].nil? - @column_properties_json_schema = args[:column_properties_json_schema] unless args[:column_properties_json_schema].nil? - @columns = args[:columns] unless args[:columns].nil? - @description = args[:description] unless args[:description].nil? - @is_exportable = args[:is_exportable] unless args[:is_exportable].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @sql = args[:sql] unless args[:sql].nil? - @table_id = args[:table_id] unless args[:table_id].nil? - @table_properties_json = args[:table_properties_json] unless args[:table_properties_json].nil? - @table_properties_json_schema = args[:table_properties_json_schema] unless args[:table_properties_json_schema].nil? - end - end - - # Represents a list of tables. - class TableList - include Google::Apis::Core::Hashable - - # List of all requested tables. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For table list, this is always fusiontables# - # tableList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. No token is displayed if - # there are no more pages left. - # 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 - - # A background task on a table, initiated for time- or resource-consuming - # operations such as changing column types or deleting all rows. - class Task - include Google::Apis::Core::Hashable - - # Type of the resource. This is always "fusiontables#task". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Task percentage completion. - # Corresponds to the JSON property `progress` - # @return [String] - attr_accessor :progress - - # false while the table is busy with some other task. true if this background - # task is currently running. - # Corresponds to the JSON property `started` - # @return [Boolean] - attr_accessor :started - alias_method :started?, :started - - # Identifier for the task. - # Corresponds to the JSON property `taskId` - # @return [String] - attr_accessor :task_id - - # Type of background task. - # 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) - @kind = args[:kind] unless args[:kind].nil? - @progress = args[:progress] unless args[:progress].nil? - @started = args[:started] unless args[:started].nil? - @task_id = args[:task_id] unless args[:task_id].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a list of tasks for a table. - class TaskList - include Google::Apis::Core::Hashable - - # List of all requested tasks. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of the resource. This is always "fusiontables#taskList". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. No token is displayed if - # there are no more pages left. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Total number of tasks for the table. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # Represents the contents of InfoWindow templates. - class Template - include Google::Apis::Core::Hashable - - # List of columns from which the template is to be automatically constructed. - # Only one of body or automaticColumns can be specified. - # Corresponds to the JSON property `automaticColumnNames` - # @return [Array] - attr_accessor :automatic_column_names - - # Body of the template. It contains HTML with `column_name` to insert values - # from a particular column. The body is sanitized to remove certain tags, e.g., - # script. Only one of body or automaticColumns can be specified. - # Corresponds to the JSON property `body` - # @return [String] - attr_accessor :body - - # The kind of item this is. For a template, this is always fusiontables#template. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Optional name assigned to a template. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Identifier for the table for which the template is defined. - # Corresponds to the JSON property `tableId` - # @return [String] - attr_accessor :table_id - - # Identifier for the template, unique within the context of a particular table. - # Corresponds to the JSON property `templateId` - # @return [Fixnum] - attr_accessor :template_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @automatic_column_names = args[:automatic_column_names] unless args[:automatic_column_names].nil? - @body = args[:body] unless args[:body].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @table_id = args[:table_id] unless args[:table_id].nil? - @template_id = args[:template_id] unless args[:template_id].nil? - end - end - - # Represents a list of templates for a given table. - class TemplateList - include Google::Apis::Core::Hashable - - # List of all requested templates. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For a template list, this is always fusiontables# - # templateList . - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. No token is displayed if - # there are no more pages left. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Total number of templates for the table. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - end -end diff --git a/generated/google/apis/fusiontables_v2/representations.rb b/generated/google/apis/fusiontables_v2/representations.rb deleted file mode 100644 index 3a1eb512e..000000000 --- a/generated/google/apis/fusiontables_v2/representations.rb +++ /dev/null @@ -1,409 +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 FusiontablesV2 - - class Bucket - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Column - class Representation < Google::Apis::Core::JsonRepresentation; end - - class BaseColumn - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ColumnList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Geometry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Import - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Line - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LineStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Point - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PointStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Polygon - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PolygonStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Sqlresponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class StyleFunction - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Gradient - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Color - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class StyleSetting - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class StyleSettingList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Table - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TableList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Task - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TaskList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Template - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TemplateList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Bucket - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color' - property :icon, as: 'icon' - property :max, as: 'max' - property :min, as: 'min' - property :opacity, as: 'opacity' - property :weight, as: 'weight' - end - end - - # @private - class Column - class Representation < Google::Apis::Core::JsonRepresentation - property :base_column, as: 'baseColumn', class: Google::Apis::FusiontablesV2::Column::BaseColumn, decorator: Google::Apis::FusiontablesV2::Column::BaseColumn::Representation - - property :column_id, as: 'columnId' - property :column_json_schema, as: 'columnJsonSchema' - property :column_properties_json, as: 'columnPropertiesJson' - property :description, as: 'description' - property :format_pattern, as: 'formatPattern' - property :graph_predicate, as: 'graphPredicate' - property :kind, as: 'kind' - property :name, as: 'name' - property :type, as: 'type' - collection :valid_values, as: 'validValues' - property :validate_data, as: 'validateData' - end - - # @private - class BaseColumn - class Representation < Google::Apis::Core::JsonRepresentation - property :column_id, as: 'columnId' - property :table_index, as: 'tableIndex' - end - end - end - - # @private - class ColumnList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Column, decorator: Google::Apis::FusiontablesV2::Column::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - - # @private - class Geometry - class Representation < Google::Apis::Core::JsonRepresentation - collection :geometries, as: 'geometries' - property :geometry, as: 'geometry' - property :type, as: 'type' - end - end - - # @private - class Import - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :num_rows_received, as: 'numRowsReceived' - end - end - - # @private - class Line - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates', :class => Array do - include Representable::JSON::Collection - items - end - - property :type, as: 'type' - end - end - - # @private - class LineStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :stroke_color, as: 'strokeColor' - property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation - - property :stroke_opacity, as: 'strokeOpacity' - property :stroke_weight, as: 'strokeWeight' - property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation - - end - end - - # @private - class Point - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates' - property :type, as: 'type' - end - end - - # @private - class PointStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :icon_name, as: 'iconName' - property :icon_styler, as: 'iconStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation - - end - end - - # @private - class Polygon - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates', :class => Array do - include Representable::JSON::Collection - items :class => Array do - include Representable::JSON::Collection - items - end - - end - - property :type, as: 'type' - end - end - - # @private - class PolygonStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :fill_color, as: 'fillColor' - property :fill_color_styler, as: 'fillColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation - - property :fill_opacity, as: 'fillOpacity' - property :stroke_color, as: 'strokeColor' - property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation - - property :stroke_opacity, as: 'strokeOpacity' - property :stroke_weight, as: 'strokeWeight' - property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation - - end - end - - # @private - class Sqlresponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :columns, as: 'columns' - property :kind, as: 'kind' - collection :rows, as: 'rows', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - # @private - class StyleFunction - class Representation < Google::Apis::Core::JsonRepresentation - collection :buckets, as: 'buckets', class: Google::Apis::FusiontablesV2::Bucket, decorator: Google::Apis::FusiontablesV2::Bucket::Representation - - property :column_name, as: 'columnName' - property :gradient, as: 'gradient', class: Google::Apis::FusiontablesV2::StyleFunction::Gradient, decorator: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Representation - - property :kind, as: 'kind' - end - - # @private - class Gradient - class Representation < Google::Apis::Core::JsonRepresentation - collection :colors, as: 'colors', class: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color, decorator: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color::Representation - - property :max, as: 'max' - property :min, as: 'min' - end - - # @private - class Color - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color' - property :opacity, as: 'opacity' - end - end - end - end - - # @private - class StyleSetting - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :marker_options, as: 'markerOptions', class: Google::Apis::FusiontablesV2::PointStyle, decorator: Google::Apis::FusiontablesV2::PointStyle::Representation - - property :name, as: 'name' - property :polygon_options, as: 'polygonOptions', class: Google::Apis::FusiontablesV2::PolygonStyle, decorator: Google::Apis::FusiontablesV2::PolygonStyle::Representation - - property :polyline_options, as: 'polylineOptions', class: Google::Apis::FusiontablesV2::LineStyle, decorator: Google::Apis::FusiontablesV2::LineStyle::Representation - - property :style_id, as: 'styleId' - property :table_id, as: 'tableId' - end - end - - # @private - class StyleSettingList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::FusiontablesV2::StyleSetting, decorator: Google::Apis::FusiontablesV2::StyleSetting::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - - # @private - class Table - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - property :attribution_link, as: 'attributionLink' - collection :base_table_ids, as: 'baseTableIds' - property :column_properties_json_schema, as: 'columnPropertiesJsonSchema' - collection :columns, as: 'columns', class: Google::Apis::FusiontablesV2::Column, decorator: Google::Apis::FusiontablesV2::Column::Representation - - property :description, as: 'description' - property :is_exportable, as: 'isExportable' - property :kind, as: 'kind' - property :name, as: 'name' - property :sql, as: 'sql' - property :table_id, as: 'tableId' - property :table_properties_json, as: 'tablePropertiesJson' - property :table_properties_json_schema, as: 'tablePropertiesJsonSchema' - end - end - - # @private - class TableList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Table, decorator: Google::Apis::FusiontablesV2::Table::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Task - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :progress, as: 'progress' - property :started, as: 'started' - property :task_id, as: 'taskId' - property :type, as: 'type' - end - end - - # @private - class TaskList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Task, decorator: Google::Apis::FusiontablesV2::Task::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - - # @private - class Template - class Representation < Google::Apis::Core::JsonRepresentation - collection :automatic_column_names, as: 'automaticColumnNames' - property :body, as: 'body' - property :kind, as: 'kind' - property :name, as: 'name' - property :table_id, as: 'tableId' - property :template_id, as: 'templateId' - end - end - - # @private - class TemplateList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Template, decorator: Google::Apis::FusiontablesV2::Template::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - end - end -end diff --git a/generated/google/apis/fusiontables_v2/service.rb b/generated/google/apis/fusiontables_v2/service.rb deleted file mode 100644 index 748d3195e..000000000 --- a/generated/google/apis/fusiontables_v2/service.rb +++ /dev/null @@ -1,1496 +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 FusiontablesV2 - # Fusion Tables API - # - # API for working with Fusion Tables data. - # - # @example - # require 'google/apis/fusiontables_v2' - # - # Fusiontables = Google::Apis::FusiontablesV2 # Alias the module - # service = Fusiontables::FusiontablesService.new - # - # @see https://developers.google.com/fusiontables - class FusiontablesService < 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/', 'fusiontables/v2/') - end - - # Deletes the specified column. - # @param [String] table_id - # Table from which the column is being deleted. - # @param [String] column_id - # Name or identifier for the column being deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_column(table_id, column_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/columns/{columnId}' - command = make_simple_command(:delete, path, options) - command.params['tableId'] = table_id unless table_id.nil? - command.params['columnId'] = column_id unless column_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 specific column by its ID. - # @param [String] table_id - # Table to which the column belongs. - # @param [String] column_id - # Name or identifier for the column that is being requested. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Column] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Column] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_column(table_id, column_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/columns/{columnId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::Column::Representation - command.response_class = Google::Apis::FusiontablesV2::Column - command.params['tableId'] = table_id unless table_id.nil? - command.params['columnId'] = column_id unless column_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 - - # Adds a new column to the table. - # @param [String] table_id - # Table for which a new column is being added. - # @param [Google::Apis::FusiontablesV2::Column] column_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::FusiontablesV2::Column] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Column] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_column(table_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/columns' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Column::Representation - command.request_object = column_object - command.response_representation = Google::Apis::FusiontablesV2::Column::Representation - command.response_class = Google::Apis::FusiontablesV2::Column - command.params['tableId'] = table_id unless table_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 columns. - # @param [String] table_id - # Table whose columns are being listed. - # @param [Fixnum] max_results - # Maximum number of columns to return. Default is 5. - # @param [String] page_token - # Continuation token specifying which result page 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::FusiontablesV2::ColumnList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::ColumnList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_columns(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/columns' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::ColumnList::Representation - command.response_class = Google::Apis::FusiontablesV2::ColumnList - command.params['tableId'] = table_id unless table_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 - - # Updates the name or type of an existing column. This method supports patch - # semantics. - # @param [String] table_id - # Table for which the column is being updated. - # @param [String] column_id - # Name or identifier for the column that is being updated. - # @param [Google::Apis::FusiontablesV2::Column] column_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::FusiontablesV2::Column] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Column] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_column(table_id, column_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/columns/{columnId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Column::Representation - command.request_object = column_object - command.response_representation = Google::Apis::FusiontablesV2::Column::Representation - command.response_class = Google::Apis::FusiontablesV2::Column - command.params['tableId'] = table_id unless table_id.nil? - command.params['columnId'] = column_id unless column_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 name or type of an existing column. - # @param [String] table_id - # Table for which the column is being updated. - # @param [String] column_id - # Name or identifier for the column that is being updated. - # @param [Google::Apis::FusiontablesV2::Column] column_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::FusiontablesV2::Column] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Column] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_column(table_id, column_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/columns/{columnId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Column::Representation - command.request_object = column_object - command.response_representation = Google::Apis::FusiontablesV2::Column::Representation - command.response_class = Google::Apis::FusiontablesV2::Column - command.params['tableId'] = table_id unless table_id.nil? - command.params['columnId'] = column_id unless column_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 - - # Executes a Fusion Tables SQL statement, which can be any of - # - SELECT - # - INSERT - # - UPDATE - # - DELETE - # - SHOW - # - DESCRIBE - # - CREATE statement. - # @param [Boolean] hdrs - # Whether column names are included in the first row. Default is true. - # @param [String] sql - # A Fusion Tables SQL statement, which can be any of - # - SELECT - # - INSERT - # - UPDATE - # - DELETE - # - SHOW - # - DESCRIBE - # - CREATE - # @param [Boolean] typed - # Whether typed values are returned in the (JSON) response: numbers for numeric - # values and parsed geometries for KML values. Default is true. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Sqlresponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Sqlresponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def sql_query(hdrs: nil, sql: nil, typed: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'query' - if download_dest.nil? - command = make_simple_command(:post, path, options) - else - command = make_download_command(:post, path, options) - command.download_dest = download_dest - end - command.response_representation = Google::Apis::FusiontablesV2::Sqlresponse::Representation - command.response_class = Google::Apis::FusiontablesV2::Sqlresponse - command.query['hdrs'] = hdrs unless hdrs.nil? - command.query['sql'] = sql unless sql.nil? - command.query['typed'] = typed unless typed.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 - - # Executes a SQL statement which can be any of - # - SELECT - # - SHOW - # - DESCRIBE - # @param [Boolean] hdrs - # Whether column names are included (in the first row). Default is true. - # @param [String] sql - # A SQL statement which can be any of - # - SELECT - # - SHOW - # - DESCRIBE - # @param [Boolean] typed - # Whether typed values are returned in the (JSON) response: numbers for numeric - # values and parsed geometries for KML values. Default is true. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Sqlresponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Sqlresponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def sql_get_query(hdrs: nil, sql: nil, typed: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'query' - 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::FusiontablesV2::Sqlresponse::Representation - command.response_class = Google::Apis::FusiontablesV2::Sqlresponse - command.query['hdrs'] = hdrs unless hdrs.nil? - command.query['sql'] = sql unless sql.nil? - command.query['typed'] = typed unless typed.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 style. - # @param [String] table_id - # Table from which the style is being deleted - # @param [Fixnum] style_id - # Identifier (within a table) for the style being deleted - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_style(table_id, style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/styles/{styleId}' - command = make_simple_command(:delete, path, options) - command.params['tableId'] = table_id unless table_id.nil? - command.params['styleId'] = style_id unless style_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 style. - # @param [String] table_id - # Table to which the requested style belongs - # @param [Fixnum] style_id - # Identifier (integer) for a specific style in a table - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::StyleSetting] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::StyleSetting] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_style(table_id, style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/styles/{styleId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation - command.response_class = Google::Apis::FusiontablesV2::StyleSetting - command.params['tableId'] = table_id unless table_id.nil? - command.params['styleId'] = style_id unless style_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 - - # Adds a new style for the table. - # @param [String] table_id - # Table for which a new style is being added - # @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_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::FusiontablesV2::StyleSetting] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::StyleSetting] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_style(table_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/styles' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation - command.request_object = style_setting_object - command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation - command.response_class = Google::Apis::FusiontablesV2::StyleSetting - command.params['tableId'] = table_id unless table_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 styles. - # @param [String] table_id - # Table whose styles are being listed - # @param [Fixnum] max_results - # Maximum number of styles to return. Optional. Default is 5. - # @param [String] page_token - # Continuation token specifying which result page to return. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::FusiontablesV2::StyleSettingList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::StyleSettingList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_styles(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/styles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::StyleSettingList::Representation - command.response_class = Google::Apis::FusiontablesV2::StyleSettingList - command.params['tableId'] = table_id unless table_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 - - # Updates an existing style. This method supports patch semantics. - # @param [String] table_id - # Table whose style is being updated. - # @param [Fixnum] style_id - # Identifier (within a table) for the style being updated. - # @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_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::FusiontablesV2::StyleSetting] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::StyleSetting] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_style(table_id, style_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/styles/{styleId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation - command.request_object = style_setting_object - command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation - command.response_class = Google::Apis::FusiontablesV2::StyleSetting - command.params['tableId'] = table_id unless table_id.nil? - command.params['styleId'] = style_id unless style_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 style. - # @param [String] table_id - # Table whose style is being updated. - # @param [Fixnum] style_id - # Identifier (within a table) for the style being updated. - # @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_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::FusiontablesV2::StyleSetting] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::StyleSetting] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_style(table_id, style_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/styles/{styleId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation - command.request_object = style_setting_object - command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation - command.response_class = Google::Apis::FusiontablesV2::StyleSetting - command.params['tableId'] = table_id unless table_id.nil? - command.params['styleId'] = style_id unless style_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 - - # Copies a table. - # @param [String] table_id - # ID of the table that is being copied. - # @param [Boolean] copy_presentation - # Whether to also copy tabs, styles, and templates. Default is false. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def copy_table(table_id, copy_presentation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/copy' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::FusiontablesV2::Table::Representation - command.response_class = Google::Apis::FusiontablesV2::Table - command.params['tableId'] = table_id unless table_id.nil? - command.query['copyPresentation'] = copy_presentation unless copy_presentation.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 table. - # @param [String] table_id - # ID of the table to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_table(table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}' - command = make_simple_command(:delete, path, options) - command.params['tableId'] = table_id unless table_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 specific table by its ID. - # @param [String] table_id - # Identifier for the table being requested. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::Table::Representation - command.response_class = Google::Apis::FusiontablesV2::Table - command.params['tableId'] = table_id unless table_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 - - # Imports more rows into a table. - # @param [String] table_id - # The table into which new rows are being imported. - # @param [String] delimiter - # The delimiter used to separate cell values. This can only consist of a single - # character. Default is ,. - # @param [String] encoding - # The encoding of the content. Default is UTF-8. Use auto-detect if you are - # unsure of the encoding. - # @param [Fixnum] end_line - # The index of the line up to which data will be imported. Default is to import - # the entire file. If endLine is negative, it is an offset from the end of the - # file; the imported content will exclude the last endLine lines. - # @param [Boolean] is_strict - # Whether the imported CSV must have the same number of values for each row. If - # false, rows with fewer values will be padded with empty values. Default is - # true. - # @param [Fixnum] start_line - # The index of the first line from which to start importing, inclusive. Default - # is 0. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::FusiontablesV2::Import] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Import] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_rows(table_id, delimiter: nil, encoding: nil, end_line: nil, is_strict: nil, start_line: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'tables/{tableId}/import' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::FusiontablesV2::Import::Representation - command.response_class = Google::Apis::FusiontablesV2::Import - command.params['tableId'] = table_id unless table_id.nil? - command.query['delimiter'] = delimiter unless delimiter.nil? - command.query['encoding'] = encoding unless encoding.nil? - command.query['endLine'] = end_line unless end_line.nil? - command.query['isStrict'] = is_strict unless is_strict.nil? - command.query['startLine'] = start_line unless start_line.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 - - # Imports a new table. - # @param [String] delimiter - # The delimiter used to separate cell values. This can only consist of a single - # character. Default is ,. - # @param [String] encoding - # The encoding of the content. Default is UTF-8. Use auto-detect if you are - # unsure of the encoding. - # @param [String] name - # The name to be assigned to the new table. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_table(delimiter: nil, encoding: nil, name: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'tables/import' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::FusiontablesV2::Table::Representation - command.response_class = Google::Apis::FusiontablesV2::Table - command.query['delimiter'] = delimiter unless delimiter.nil? - command.query['encoding'] = encoding unless encoding.nil? - command.query['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new table. - # @param [Google::Apis::FusiontablesV2::Table] table_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::FusiontablesV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::FusiontablesV2::Table::Representation - command.response_class = Google::Apis::FusiontablesV2::Table - 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 tables a user owns. - # @param [Fixnum] max_results - # Maximum number of tables to return. Default is 5. - # @param [String] page_token - # Continuation token specifying which result page 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::FusiontablesV2::TableList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::TableList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tables(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::TableList::Representation - command.response_class = Google::Apis::FusiontablesV2::TableList - 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 - - # Updates an existing table. Unless explicitly requested, only the name, - # description, and attribution will be updated. This method supports patch - # semantics. - # @param [String] table_id - # ID of the table that is being updated. - # @param [Google::Apis::FusiontablesV2::Table] table_object - # @param [Boolean] replace_view_definition - # Whether the view definition is also updated. The specified view definition - # replaces the existing one. Only a view can be updated with a new definition. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(table_id, table_object = nil, replace_view_definition: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::FusiontablesV2::Table::Representation - command.response_class = Google::Apis::FusiontablesV2::Table - command.params['tableId'] = table_id unless table_id.nil? - command.query['replaceViewDefinition'] = replace_view_definition unless replace_view_definition.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 rows of an existing table. Current rows remain visible until all - # replacement rows are ready. - # @param [String] table_id - # Table whose rows will be replaced. - # @param [String] delimiter - # The delimiter used to separate cell values. This can only consist of a single - # character. Default is ,. - # @param [String] encoding - # The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are - # unsure of the encoding. - # @param [Fixnum] end_line - # The index of the line up to which data will be imported. Default is to import - # the entire file. If endLine is negative, it is an offset from the end of the - # file; the imported content will exclude the last endLine lines. - # @param [Boolean] is_strict - # Whether the imported CSV must have the same number of column values for each - # row. If true, throws an exception if the CSV does not have the same number of - # columns. If false, rows with fewer column values will be padded with empty - # values. Default is true. - # @param [Fixnum] start_line - # The index of the first line from which to start importing, inclusive. Default - # is 0. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::FusiontablesV2::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def replace_rows_table(table_id, delimiter: nil, encoding: nil, end_line: nil, is_strict: nil, start_line: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'tables/{tableId}/replace' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::FusiontablesV2::Task::Representation - command.response_class = Google::Apis::FusiontablesV2::Task - command.params['tableId'] = table_id unless table_id.nil? - command.query['delimiter'] = delimiter unless delimiter.nil? - command.query['encoding'] = encoding unless encoding.nil? - command.query['endLine'] = end_line unless end_line.nil? - command.query['isStrict'] = is_strict unless is_strict.nil? - command.query['startLine'] = start_line unless start_line.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 table. Unless explicitly requested, only the name, - # description, and attribution will be updated. - # @param [String] table_id - # ID of the table that is being updated. - # @param [Google::Apis::FusiontablesV2::Table] table_object - # @param [Boolean] replace_view_definition - # Whether the view definition is also updated. The specified view definition - # replaces the existing one. Only a view can be updated with a new definition. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(table_id, table_object = nil, replace_view_definition: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::FusiontablesV2::Table::Representation - command.response_class = Google::Apis::FusiontablesV2::Table - command.params['tableId'] = table_id unless table_id.nil? - command.query['replaceViewDefinition'] = replace_view_definition unless replace_view_definition.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 specific task by its ID, unless that task has already started - # running. - # @param [String] table_id - # Table from which the task is being deleted. - # @param [String] task_id - # The identifier of the task 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_task(table_id, task_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/tasks/{taskId}' - command = make_simple_command(:delete, path, options) - command.params['tableId'] = table_id unless table_id.nil? - command.params['taskId'] = task_id unless task_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 specific task by its ID. - # @param [String] table_id - # Table to which the task belongs. - # @param [String] task_id - # The identifier of the task to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::FusiontablesV2::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_task(table_id, task_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/tasks/{taskId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::Task::Representation - command.response_class = Google::Apis::FusiontablesV2::Task - command.params['tableId'] = table_id unless table_id.nil? - command.params['taskId'] = task_id unless task_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 tasks. - # @param [String] table_id - # Table whose tasks are being listed. - # @param [Fixnum] max_results - # Maximum number of tasks to return. Default is 5. - # @param [String] page_token - # Continuation token specifying which result page to return. - # @param [Fixnum] start_index - # Index of the first result returned in the current page. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::TaskList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::TaskList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasks(table_id, max_results: nil, page_token: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/tasks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::TaskList::Representation - command.response_class = Google::Apis::FusiontablesV2::TaskList - command.params['tableId'] = table_id unless table_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.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 - - # Deletes a template - # @param [String] table_id - # Table from which the template is being deleted - # @param [Fixnum] template_id - # Identifier for the template which is being deleted - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_template(table_id, template_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/templates/{templateId}' - command = make_simple_command(:delete, path, options) - command.params['tableId'] = table_id unless table_id.nil? - command.params['templateId'] = template_id unless template_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 specific template by its id - # @param [String] table_id - # Table to which the template belongs - # @param [Fixnum] template_id - # Identifier for the template that is being requested - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::FusiontablesV2::Template] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Template] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_template(table_id, template_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/templates/{templateId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::Template::Representation - command.response_class = Google::Apis::FusiontablesV2::Template - command.params['tableId'] = table_id unless table_id.nil? - command.params['templateId'] = template_id unless template_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 new template for the table. - # @param [String] table_id - # Table for which a new template is being created - # @param [Google::Apis::FusiontablesV2::Template] template_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::FusiontablesV2::Template] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Template] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_template(table_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/templates' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Template::Representation - command.request_object = template_object - command.response_representation = Google::Apis::FusiontablesV2::Template::Representation - command.response_class = Google::Apis::FusiontablesV2::Template - command.params['tableId'] = table_id unless table_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 templates. - # @param [String] table_id - # Identifier for the table whose templates are being requested - # @param [Fixnum] max_results - # Maximum number of templates to return. Optional. Default is 5. - # @param [String] page_token - # Continuation token specifying which results page to return. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::FusiontablesV2::TemplateList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::TemplateList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_templates(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/templates' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::FusiontablesV2::TemplateList::Representation - command.response_class = Google::Apis::FusiontablesV2::TemplateList - command.params['tableId'] = table_id unless table_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 - - # Updates an existing template. This method supports patch semantics. - # @param [String] table_id - # Table to which the updated template belongs - # @param [Fixnum] template_id - # Identifier for the template that is being updated - # @param [Google::Apis::FusiontablesV2::Template] template_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::FusiontablesV2::Template] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Template] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_template(table_id, template_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/templates/{templateId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Template::Representation - command.request_object = template_object - command.response_representation = Google::Apis::FusiontablesV2::Template::Representation - command.response_class = Google::Apis::FusiontablesV2::Template - command.params['tableId'] = table_id unless table_id.nil? - command.params['templateId'] = template_id unless template_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 template - # @param [String] table_id - # Table to which the updated template belongs - # @param [Fixnum] template_id - # Identifier for the template that is being updated - # @param [Google::Apis::FusiontablesV2::Template] template_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::FusiontablesV2::Template] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FusiontablesV2::Template] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_template(table_id, template_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/templates/{templateId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::FusiontablesV2::Template::Representation - command.request_object = template_object - command.response_representation = Google::Apis::FusiontablesV2::Template::Representation - command.response_class = Google::Apis::FusiontablesV2::Template - command.params['tableId'] = table_id unless table_id.nil? - command.params['templateId'] = template_id unless template_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 diff --git a/generated/google/apis/games_configuration_v1configuration.rb b/generated/google/apis/games_configuration_v1configuration.rb deleted file mode 100644 index 122cbacb6..000000000 --- a/generated/google/apis/games_configuration_v1configuration.rb +++ /dev/null @@ -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/games_configuration_v1configuration/service.rb' -require 'google/apis/games_configuration_v1configuration/classes.rb' -require 'google/apis/games_configuration_v1configuration/representations.rb' - -module Google - module Apis - # Google Play Game Services Publishing API - # - # The Publishing API for Google Play Game Services. - # - # @see https://developers.google.com/games/services - module GamesConfigurationV1configuration - VERSION = 'V1configuration' - REVISION = '20150601' - - # View and manage your Google Play Developer account - AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher' - end - end -end diff --git a/generated/google/apis/games_configuration_v1configuration/classes.rb b/generated/google/apis/games_configuration_v1configuration/classes.rb deleted file mode 100644 index 80c1e294c..000000000 --- a/generated/google/apis/games_configuration_v1configuration/classes.rb +++ /dev/null @@ -1,506 +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 GamesConfigurationV1configuration - - # This is a JSON template for an achievement configuration resource. - class AchievementConfiguration - include Google::Apis::Core::Hashable - - # The type of the achievement. - # Possible values are: - # - "STANDARD" - Achievement is either locked or unlocked. - # - "INCREMENTAL" - Achievement is incremental. - # Corresponds to the JSON property `achievementType` - # @return [String] - attr_accessor :achievement_type - - # This is a JSON template for an achievement configuration detail. - # Corresponds to the JSON property `draft` - # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail] - attr_accessor :draft - - # The ID of the achievement. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The initial state of the achievement. - # Possible values are: - # - "HIDDEN" - Achievement is hidden. - # - "REVEALED" - Achievement is revealed. - # - "UNLOCKED" - Achievement is unlocked. - # Corresponds to the JSON property `initialState` - # @return [String] - attr_accessor :initial_state - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesConfiguration#achievementConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for an achievement configuration detail. - # Corresponds to the JSON property `published` - # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail] - attr_accessor :published - - # Steps to unlock. Only applicable to incremental achievements. - # Corresponds to the JSON property `stepsToUnlock` - # @return [Fixnum] - attr_accessor :steps_to_unlock - - # The token for this resource. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @achievement_type = args[:achievement_type] unless args[:achievement_type].nil? - @draft = args[:draft] unless args[:draft].nil? - @id = args[:id] unless args[:id].nil? - @initial_state = args[:initial_state] unless args[:initial_state].nil? - @kind = args[:kind] unless args[:kind].nil? - @published = args[:published] unless args[:published].nil? - @steps_to_unlock = args[:steps_to_unlock] unless args[:steps_to_unlock].nil? - @token = args[:token] unless args[:token].nil? - end - end - - # This is a JSON template for an achievement configuration detail. - class AchievementConfigurationDetail - include Google::Apis::Core::Hashable - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `description` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :description - - # The icon url of this achievement. Writes to this field are ignored. - # Corresponds to the JSON property `iconUrl` - # @return [String] - attr_accessor :icon_url - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesConfiguration#achievementConfigurationDetail. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `name` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :name - - # Point value for the achievement. - # Corresponds to the JSON property `pointValue` - # @return [Fixnum] - attr_accessor :point_value - - # The sort rank of this achievement. Writes to this field are ignored. - # Corresponds to the JSON property `sortRank` - # @return [Fixnum] - attr_accessor :sort_rank - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @icon_url = args[:icon_url] unless args[:icon_url].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @point_value = args[:point_value] unless args[:point_value].nil? - @sort_rank = args[:sort_rank] unless args[:sort_rank].nil? - end - end - - # This is a JSON template for a ListConfigurations response. - class ListAchievementConfigurationResponse - include Google::Apis::Core::Hashable - - # The achievement configurations. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementConfigurationListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination 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) - @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 - - # This is a JSON template for a number affix resource. - class GamesNumberAffixConfiguration - include Google::Apis::Core::Hashable - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `few` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :few - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `many` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :many - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `one` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :one - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `other` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :other - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `two` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :two - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `zero` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :zero - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @few = args[:few] unless args[:few].nil? - @many = args[:many] unless args[:many].nil? - @one = args[:one] unless args[:one].nil? - @other = args[:other] unless args[:other].nil? - @two = args[:two] unless args[:two].nil? - @zero = args[:zero] unless args[:zero].nil? - end - end - - # This is a JSON template for a number format resource. - class GamesNumberFormatConfiguration - include Google::Apis::Core::Hashable - - # The curreny code string. Only used for CURRENCY format type. - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - # The number of decimal places for number. Only used for NUMERIC format type. - # Corresponds to the JSON property `numDecimalPlaces` - # @return [Fixnum] - attr_accessor :num_decimal_places - - # The formatting for the number. - # Possible values are: - # - "NUMERIC" - Numbers are formatted to have no digits or a fixed number of - # digits after the decimal point according to locale. An optional custom unit - # can be added. - # - "TIME_DURATION" - Numbers are formatted to hours, minutes and seconds. - # - "CURRENCY" - Numbers are formatted to currency according to locale. - # Corresponds to the JSON property `numberFormatType` - # @return [String] - attr_accessor :number_format_type - - # This is a JSON template for a number affix resource. - # Corresponds to the JSON property `suffix` - # @return [Google::Apis::GamesConfigurationV1configuration::GamesNumberAffixConfiguration] - attr_accessor :suffix - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @currency_code = args[:currency_code] unless args[:currency_code].nil? - @num_decimal_places = args[:num_decimal_places] unless args[:num_decimal_places].nil? - @number_format_type = args[:number_format_type] unless args[:number_format_type].nil? - @suffix = args[:suffix] unless args[:suffix].nil? - end - end - - # This is a JSON template for an image configuration resource. - class ImageConfiguration - include Google::Apis::Core::Hashable - - # The image type for the image. - # Corresponds to the JSON property `imageType` - # @return [String] - attr_accessor :image_type - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesConfiguration#imageConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The resource ID of resource which the image belongs to. - # Corresponds to the JSON property `resourceId` - # @return [String] - attr_accessor :resource_id - - # The url for this image. - # 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) - @image_type = args[:image_type] unless args[:image_type].nil? - @kind = args[:kind] unless args[:kind].nil? - @resource_id = args[:resource_id] unless args[:resource_id].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # This is a JSON template for an leaderboard configuration resource. - class LeaderboardConfiguration - include Google::Apis::Core::Hashable - - # This is a JSON template for a leaderboard configuration detail. - # Corresponds to the JSON property `draft` - # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail] - attr_accessor :draft - - # The ID of the leaderboard. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesConfiguration#leaderboardConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for a leaderboard configuration detail. - # Corresponds to the JSON property `published` - # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail] - attr_accessor :published - - # Maximum score that can be posted to this leaderboard. - # Corresponds to the JSON property `scoreMax` - # @return [String] - attr_accessor :score_max - - # Minimum score that can be posted to this leaderboard. - # Corresponds to the JSON property `scoreMin` - # @return [String] - attr_accessor :score_min - - # The type of the leaderboard. - # Possible values are: - # - "LARGER_IS_BETTER" - Larger scores posted are ranked higher. - # - "SMALLER_IS_BETTER" - Smaller scores posted are ranked higher. - # Corresponds to the JSON property `scoreOrder` - # @return [String] - attr_accessor :score_order - - # The token for this resource. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @draft = args[:draft] unless args[:draft].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @published = args[:published] unless args[:published].nil? - @score_max = args[:score_max] unless args[:score_max].nil? - @score_min = args[:score_min] unless args[:score_min].nil? - @score_order = args[:score_order] unless args[:score_order].nil? - @token = args[:token] unless args[:token].nil? - end - end - - # This is a JSON template for a leaderboard configuration detail. - class LeaderboardConfigurationDetail - include Google::Apis::Core::Hashable - - # The icon url of this leaderboard. Writes to this field are ignored. - # Corresponds to the JSON property `iconUrl` - # @return [String] - attr_accessor :icon_url - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesConfiguration#leaderboardConfigurationDetail. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for a localized string bundle resource. - # Corresponds to the JSON property `name` - # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle] - attr_accessor :name - - # This is a JSON template for a number format resource. - # Corresponds to the JSON property `scoreFormat` - # @return [Google::Apis::GamesConfigurationV1configuration::GamesNumberFormatConfiguration] - attr_accessor :score_format - - # The sort rank of this leaderboard. Writes to this field are ignored. - # Corresponds to the JSON property `sortRank` - # @return [Fixnum] - attr_accessor :sort_rank - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @icon_url = args[:icon_url] unless args[:icon_url].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @score_format = args[:score_format] unless args[:score_format].nil? - @sort_rank = args[:sort_rank] unless args[:sort_rank].nil? - end - end - - # This is a JSON template for a ListConfigurations response. - class ListLeaderboardConfigurationResponse - include Google::Apis::Core::Hashable - - # The leaderboard configurations. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#leaderboardConfigurationListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination 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) - @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 - - # This is a JSON template for a localized string resource. - class LocalizedString - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesConfiguration#localizedString. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The locale string. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # The string 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) - @kind = args[:kind] unless args[:kind].nil? - @locale = args[:locale] unless args[:locale].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # This is a JSON template for a localized string bundle resource. - class LocalizedStringBundle - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesConfiguration#localizedStringBundle. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The locale strings. - # Corresponds to the JSON property `translations` - # @return [Array] - attr_accessor :translations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @translations = args[:translations] unless args[:translations].nil? - end - end - end - end -end diff --git a/generated/google/apis/games_configuration_v1configuration/representations.rb b/generated/google/apis/games_configuration_v1configuration/representations.rb deleted file mode 100644 index 226bf298d..000000000 --- a/generated/google/apis/games_configuration_v1configuration/representations.rb +++ /dev/null @@ -1,206 +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 GamesConfigurationV1configuration - - class AchievementConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AchievementConfigurationDetail - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAchievementConfigurationResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GamesNumberAffixConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GamesNumberFormatConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImageConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LeaderboardConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LeaderboardConfigurationDetail - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLeaderboardConfigurationResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LocalizedString - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LocalizedStringBundle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AchievementConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :achievement_type, as: 'achievementType' - property :draft, as: 'draft', class: Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail, decorator: Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail::Representation - - property :id, as: 'id' - property :initial_state, as: 'initialState' - property :kind, as: 'kind' - property :published, as: 'published', class: Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail, decorator: Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail::Representation - - property :steps_to_unlock, as: 'stepsToUnlock' - property :token, as: 'token' - end - end - - # @private - class AchievementConfigurationDetail - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :icon_url, as: 'iconUrl' - property :kind, as: 'kind' - property :name, as: 'name', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :point_value, as: 'pointValue' - property :sort_rank, as: 'sortRank' - end - end - - # @private - class ListAchievementConfigurationResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration, decorator: Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class GamesNumberAffixConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :few, as: 'few', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :many, as: 'many', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :one, as: 'one', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :other, as: 'other', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :two, as: 'two', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :zero, as: 'zero', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - end - end - - # @private - class GamesNumberFormatConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :currency_code, as: 'currencyCode' - property :num_decimal_places, as: 'numDecimalPlaces' - property :number_format_type, as: 'numberFormatType' - property :suffix, as: 'suffix', class: Google::Apis::GamesConfigurationV1configuration::GamesNumberAffixConfiguration, decorator: Google::Apis::GamesConfigurationV1configuration::GamesNumberAffixConfiguration::Representation - - end - end - - # @private - class ImageConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :image_type, as: 'imageType' - property :kind, as: 'kind' - property :resource_id, as: 'resourceId' - property :url, as: 'url' - end - end - - # @private - class LeaderboardConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :draft, as: 'draft', class: Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail, decorator: Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :published, as: 'published', class: Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail, decorator: Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail::Representation - - property :score_max, as: 'scoreMax' - property :score_min, as: 'scoreMin' - property :score_order, as: 'scoreOrder' - property :token, as: 'token' - end - end - - # @private - class LeaderboardConfigurationDetail - class Representation < Google::Apis::Core::JsonRepresentation - property :icon_url, as: 'iconUrl' - property :kind, as: 'kind' - property :name, as: 'name', class: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle::Representation - - property :score_format, as: 'scoreFormat', class: Google::Apis::GamesConfigurationV1configuration::GamesNumberFormatConfiguration, decorator: Google::Apis::GamesConfigurationV1configuration::GamesNumberFormatConfiguration::Representation - - property :sort_rank, as: 'sortRank' - end - end - - # @private - class ListLeaderboardConfigurationResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration, decorator: Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class LocalizedString - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :locale, as: 'locale' - property :value, as: 'value' - end - end - - # @private - class LocalizedStringBundle - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :translations, as: 'translations', class: Google::Apis::GamesConfigurationV1configuration::LocalizedString, decorator: Google::Apis::GamesConfigurationV1configuration::LocalizedString::Representation - - end - end - end - end -end diff --git a/generated/google/apis/games_configuration_v1configuration/service.rb b/generated/google/apis/games_configuration_v1configuration/service.rb deleted file mode 100644 index 6aed9c0de..000000000 --- a/generated/google/apis/games_configuration_v1configuration/service.rb +++ /dev/null @@ -1,578 +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 GamesConfigurationV1configuration - # Google Play Game Services Publishing API - # - # The Publishing API for Google Play Game Services. - # - # @example - # require 'google/apis/games_configuration_v1configuration' - # - # GamesConfiguration = Google::Apis::GamesConfigurationV1configuration # Alias the module - # service = GamesConfiguration::GamesConfigurationService.new - # - # @see https://developers.google.com/games/services - class GamesConfigurationService < 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/', 'games/v1configuration/') - end - - # Delete the achievement configuration with the given ID. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_achievement_configuration(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}' - command = make_simple_command(:delete, path, options) - command.params['achievementId'] = achievement_id unless achievement_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 metadata of the achievement configuration with the given ID. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesConfigurationV1configuration::AchievementConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_achievement_configuration(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration - command.params['achievementId'] = achievement_id unless achievement_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 - - # Insert a new achievement configuration in this application. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration] achievement_configuration_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::GamesConfigurationV1configuration::AchievementConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_achievement_configuration(application_id, achievement_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}/achievements' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - command.request_object = achievement_configuration_object - command.response_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration - command.params['applicationId'] = application_id unless application_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of the achievement configurations in this application. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [Fixnum] max_results - # The maximum number of resource configurations to return in the response, used - # for paging. For any response, the actual number of resources returned may be - # less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesConfigurationV1configuration::ListAchievementConfigurationResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::ListAchievementConfigurationResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_achievement_configurations(application_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}/achievements' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesConfigurationV1configuration::ListAchievementConfigurationResponse::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::ListAchievementConfigurationResponse - command.params['applicationId'] = application_id unless application_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 - - # Update the metadata of the achievement configuration with the given ID. This - # method supports patch semantics. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration] achievement_configuration_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::GamesConfigurationV1configuration::AchievementConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_achievement_configuration(achievement_id, achievement_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - command.request_object = achievement_configuration_object - command.response_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration - command.params['achievementId'] = achievement_id unless achievement_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 - - # Update the metadata of the achievement configuration with the given ID. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration] achievement_configuration_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::GamesConfigurationV1configuration::AchievementConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_achievement_configuration(achievement_id, achievement_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - command.request_object = achievement_configuration_object - command.response_representation = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration - command.params['achievementId'] = achievement_id unless achievement_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 - - # Uploads an image for a resource with the given ID and image type. - # @param [String] resource_id - # The ID of the resource used by this method. - # @param [String] image_type - # Selects which image in a resource for this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GamesConfigurationV1configuration::ImageConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::ImageConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_image_configuration(resource_id, image_type, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'images/{resourceId}/imageType/{imageType}' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::GamesConfigurationV1configuration::ImageConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::ImageConfiguration - command.params['resourceId'] = resource_id unless resource_id.nil? - command.params['imageType'] = image_type unless image_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete the leaderboard configuration with the given ID. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_leaderboard_configuration(leaderboard_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}' - command = make_simple_command(:delete, path, options) - command.params['leaderboardId'] = leaderboard_id unless leaderboard_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 metadata of the leaderboard configuration with the given ID. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesConfigurationV1configuration::LeaderboardConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_leaderboard_configuration(leaderboard_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration - command.params['leaderboardId'] = leaderboard_id unless leaderboard_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 - - # Insert a new leaderboard configuration in this application. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration] leaderboard_configuration_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::GamesConfigurationV1configuration::LeaderboardConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_leaderboard_configuration(application_id, leaderboard_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}/leaderboards' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - command.request_object = leaderboard_configuration_object - command.response_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration - command.params['applicationId'] = application_id unless application_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of the leaderboard configurations in this application. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [Fixnum] max_results - # The maximum number of resource configurations to return in the response, used - # for paging. For any response, the actual number of resources returned may be - # less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesConfigurationV1configuration::ListLeaderboardConfigurationResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::ListLeaderboardConfigurationResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_leaderboard_configurations(application_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}/leaderboards' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesConfigurationV1configuration::ListLeaderboardConfigurationResponse::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::ListLeaderboardConfigurationResponse - command.params['applicationId'] = application_id unless application_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 - - # Update the metadata of the leaderboard configuration with the given ID. This - # method supports patch semantics. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration] leaderboard_configuration_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::GamesConfigurationV1configuration::LeaderboardConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_leaderboard_configuration(leaderboard_id, leaderboard_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - command.request_object = leaderboard_configuration_object - command.response_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration - command.params['leaderboardId'] = leaderboard_id unless leaderboard_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 - - # Update the metadata of the leaderboard configuration with the given ID. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration] leaderboard_configuration_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::GamesConfigurationV1configuration::LeaderboardConfiguration] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_leaderboard_configuration(leaderboard_id, leaderboard_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - command.request_object = leaderboard_configuration_object - command.response_representation = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration::Representation - command.response_class = Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration - command.params['leaderboardId'] = leaderboard_id unless leaderboard_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 diff --git a/generated/google/apis/games_management_v1management.rb b/generated/google/apis/games_management_v1management.rb deleted file mode 100644 index 69dbccf6f..000000000 --- a/generated/google/apis/games_management_v1management.rb +++ /dev/null @@ -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/games_management_v1management/service.rb' -require 'google/apis/games_management_v1management/classes.rb' -require 'google/apis/games_management_v1management/representations.rb' - -module Google - module Apis - # Google Play Game Services Management API - # - # The Management API for Google Play Game Services. - # - # @see https://developers.google.com/games/services - module GamesManagementV1management - VERSION = 'V1management' - REVISION = '20150413' - - # Share your Google+ profile information and view and manage your game activity - AUTH_GAMES = 'https://www.googleapis.com/auth/games' - - # Know your basic profile info and list of people in your circles. - AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' - end - end -end \ No newline at end of file diff --git a/generated/google/apis/games_management_v1management/classes.rb b/generated/google/apis/games_management_v1management/classes.rb deleted file mode 100644 index 8e92cc29d..000000000 --- a/generated/google/apis/games_management_v1management/classes.rb +++ /dev/null @@ -1,438 +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 GamesManagementV1management - - # This is a JSON template for achievement reset all response. - class AchievementResetAllResponse - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#achievementResetAllResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The achievement reset results. - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - def initialize(**args) - @kind = args[:kind] unless args[:kind].nil? - @results = args[:results] unless args[:results].nil? - end - end - - # This is a JSON template for multiple achievements reset all request. - class AchievementResetMultipleForAllRequest - include Google::Apis::Core::Hashable - - # The IDs of achievements to reset. - # Corresponds to the JSON property `achievement_ids` - # @return [Array] - attr_accessor :achievement_ids - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#achievementResetMultipleForAllRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - @achievement_ids = args[:achievement_ids] unless args[:achievement_ids].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for an achievement reset response. - class AchievementResetResponse - include Google::Apis::Core::Hashable - - # The current state of the achievement. This is the same as the initial state of - # the achievement. - # Possible values are: - # - "HIDDEN"- Achievement is hidden. - # - "REVEALED" - Achievement is revealed. - # - "UNLOCKED" - Achievement is unlocked. - # Corresponds to the JSON property `currentState` - # @return [String] - attr_accessor :current_state - - # The ID of an achievement for which player state has been updated. - # Corresponds to the JSON property `definitionId` - # @return [String] - attr_accessor :definition_id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#achievementResetResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Flag to indicate if the requested update actually occurred. - # Corresponds to the JSON property `updateOccurred` - # @return [Boolean] - attr_accessor :update_occurred - alias_method :update_occurred?, :update_occurred - - def initialize(**args) - @current_state = args[:current_state] unless args[:current_state].nil? - @definition_id = args[:definition_id] unless args[:definition_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @update_occurred = args[:update_occurred] unless args[:update_occurred].nil? - end - end - - # This is a JSON template for multiple events reset all request. - class EventsResetMultipleForAllRequest - include Google::Apis::Core::Hashable - - # The IDs of events to reset. - # Corresponds to the JSON property `event_ids` - # @return [Array] - attr_accessor :event_ids - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#eventsResetMultipleForAllRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - @event_ids = args[:event_ids] unless args[:event_ids].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for metadata about a player playing a game with the - # currently authenticated user. - class GamesPlayedResource - include Google::Apis::Core::Hashable - - # True if the player was auto-matched with the currently authenticated user. - # Corresponds to the JSON property `autoMatched` - # @return [Boolean] - attr_accessor :auto_matched - alias_method :auto_matched?, :auto_matched - - # The last time the player played the game in milliseconds since the epoch in - # UTC. - # Corresponds to the JSON property `timeMillis` - # @return [String] - attr_accessor :time_millis - - def initialize(**args) - @auto_matched = args[:auto_matched] unless args[:auto_matched].nil? - @time_millis = args[:time_millis] unless args[:time_millis].nil? - end - end - - # This is a JSON template for 1P/3P metadata about the player's experience. - class GamesPlayerExperienceInfoResource - include Google::Apis::Core::Hashable - - # The current number of experience points for the player. - # Corresponds to the JSON property `currentExperiencePoints` - # @return [String] - attr_accessor :current_experience_points - - # The current level of the player. - # Corresponds to the JSON property `currentLevel` - # @return [Google::Apis::GamesManagementV1management::GamesPlayerLevelResource] - attr_accessor :current_level - - # The timestamp when the player was leveled up, in millis since Unix epoch UTC. - # Corresponds to the JSON property `lastLevelUpTimestampMillis` - # @return [String] - attr_accessor :last_level_up_timestamp_millis - - # The next level of the player. If the current level is the maximum level, this - # should be same as the current level. - # Corresponds to the JSON property `nextLevel` - # @return [Google::Apis::GamesManagementV1management::GamesPlayerLevelResource] - attr_accessor :next_level - - def initialize(**args) - @current_experience_points = args[:current_experience_points] unless args[:current_experience_points].nil? - @current_level = args[:current_level] unless args[:current_level].nil? - @last_level_up_timestamp_millis = args[:last_level_up_timestamp_millis] unless args[:last_level_up_timestamp_millis].nil? - @next_level = args[:next_level] unless args[:next_level].nil? - end - end - - # This is a JSON template for 1P/3P metadata about a user's level. - class GamesPlayerLevelResource - include Google::Apis::Core::Hashable - - # The level for the user. - # Corresponds to the JSON property `level` - # @return [Fixnum] - attr_accessor :level - - # The maximum experience points for this level. - # Corresponds to the JSON property `maxExperiencePoints` - # @return [String] - attr_accessor :max_experience_points - - # The minimum experience points for this level. - # Corresponds to the JSON property `minExperiencePoints` - # @return [String] - attr_accessor :min_experience_points - - def initialize(**args) - @level = args[:level] unless args[:level].nil? - @max_experience_points = args[:max_experience_points] unless args[:max_experience_points].nil? - @min_experience_points = args[:min_experience_points] unless args[:min_experience_points].nil? - end - end - - # This is a JSON template for the HiddenPlayer resource. - class HiddenPlayer - include Google::Apis::Core::Hashable - - # The time this player was hidden. - # Corresponds to the JSON property `hiddenTimeMillis` - # @return [String] - attr_accessor :hidden_time_millis - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#hiddenPlayer. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The player information. - # Corresponds to the JSON property `player` - # @return [Google::Apis::GamesManagementV1management::Player] - attr_accessor :player - - def initialize(**args) - @hidden_time_millis = args[:hidden_time_millis] unless args[:hidden_time_millis].nil? - @kind = args[:kind] unless args[:kind].nil? - @player = args[:player] unless args[:player].nil? - end - end - - # This is a JSON template for a list of hidden players. - class HiddenPlayerList - include Google::Apis::Core::Hashable - - # The players. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#hiddenPlayerList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination token for the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**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 - - # This is a JSON template for a Player resource. - class Player - include Google::Apis::Core::Hashable - - # The base URL for the image that represents the player. - # Corresponds to the JSON property `avatarImageUrl` - # @return [String] - attr_accessor :avatar_image_url - - # The name to display for the player. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # An object to represent Play Game experience information for the player. - # Corresponds to the JSON property `experienceInfo` - # @return [Google::Apis::GamesManagementV1management::GamesPlayerExperienceInfoResource] - attr_accessor :experience_info - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#player. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Details about the last time this player played a multiplayer game with the - # currently authenticated player. Populated for PLAYED_WITH player collection - # members. - # Corresponds to the JSON property `lastPlayedWith` - # @return [Google::Apis::GamesManagementV1management::GamesPlayedResource] - attr_accessor :last_played_with - - # An object representation of the individual components of the player's name. - # For some players, these fields may not be present. - # Corresponds to the JSON property `name` - # @return [Google::Apis::GamesManagementV1management::Player::Name] - attr_accessor :name - - # The ID of the player. - # Corresponds to the JSON property `playerId` - # @return [String] - attr_accessor :player_id - - # The player's title rewarded for their game activities. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - def initialize(**args) - @avatar_image_url = args[:avatar_image_url] unless args[:avatar_image_url].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @experience_info = args[:experience_info] unless args[:experience_info].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_played_with = args[:last_played_with] unless args[:last_played_with].nil? - @name = args[:name] unless args[:name].nil? - @player_id = args[:player_id] unless args[:player_id].nil? - @title = args[:title] unless args[:title].nil? - end - # An object representation of the individual components of the player's name. - # For some players, these fields may not be present. - class Name - include Google::Apis::Core::Hashable - - # The family name of this player. In some places, this is known as the last name. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The given name of this player. In some places, this is known as the first name. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - def initialize(**args) - @family_name = args[:family_name] unless args[:family_name].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - end - end - end - - # This is a JSON template for a list of leaderboard reset resources. - class PlayerScoreResetAllResponse - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#playerScoreResetResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The leaderboard reset results. - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - def initialize(**args) - @kind = args[:kind] unless args[:kind].nil? - @results = args[:results] unless args[:results].nil? - end - end - - # This is a JSON template for a list of reset leaderboard entry resources. - class PlayerScoreResetResponse - include Google::Apis::Core::Hashable - - # The ID of an leaderboard for which player state has been updated. - # Corresponds to the JSON property `definitionId` - # @return [String] - attr_accessor :definition_id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#playerScoreResetResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The time spans of the updated score. - # Possible values are: - # - "ALL_TIME" - The score is an all-time score. - # - "WEEKLY" - The score is a weekly score. - # - "DAILY" - The score is a daily score. - # Corresponds to the JSON property `resetScoreTimeSpans` - # @return [Array] - attr_accessor :reset_score_time_spans - - def initialize(**args) - @definition_id = args[:definition_id] unless args[:definition_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @reset_score_time_spans = args[:reset_score_time_spans] unless args[:reset_score_time_spans].nil? - end - end - - # This is a JSON template for multiple quests reset all request. - class QuestsResetMultipleForAllRequest - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#questsResetMultipleForAllRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The IDs of quests to reset. - # Corresponds to the JSON property `quest_ids` - # @return [Array] - attr_accessor :quest_ids - - def initialize(**args) - @kind = args[:kind] unless args[:kind].nil? - @quest_ids = args[:quest_ids] unless args[:quest_ids].nil? - end - end - - # This is a JSON template for multiple scores reset all request. - class ScoresResetMultipleForAllRequest - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string gamesManagement#scoresResetMultipleForAllRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The IDs of leaderboards to reset. - # Corresponds to the JSON property `leaderboard_ids` - # @return [Array] - attr_accessor :leaderboard_ids - - def initialize(**args) - @kind = args[:kind] unless args[:kind].nil? - @leaderboard_ids = args[:leaderboard_ids] unless args[:leaderboard_ids].nil? - end - end - end - end -end diff --git a/generated/google/apis/games_management_v1management/representations.rb b/generated/google/apis/games_management_v1management/representations.rb deleted file mode 100644 index dffcce767..000000000 --- a/generated/google/apis/games_management_v1management/representations.rb +++ /dev/null @@ -1,149 +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 GamesManagementV1management - class AchievementResetAllResponseRepresentation < Google::Apis::Core::JsonRepresentation; end - class AchievementResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation; end - class AchievementResetResponseRepresentation < Google::Apis::Core::JsonRepresentation; end - class EventsResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation; end - class GamesPlayedResourceRepresentation < Google::Apis::Core::JsonRepresentation; end - class GamesPlayerExperienceInfoResourceRepresentation < Google::Apis::Core::JsonRepresentation; end - class GamesPlayerLevelResourceRepresentation < Google::Apis::Core::JsonRepresentation; end - class HiddenPlayerRepresentation < Google::Apis::Core::JsonRepresentation; end - class HiddenPlayerListRepresentation < Google::Apis::Core::JsonRepresentation; end - class PlayerRepresentation < Google::Apis::Core::JsonRepresentation; end - class PlayerScoreResetAllResponseRepresentation < Google::Apis::Core::JsonRepresentation; end - class PlayerScoreResetResponseRepresentation < Google::Apis::Core::JsonRepresentation; end - class QuestsResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation; end - class ScoresResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation; end - - # @private - class AchievementResetAllResponseRepresentation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :results, as: 'results', class: Google::Apis::GamesManagementV1management::AchievementResetResponse, decorator: Google::Apis::GamesManagementV1management::AchievementResetResponseRepresentation - end - - # @private - class AchievementResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation - collection :achievement_ids, as: 'achievement_ids' - - property :kind, as: 'kind' - end - - # @private - class AchievementResetResponseRepresentation < Google::Apis::Core::JsonRepresentation - property :current_state, as: 'currentState' - property :definition_id, as: 'definitionId' - property :kind, as: 'kind' - property :update_occurred, as: 'updateOccurred' - end - - # @private - class EventsResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation - collection :event_ids, as: 'event_ids' - - property :kind, as: 'kind' - end - - # @private - class GamesPlayedResourceRepresentation < Google::Apis::Core::JsonRepresentation - property :auto_matched, as: 'autoMatched' - property :time_millis, as: 'timeMillis' - end - - # @private - class GamesPlayerExperienceInfoResourceRepresentation < Google::Apis::Core::JsonRepresentation - property :current_experience_points, as: 'currentExperiencePoints' - property :current_level, as: 'currentLevel', class: Google::Apis::GamesManagementV1management::GamesPlayerLevelResource, decorator: Google::Apis::GamesManagementV1management::GamesPlayerLevelResourceRepresentation - - property :last_level_up_timestamp_millis, as: 'lastLevelUpTimestampMillis' - property :next_level, as: 'nextLevel', class: Google::Apis::GamesManagementV1management::GamesPlayerLevelResource, decorator: Google::Apis::GamesManagementV1management::GamesPlayerLevelResourceRepresentation - end - - # @private - class GamesPlayerLevelResourceRepresentation < Google::Apis::Core::JsonRepresentation - property :level, as: 'level' - property :max_experience_points, as: 'maxExperiencePoints' - property :min_experience_points, as: 'minExperiencePoints' - end - - # @private - class HiddenPlayerRepresentation < Google::Apis::Core::JsonRepresentation - property :hidden_time_millis, as: 'hiddenTimeMillis' - property :kind, as: 'kind' - property :player, as: 'player', class: Google::Apis::GamesManagementV1management::Player, decorator: Google::Apis::GamesManagementV1management::PlayerRepresentation - end - - # @private - class HiddenPlayerListRepresentation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesManagementV1management::HiddenPlayer, decorator: Google::Apis::GamesManagementV1management::HiddenPlayerRepresentation - - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - - # @private - class PlayerRepresentation < Google::Apis::Core::JsonRepresentation - property :avatar_image_url, as: 'avatarImageUrl' - property :display_name, as: 'displayName' - property :experience_info, as: 'experienceInfo', class: Google::Apis::GamesManagementV1management::GamesPlayerExperienceInfoResource, decorator: Google::Apis::GamesManagementV1management::GamesPlayerExperienceInfoResourceRepresentation - - property :kind, as: 'kind' - property :last_played_with, as: 'lastPlayedWith', class: Google::Apis::GamesManagementV1management::GamesPlayedResource, decorator: Google::Apis::GamesManagementV1management::GamesPlayedResourceRepresentation - - property :name, as: 'name', class: Google::Apis::GamesManagementV1management::Player::Name do - property :family_name, as: 'familyName' - property :given_name, as: 'givenName' - end - - property :player_id, as: 'playerId' - property :title, as: 'title' - end - - # @private - class PlayerScoreResetAllResponseRepresentation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :results, as: 'results', class: Google::Apis::GamesManagementV1management::PlayerScoreResetResponse, decorator: Google::Apis::GamesManagementV1management::PlayerScoreResetResponseRepresentation - end - - # @private - class PlayerScoreResetResponseRepresentation < Google::Apis::Core::JsonRepresentation - property :definition_id, as: 'definitionId' - property :kind, as: 'kind' - collection :reset_score_time_spans, as: 'resetScoreTimeSpans' - end - - # @private - class QuestsResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :quest_ids, as: 'quest_ids' - end - - # @private - class ScoresResetMultipleForAllRequestRepresentation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :leaderboard_ids, as: 'leaderboard_ids' - end - end - end -end diff --git a/generated/google/apis/games_management_v1management/service.rb b/generated/google/apis/games_management_v1management/service.rb deleted file mode 100644 index 6d25be91c..000000000 --- a/generated/google/apis/games_management_v1management/service.rb +++ /dev/null @@ -1,1045 +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 GamesManagementV1management - # Google Play Game Services Management API - # - # The Management API for Google Play Game Services. - # - # @example - # require 'google/apis/games_management_v1management' - # - # GamesManagement = Google::Apis::GamesManagementV1management # Alias the module - # service = GamesManagement::GamesManagementService.new - # - # @see https://developers.google.com/games/services - class GamesManagementService < 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/', 'games/v1management/') - end - - # Resets the achievement with the given ID for the currently authenticated - # player. This method is only accessible to whitelisted tester accounts for your - # application. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesManagementV1management::AchievementResetResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesManagementV1management::AchievementResetResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reset_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}/reset' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesManagementV1management::AchievementResetResponseRepresentation - command.response_class = Google::Apis::GamesManagementV1management::AchievementResetResponse - command.params['achievementId'] = achievement_id unless achievement_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 - - - # Resets all achievements for the currently authenticated player for your - # application. This method is only accessible to whitelisted tester accounts for - # your application. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesManagementV1management::AchievementResetAllResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesManagementV1management::AchievementResetAllResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reset_all(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/reset' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesManagementV1management::AchievementResetAllResponseRepresentation - command.response_class = Google::Apis::GamesManagementV1management::AchievementResetAllResponse - 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 - - - # Resets all draft achievements for all players. This method is only available - # to user accounts for your developer console. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_all_for_all_players(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/resetAllForAllPlayers' - command = make_simple_command(:post, path, options) - 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 - - - # Resets the achievement with the given ID for all players. This method is only - # available to user accounts for your developer console. Only draft achievements - # can be reset. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_for_all_players(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}/resetForAllPlayers' - command = make_simple_command(:post, path, options) - command.params['achievementId'] = achievement_id unless achievement_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 - - - # Resets achievements with the given IDs for all players. This method is only - # available to user accounts for your developer console. Only draft achievements - # may be reset. - # @param [Google::Apis::GamesManagementV1management::AchievementResetMultipleForAllRequest] achievement_reset_multiple_for_all_request_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 [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 reset_multiple_for_all_players(achievement_reset_multiple_for_all_request_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/resetMultipleForAllPlayers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesManagementV1management::AchievementResetMultipleForAllRequestRepresentation - command.request_object = achievement_reset_multiple_for_all_request_obj - 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 list of players hidden from the given application. This method is only - # available to user accounts for your developer console. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [Fixnum] max_results - # The maximum number of player resources to return in the response, used for - # paging. For any response, the actual number of player resources returned may - # be less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesManagementV1management::HiddenPlayerList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesManagementV1management::HiddenPlayerList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_hidden(application_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}/players/hidden' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesManagementV1management::HiddenPlayerListRepresentation - command.response_class = Google::Apis::GamesManagementV1management::HiddenPlayerList - command.params['applicationId'] = application_id unless application_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 - - # Resets all player progress on the event with the given ID for the currently - # authenticated player. This method is only accessible to whitelisted tester - # accounts for your application. All quests for this player that use the event - # will also be reset. - # @param [String] event_id - # The ID of the event. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_event(event_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'events/{eventId}/reset' - command = make_simple_command(:post, path, options) - command.params['eventId'] = event_id unless event_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 - - - # Resets all player progress on all events for the currently authenticated - # player. This method is only accessible to whitelisted tester accounts for your - # application. All quests for this player will also be reset. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_all(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'events/reset' - command = make_simple_command(:post, path, options) - 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 - - - # Resets all draft events for all players. This method is only available to user - # accounts for your developer console. All quests that use any of these events - # will also be reset. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_all_for_all_players(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'events/resetAllForAllPlayers' - command = make_simple_command(:post, path, options) - 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 - - - # Resets the event with the given ID for all players. This method is only - # available to user accounts for your developer console. Only draft events can - # be reset. All quests that use the event will also be reset. - # @param [String] event_id - # The ID of the event. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_for_all_players(event_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'events/{eventId}/resetForAllPlayers' - command = make_simple_command(:post, path, options) - command.params['eventId'] = event_id unless event_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 - - - # Resets events with the given IDs for all players. This method is only - # available to user accounts for your developer console. Only draft events may - # be reset. All quests that use any of the events will also be reset. - # @param [Google::Apis::GamesManagementV1management::EventsResetMultipleForAllRequest] events_reset_multiple_for_all_request_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 [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 reset_multiple_for_all_players(events_reset_multiple_for_all_request_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'events/resetMultipleForAllPlayers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesManagementV1management::EventsResetMultipleForAllRequestRepresentation - command.request_object = events_reset_multiple_for_all_request_obj - 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 - - # Hide the given player's leaderboard scores from the given application. This - # method is only available to user accounts for your developer console. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # 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::Api::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 hide_player(application_id, player_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}/players/hidden/{playerId}' - command = make_simple_command(:post, path, options) - command.params['applicationId'] = application_id unless application_id.nil? - command.params['playerId'] = player_id unless player_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 - - - # Unhide the given player's leaderboard scores from the given application. This - # method is only available to user accounts for your developer console. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # 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::Api::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 unhide_player(application_id, player_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}/players/hidden/{playerId}' - command = make_simple_command(:delete, path, options) - command.params['applicationId'] = application_id unless application_id.nil? - command.params['playerId'] = player_id unless player_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 - - # Resets all player progress on the quest with the given ID for the currently - # authenticated player. This method is only accessible to whitelisted tester - # accounts for your application. - # @param [String] quest_id - # The ID of the quest. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_quest(quest_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'quests/{questId}/reset' - command = make_simple_command(:post, path, options) - command.params['questId'] = quest_id unless quest_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 - - - # Resets all player progress on all quests for the currently authenticated - # player. This method is only accessible to whitelisted tester accounts for your - # application. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_all(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'quests/reset' - command = make_simple_command(:post, path, options) - 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 - - - # Resets all draft quests for all players. This method is only available to user - # accounts for your developer console. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_all_for_all_players(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'quests/resetAllForAllPlayers' - command = make_simple_command(:post, path, options) - 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 - - - # Resets all player progress on the quest with the given ID for all players. - # This method is only available to user accounts for your developer console. - # Only draft quests can be reset. - # @param [String] quest_id - # The ID of the quest. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_for_all_players(quest_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'quests/{questId}/resetForAllPlayers' - command = make_simple_command(:post, path, options) - command.params['questId'] = quest_id unless quest_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 - - - # Resets quests with the given IDs for all players. This method is only - # available to user accounts for your developer console. Only draft quests may - # be reset. - # @param [Google::Apis::GamesManagementV1management::QuestsResetMultipleForAllRequest] quests_reset_multiple_for_all_request_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 [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 reset_multiple_for_all_players(quests_reset_multiple_for_all_request_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'quests/resetMultipleForAllPlayers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesManagementV1management::QuestsResetMultipleForAllRequestRepresentation - command.request_object = quests_reset_multiple_for_all_request_obj - 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 - - # Reset all rooms for the currently authenticated player for your application. - # This method is only accessible to whitelisted tester accounts for your - # application. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_room(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/reset' - command = make_simple_command(:post, path, options) - 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 rooms where the only room participants are from whitelisted tester - # accounts for your application. This method is only available to user accounts - # for your developer console. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_for_all_players(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/resetForAllPlayers' - command = make_simple_command(:post, path, options) - 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 - - # Resets scores for the leaderboard with the given ID for the currently - # authenticated player. This method is only accessible to whitelisted tester - # accounts for your application. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesManagementV1management::PlayerScoreResetResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesManagementV1management::PlayerScoreResetResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reset_score(leaderboard_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}/scores/reset' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesManagementV1management::PlayerScoreResetResponseRepresentation - command.response_class = Google::Apis::GamesManagementV1management::PlayerScoreResetResponse - command.params['leaderboardId'] = leaderboard_id unless leaderboard_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 - - - # Resets all scores for all leaderboards for the currently authenticated players. - # This method is only accessible to whitelisted tester accounts for your - # application. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesManagementV1management::PlayerScoreResetAllResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesManagementV1management::PlayerScoreResetAllResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reset_all(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'scores/reset' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesManagementV1management::PlayerScoreResetAllResponseRepresentation - command.response_class = Google::Apis::GamesManagementV1management::PlayerScoreResetAllResponse - 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 - - - # Resets scores for all draft leaderboards for all players. This method is only - # available to user accounts for your developer console. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_all_for_all_players(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'scores/resetAllForAllPlayers' - command = make_simple_command(:post, path, options) - 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 - - - # Resets scores for the leaderboard with the given ID for all players. This - # method is only available to user accounts for your developer console. Only - # draft leaderboards can be reset. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_for_all_players(leaderboard_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}/scores/resetForAllPlayers' - command = make_simple_command(:post, path, options) - command.params['leaderboardId'] = leaderboard_id unless leaderboard_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 - - - # Resets scores for the leaderboards with the given IDs for all players. This - # method is only available to user accounts for your developer console. Only - # draft leaderboards may be reset. - # @param [Google::Apis::GamesManagementV1management::ScoresResetMultipleForAllRequest] scores_reset_multiple_for_all_request_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 [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 reset_multiple_for_all_players(scores_reset_multiple_for_all_request_obj, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'scores/resetMultipleForAllPlayers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesManagementV1management::ScoresResetMultipleForAllRequestRepresentation - command.request_object = scores_reset_multiple_for_all_request_obj - 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 - - # Reset all turn-based match data for a user. This method is only accessible to - # whitelisted tester accounts for your application. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_turn_based_match(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/reset' - command = make_simple_command(:post, path, options) - 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 turn-based matches where the only match participants are from - # whitelisted tester accounts for your application. This method is only - # available to user accounts for your developer console. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 [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 reset_for_all_players(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/resetForAllPlayers' - command = make_simple_command(:post, path, options) - 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 diff --git a/generated/google/apis/games_v1.rb b/generated/google/apis/games_v1.rb deleted file mode 100644 index e51bdeb4a..000000000 --- a/generated/google/apis/games_v1.rb +++ /dev/null @@ -1,40 +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/games_v1/service.rb' -require 'google/apis/games_v1/classes.rb' -require 'google/apis/games_v1/representations.rb' - -module Google - module Apis - # Google Play Game Services API - # - # The API for Google Play Game Services. - # - # @see https://developers.google.com/games/services/ - module GamesV1 - VERSION = 'V1' - REVISION = '20150601' - - # View and manage its own configuration data in your Google Drive - AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata' - - # Share your Google+ profile information and view and manage your game activity - AUTH_GAMES = 'https://www.googleapis.com/auth/games' - - # Know your basic profile info and list of people in your circles. - AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' - end - end -end diff --git a/generated/google/apis/games_v1/classes.rb b/generated/google/apis/games_v1/classes.rb deleted file mode 100644 index e761024bd..000000000 --- a/generated/google/apis/games_v1/classes.rb +++ /dev/null @@ -1,4578 +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 GamesV1 - - # This is a JSON template for an achievement definition object. - class AchievementDefinition - include Google::Apis::Core::Hashable - - # The type of the achievement. - # Possible values are: - # - "STANDARD" - Achievement is either locked or unlocked. - # - "INCREMENTAL" - Achievement is incremental. - # Corresponds to the JSON property `achievementType` - # @return [String] - attr_accessor :achievement_type - - # The description of the achievement. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Experience points which will be earned when unlocking this achievement. - # Corresponds to the JSON property `experiencePoints` - # @return [String] - attr_accessor :experience_points - - # The total steps for an incremental achievement as a string. - # Corresponds to the JSON property `formattedTotalSteps` - # @return [String] - attr_accessor :formatted_total_steps - - # The ID of the achievement. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The initial state of the achievement. - # Possible values are: - # - "HIDDEN" - Achievement is hidden. - # - "REVEALED" - Achievement is revealed. - # - "UNLOCKED" - Achievement is unlocked. - # Corresponds to the JSON property `initialState` - # @return [String] - attr_accessor :initial_state - - # Indicates whether the revealed icon image being returned is a default image, - # or is provided by the game. - # Corresponds to the JSON property `isRevealedIconUrlDefault` - # @return [Boolean] - attr_accessor :is_revealed_icon_url_default - alias_method :is_revealed_icon_url_default?, :is_revealed_icon_url_default - - # Indicates whether the unlocked icon image being returned is a default image, - # or is game-provided. - # Corresponds to the JSON property `isUnlockedIconUrlDefault` - # @return [Boolean] - attr_accessor :is_unlocked_icon_url_default - alias_method :is_unlocked_icon_url_default?, :is_unlocked_icon_url_default - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementDefinition. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the achievement. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The image URL for the revealed achievement icon. - # Corresponds to the JSON property `revealedIconUrl` - # @return [String] - attr_accessor :revealed_icon_url - - # The total steps for an incremental achievement. - # Corresponds to the JSON property `totalSteps` - # @return [Fixnum] - attr_accessor :total_steps - - # The image URL for the unlocked achievement icon. - # Corresponds to the JSON property `unlockedIconUrl` - # @return [String] - attr_accessor :unlocked_icon_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @achievement_type = args[:achievement_type] unless args[:achievement_type].nil? - @description = args[:description] unless args[:description].nil? - @experience_points = args[:experience_points] unless args[:experience_points].nil? - @formatted_total_steps = args[:formatted_total_steps] unless args[:formatted_total_steps].nil? - @id = args[:id] unless args[:id].nil? - @initial_state = args[:initial_state] unless args[:initial_state].nil? - @is_revealed_icon_url_default = args[:is_revealed_icon_url_default] unless args[:is_revealed_icon_url_default].nil? - @is_unlocked_icon_url_default = args[:is_unlocked_icon_url_default] unless args[:is_unlocked_icon_url_default].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @revealed_icon_url = args[:revealed_icon_url] unless args[:revealed_icon_url].nil? - @total_steps = args[:total_steps] unless args[:total_steps].nil? - @unlocked_icon_url = args[:unlocked_icon_url] unless args[:unlocked_icon_url].nil? - end - end - - # This is a JSON template for a list of achievement definition objects. - class ListAchievementDefinitionsResponse - include Google::Apis::Core::Hashable - - # The achievement definitions. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementDefinitionsListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token corresponding to 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 - - # This is a JSON template for an achievement increment response - class AchievementIncrementResponse - include Google::Apis::Core::Hashable - - # The current steps recorded for this incremental achievement. - # Corresponds to the JSON property `currentSteps` - # @return [Fixnum] - attr_accessor :current_steps - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementIncrementResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Whether the the current steps for the achievement has reached the number of - # steps required to unlock. - # Corresponds to the JSON property `newlyUnlocked` - # @return [Boolean] - attr_accessor :newly_unlocked - alias_method :newly_unlocked?, :newly_unlocked - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @current_steps = args[:current_steps] unless args[:current_steps].nil? - @kind = args[:kind] unless args[:kind].nil? - @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil? - end - end - - # This is a JSON template for an achievement reveal response - class AchievementRevealResponse - include Google::Apis::Core::Hashable - - # The current state of the achievement for which a reveal was attempted. This - # might be UNLOCKED if the achievement was already unlocked. - # Possible values are: - # - "REVEALED" - Achievement is revealed. - # - "UNLOCKED" - Achievement is unlocked. - # Corresponds to the JSON property `currentState` - # @return [String] - attr_accessor :current_state - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementRevealResponse. - # 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) - @current_state = args[:current_state] unless args[:current_state].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for an achievement set steps at least response. - class AchievementSetStepsAtLeastResponse - include Google::Apis::Core::Hashable - - # The current steps recorded for this incremental achievement. - # Corresponds to the JSON property `currentSteps` - # @return [Fixnum] - attr_accessor :current_steps - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementSetStepsAtLeastResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Whether the the current steps for the achievement has reached the number of - # steps required to unlock. - # Corresponds to the JSON property `newlyUnlocked` - # @return [Boolean] - attr_accessor :newly_unlocked - alias_method :newly_unlocked?, :newly_unlocked - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @current_steps = args[:current_steps] unless args[:current_steps].nil? - @kind = args[:kind] unless args[:kind].nil? - @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil? - end - end - - # This is a JSON template for an achievement unlock response - class AchievementUnlockResponse - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementUnlockResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Whether this achievement was newly unlocked (that is, whether the unlock - # request for the achievement was the first for the player). - # Corresponds to the JSON property `newlyUnlocked` - # @return [Boolean] - attr_accessor :newly_unlocked - alias_method :newly_unlocked?, :newly_unlocked - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil? - end - end - - # This is a JSON template for a list of achievement update requests. - class AchievementUpdateMultipleRequest - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementUpdateMultipleRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The individual achievement update requests. - # Corresponds to the JSON property `updates` - # @return [Array] - attr_accessor :updates - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @updates = args[:updates] unless args[:updates].nil? - end - end - - # This is a JSON template for an achievement unlock response. - class AchievementUpdateMultipleResponse - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementUpdateListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The updated state of the achievements. - # Corresponds to the JSON property `updatedAchievements` - # @return [Array] - attr_accessor :updated_achievements - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @updated_achievements = args[:updated_achievements] unless args[:updated_achievements].nil? - end - end - - # This is a JSON template for a request to update an achievement. - class UpdateAchievementRequest - include Google::Apis::Core::Hashable - - # The achievement this update is being applied to. - # Corresponds to the JSON property `achievementId` - # @return [String] - attr_accessor :achievement_id - - # This is a JSON template for the payload to request to increment an achievement. - # Corresponds to the JSON property `incrementPayload` - # @return [Google::Apis::GamesV1::GamesAchievementIncrement] - attr_accessor :increment_payload - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementUpdateRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for the payload to request to increment an achievement. - # Corresponds to the JSON property `setStepsAtLeastPayload` - # @return [Google::Apis::GamesV1::GamesAchievementSetStepsAtLeast] - attr_accessor :set_steps_at_least_payload - - # The type of update being applied. - # Possible values are: - # - "REVEAL" - Achievement is revealed. - # - "UNLOCK" - Achievement is unlocked. - # - "INCREMENT" - Achievement is incremented. - # - "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the passed - # value. - # Corresponds to the JSON property `updateType` - # @return [String] - attr_accessor :update_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @achievement_id = args[:achievement_id] unless args[:achievement_id].nil? - @increment_payload = args[:increment_payload] unless args[:increment_payload].nil? - @kind = args[:kind] unless args[:kind].nil? - @set_steps_at_least_payload = args[:set_steps_at_least_payload] unless args[:set_steps_at_least_payload].nil? - @update_type = args[:update_type] unless args[:update_type].nil? - end - end - - # This is a JSON template for an achievement update response. - class UpdateAchievementResponse - include Google::Apis::Core::Hashable - - # The achievement this update is was applied to. - # Corresponds to the JSON property `achievementId` - # @return [String] - attr_accessor :achievement_id - - # The current state of the achievement. - # Possible values are: - # - "HIDDEN" - Achievement is hidden. - # - "REVEALED" - Achievement is revealed. - # - "UNLOCKED" - Achievement is unlocked. - # Corresponds to the JSON property `currentState` - # @return [String] - attr_accessor :current_state - - # The current steps recorded for this achievement if it is incremental. - # Corresponds to the JSON property `currentSteps` - # @return [Fixnum] - attr_accessor :current_steps - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#achievementUpdateResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Whether this achievement was newly unlocked (that is, whether the unlock - # request for the achievement was the first for the player). - # Corresponds to the JSON property `newlyUnlocked` - # @return [Boolean] - attr_accessor :newly_unlocked - alias_method :newly_unlocked?, :newly_unlocked - - # Whether the requested updates actually affected the achievement. - # Corresponds to the JSON property `updateOccurred` - # @return [Boolean] - attr_accessor :update_occurred - alias_method :update_occurred?, :update_occurred - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @achievement_id = args[:achievement_id] unless args[:achievement_id].nil? - @current_state = args[:current_state] unless args[:current_state].nil? - @current_steps = args[:current_steps] unless args[:current_steps].nil? - @kind = args[:kind] unless args[:kind].nil? - @newly_unlocked = args[:newly_unlocked] unless args[:newly_unlocked].nil? - @update_occurred = args[:update_occurred] unless args[:update_occurred].nil? - end - end - - # This is a JSON template for aggregate stats. - class AggregateStats - include Google::Apis::Core::Hashable - - # The number of messages sent between a pair of peers. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#aggregateStats. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The maximum amount. - # Corresponds to the JSON property `max` - # @return [String] - attr_accessor :max - - # The minimum amount. - # Corresponds to the JSON property `min` - # @return [String] - attr_accessor :min - - # The total number of bytes sent for messages between a pair of peers. - # Corresponds to the JSON property `sum` - # @return [String] - attr_accessor :sum - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @kind = args[:kind] unless args[:kind].nil? - @max = args[:max] unless args[:max].nil? - @min = args[:min] unless args[:min].nil? - @sum = args[:sum] unless args[:sum].nil? - end - end - - # This is a JSON template for an anonymous player - class AnonymousPlayer - include Google::Apis::Core::Hashable - - # The base URL for the image to display for the anonymous player. - # Corresponds to the JSON property `avatarImageUrl` - # @return [String] - attr_accessor :avatar_image_url - - # The name to display for the anonymous player. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#anonymousPlayer. - # 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) - @avatar_image_url = args[:avatar_image_url] unless args[:avatar_image_url].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for the Application resource. - class Application - include Google::Apis::Core::Hashable - - # The number of achievements visible to the currently authenticated player. - # Corresponds to the JSON property `achievement_count` - # @return [Fixnum] - attr_accessor :achievement_count - - # The assets of the application. - # Corresponds to the JSON property `assets` - # @return [Array] - attr_accessor :assets - - # The author of the application. - # Corresponds to the JSON property `author` - # @return [String] - attr_accessor :author - - # This is a JSON template for an application category object. - # Corresponds to the JSON property `category` - # @return [Google::Apis::GamesV1::ApplicationCategory] - attr_accessor :category - - # The description of the application. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A list of features that have been enabled for the application. - # Possible values are: - # - "SNAPSHOTS" - Snapshots has been enabled - # Corresponds to the JSON property `enabledFeatures` - # @return [Array] - attr_accessor :enabled_features - - # The ID of the application. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The instances of the application. - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#application. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The last updated timestamp of the application. - # Corresponds to the JSON property `lastUpdatedTimestamp` - # @return [String] - attr_accessor :last_updated_timestamp - - # The number of leaderboards visible to the currently authenticated player. - # Corresponds to the JSON property `leaderboard_count` - # @return [Fixnum] - attr_accessor :leaderboard_count - - # The name of the application. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A hint to the client UI for what color to use as an app-themed color. The - # color is given as an RGB triplet (e.g. "E0E0E0"). - # Corresponds to the JSON property `themeColor` - # @return [String] - attr_accessor :theme_color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @achievement_count = args[:achievement_count] unless args[:achievement_count].nil? - @assets = args[:assets] unless args[:assets].nil? - @author = args[:author] unless args[:author].nil? - @category = args[:category] unless args[:category].nil? - @description = args[:description] unless args[:description].nil? - @enabled_features = args[:enabled_features] unless args[:enabled_features].nil? - @id = args[:id] unless args[:id].nil? - @instances = args[:instances] unless args[:instances].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_updated_timestamp = args[:last_updated_timestamp] unless args[:last_updated_timestamp].nil? - @leaderboard_count = args[:leaderboard_count] unless args[:leaderboard_count].nil? - @name = args[:name] unless args[:name].nil? - @theme_color = args[:theme_color] unless args[:theme_color].nil? - end - end - - # This is a JSON template for an application category object. - class ApplicationCategory - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#applicationCategory. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The primary category. - # Corresponds to the JSON property `primary` - # @return [String] - attr_accessor :primary - - # The secondary category. - # Corresponds to the JSON property `secondary` - # @return [String] - attr_accessor :secondary - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @primary = args[:primary] unless args[:primary].nil? - @secondary = args[:secondary] unless args[:secondary].nil? - end - end - - # This is a JSON template for data related to individual game categories. - class Category - include Google::Apis::Core::Hashable - - # The category name. - # Corresponds to the JSON property `category` - # @return [String] - attr_accessor :category - - # Experience points earned in this category. - # Corresponds to the JSON property `experiencePoints` - # @return [String] - attr_accessor :experience_points - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#category. - # 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) - @category = args[:category] unless args[:category].nil? - @experience_points = args[:experience_points] unless args[:experience_points].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for a list of category data objects. - class ListCategoryResponse - include Google::Apis::Core::Hashable - - # The list of categories with usage data. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#categoryListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token corresponding to 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 - - # This is a JSON template for a batch update failure resource. - class EventBatchRecordFailure - include Google::Apis::Core::Hashable - - # The cause for the update failure. - # Possible values are: - # - "TOO_LARGE": A batch request was issued with more events than are allowed in - # a single batch. - # - "TIME_PERIOD_EXPIRED": A batch was sent with data too far in the past to - # record. - # - "TIME_PERIOD_SHORT": A batch was sent with a time range that was too short. - # - "TIME_PERIOD_LONG": A batch was sent with a time range that was too long. - # - "ALREADY_UPDATED": An attempt was made to record a batch of data which was - # already seen. - # - "RECORD_RATE_HIGH": An attempt was made to record data faster than the - # server will apply updates. - # Corresponds to the JSON property `failureCause` - # @return [String] - attr_accessor :failure_cause - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventBatchRecordFailure. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for an event period time range. - # Corresponds to the JSON property `range` - # @return [Google::Apis::GamesV1::EventPeriodRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @failure_cause = args[:failure_cause] unless args[:failure_cause].nil? - @kind = args[:kind] unless args[:kind].nil? - @range = args[:range] unless args[:range].nil? - end - end - - # This is a JSON template for an event child relationship resource. - class EventChild - include Google::Apis::Core::Hashable - - # The ID of the child event. - # Corresponds to the JSON property `childId` - # @return [String] - attr_accessor :child_id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventChild. - # 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) - @child_id = args[:child_id] unless args[:child_id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for an event definition resource. - class EventDefinition - include Google::Apis::Core::Hashable - - # A list of events that are a child of this event. - # Corresponds to the JSON property `childEvents` - # @return [Array] - attr_accessor :child_events - - # Description of what this event represents. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The name to display for the event. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the event. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The base URL for the image that represents the event. - # Corresponds to the JSON property `imageUrl` - # @return [String] - attr_accessor :image_url - - # Indicates whether the icon image being returned is a default image, or is game- - # provided. - # Corresponds to the JSON property `isDefaultImageUrl` - # @return [Boolean] - attr_accessor :is_default_image_url - alias_method :is_default_image_url?, :is_default_image_url - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventDefinition. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The visibility of event being tracked in this definition. - # Possible values are: - # - "REVEALED": This event should be visible to all users. - # - "HIDDEN": This event should only be shown to users that have recorded this - # event at least once. - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @child_events = args[:child_events] unless args[:child_events].nil? - @description = args[:description] unless args[:description].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image_url = args[:image_url] unless args[:image_url].nil? - @is_default_image_url = args[:is_default_image_url] unless args[:is_default_image_url].nil? - @kind = args[:kind] unless args[:kind].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # This is a JSON template for a ListDefinitions response. - class ListEventDefinitionResponse - include Google::Apis::Core::Hashable - - # The event definitions. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventDefinitionListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination 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) - @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 - - # This is a JSON template for an event period time range. - class EventPeriodRange - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventPeriodRange. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The time when this update period ends, in millis, since 1970 UTC (Unix Epoch). - # Corresponds to the JSON property `periodEndMillis` - # @return [String] - attr_accessor :period_end_millis - - # The time when this update period begins, in millis, since 1970 UTC (Unix Epoch) - # . - # Corresponds to the JSON property `periodStartMillis` - # @return [String] - attr_accessor :period_start_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @period_end_millis = args[:period_end_millis] unless args[:period_end_millis].nil? - @period_start_millis = args[:period_start_millis] unless args[:period_start_millis].nil? - end - end - - # This is a JSON template for an event period update resource. - class EventPeriodUpdate - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventPeriodUpdate. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for an event period time range. - # Corresponds to the JSON property `timePeriod` - # @return [Google::Apis::GamesV1::EventPeriodRange] - attr_accessor :time_period - - # The updates being made for this time period. - # Corresponds to the JSON property `updates` - # @return [Array] - attr_accessor :updates - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @time_period = args[:time_period] unless args[:time_period].nil? - @updates = args[:updates] unless args[:updates].nil? - end - end - - # This is a JSON template for an event update failure resource. - class EventRecordFailure - include Google::Apis::Core::Hashable - - # The ID of the event that was not updated. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # The cause for the update failure. - # Possible values are: - # - "NOT_FOUND" - An attempt was made to set an event that was not defined. - # - "INVALID_UPDATE_VALUE" - An attempt was made to increment an event by a non- - # positive value. - # Corresponds to the JSON property `failureCause` - # @return [String] - attr_accessor :failure_cause - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventRecordFailure. - # 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) - @event_id = args[:event_id] unless args[:event_id].nil? - @failure_cause = args[:failure_cause] unless args[:failure_cause].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for an event period update resource. - class EventRecordRequest - include Google::Apis::Core::Hashable - - # The current time when this update was sent, in milliseconds, since 1970 UTC ( - # Unix Epoch). - # Corresponds to the JSON property `currentTimeMillis` - # @return [String] - attr_accessor :current_time_millis - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventRecordRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The request ID used to identify this attempt to record events. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # A list of the time period updates being made in this request. - # Corresponds to the JSON property `timePeriods` - # @return [Array] - attr_accessor :time_periods - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @current_time_millis = args[:current_time_millis] unless args[:current_time_millis].nil? - @kind = args[:kind] unless args[:kind].nil? - @request_id = args[:request_id] unless args[:request_id].nil? - @time_periods = args[:time_periods] unless args[:time_periods].nil? - end - end - - # This is a JSON template for an event period update resource. - class UpdateEventRequest - include Google::Apis::Core::Hashable - - # The ID of the event being modified in this update. - # Corresponds to the JSON property `definitionId` - # @return [String] - attr_accessor :definition_id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventUpdateRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of times this event occurred in this time period. - # Corresponds to the JSON property `updateCount` - # @return [String] - attr_accessor :update_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @definition_id = args[:definition_id] unless args[:definition_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @update_count = args[:update_count] unless args[:update_count].nil? - end - end - - # This is a JSON template for an event period update resource. - class UpdateEventResponse - include Google::Apis::Core::Hashable - - # Any batch-wide failures which occurred applying updates. - # Corresponds to the JSON property `batchFailures` - # @return [Array] - attr_accessor :batch_failures - - # Any failures updating a particular event. - # Corresponds to the JSON property `eventFailures` - # @return [Array] - attr_accessor :event_failures - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#eventUpdateResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The current status of any updated events - # Corresponds to the JSON property `playerEvents` - # @return [Array] - attr_accessor :player_events - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @batch_failures = args[:batch_failures] unless args[:batch_failures].nil? - @event_failures = args[:event_failures] unless args[:event_failures].nil? - @kind = args[:kind] unless args[:kind].nil? - @player_events = args[:player_events] unless args[:player_events].nil? - end - end - - # This is a JSON template for the payload to request to increment an achievement. - class GamesAchievementIncrement - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#GamesAchievementIncrement. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The requestId associated with an increment to an achievement. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The number of steps to be incremented. - # Corresponds to the JSON property `steps` - # @return [Fixnum] - attr_accessor :steps - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @request_id = args[:request_id] unless args[:request_id].nil? - @steps = args[:steps] unless args[:steps].nil? - end - end - - # This is a JSON template for the payload to request to increment an achievement. - class GamesAchievementSetStepsAtLeast - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#GamesAchievementSetStepsAtLeast. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The minimum number of steps for the achievement to be set to. - # Corresponds to the JSON property `steps` - # @return [Fixnum] - attr_accessor :steps - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @steps = args[:steps] unless args[:steps].nil? - end - end - - # This is a JSON template for an image asset object. - class ImageAsset - include Google::Apis::Core::Hashable - - # The height of the asset. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#imageAsset. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the asset. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The URL of the asset. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width of the asset. - # 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? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # This is a JSON template for the Instance resource. - class Instance - include Google::Apis::Core::Hashable - - # URI which shows where a user can acquire this instance. - # Corresponds to the JSON property `acquisitionUri` - # @return [String] - attr_accessor :acquisition_uri - - # This is a JSON template for the Android instance details resource. - # Corresponds to the JSON property `androidInstance` - # @return [Google::Apis::GamesV1::InstanceAndroidDetails] - attr_accessor :android_instance - - # This is a JSON template for the iOS details resource. - # Corresponds to the JSON property `iosInstance` - # @return [Google::Apis::GamesV1::InstanceIosDetails] - attr_accessor :ios_instance - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#instance. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Localized display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The platform type. - # Possible values are: - # - "ANDROID" - Instance is for Android. - # - "IOS" - Instance is for iOS - # - "WEB_APP" - Instance is for Web App. - # Corresponds to the JSON property `platformType` - # @return [String] - attr_accessor :platform_type - - # Flag to show if this game instance supports realtime play. - # Corresponds to the JSON property `realtimePlay` - # @return [Boolean] - attr_accessor :realtime_play - alias_method :realtime_play?, :realtime_play - - # Flag to show if this game instance supports turn based play. - # Corresponds to the JSON property `turnBasedPlay` - # @return [Boolean] - attr_accessor :turn_based_play - alias_method :turn_based_play?, :turn_based_play - - # This is a JSON template for the Web details resource. - # Corresponds to the JSON property `webInstance` - # @return [Google::Apis::GamesV1::InstanceWebDetails] - attr_accessor :web_instance - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acquisition_uri = args[:acquisition_uri] unless args[:acquisition_uri].nil? - @android_instance = args[:android_instance] unless args[:android_instance].nil? - @ios_instance = args[:ios_instance] unless args[:ios_instance].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @platform_type = args[:platform_type] unless args[:platform_type].nil? - @realtime_play = args[:realtime_play] unless args[:realtime_play].nil? - @turn_based_play = args[:turn_based_play] unless args[:turn_based_play].nil? - @web_instance = args[:web_instance] unless args[:web_instance].nil? - end - end - - # This is a JSON template for the Android instance details resource. - class InstanceAndroidDetails - include Google::Apis::Core::Hashable - - # Flag indicating whether the anti-piracy check is enabled. - # Corresponds to the JSON property `enablePiracyCheck` - # @return [Boolean] - attr_accessor :enable_piracy_check - alias_method :enable_piracy_check?, :enable_piracy_check - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#instanceAndroidDetails. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Android package name which maps to Google Play URL. - # Corresponds to the JSON property `packageName` - # @return [String] - attr_accessor :package_name - - # Indicates that this instance is the default for new installations. - # Corresponds to the JSON property `preferred` - # @return [Boolean] - attr_accessor :preferred - alias_method :preferred?, :preferred - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @enable_piracy_check = args[:enable_piracy_check] unless args[:enable_piracy_check].nil? - @kind = args[:kind] unless args[:kind].nil? - @package_name = args[:package_name] unless args[:package_name].nil? - @preferred = args[:preferred] unless args[:preferred].nil? - end - end - - # This is a JSON template for the iOS details resource. - class InstanceIosDetails - include Google::Apis::Core::Hashable - - # Bundle identifier. - # Corresponds to the JSON property `bundleIdentifier` - # @return [String] - attr_accessor :bundle_identifier - - # iTunes App ID. - # Corresponds to the JSON property `itunesAppId` - # @return [String] - attr_accessor :itunes_app_id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#instanceIosDetails. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Indicates that this instance is the default for new installations on iPad - # devices. - # Corresponds to the JSON property `preferredForIpad` - # @return [Boolean] - attr_accessor :preferred_for_ipad - alias_method :preferred_for_ipad?, :preferred_for_ipad - - # Indicates that this instance is the default for new installations on iPhone - # devices. - # Corresponds to the JSON property `preferredForIphone` - # @return [Boolean] - attr_accessor :preferred_for_iphone - alias_method :preferred_for_iphone?, :preferred_for_iphone - - # Flag to indicate if this instance supports iPad. - # Corresponds to the JSON property `supportIpad` - # @return [Boolean] - attr_accessor :support_ipad - alias_method :support_ipad?, :support_ipad - - # Flag to indicate if this instance supports iPhone. - # Corresponds to the JSON property `supportIphone` - # @return [Boolean] - attr_accessor :support_iphone - alias_method :support_iphone?, :support_iphone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bundle_identifier = args[:bundle_identifier] unless args[:bundle_identifier].nil? - @itunes_app_id = args[:itunes_app_id] unless args[:itunes_app_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @preferred_for_ipad = args[:preferred_for_ipad] unless args[:preferred_for_ipad].nil? - @preferred_for_iphone = args[:preferred_for_iphone] unless args[:preferred_for_iphone].nil? - @support_ipad = args[:support_ipad] unless args[:support_ipad].nil? - @support_iphone = args[:support_iphone] unless args[:support_iphone].nil? - end - end - - # This is a JSON template for the Web details resource. - class InstanceWebDetails - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#instanceWebDetails. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Launch URL for the game. - # Corresponds to the JSON property `launchUrl` - # @return [String] - attr_accessor :launch_url - - # Indicates that this instance is the default for new installations. - # Corresponds to the JSON property `preferred` - # @return [Boolean] - attr_accessor :preferred - alias_method :preferred?, :preferred - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @launch_url = args[:launch_url] unless args[:launch_url].nil? - @preferred = args[:preferred] unless args[:preferred].nil? - end - end - - # This is a JSON template for the Leaderboard resource. - class Leaderboard - include Google::Apis::Core::Hashable - - # The icon for the leaderboard. - # Corresponds to the JSON property `iconUrl` - # @return [String] - attr_accessor :icon_url - - # The leaderboard ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Indicates whether the icon image being returned is a default image, or is game- - # provided. - # Corresponds to the JSON property `isIconUrlDefault` - # @return [Boolean] - attr_accessor :is_icon_url_default - alias_method :is_icon_url_default?, :is_icon_url_default - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#leaderboard. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the leaderboard. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # How scores are ordered. - # Possible values are: - # - "LARGER_IS_BETTER" - Larger values are better; scores are sorted in - # descending order. - # - "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted in - # ascending order. - # Corresponds to the JSON property `order` - # @return [String] - attr_accessor :order - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @icon_url = args[:icon_url] unless args[:icon_url].nil? - @id = args[:id] unless args[:id].nil? - @is_icon_url_default = args[:is_icon_url_default] unless args[:is_icon_url_default].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @order = args[:order] unless args[:order].nil? - end - end - - # This is a JSON template for the Leaderboard Entry resource. - class LeaderboardEntry - include Google::Apis::Core::Hashable - - # The localized string for the numerical value of this score. - # Corresponds to the JSON property `formattedScore` - # @return [String] - attr_accessor :formatted_score - - # The localized string for the rank of this score for this leaderboard. - # Corresponds to the JSON property `formattedScoreRank` - # @return [String] - attr_accessor :formatted_score_rank - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#leaderboardEntry. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for a Player resource. - # Corresponds to the JSON property `player` - # @return [Google::Apis::GamesV1::Player] - attr_accessor :player - - # The rank of this score for this leaderboard. - # Corresponds to the JSON property `scoreRank` - # @return [String] - attr_accessor :score_rank - - # Additional information about the score. Values must contain no more than 64 - # URI-safe characters as defined by section 2.3 of RFC 3986. - # Corresponds to the JSON property `scoreTag` - # @return [String] - attr_accessor :score_tag - - # The numerical value of this score. - # Corresponds to the JSON property `scoreValue` - # @return [String] - attr_accessor :score_value - - # The time span of this high score. - # Possible values are: - # - "ALL_TIME" - The score is an all-time high score. - # - "WEEKLY" - The score is a weekly high score. - # - "DAILY" - The score is a daily high score. - # Corresponds to the JSON property `timeSpan` - # @return [String] - attr_accessor :time_span - - # The timestamp at which this score was recorded, in milliseconds since the - # epoch in UTC. - # Corresponds to the JSON property `writeTimestampMillis` - # @return [String] - attr_accessor :write_timestamp_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_score = args[:formatted_score] unless args[:formatted_score].nil? - @formatted_score_rank = args[:formatted_score_rank] unless args[:formatted_score_rank].nil? - @kind = args[:kind] unless args[:kind].nil? - @player = args[:player] unless args[:player].nil? - @score_rank = args[:score_rank] unless args[:score_rank].nil? - @score_tag = args[:score_tag] unless args[:score_tag].nil? - @score_value = args[:score_value] unless args[:score_value].nil? - @time_span = args[:time_span] unless args[:time_span].nil? - @write_timestamp_millis = args[:write_timestamp_millis] unless args[:write_timestamp_millis].nil? - end - end - - # This is a JSON template for a list of leaderboard objects. - class ListLeaderboardResponse - include Google::Apis::Core::Hashable - - # The leaderboards. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#leaderboardListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token corresponding to 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 - - # This is a JSON template for a score rank in a leaderboard. - class LeaderboardScoreRank - include Google::Apis::Core::Hashable - - # The number of scores in the leaderboard as a string. - # Corresponds to the JSON property `formattedNumScores` - # @return [String] - attr_accessor :formatted_num_scores - - # The rank in the leaderboard as a string. - # Corresponds to the JSON property `formattedRank` - # @return [String] - attr_accessor :formatted_rank - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#leaderboardScoreRank. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of scores in the leaderboard. - # Corresponds to the JSON property `numScores` - # @return [String] - attr_accessor :num_scores - - # The rank in the leaderboard. - # Corresponds to the JSON property `rank` - # @return [String] - attr_accessor :rank - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_num_scores = args[:formatted_num_scores] unless args[:formatted_num_scores].nil? - @formatted_rank = args[:formatted_rank] unless args[:formatted_rank].nil? - @kind = args[:kind] unless args[:kind].nil? - @num_scores = args[:num_scores] unless args[:num_scores].nil? - @rank = args[:rank] unless args[:rank].nil? - end - end - - # This is a JSON template for a ListScores response. - class LeaderboardScores - include Google::Apis::Core::Hashable - - # The scores in the leaderboard. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#leaderboardScores. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination token for the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The total number of scores in the leaderboard. - # Corresponds to the JSON property `numScores` - # @return [String] - attr_accessor :num_scores - - # This is a JSON template for the Leaderboard Entry resource. - # Corresponds to the JSON property `playerScore` - # @return [Google::Apis::GamesV1::LeaderboardEntry] - attr_accessor :player_score - - # The pagination token for the previous page of results. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @num_scores = args[:num_scores] unless args[:num_scores].nil? - @player_score = args[:player_score] unless args[:player_score].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - end - end - - # This is a JSON template for the metagame config resource - class MetagameConfig - include Google::Apis::Core::Hashable - - # Current version of the metagame configuration data. When this data is updated, - # the version number will be increased by one. - # Corresponds to the JSON property `currentVersion` - # @return [Fixnum] - attr_accessor :current_version - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#metagameConfig. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The list of player levels. - # Corresponds to the JSON property `playerLevels` - # @return [Array] - attr_accessor :player_levels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @current_version = args[:current_version] unless args[:current_version].nil? - @kind = args[:kind] unless args[:kind].nil? - @player_levels = args[:player_levels] unless args[:player_levels].nil? - end - end - - # This is a JSON template for network diagnostics reported for a client. - class NetworkDiagnostics - include Google::Apis::Core::Hashable - - # The Android network subtype. - # Corresponds to the JSON property `androidNetworkSubtype` - # @return [Fixnum] - attr_accessor :android_network_subtype - - # The Android network type. - # Corresponds to the JSON property `androidNetworkType` - # @return [Fixnum] - attr_accessor :android_network_type - - # iOS network type as defined in Reachability.h. - # Corresponds to the JSON property `iosNetworkType` - # @return [Fixnum] - attr_accessor :ios_network_type - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#networkDiagnostics. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The MCC+MNC code for the client's network connection. On Android: http:// - # developer.android.com/reference/android/telephony/TelephonyManager.html# - # getNetworkOperator() On iOS, see: https://developer.apple.com/library/ios/ - # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html - # Corresponds to the JSON property `networkOperatorCode` - # @return [String] - attr_accessor :network_operator_code - - # The name of the carrier of the client's network connection. On Android: http:// - # developer.android.com/reference/android/telephony/TelephonyManager.html# - # getNetworkOperatorName() On iOS: https://developer.apple.com/library/ios/ - # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#/ - # /apple_ref/occ/instp/CTCarrier/carrierName - # Corresponds to the JSON property `networkOperatorName` - # @return [String] - attr_accessor :network_operator_name - - # The amount of time in milliseconds it took for the client to establish a - # connection with the XMPP server. - # Corresponds to the JSON property `registrationLatencyMillis` - # @return [Fixnum] - attr_accessor :registration_latency_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @android_network_subtype = args[:android_network_subtype] unless args[:android_network_subtype].nil? - @android_network_type = args[:android_network_type] unless args[:android_network_type].nil? - @ios_network_type = args[:ios_network_type] unless args[:ios_network_type].nil? - @kind = args[:kind] unless args[:kind].nil? - @network_operator_code = args[:network_operator_code] unless args[:network_operator_code].nil? - @network_operator_name = args[:network_operator_name] unless args[:network_operator_name].nil? - @registration_latency_millis = args[:registration_latency_millis] unless args[:registration_latency_millis].nil? - end - end - - # This is a JSON template for a result for a match participant. - class ParticipantResult - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#participantResult. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The ID of the participant. - # Corresponds to the JSON property `participantId` - # @return [String] - attr_accessor :participant_id - - # The placement or ranking of the participant in the match results; a number - # from one to the number of participants in the match. Multiple participants may - # have the same placing value in case of a type. - # Corresponds to the JSON property `placing` - # @return [Fixnum] - attr_accessor :placing - - # The result of the participant for this match. - # Possible values are: - # - "MATCH_RESULT_WIN" - The participant won the match. - # - "MATCH_RESULT_LOSS" - The participant lost the match. - # - "MATCH_RESULT_TIE" - The participant tied the match. - # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or - # loses this kind of game.) - # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the - # match. - # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for - # this participant. - # Corresponds to the JSON property `result` - # @return [String] - attr_accessor :result - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @participant_id = args[:participant_id] unless args[:participant_id].nil? - @placing = args[:placing] unless args[:placing].nil? - @result = args[:result] unless args[:result].nil? - end - end - - # This is a JSON template for peer channel diagnostics. - class PeerChannelDiagnostics - include Google::Apis::Core::Hashable - - # This is a JSON template for aggregate stats. - # Corresponds to the JSON property `bytesReceived` - # @return [Google::Apis::GamesV1::AggregateStats] - attr_accessor :bytes_received - - # This is a JSON template for aggregate stats. - # Corresponds to the JSON property `bytesSent` - # @return [Google::Apis::GamesV1::AggregateStats] - attr_accessor :bytes_sent - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#peerChannelDiagnostics. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Number of messages lost. - # Corresponds to the JSON property `numMessagesLost` - # @return [Fixnum] - attr_accessor :num_messages_lost - - # Number of messages received. - # Corresponds to the JSON property `numMessagesReceived` - # @return [Fixnum] - attr_accessor :num_messages_received - - # Number of messages sent. - # Corresponds to the JSON property `numMessagesSent` - # @return [Fixnum] - attr_accessor :num_messages_sent - - # Number of send failures. - # Corresponds to the JSON property `numSendFailures` - # @return [Fixnum] - attr_accessor :num_send_failures - - # This is a JSON template for aggregate stats. - # Corresponds to the JSON property `roundtripLatencyMillis` - # @return [Google::Apis::GamesV1::AggregateStats] - attr_accessor :roundtrip_latency_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bytes_received = args[:bytes_received] unless args[:bytes_received].nil? - @bytes_sent = args[:bytes_sent] unless args[:bytes_sent].nil? - @kind = args[:kind] unless args[:kind].nil? - @num_messages_lost = args[:num_messages_lost] unless args[:num_messages_lost].nil? - @num_messages_received = args[:num_messages_received] unless args[:num_messages_received].nil? - @num_messages_sent = args[:num_messages_sent] unless args[:num_messages_sent].nil? - @num_send_failures = args[:num_send_failures] unless args[:num_send_failures].nil? - @roundtrip_latency_millis = args[:roundtrip_latency_millis] unless args[:roundtrip_latency_millis].nil? - end - end - - # This is a JSON template for peer session diagnostics. - class PeerSessionDiagnostics - include Google::Apis::Core::Hashable - - # Connected time in milliseconds. - # Corresponds to the JSON property `connectedTimestampMillis` - # @return [String] - attr_accessor :connected_timestamp_millis - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#peerSessionDiagnostics. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The participant ID of the peer. - # Corresponds to the JSON property `participantId` - # @return [String] - attr_accessor :participant_id - - # This is a JSON template for peer channel diagnostics. - # Corresponds to the JSON property `reliableChannel` - # @return [Google::Apis::GamesV1::PeerChannelDiagnostics] - attr_accessor :reliable_channel - - # This is a JSON template for peer channel diagnostics. - # Corresponds to the JSON property `unreliableChannel` - # @return [Google::Apis::GamesV1::PeerChannelDiagnostics] - attr_accessor :unreliable_channel - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @connected_timestamp_millis = args[:connected_timestamp_millis] unless args[:connected_timestamp_millis].nil? - @kind = args[:kind] unless args[:kind].nil? - @participant_id = args[:participant_id] unless args[:participant_id].nil? - @reliable_channel = args[:reliable_channel] unless args[:reliable_channel].nil? - @unreliable_channel = args[:unreliable_channel] unless args[:unreliable_channel].nil? - end - end - - # This is a JSON template for metadata about a player playing a game with the - # currently authenticated user. - class Played - include Google::Apis::Core::Hashable - - # True if the player was auto-matched with the currently authenticated user. - # Corresponds to the JSON property `autoMatched` - # @return [Boolean] - attr_accessor :auto_matched - alias_method :auto_matched?, :auto_matched - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#played. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The last time the player played the game in milliseconds since the epoch in - # UTC. - # Corresponds to the JSON property `timeMillis` - # @return [String] - attr_accessor :time_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_matched = args[:auto_matched] unless args[:auto_matched].nil? - @kind = args[:kind] unless args[:kind].nil? - @time_millis = args[:time_millis] unless args[:time_millis].nil? - end - end - - # This is a JSON template for a Player resource. - class Player - include Google::Apis::Core::Hashable - - # The base URL for the image that represents the player. - # Corresponds to the JSON property `avatarImageUrl` - # @return [String] - attr_accessor :avatar_image_url - - # The name to display for the player. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # This is a JSON template for 1P/3P metadata about the player's experience. - # Corresponds to the JSON property `experienceInfo` - # @return [Google::Apis::GamesV1::PlayerExperienceInfo] - attr_accessor :experience_info - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#player. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for metadata about a player playing a game with the - # currently authenticated user. - # Corresponds to the JSON property `lastPlayedWith` - # @return [Google::Apis::GamesV1::Played] - attr_accessor :last_played_with - - # An object representation of the individual components of the player's name. - # For some players, these fields may not be present. - # Corresponds to the JSON property `name` - # @return [Google::Apis::GamesV1::Player::Name] - attr_accessor :name - - # The ID of the player. - # Corresponds to the JSON property `playerId` - # @return [String] - attr_accessor :player_id - - # The player's title rewarded for their game activities. - # 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) - @avatar_image_url = args[:avatar_image_url] unless args[:avatar_image_url].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @experience_info = args[:experience_info] unless args[:experience_info].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_played_with = args[:last_played_with] unless args[:last_played_with].nil? - @name = args[:name] unless args[:name].nil? - @player_id = args[:player_id] unless args[:player_id].nil? - @title = args[:title] unless args[:title].nil? - end - - # An object representation of the individual components of the player's name. - # For some players, these fields may not be present. - class Name - include Google::Apis::Core::Hashable - - # The family name of this player. In some places, this is known as the last name. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The given name of this player. In some places, this is known as the first name. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @family_name = args[:family_name] unless args[:family_name].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - end - end - end - - # This is a JSON template for an achievement object. - class PlayerAchievement - include Google::Apis::Core::Hashable - - # The state of the achievement. - # Possible values are: - # - "HIDDEN" - Achievement is hidden. - # - "REVEALED" - Achievement is revealed. - # - "UNLOCKED" - Achievement is unlocked. - # Corresponds to the JSON property `achievementState` - # @return [String] - attr_accessor :achievement_state - - # The current steps for an incremental achievement. - # Corresponds to the JSON property `currentSteps` - # @return [Fixnum] - attr_accessor :current_steps - - # Experience points earned for the achievement. This field is absent for - # achievements that have not yet been unlocked and 0 for achievements that have - # been unlocked by testers but that are unpublished. - # Corresponds to the JSON property `experiencePoints` - # @return [String] - attr_accessor :experience_points - - # The current steps for an incremental achievement as a string. - # Corresponds to the JSON property `formattedCurrentStepsString` - # @return [String] - attr_accessor :formatted_current_steps_string - - # The ID of the achievement. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerAchievement. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp of the last modification to this achievement's state. - # Corresponds to the JSON property `lastUpdatedTimestamp` - # @return [String] - attr_accessor :last_updated_timestamp - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @achievement_state = args[:achievement_state] unless args[:achievement_state].nil? - @current_steps = args[:current_steps] unless args[:current_steps].nil? - @experience_points = args[:experience_points] unless args[:experience_points].nil? - @formatted_current_steps_string = args[:formatted_current_steps_string] unless args[:formatted_current_steps_string].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_updated_timestamp = args[:last_updated_timestamp] unless args[:last_updated_timestamp].nil? - end - end - - # This is a JSON template for a list of achievement objects. - class ListPlayerAchievementResponse - include Google::Apis::Core::Hashable - - # The achievements. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerAchievementListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token corresponding to 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 - - # This is a JSON template for an event status resource. - class PlayerEvent - include Google::Apis::Core::Hashable - - # The ID of the event definition. - # Corresponds to the JSON property `definitionId` - # @return [String] - attr_accessor :definition_id - - # The current number of times this event has occurred, as a string. The - # formatting of this string depends on the configuration of your event in the - # Play Games Developer Console. - # Corresponds to the JSON property `formattedNumEvents` - # @return [String] - attr_accessor :formatted_num_events - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerEvent. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The current number of times this event has occurred. - # Corresponds to the JSON property `numEvents` - # @return [String] - attr_accessor :num_events - - # The ID of the player. - # Corresponds to the JSON property `playerId` - # @return [String] - attr_accessor :player_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @definition_id = args[:definition_id] unless args[:definition_id].nil? - @formatted_num_events = args[:formatted_num_events] unless args[:formatted_num_events].nil? - @kind = args[:kind] unless args[:kind].nil? - @num_events = args[:num_events] unless args[:num_events].nil? - @player_id = args[:player_id] unless args[:player_id].nil? - end - end - - # This is a JSON template for a ListByPlayer response. - class ListPlayerEventResponse - include Google::Apis::Core::Hashable - - # The player events. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerEventListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination 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) - @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 - - # This is a JSON template for 1P/3P metadata about the player's experience. - class PlayerExperienceInfo - include Google::Apis::Core::Hashable - - # The current number of experience points for the player. - # Corresponds to the JSON property `currentExperiencePoints` - # @return [String] - attr_accessor :current_experience_points - - # This is a JSON template for 1P/3P metadata about a user's level. - # Corresponds to the JSON property `currentLevel` - # @return [Google::Apis::GamesV1::PlayerLevel] - attr_accessor :current_level - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerExperienceInfo. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp when the player was leveled up, in millis since Unix epoch UTC. - # Corresponds to the JSON property `lastLevelUpTimestampMillis` - # @return [String] - attr_accessor :last_level_up_timestamp_millis - - # This is a JSON template for 1P/3P metadata about a user's level. - # Corresponds to the JSON property `nextLevel` - # @return [Google::Apis::GamesV1::PlayerLevel] - attr_accessor :next_level - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @current_experience_points = args[:current_experience_points] unless args[:current_experience_points].nil? - @current_level = args[:current_level] unless args[:current_level].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_level_up_timestamp_millis = args[:last_level_up_timestamp_millis] unless args[:last_level_up_timestamp_millis].nil? - @next_level = args[:next_level] unless args[:next_level].nil? - end - end - - # This is a JSON template for a player leaderboard score object. - class PlayerLeaderboardScore - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerLeaderboardScore. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The ID of the leaderboard this score is in. - # Corresponds to the JSON property `leaderboard_id` - # @return [String] - attr_accessor :leaderboard_id - - # This is a JSON template for a score rank in a leaderboard. - # Corresponds to the JSON property `publicRank` - # @return [Google::Apis::GamesV1::LeaderboardScoreRank] - attr_accessor :public_rank - - # The formatted value of this score. - # Corresponds to the JSON property `scoreString` - # @return [String] - attr_accessor :score_string - - # Additional information about the score. Values must contain no more than 64 - # URI-safe characters as defined by section 2.3 of RFC 3986. - # Corresponds to the JSON property `scoreTag` - # @return [String] - attr_accessor :score_tag - - # The numerical value of this score. - # Corresponds to the JSON property `scoreValue` - # @return [String] - attr_accessor :score_value - - # This is a JSON template for a score rank in a leaderboard. - # Corresponds to the JSON property `socialRank` - # @return [Google::Apis::GamesV1::LeaderboardScoreRank] - attr_accessor :social_rank - - # The time span of this score. - # Possible values are: - # - "ALL_TIME" - The score is an all-time score. - # - "WEEKLY" - The score is a weekly score. - # - "DAILY" - The score is a daily score. - # Corresponds to the JSON property `timeSpan` - # @return [String] - attr_accessor :time_span - - # The timestamp at which this score was recorded, in milliseconds since the - # epoch in UTC. - # Corresponds to the JSON property `writeTimestamp` - # @return [String] - attr_accessor :write_timestamp - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @leaderboard_id = args[:leaderboard_id] unless args[:leaderboard_id].nil? - @public_rank = args[:public_rank] unless args[:public_rank].nil? - @score_string = args[:score_string] unless args[:score_string].nil? - @score_tag = args[:score_tag] unless args[:score_tag].nil? - @score_value = args[:score_value] unless args[:score_value].nil? - @social_rank = args[:social_rank] unless args[:social_rank].nil? - @time_span = args[:time_span] unless args[:time_span].nil? - @write_timestamp = args[:write_timestamp] unless args[:write_timestamp].nil? - end - end - - # This is a JSON template for a list of player leaderboard scores. - class ListPlayerLeaderboardScoreResponse - include Google::Apis::Core::Hashable - - # The leaderboard scores. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerLeaderboardScoreListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination token for the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # This is a JSON template for a Player resource. - # Corresponds to the JSON property `player` - # @return [Google::Apis::GamesV1::Player] - attr_accessor :player - - 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? - @player = args[:player] unless args[:player].nil? - end - end - - # This is a JSON template for 1P/3P metadata about a user's level. - class PlayerLevel - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerLevel. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The level for the user. - # Corresponds to the JSON property `level` - # @return [Fixnum] - attr_accessor :level - - # The maximum experience points for this level. - # Corresponds to the JSON property `maxExperiencePoints` - # @return [String] - attr_accessor :max_experience_points - - # The minimum experience points for this level. - # Corresponds to the JSON property `minExperiencePoints` - # @return [String] - attr_accessor :min_experience_points - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @level = args[:level] unless args[:level].nil? - @max_experience_points = args[:max_experience_points] unless args[:max_experience_points].nil? - @min_experience_points = args[:min_experience_points] unless args[:min_experience_points].nil? - end - end - - # This is a JSON template for a third party player list response. - class ListPlayerResponse - include Google::Apis::Core::Hashable - - # The players. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token corresponding to 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 - - # This is a JSON template for a player score. - class PlayerScore - include Google::Apis::Core::Hashable - - # The formatted score for this player score. - # Corresponds to the JSON property `formattedScore` - # @return [String] - attr_accessor :formatted_score - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerScore. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The numerical value for this player score. - # Corresponds to the JSON property `score` - # @return [String] - attr_accessor :score - - # Additional information about this score. Values will contain no more than 64 - # URI-safe characters as defined by section 2.3 of RFC 3986. - # Corresponds to the JSON property `scoreTag` - # @return [String] - attr_accessor :score_tag - - # The time span for this player score. - # Possible values are: - # - "ALL_TIME" - The score is an all-time score. - # - "WEEKLY" - The score is a weekly score. - # - "DAILY" - The score is a daily score. - # Corresponds to the JSON property `timeSpan` - # @return [String] - attr_accessor :time_span - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_score = args[:formatted_score] unless args[:formatted_score].nil? - @kind = args[:kind] unless args[:kind].nil? - @score = args[:score] unless args[:score].nil? - @score_tag = args[:score_tag] unless args[:score_tag].nil? - @time_span = args[:time_span] unless args[:time_span].nil? - end - end - - # This is a JSON template for a list of score submission statuses. - class ListPlayerScoreResponse - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerScoreListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The score submissions statuses. - # Corresponds to the JSON property `submittedScores` - # @return [Array] - attr_accessor :submitted_scores - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @submitted_scores = args[:submitted_scores] unless args[:submitted_scores].nil? - end - end - - # This is a JSON template for a list of leaderboard entry resources. - class PlayerScoreResponse - include Google::Apis::Core::Hashable - - # The time spans where the submitted score is better than the existing score for - # that time span. - # Possible values are: - # - "ALL_TIME" - The score is an all-time score. - # - "WEEKLY" - The score is a weekly score. - # - "DAILY" - The score is a daily score. - # Corresponds to the JSON property `beatenScoreTimeSpans` - # @return [Array] - attr_accessor :beaten_score_time_spans - - # The formatted value of the submitted score. - # Corresponds to the JSON property `formattedScore` - # @return [String] - attr_accessor :formatted_score - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerScoreResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The leaderboard ID that this score was submitted to. - # Corresponds to the JSON property `leaderboardId` - # @return [String] - attr_accessor :leaderboard_id - - # Additional information about this score. Values will contain no more than 64 - # URI-safe characters as defined by section 2.3 of RFC 3986. - # Corresponds to the JSON property `scoreTag` - # @return [String] - attr_accessor :score_tag - - # The scores in time spans that have not been beaten. As an example, the - # submitted score may be better than the player's DAILY score, but not better - # than the player's scores for the WEEKLY or ALL_TIME time spans. - # Corresponds to the JSON property `unbeatenScores` - # @return [Array] - attr_accessor :unbeaten_scores - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @beaten_score_time_spans = args[:beaten_score_time_spans] unless args[:beaten_score_time_spans].nil? - @formatted_score = args[:formatted_score] unless args[:formatted_score].nil? - @kind = args[:kind] unless args[:kind].nil? - @leaderboard_id = args[:leaderboard_id] unless args[:leaderboard_id].nil? - @score_tag = args[:score_tag] unless args[:score_tag].nil? - @unbeaten_scores = args[:unbeaten_scores] unless args[:unbeaten_scores].nil? - end - end - - # This is a JSON template for a list of score submission requests - class PlayerScoreSubmissionList - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#playerScoreSubmissionList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The score submissions. - # Corresponds to the JSON property `scores` - # @return [Array] - attr_accessor :scores - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @scores = args[:scores] unless args[:scores].nil? - end - end - - # This is a JSON template for a push token resource. - class PushToken - include Google::Apis::Core::Hashable - - # The revision of the client SDK used by your application, in the same format - # that's used by revisions.check. Used to send backward compatible messages. - # Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: - # - # - IOS - Push token is for iOS - # Corresponds to the JSON property `clientRevision` - # @return [String] - attr_accessor :client_revision - - # This is a JSON template for a push token ID resource. - # Corresponds to the JSON property `id` - # @return [Google::Apis::GamesV1::PushTokenId] - attr_accessor :id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#pushToken. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The preferred language for notifications that are sent using this token. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @client_revision = args[:client_revision] unless args[:client_revision].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @language = args[:language] unless args[:language].nil? - end - end - - # This is a JSON template for a push token ID resource. - class PushTokenId - include Google::Apis::Core::Hashable - - # A push token ID for iOS devices. - # Corresponds to the JSON property `ios` - # @return [Google::Apis::GamesV1::PushTokenId::Ios] - attr_accessor :ios - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#pushTokenId. - # 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) - @ios = args[:ios] unless args[:ios].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # A push token ID for iOS devices. - class Ios - include Google::Apis::Core::Hashable - - # Device token supplied by an iOS system call to register for remote - # notifications. Encode this field as web-safe base64. - # Corresponds to the JSON property `apns_device_token` - # @return [String] - attr_accessor :apns_device_token - - # Indicates whether this token should be used for the production or sandbox APNS - # server. - # Corresponds to the JSON property `apns_environment` - # @return [String] - attr_accessor :apns_environment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @apns_device_token = args[:apns_device_token] unless args[:apns_device_token].nil? - @apns_environment = args[:apns_environment] unless args[:apns_environment].nil? - end - end - end - - # This is a JSON template for a Quest resource. - class Quest - include Google::Apis::Core::Hashable - - # The timestamp at which the user accepted the quest in milliseconds since the - # epoch in UTC. Only present if the player has accepted the quest. - # Corresponds to the JSON property `acceptedTimestampMillis` - # @return [String] - attr_accessor :accepted_timestamp_millis - - # The ID of the application this quest is part of. - # Corresponds to the JSON property `applicationId` - # @return [String] - attr_accessor :application_id - - # The banner image URL for the quest. - # Corresponds to the JSON property `bannerUrl` - # @return [String] - attr_accessor :banner_url - - # The description of the quest. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The timestamp at which the quest ceases to be active in milliseconds since the - # epoch in UTC. - # Corresponds to the JSON property `endTimestampMillis` - # @return [String] - attr_accessor :end_timestamp_millis - - # The icon image URL for the quest. - # Corresponds to the JSON property `iconUrl` - # @return [String] - attr_accessor :icon_url - - # The ID of the quest. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Indicates whether the banner image being returned is a default image, or is - # game-provided. - # Corresponds to the JSON property `isDefaultBannerUrl` - # @return [Boolean] - attr_accessor :is_default_banner_url - alias_method :is_default_banner_url?, :is_default_banner_url - - # Indicates whether the icon image being returned is a default image, or is game- - # provided. - # Corresponds to the JSON property `isDefaultIconUrl` - # @return [Boolean] - attr_accessor :is_default_icon_url - alias_method :is_default_icon_url?, :is_default_icon_url - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#quest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp at which the quest was last updated by the user in milliseconds - # since the epoch in UTC. Only present if the player has accepted the quest. - # Corresponds to the JSON property `lastUpdatedTimestampMillis` - # @return [String] - attr_accessor :last_updated_timestamp_millis - - # The quest milestones. - # Corresponds to the JSON property `milestones` - # @return [Array] - attr_accessor :milestones - - # The name of the quest. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The timestamp at which the user should be notified that the quest will end - # soon in milliseconds since the epoch in UTC. - # Corresponds to the JSON property `notifyTimestampMillis` - # @return [String] - attr_accessor :notify_timestamp_millis - - # The timestamp at which the quest becomes active in milliseconds since the - # epoch in UTC. - # Corresponds to the JSON property `startTimestampMillis` - # @return [String] - attr_accessor :start_timestamp_millis - - # The state of the quest. - # Possible values are: - # - "UPCOMING": The quest is upcoming. The user can see the quest, but cannot - # accept it until it is open. - # - "OPEN": The quest is currently open and may be accepted at this time. - # - "ACCEPTED": The user is currently participating in this quest. - # - "COMPLETED": The user has completed the quest. - # - "FAILED": The quest was attempted but was not completed before the deadline - # expired. - # - "EXPIRED": The quest has expired and was not accepted. - # - "DELETED": The quest should be deleted from the local database. - # 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) - @accepted_timestamp_millis = args[:accepted_timestamp_millis] unless args[:accepted_timestamp_millis].nil? - @application_id = args[:application_id] unless args[:application_id].nil? - @banner_url = args[:banner_url] unless args[:banner_url].nil? - @description = args[:description] unless args[:description].nil? - @end_timestamp_millis = args[:end_timestamp_millis] unless args[:end_timestamp_millis].nil? - @icon_url = args[:icon_url] unless args[:icon_url].nil? - @id = args[:id] unless args[:id].nil? - @is_default_banner_url = args[:is_default_banner_url] unless args[:is_default_banner_url].nil? - @is_default_icon_url = args[:is_default_icon_url] unless args[:is_default_icon_url].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_updated_timestamp_millis = args[:last_updated_timestamp_millis] unless args[:last_updated_timestamp_millis].nil? - @milestones = args[:milestones] unless args[:milestones].nil? - @name = args[:name] unless args[:name].nil? - @notify_timestamp_millis = args[:notify_timestamp_millis] unless args[:notify_timestamp_millis].nil? - @start_timestamp_millis = args[:start_timestamp_millis] unless args[:start_timestamp_millis].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # This is a JSON template for a Quest Criterion Contribution resource. - class QuestContribution - include Google::Apis::Core::Hashable - - # The formatted value of the contribution as a string. Format depends on the - # configuration for the associated event definition in the Play Games Developer - # Console. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#questContribution. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The value of the contribution. - # 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) - @formatted_value = args[:formatted_value] unless args[:formatted_value].nil? - @kind = args[:kind] unless args[:kind].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # This is a JSON template for a Quest Criterion resource. - class QuestCriterion - include Google::Apis::Core::Hashable - - # This is a JSON template for a Quest Criterion Contribution resource. - # Corresponds to the JSON property `completionContribution` - # @return [Google::Apis::GamesV1::QuestContribution] - attr_accessor :completion_contribution - - # This is a JSON template for a Quest Criterion Contribution resource. - # Corresponds to the JSON property `currentContribution` - # @return [Google::Apis::GamesV1::QuestContribution] - attr_accessor :current_contribution - - # The ID of the event the criterion corresponds to. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # This is a JSON template for a Quest Criterion Contribution resource. - # Corresponds to the JSON property `initialPlayerProgress` - # @return [Google::Apis::GamesV1::QuestContribution] - attr_accessor :initial_player_progress - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#questCriterion. - # 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) - @completion_contribution = args[:completion_contribution] unless args[:completion_contribution].nil? - @current_contribution = args[:current_contribution] unless args[:current_contribution].nil? - @event_id = args[:event_id] unless args[:event_id].nil? - @initial_player_progress = args[:initial_player_progress] unless args[:initial_player_progress].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for a list of quest objects. - class ListQuestResponse - include Google::Apis::Core::Hashable - - # The quests. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#questListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token corresponding to 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 - - # This is a JSON template for a Quest Milestone resource. - class QuestMilestone - include Google::Apis::Core::Hashable - - # The completion reward data of the milestone, represented as a Base64-encoded - # string. This is a developer-specified binary blob with size between 0 and 2 KB - # before encoding. - # Corresponds to the JSON property `completionRewardData` - # @return [String] - attr_accessor :completion_reward_data - - # The criteria of the milestone. - # Corresponds to the JSON property `criteria` - # @return [Array] - attr_accessor :criteria - - # The milestone ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#questMilestone. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The current state of the milestone. - # Possible values are: - # - "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet been - # claimed. - # - "CLAIMED" - The milestone is complete and has been claimed. - # - "NOT_COMPLETED" - The milestone has not yet been completed. - # - "NOT_STARTED" - The milestone is for a quest that has not yet been accepted. - # 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) - @completion_reward_data = args[:completion_reward_data] unless args[:completion_reward_data].nil? - @criteria = args[:criteria] unless args[:criteria].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # This is a JSON template for the result of checking a revision. - class CheckRevisionResponse - include Google::Apis::Core::Hashable - - # The version of the API this client revision should use when calling API - # methods. - # Corresponds to the JSON property `apiVersion` - # @return [String] - attr_accessor :api_version - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#revisionCheckResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The result of the revision check. - # Possible values are: - # - "OK" - The revision being used is current. - # - "DEPRECATED" - There is currently a newer version available, but the - # revision being used still works. - # - "INVALID" - The revision being used is not supported in any released version. - # Corresponds to the JSON property `revisionStatus` - # @return [String] - attr_accessor :revision_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @api_version = args[:api_version] unless args[:api_version].nil? - @kind = args[:kind] unless args[:kind].nil? - @revision_status = args[:revision_status] unless args[:revision_status].nil? - end - end - - # This is a JSON template for a room resource object. - class Room - include Google::Apis::Core::Hashable - - # The ID of the application being played. - # Corresponds to the JSON property `applicationId` - # @return [String] - attr_accessor :application_id - - # This is a JSON template for a room auto-match criteria object. - # Corresponds to the JSON property `autoMatchingCriteria` - # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria] - attr_accessor :auto_matching_criteria - - # This is a JSON template for status of room automatching that is in progress. - # Corresponds to the JSON property `autoMatchingStatus` - # @return [Google::Apis::GamesV1::RoomAutoMatchStatus] - attr_accessor :auto_matching_status - - # This is a JSON template for room modification metadata. - # Corresponds to the JSON property `creationDetails` - # @return [Google::Apis::GamesV1::RoomModification] - attr_accessor :creation_details - - # This short description is generated by our servers and worded relative to the - # player requesting the room. It is intended to be displayed when the room is - # shown in a list (that is, an invitation to a room.) - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The ID of the participant that invited the user to the room. Not set if the - # user was not invited to the room. - # Corresponds to the JSON property `inviterId` - # @return [String] - attr_accessor :inviter_id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#room. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for room modification metadata. - # Corresponds to the JSON property `lastUpdateDetails` - # @return [Google::Apis::GamesV1::RoomModification] - attr_accessor :last_update_details - - # The participants involved in the room, along with their statuses. Includes - # participants who have left or declined invitations. - # Corresponds to the JSON property `participants` - # @return [Array] - attr_accessor :participants - - # Globally unique ID for a room. - # Corresponds to the JSON property `roomId` - # @return [String] - attr_accessor :room_id - - # The version of the room status: an increasing counter, used by the client to - # ignore out-of-order updates to room status. - # Corresponds to the JSON property `roomStatusVersion` - # @return [Fixnum] - attr_accessor :room_status_version - - # The status of the room. - # Possible values are: - # - "ROOM_INVITING" - One or more players have been invited and not responded. - # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. - # - "ROOM_CONNECTING" - Players have joined and are connecting to each other ( - # either before or after auto-matching). - # - "ROOM_ACTIVE" - All players have joined and connected to each other. - # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned - # in sync calls when a player joins a room (as a tombstone), or for rooms where - # all joined participants have left. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The variant / mode of the application being played; can be any integer value, - # or left blank. - # Corresponds to the JSON property `variant` - # @return [Fixnum] - attr_accessor :variant - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @application_id = args[:application_id] unless args[:application_id].nil? - @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil? - @auto_matching_status = args[:auto_matching_status] unless args[:auto_matching_status].nil? - @creation_details = args[:creation_details] unless args[:creation_details].nil? - @description = args[:description] unless args[:description].nil? - @inviter_id = args[:inviter_id] unless args[:inviter_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_update_details = args[:last_update_details] unless args[:last_update_details].nil? - @participants = args[:participants] unless args[:participants].nil? - @room_id = args[:room_id] unless args[:room_id].nil? - @room_status_version = args[:room_status_version] unless args[:room_status_version].nil? - @status = args[:status] unless args[:status].nil? - @variant = args[:variant] unless args[:variant].nil? - end - end - - # This is a JSON template for status of room automatching that is in progress. - class RoomAutoMatchStatus - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomAutoMatchStatus. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An estimate for the amount of time (in seconds) that auto-matching is expected - # to take to complete. - # Corresponds to the JSON property `waitEstimateSeconds` - # @return [Fixnum] - attr_accessor :wait_estimate_seconds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @wait_estimate_seconds = args[:wait_estimate_seconds] unless args[:wait_estimate_seconds].nil? - end - end - - # This is a JSON template for a room auto-match criteria object. - class RoomAutoMatchingCriteria - include Google::Apis::Core::Hashable - - # A bitmask indicating when auto-matches are valid. When ANDed with other - # exclusive bitmasks, the result must be zero. Can be used to support exclusive - # roles within a game. - # Corresponds to the JSON property `exclusiveBitmask` - # @return [String] - attr_accessor :exclusive_bitmask - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomAutoMatchingCriteria. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The maximum number of players that should be added to the room by auto- - # matching. - # Corresponds to the JSON property `maxAutoMatchingPlayers` - # @return [Fixnum] - attr_accessor :max_auto_matching_players - - # The minimum number of players that should be added to the room by auto- - # matching. - # Corresponds to the JSON property `minAutoMatchingPlayers` - # @return [Fixnum] - attr_accessor :min_auto_matching_players - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @exclusive_bitmask = args[:exclusive_bitmask] unless args[:exclusive_bitmask].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_auto_matching_players = args[:max_auto_matching_players] unless args[:max_auto_matching_players].nil? - @min_auto_matching_players = args[:min_auto_matching_players] unless args[:min_auto_matching_players].nil? - end - end - - # This is a JSON template for the client address when setting up a room. - class RoomClientAddress - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomClientAddress. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The XMPP address of the client on the Google Games XMPP network. - # Corresponds to the JSON property `xmppAddress` - # @return [String] - attr_accessor :xmpp_address - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @xmpp_address = args[:xmpp_address] unless args[:xmpp_address].nil? - end - end - - # This is a JSON template for a room creation request. - class CreateRoomRequest - include Google::Apis::Core::Hashable - - # This is a JSON template for a room auto-match criteria object. - # Corresponds to the JSON property `autoMatchingCriteria` - # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria] - attr_accessor :auto_matching_criteria - - # The capabilities that this client supports for realtime communication. - # Corresponds to the JSON property `capabilities` - # @return [Array] - attr_accessor :capabilities - - # This is a JSON template for the client address when setting up a room. - # Corresponds to the JSON property `clientAddress` - # @return [Google::Apis::GamesV1::RoomClientAddress] - attr_accessor :client_address - - # The player IDs to invite to the room. - # Corresponds to the JSON property `invitedPlayerIds` - # @return [Array] - attr_accessor :invited_player_ids - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomCreateRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for network diagnostics reported for a client. - # Corresponds to the JSON property `networkDiagnostics` - # @return [Google::Apis::GamesV1::NetworkDiagnostics] - attr_accessor :network_diagnostics - - # A randomly generated numeric ID. This number is used at the server to ensure - # that the request is handled correctly across retries. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The variant / mode of the application to be played. This can be any integer - # value, or left blank. You should use a small number of variants to keep the - # auto-matching pool as large as possible. - # Corresponds to the JSON property `variant` - # @return [Fixnum] - attr_accessor :variant - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil? - @capabilities = args[:capabilities] unless args[:capabilities].nil? - @client_address = args[:client_address] unless args[:client_address].nil? - @invited_player_ids = args[:invited_player_ids] unless args[:invited_player_ids].nil? - @kind = args[:kind] unless args[:kind].nil? - @network_diagnostics = args[:network_diagnostics] unless args[:network_diagnostics].nil? - @request_id = args[:request_id] unless args[:request_id].nil? - @variant = args[:variant] unless args[:variant].nil? - end - end - - # This is a JSON template for a join room request. - class JoinRoomRequest - include Google::Apis::Core::Hashable - - # The capabilities that this client supports for realtime communication. - # Corresponds to the JSON property `capabilities` - # @return [Array] - attr_accessor :capabilities - - # This is a JSON template for the client address when setting up a room. - # Corresponds to the JSON property `clientAddress` - # @return [Google::Apis::GamesV1::RoomClientAddress] - attr_accessor :client_address - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomJoinRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for network diagnostics reported for a client. - # Corresponds to the JSON property `networkDiagnostics` - # @return [Google::Apis::GamesV1::NetworkDiagnostics] - attr_accessor :network_diagnostics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @capabilities = args[:capabilities] unless args[:capabilities].nil? - @client_address = args[:client_address] unless args[:client_address].nil? - @kind = args[:kind] unless args[:kind].nil? - @network_diagnostics = args[:network_diagnostics] unless args[:network_diagnostics].nil? - end - end - - # This is a JSON template for room leave diagnostics. - class RoomLeaveDiagnostics - include Google::Apis::Core::Hashable - - # Android network subtype. http://developer.android.com/reference/android/net/ - # NetworkInfo.html#getSubtype() - # Corresponds to the JSON property `androidNetworkSubtype` - # @return [Fixnum] - attr_accessor :android_network_subtype - - # Android network type. http://developer.android.com/reference/android/net/ - # NetworkInfo.html#getType() - # Corresponds to the JSON property `androidNetworkType` - # @return [Fixnum] - attr_accessor :android_network_type - - # iOS network type as defined in Reachability.h. - # Corresponds to the JSON property `iosNetworkType` - # @return [Fixnum] - attr_accessor :ios_network_type - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomLeaveDiagnostics. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The MCC+MNC code for the client's network connection. On Android: http:// - # developer.android.com/reference/android/telephony/TelephonyManager.html# - # getNetworkOperator() On iOS, see: https://developer.apple.com/library/ios/ - # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html - # Corresponds to the JSON property `networkOperatorCode` - # @return [String] - attr_accessor :network_operator_code - - # The name of the carrier of the client's network connection. On Android: http:// - # developer.android.com/reference/android/telephony/TelephonyManager.html# - # getNetworkOperatorName() On iOS: https://developer.apple.com/library/ios/ - # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#/ - # /apple_ref/occ/instp/CTCarrier/carrierName - # Corresponds to the JSON property `networkOperatorName` - # @return [String] - attr_accessor :network_operator_name - - # Diagnostics about all peer sessions. - # Corresponds to the JSON property `peerSession` - # @return [Array] - attr_accessor :peer_session - - # Whether or not sockets were used. - # Corresponds to the JSON property `socketsUsed` - # @return [Boolean] - attr_accessor :sockets_used - alias_method :sockets_used?, :sockets_used - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @android_network_subtype = args[:android_network_subtype] unless args[:android_network_subtype].nil? - @android_network_type = args[:android_network_type] unless args[:android_network_type].nil? - @ios_network_type = args[:ios_network_type] unless args[:ios_network_type].nil? - @kind = args[:kind] unless args[:kind].nil? - @network_operator_code = args[:network_operator_code] unless args[:network_operator_code].nil? - @network_operator_name = args[:network_operator_name] unless args[:network_operator_name].nil? - @peer_session = args[:peer_session] unless args[:peer_session].nil? - @sockets_used = args[:sockets_used] unless args[:sockets_used].nil? - end - end - - # This is a JSON template for a leave room request. - class LeaveRoomRequest - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomLeaveRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for room leave diagnostics. - # Corresponds to the JSON property `leaveDiagnostics` - # @return [Google::Apis::GamesV1::RoomLeaveDiagnostics] - attr_accessor :leave_diagnostics - - # Reason for leaving the match. - # Possible values are: - # - "PLAYER_LEFT" - The player chose to leave the room.. - # - "GAME_LEFT" - The game chose to remove the player from the room. - # - "REALTIME_ABANDONED" - The player switched to another application and - # abandoned the room. - # - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a - # connection to other peer(s). - # - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate - # with the server. - # - "REALTIME_SERVER_ERROR" - The client received an error response when it - # tried to communicate with the server. - # - "REALTIME_TIMEOUT" - The client timed out while waiting for a room. - # - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first - # calling Leave. - # - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room. - # - "REALTIME_GAME_CRASHED" - The game crashed. - # - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed. - # - "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to - # enter a room. - # - "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to enter a - # new room. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @leave_diagnostics = args[:leave_diagnostics] unless args[:leave_diagnostics].nil? - @reason = args[:reason] unless args[:reason].nil? - end - end - - # This is a JSON template for a list of rooms. - class RoomList - include Google::Apis::Core::Hashable - - # The rooms. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination 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) - @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 - - # This is a JSON template for room modification metadata. - class RoomModification - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomModification. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp at which they modified the room, in milliseconds since the epoch - # in UTC. - # Corresponds to the JSON property `modifiedTimestampMillis` - # @return [String] - attr_accessor :modified_timestamp_millis - - # The ID of the participant that modified the room. - # Corresponds to the JSON property `participantId` - # @return [String] - attr_accessor :participant_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @modified_timestamp_millis = args[:modified_timestamp_millis] unless args[:modified_timestamp_millis].nil? - @participant_id = args[:participant_id] unless args[:participant_id].nil? - end - end - - # This is a JSON template for an update on the status of a peer in a room. - class RoomP2PStatus - include Google::Apis::Core::Hashable - - # The amount of time in milliseconds it took to establish connections with this - # peer. - # Corresponds to the JSON property `connectionSetupLatencyMillis` - # @return [Fixnum] - attr_accessor :connection_setup_latency_millis - - # The error code in event of a failure. - # Possible values are: - # - "P2P_FAILED" - The client failed to establish a P2P connection with the peer. - # - # - "PRESENCE_FAILED" - The client failed to register to receive P2P connections. - # - # - "RELAY_SERVER_FAILED" - The client received an error when trying to use the - # relay server to establish a P2P connection with the peer. - # Corresponds to the JSON property `error` - # @return [String] - attr_accessor :error - - # More detailed diagnostic message returned in event of a failure. - # Corresponds to the JSON property `error_reason` - # @return [String] - attr_accessor :error_reason - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomP2PStatus. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The ID of the participant. - # Corresponds to the JSON property `participantId` - # @return [String] - attr_accessor :participant_id - - # The status of the peer in the room. - # Possible values are: - # - "CONNECTION_ESTABLISHED" - The client established a P2P connection with the - # peer. - # - "CONNECTION_FAILED" - The client failed to establish directed presence with - # the peer. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The amount of time in milliseconds it took to send packets back and forth on - # the unreliable channel with this peer. - # Corresponds to the JSON property `unreliableRoundtripLatencyMillis` - # @return [Fixnum] - attr_accessor :unreliable_roundtrip_latency_millis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @connection_setup_latency_millis = args[:connection_setup_latency_millis] unless args[:connection_setup_latency_millis].nil? - @error = args[:error] unless args[:error].nil? - @error_reason = args[:error_reason] unless args[:error_reason].nil? - @kind = args[:kind] unless args[:kind].nil? - @participant_id = args[:participant_id] unless args[:participant_id].nil? - @status = args[:status] unless args[:status].nil? - @unreliable_roundtrip_latency_millis = args[:unreliable_roundtrip_latency_millis] unless args[:unreliable_roundtrip_latency_millis].nil? - end - end - - # This is a JSON template for an update on the status of peers in a room. - class RoomP2PStatuses - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomP2PStatuses. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The updates for the peers. - # Corresponds to the JSON property `updates` - # @return [Array] - attr_accessor :updates - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @updates = args[:updates] unless args[:updates].nil? - end - end - - # This is a JSON template for a participant in a room. - class RoomParticipant - include Google::Apis::Core::Hashable - - # True if this participant was auto-matched with the requesting player. - # Corresponds to the JSON property `autoMatched` - # @return [Boolean] - attr_accessor :auto_matched - alias_method :auto_matched?, :auto_matched - - # This is a JSON template for an anonymous player - # Corresponds to the JSON property `autoMatchedPlayer` - # @return [Google::Apis::GamesV1::AnonymousPlayer] - attr_accessor :auto_matched_player - - # The capabilities which can be used when communicating with this participant. - # Corresponds to the JSON property `capabilities` - # @return [Array] - attr_accessor :capabilities - - # This is a JSON template for the client address when setting up a room. - # Corresponds to the JSON property `clientAddress` - # @return [Google::Apis::GamesV1::RoomClientAddress] - attr_accessor :client_address - - # True if this participant is in the fully connected set of peers in the room. - # Corresponds to the JSON property `connected` - # @return [Boolean] - attr_accessor :connected - alias_method :connected?, :connected - - # An identifier for the participant in the scope of the room. Cannot be used to - # identify a player across rooms or in other contexts. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomParticipant. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The reason the participant left the room; populated if the participant status - # is PARTICIPANT_LEFT. - # Possible values are: - # - "PLAYER_LEFT" - The player explicitly chose to leave the room. - # - "GAME_LEFT" - The game chose to remove the player from the room. - # - "ABANDONED" - The player switched to another application and abandoned the - # room. - # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a - # connection to other peer(s) in the room. - # - "SERVER_ERROR" - The client received an error response when it tried to - # communicate with the server. - # - "TIMEOUT" - The client timed out while waiting for players to join and - # connect. - # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. - # Corresponds to the JSON property `leaveReason` - # @return [String] - attr_accessor :leave_reason - - # This is a JSON template for a Player resource. - # Corresponds to the JSON property `player` - # @return [Google::Apis::GamesV1::Player] - attr_accessor :player - - # The status of the participant with respect to the room. - # Possible values are: - # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, - # but has not yet responded. - # - "PARTICIPANT_JOINED" - The participant has joined the room (either after - # creating it or accepting an invitation.) - # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the - # room. - # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. - # 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) - @auto_matched = args[:auto_matched] unless args[:auto_matched].nil? - @auto_matched_player = args[:auto_matched_player] unless args[:auto_matched_player].nil? - @capabilities = args[:capabilities] unless args[:capabilities].nil? - @client_address = args[:client_address] unless args[:client_address].nil? - @connected = args[:connected] unless args[:connected].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @leave_reason = args[:leave_reason] unless args[:leave_reason].nil? - @player = args[:player] unless args[:player].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # This is a JSON template for the status of a room that the player has joined. - class RoomStatus - include Google::Apis::Core::Hashable - - # This is a JSON template for status of room automatching that is in progress. - # Corresponds to the JSON property `autoMatchingStatus` - # @return [Google::Apis::GamesV1::RoomAutoMatchStatus] - attr_accessor :auto_matching_status - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#roomStatus. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The participants involved in the room, along with their statuses. Includes - # participants who have left or declined invitations. - # Corresponds to the JSON property `participants` - # @return [Array] - attr_accessor :participants - - # Globally unique ID for a room. - # Corresponds to the JSON property `roomId` - # @return [String] - attr_accessor :room_id - - # The status of the room. - # Possible values are: - # - "ROOM_INVITING" - One or more players have been invited and not responded. - # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. - # - "ROOM_CONNECTING" - Players have joined are connecting to each other (either - # before or after auto-matching). - # - "ROOM_ACTIVE" - All players have joined and connected to each other. - # - "ROOM_DELETED" - All joined players have left. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The version of the status for the room: an increasing counter, used by the - # client to ignore out-of-order updates to room status. - # Corresponds to the JSON property `statusVersion` - # @return [Fixnum] - attr_accessor :status_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_matching_status = args[:auto_matching_status] unless args[:auto_matching_status].nil? - @kind = args[:kind] unless args[:kind].nil? - @participants = args[:participants] unless args[:participants].nil? - @room_id = args[:room_id] unless args[:room_id].nil? - @status = args[:status] unless args[:status].nil? - @status_version = args[:status_version] unless args[:status_version].nil? - end - end - - # This is a JSON template for a request to submit a score to leaderboards. - class ScoreSubmission - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#scoreSubmission. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The leaderboard this score is being submitted to. - # Corresponds to the JSON property `leaderboardId` - # @return [String] - attr_accessor :leaderboard_id - - # The new score being submitted. - # Corresponds to the JSON property `score` - # @return [String] - attr_accessor :score - - # Additional information about this score. Values will contain no more than 64 - # URI-safe characters as defined by section 2.3 of RFC 3986. - # Corresponds to the JSON property `scoreTag` - # @return [String] - attr_accessor :score_tag - - # Signature Values will contain URI-safe characters as defined by section 2.3 of - # RFC 3986. - # Corresponds to the JSON property `signature` - # @return [String] - attr_accessor :signature - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @leaderboard_id = args[:leaderboard_id] unless args[:leaderboard_id].nil? - @score = args[:score] unless args[:score].nil? - @score_tag = args[:score_tag] unless args[:score_tag].nil? - @signature = args[:signature] unless args[:signature].nil? - end - end - - # This is a JSON template for an snapshot object. - class Snapshot - include Google::Apis::Core::Hashable - - # This is a JSON template for an image of a snapshot. - # Corresponds to the JSON property `coverImage` - # @return [Google::Apis::GamesV1::SnapshotImage] - attr_accessor :cover_image - - # The description of this snapshot. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The ID of the file underlying this snapshot in the Drive API. Only present if - # the snapshot is a view on a Drive file and the file is owned by the caller. - # Corresponds to the JSON property `driveId` - # @return [String] - attr_accessor :drive_id - - # The duration associated with this snapshot, in millis. - # Corresponds to the JSON property `durationMillis` - # @return [String] - attr_accessor :duration_millis - - # The ID of the snapshot. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#snapshot. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp (in millis since Unix epoch) of the last modification to this - # snapshot. - # Corresponds to the JSON property `lastModifiedMillis` - # @return [String] - attr_accessor :last_modified_millis - - # The progress value (64-bit integer set by developer) associated with this - # snapshot. - # Corresponds to the JSON property `progressValue` - # @return [String] - attr_accessor :progress_value - - # The title of this snapshot. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The type of this snapshot. - # Possible values are: - # - "SAVE_GAME" - A snapshot representing a save game. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The unique name provided when the snapshot was created. - # Corresponds to the JSON property `uniqueName` - # @return [String] - attr_accessor :unique_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cover_image = args[:cover_image] unless args[:cover_image].nil? - @description = args[:description] unless args[:description].nil? - @drive_id = args[:drive_id] unless args[:drive_id].nil? - @duration_millis = args[:duration_millis] unless args[:duration_millis].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_modified_millis = args[:last_modified_millis] unless args[:last_modified_millis].nil? - @progress_value = args[:progress_value] unless args[:progress_value].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - @unique_name = args[:unique_name] unless args[:unique_name].nil? - end - end - - # This is a JSON template for an image of a snapshot. - class SnapshotImage - include Google::Apis::Core::Hashable - - # The height of the image. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#snapshotImage. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The MIME type of the image. - # Corresponds to the JSON property `mime_type` - # @return [String] - attr_accessor :mime_type - - # The URL of the image. This URL may be invalidated at any time and should not - # be cached. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width of the image. - # 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? - @kind = args[:kind] unless args[:kind].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # This is a JSON template for a list of snapshot objects. - class ListSnapshotResponse - include Google::Apis::Core::Hashable - - # The snapshots. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#snapshotListResponse. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token corresponding to the next page of results. If there are no more results, - # the token is omitted. - # 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 - - # This is a JSON template for an turn-based auto-match criteria object. - class TurnBasedAutoMatchingCriteria - include Google::Apis::Core::Hashable - - # A bitmask indicating when auto-matches are valid. When ANDed with other - # exclusive bitmasks, the result must be zero. Can be used to support exclusive - # roles within a game. - # Corresponds to the JSON property `exclusiveBitmask` - # @return [String] - attr_accessor :exclusive_bitmask - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedAutoMatchingCriteria. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The maximum number of players that should be added to the match by auto- - # matching. - # Corresponds to the JSON property `maxAutoMatchingPlayers` - # @return [Fixnum] - attr_accessor :max_auto_matching_players - - # The minimum number of players that should be added to the match by auto- - # matching. - # Corresponds to the JSON property `minAutoMatchingPlayers` - # @return [Fixnum] - attr_accessor :min_auto_matching_players - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @exclusive_bitmask = args[:exclusive_bitmask] unless args[:exclusive_bitmask].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_auto_matching_players = args[:max_auto_matching_players] unless args[:max_auto_matching_players].nil? - @min_auto_matching_players = args[:min_auto_matching_players] unless args[:min_auto_matching_players].nil? - end - end - - # This is a JSON template for a turn-based match resource object. - class TurnBasedMatch - include Google::Apis::Core::Hashable - - # The ID of the application being played. - # Corresponds to the JSON property `applicationId` - # @return [String] - attr_accessor :application_id - - # This is a JSON template for an turn-based auto-match criteria object. - # Corresponds to the JSON property `autoMatchingCriteria` - # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria] - attr_accessor :auto_matching_criteria - - # This is a JSON template for turn-based match modification metadata. - # Corresponds to the JSON property `creationDetails` - # @return [Google::Apis::GamesV1::TurnBasedMatchModification] - attr_accessor :creation_details - - # This is a JSON template for a turn-based match data object. - # Corresponds to the JSON property `data` - # @return [Google::Apis::GamesV1::TurnBasedMatchData] - attr_accessor :data - - # This short description is generated by our servers based on turn state and is - # localized and worded relative to the player requesting the match. It is - # intended to be displayed when the match is shown in a list. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The ID of the participant that invited the user to the match. Not set if the - # user was not invited to the match. - # Corresponds to the JSON property `inviterId` - # @return [String] - attr_accessor :inviter_id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatch. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for turn-based match modification metadata. - # Corresponds to the JSON property `lastUpdateDetails` - # @return [Google::Apis::GamesV1::TurnBasedMatchModification] - attr_accessor :last_update_details - - # Globally unique ID for a turn-based match. - # Corresponds to the JSON property `matchId` - # @return [String] - attr_accessor :match_id - - # The number of the match in a chain of rematches. Will be set to 1 for the - # first match and incremented by 1 for each rematch. - # Corresponds to the JSON property `matchNumber` - # @return [Fixnum] - attr_accessor :match_number - - # The version of this match: an increasing counter, used to avoid out-of-date - # updates to the match. - # Corresponds to the JSON property `matchVersion` - # @return [Fixnum] - attr_accessor :match_version - - # The participants involved in the match, along with their statuses. Includes - # participants who have left or declined invitations. - # Corresponds to the JSON property `participants` - # @return [Array] - attr_accessor :participants - - # The ID of the participant that is taking a turn. - # Corresponds to the JSON property `pendingParticipantId` - # @return [String] - attr_accessor :pending_participant_id - - # This is a JSON template for a turn-based match data object. - # Corresponds to the JSON property `previousMatchData` - # @return [Google::Apis::GamesV1::TurnBasedMatchData] - attr_accessor :previous_match_data - - # The ID of a rematch of this match. Only set for completed matches that have - # been rematched. - # Corresponds to the JSON property `rematchId` - # @return [String] - attr_accessor :rematch_id - - # The results reported for this match. - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - # The status of the match. - # Possible values are: - # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; - # the match cannot be established until they are filled. - # - "MATCH_ACTIVE" - The match has started. - # - "MATCH_COMPLETE" - The match has finished. - # - "MATCH_CANCELED" - The match was canceled. - # - "MATCH_EXPIRED" - The match expired due to inactivity. - # - "MATCH_DELETED" - The match should no longer be shown on the client. - # Returned only for tombstones for matches when sync is called. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The status of the current user in the match. Derived from the match type, - # match status, the user's participant status, and the pending participant for - # the match. - # Possible values are: - # - "USER_INVITED" - The user has been invited to join the match and has not - # responded yet. - # - "USER_AWAITING_TURN" - The user is waiting for their turn. - # - "USER_TURN" - The user has an action to take in the match. - # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or - # expired.) - # Corresponds to the JSON property `userMatchStatus` - # @return [String] - attr_accessor :user_match_status - - # The variant / mode of the application being played; can be any integer value, - # or left blank. - # Corresponds to the JSON property `variant` - # @return [Fixnum] - attr_accessor :variant - - # The ID of another participant in the match that can be used when describing - # the participants the user is playing with. - # Corresponds to the JSON property `withParticipantId` - # @return [String] - attr_accessor :with_participant_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @application_id = args[:application_id] unless args[:application_id].nil? - @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil? - @creation_details = args[:creation_details] unless args[:creation_details].nil? - @data = args[:data] unless args[:data].nil? - @description = args[:description] unless args[:description].nil? - @inviter_id = args[:inviter_id] unless args[:inviter_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @last_update_details = args[:last_update_details] unless args[:last_update_details].nil? - @match_id = args[:match_id] unless args[:match_id].nil? - @match_number = args[:match_number] unless args[:match_number].nil? - @match_version = args[:match_version] unless args[:match_version].nil? - @participants = args[:participants] unless args[:participants].nil? - @pending_participant_id = args[:pending_participant_id] unless args[:pending_participant_id].nil? - @previous_match_data = args[:previous_match_data] unless args[:previous_match_data].nil? - @rematch_id = args[:rematch_id] unless args[:rematch_id].nil? - @results = args[:results] unless args[:results].nil? - @status = args[:status] unless args[:status].nil? - @user_match_status = args[:user_match_status] unless args[:user_match_status].nil? - @variant = args[:variant] unless args[:variant].nil? - @with_participant_id = args[:with_participant_id] unless args[:with_participant_id].nil? - end - end - - # This is a JSON template for a turn-based match creation request. - class CreateTurnBasedMatchRequest - include Google::Apis::Core::Hashable - - # This is a JSON template for an turn-based auto-match criteria object. - # Corresponds to the JSON property `autoMatchingCriteria` - # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria] - attr_accessor :auto_matching_criteria - - # The player ids to invite to the match. - # Corresponds to the JSON property `invitedPlayerIds` - # @return [Array] - attr_accessor :invited_player_ids - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchCreateRequest. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A randomly generated numeric ID. This number is used at the server to ensure - # that the request is handled correctly across retries. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The variant / mode of the application to be played. This can be any integer - # value, or left blank. You should use a small number of variants to keep the - # auto-matching pool as large as possible. - # Corresponds to the JSON property `variant` - # @return [Fixnum] - attr_accessor :variant - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_matching_criteria = args[:auto_matching_criteria] unless args[:auto_matching_criteria].nil? - @invited_player_ids = args[:invited_player_ids] unless args[:invited_player_ids].nil? - @kind = args[:kind] unless args[:kind].nil? - @request_id = args[:request_id] unless args[:request_id].nil? - @variant = args[:variant] unless args[:variant].nil? - end - end - - # This is a JSON template for a turn-based match data object. - class TurnBasedMatchData - include Google::Apis::Core::Hashable - - # The byte representation of the data (limited to 128 kB), as a Base64-encoded - # string with the URL_SAFE encoding option. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # True if this match has data available but it wasn't returned in a list - # response; fetching the match individually will retrieve this data. - # Corresponds to the JSON property `dataAvailable` - # @return [Boolean] - attr_accessor :data_available - alias_method :data_available?, :data_available - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchData. - # 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? - @data_available = args[:data_available] unless args[:data_available].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # This is a JSON template for sending a turn-based match data object. - class TurnBasedMatchDataRequest - include Google::Apis::Core::Hashable - - # The byte representation of the data (limited to 128 kB), as a Base64-encoded - # string with the URL_SAFE encoding option. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchDataRequest. - # 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 a list of turn-based matches. - class TurnBasedMatchList - include Google::Apis::Core::Hashable - - # The matches. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The pagination 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) - @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 - - # This is a JSON template for turn-based match modification metadata. - class TurnBasedMatchModification - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchModification. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The timestamp at which they modified the match, in milliseconds since the - # epoch in UTC. - # Corresponds to the JSON property `modifiedTimestampMillis` - # @return [String] - attr_accessor :modified_timestamp_millis - - # The ID of the participant that modified the match. - # Corresponds to the JSON property `participantId` - # @return [String] - attr_accessor :participant_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @modified_timestamp_millis = args[:modified_timestamp_millis] unless args[:modified_timestamp_millis].nil? - @participant_id = args[:participant_id] unless args[:participant_id].nil? - end - end - - # This is a JSON template for a participant in a turn-based match. - class TurnBasedMatchParticipant - include Google::Apis::Core::Hashable - - # True if this participant was auto-matched with the requesting player. - # Corresponds to the JSON property `autoMatched` - # @return [Boolean] - attr_accessor :auto_matched - alias_method :auto_matched?, :auto_matched - - # This is a JSON template for an anonymous player - # Corresponds to the JSON property `autoMatchedPlayer` - # @return [Google::Apis::GamesV1::AnonymousPlayer] - attr_accessor :auto_matched_player - - # An identifier for the participant in the scope of the match. Cannot be used to - # identify a player across matches or in other contexts. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchParticipant. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for a Player resource. - # Corresponds to the JSON property `player` - # @return [Google::Apis::GamesV1::Player] - attr_accessor :player - - # The status of the participant with respect to the match. - # Possible values are: - # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to - # the match, but the invitation has not been sent; the invite will be sent when - # it becomes their turn. - # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, - # but has not yet responded. - # - "PARTICIPANT_JOINED" - The participant has joined the match (either after - # creating it or accepting an invitation.) - # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the - # match. - # - "PARTICIPANT_LEFT" - The participant joined the match and then left it. - # - "PARTICIPANT_FINISHED" - The participant finished playing in the match. - # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the - # allotted time. - # 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) - @auto_matched = args[:auto_matched] unless args[:auto_matched].nil? - @auto_matched_player = args[:auto_matched_player] unless args[:auto_matched_player].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @player = args[:player] unless args[:player].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # This is a JSON template for a rematch response. - class TurnBasedMatchRematch - include Google::Apis::Core::Hashable - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchRematch. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # This is a JSON template for a turn-based match resource object. - # Corresponds to the JSON property `previousMatch` - # @return [Google::Apis::GamesV1::TurnBasedMatch] - attr_accessor :previous_match - - # This is a JSON template for a turn-based match resource object. - # Corresponds to the JSON property `rematch` - # @return [Google::Apis::GamesV1::TurnBasedMatch] - attr_accessor :rematch - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @previous_match = args[:previous_match] unless args[:previous_match].nil? - @rematch = args[:rematch] unless args[:rematch].nil? - end - end - - # This is a JSON template for a turn-based match results object. - class TurnBasedMatchResults - include Google::Apis::Core::Hashable - - # This is a JSON template for sending a turn-based match data object. - # Corresponds to the JSON property `data` - # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest] - attr_accessor :data - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchResults. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The version of the match being updated. - # Corresponds to the JSON property `matchVersion` - # @return [Fixnum] - attr_accessor :match_version - - # The match results for the participants in the match. - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - 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? - @match_version = args[:match_version] unless args[:match_version].nil? - @results = args[:results] unless args[:results].nil? - end - end - - # This is a JSON template for a list of turn-based matches returned from a sync. - class TurnBasedMatchSync - include Google::Apis::Core::Hashable - - # The matches. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchSync. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # True if there were more matches available to fetch at the time the response - # was generated (which were not returned due to page size limits.) - # Corresponds to the JSON property `moreAvailable` - # @return [Boolean] - attr_accessor :more_available - alias_method :more_available?, :more_available - - # The pagination 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) - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @more_available = args[:more_available] unless args[:more_available].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # This is a JSON template for the object representing a turn. - class TurnBasedMatchTurn - include Google::Apis::Core::Hashable - - # This is a JSON template for sending a turn-based match data object. - # Corresponds to the JSON property `data` - # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest] - attr_accessor :data - - # Uniquely identifies the type of this resource. Value is always the fixed - # string games#turnBasedMatchTurn. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The version of this match: an increasing counter, used to avoid out-of-date - # updates to the match. - # Corresponds to the JSON property `matchVersion` - # @return [Fixnum] - attr_accessor :match_version - - # The ID of the participant who should take their turn next. May be set to the - # current player's participant ID to update match state without changing the - # turn. If not set, the match will wait for other player(s) to join via - # automatching; this is only valid if automatch criteria is set on the match - # with remaining slots for automatched players. - # Corresponds to the JSON property `pendingParticipantId` - # @return [String] - attr_accessor :pending_participant_id - - # The match results for the participants in the match. - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - 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? - @match_version = args[:match_version] unless args[:match_version].nil? - @pending_participant_id = args[:pending_participant_id] unless args[:pending_participant_id].nil? - @results = args[:results] unless args[:results].nil? - end - end - end - end -end diff --git a/generated/google/apis/games_v1/representations.rb b/generated/google/apis/games_v1/representations.rb deleted file mode 100644 index 17cdc95b0..000000000 --- a/generated/google/apis/games_v1/representations.rb +++ /dev/null @@ -1,1570 +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 GamesV1 - - class AchievementDefinition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAchievementDefinitionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AchievementIncrementResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AchievementRevealResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AchievementSetStepsAtLeastResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AchievementUnlockResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AchievementUpdateMultipleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AchievementUpdateMultipleResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UpdateAchievementRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UpdateAchievementResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AggregateStats - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AnonymousPlayer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Application - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ApplicationCategory - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Category - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCategoryResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventBatchRecordFailure - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventChild - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventDefinition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListEventDefinitionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventPeriodRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventPeriodUpdate - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventRecordFailure - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EventRecordRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UpdateEventRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UpdateEventResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GamesAchievementIncrement - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GamesAchievementSetStepsAtLeast - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImageAsset - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Instance - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceAndroidDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceIosDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceWebDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Leaderboard - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LeaderboardEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLeaderboardResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LeaderboardScoreRank - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LeaderboardScores - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MetagameConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NetworkDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParticipantResult - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PeerChannelDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PeerSessionDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Played - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Player - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Name - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class PlayerAchievement - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlayerAchievementResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlayerEvent - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlayerEventResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlayerExperienceInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlayerLeaderboardScore - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlayerLeaderboardScoreResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlayerLevel - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlayerResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlayerScore - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPlayerScoreResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlayerScoreResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlayerScoreSubmissionList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PushToken - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PushTokenId - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Ios - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Quest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QuestContribution - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QuestCriterion - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListQuestResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QuestMilestone - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CheckRevisionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Room - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomAutoMatchStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomAutoMatchingCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomClientAddress - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreateRoomRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class JoinRoomRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomLeaveDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LeaveRoomRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomModification - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomP2PStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomP2PStatuses - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomParticipant - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RoomStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ScoreSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Snapshot - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SnapshotImage - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSnapshotResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedAutoMatchingCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatch - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreateTurnBasedMatchRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchDataRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchModification - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchParticipant - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchRematch - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchResults - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchSync - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TurnBasedMatchTurn - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AchievementDefinition - class Representation < Google::Apis::Core::JsonRepresentation - property :achievement_type, as: 'achievementType' - property :description, as: 'description' - property :experience_points, as: 'experiencePoints' - property :formatted_total_steps, as: 'formattedTotalSteps' - property :id, as: 'id' - property :initial_state, as: 'initialState' - property :is_revealed_icon_url_default, as: 'isRevealedIconUrlDefault' - property :is_unlocked_icon_url_default, as: 'isUnlockedIconUrlDefault' - property :kind, as: 'kind' - property :name, as: 'name' - property :revealed_icon_url, as: 'revealedIconUrl' - property :total_steps, as: 'totalSteps' - property :unlocked_icon_url, as: 'unlockedIconUrl' - end - end - - # @private - class ListAchievementDefinitionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::AchievementDefinition, decorator: Google::Apis::GamesV1::AchievementDefinition::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class AchievementIncrementResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :current_steps, as: 'currentSteps' - property :kind, as: 'kind' - property :newly_unlocked, as: 'newlyUnlocked' - end - end - - # @private - class AchievementRevealResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :current_state, as: 'currentState' - property :kind, as: 'kind' - end - end - - # @private - class AchievementSetStepsAtLeastResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :current_steps, as: 'currentSteps' - property :kind, as: 'kind' - property :newly_unlocked, as: 'newlyUnlocked' - end - end - - # @private - class AchievementUnlockResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :newly_unlocked, as: 'newlyUnlocked' - end - end - - # @private - class AchievementUpdateMultipleRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :updates, as: 'updates', class: Google::Apis::GamesV1::UpdateAchievementRequest, decorator: Google::Apis::GamesV1::UpdateAchievementRequest::Representation - - end - end - - # @private - class AchievementUpdateMultipleResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :updated_achievements, as: 'updatedAchievements', class: Google::Apis::GamesV1::UpdateAchievementResponse, decorator: Google::Apis::GamesV1::UpdateAchievementResponse::Representation - - end - end - - # @private - class UpdateAchievementRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :achievement_id, as: 'achievementId' - property :increment_payload, as: 'incrementPayload', class: Google::Apis::GamesV1::GamesAchievementIncrement, decorator: Google::Apis::GamesV1::GamesAchievementIncrement::Representation - - property :kind, as: 'kind' - property :set_steps_at_least_payload, as: 'setStepsAtLeastPayload', class: Google::Apis::GamesV1::GamesAchievementSetStepsAtLeast, decorator: Google::Apis::GamesV1::GamesAchievementSetStepsAtLeast::Representation - - property :update_type, as: 'updateType' - end - end - - # @private - class UpdateAchievementResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :achievement_id, as: 'achievementId' - property :current_state, as: 'currentState' - property :current_steps, as: 'currentSteps' - property :kind, as: 'kind' - property :newly_unlocked, as: 'newlyUnlocked' - property :update_occurred, as: 'updateOccurred' - end - end - - # @private - class AggregateStats - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :kind, as: 'kind' - property :max, as: 'max' - property :min, as: 'min' - property :sum, as: 'sum' - end - end - - # @private - class AnonymousPlayer - class Representation < Google::Apis::Core::JsonRepresentation - property :avatar_image_url, as: 'avatarImageUrl' - property :display_name, as: 'displayName' - property :kind, as: 'kind' - end - end - - # @private - class Application - class Representation < Google::Apis::Core::JsonRepresentation - property :achievement_count, as: 'achievement_count' - collection :assets, as: 'assets', class: Google::Apis::GamesV1::ImageAsset, decorator: Google::Apis::GamesV1::ImageAsset::Representation - - property :author, as: 'author' - property :category, as: 'category', class: Google::Apis::GamesV1::ApplicationCategory, decorator: Google::Apis::GamesV1::ApplicationCategory::Representation - - property :description, as: 'description' - collection :enabled_features, as: 'enabledFeatures' - property :id, as: 'id' - collection :instances, as: 'instances', class: Google::Apis::GamesV1::Instance, decorator: Google::Apis::GamesV1::Instance::Representation - - property :kind, as: 'kind' - property :last_updated_timestamp, as: 'lastUpdatedTimestamp' - property :leaderboard_count, as: 'leaderboard_count' - property :name, as: 'name' - property :theme_color, as: 'themeColor' - end - end - - # @private - class ApplicationCategory - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :primary, as: 'primary' - property :secondary, as: 'secondary' - end - end - - # @private - class Category - class Representation < Google::Apis::Core::JsonRepresentation - property :category, as: 'category' - property :experience_points, as: 'experiencePoints' - property :kind, as: 'kind' - end - end - - # @private - class ListCategoryResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::Category, decorator: Google::Apis::GamesV1::Category::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class EventBatchRecordFailure - class Representation < Google::Apis::Core::JsonRepresentation - property :failure_cause, as: 'failureCause' - property :kind, as: 'kind' - property :range, as: 'range', class: Google::Apis::GamesV1::EventPeriodRange, decorator: Google::Apis::GamesV1::EventPeriodRange::Representation - - end - end - - # @private - class EventChild - class Representation < Google::Apis::Core::JsonRepresentation - property :child_id, as: 'childId' - property :kind, as: 'kind' - end - end - - # @private - class EventDefinition - class Representation < Google::Apis::Core::JsonRepresentation - collection :child_events, as: 'childEvents', class: Google::Apis::GamesV1::EventChild, decorator: Google::Apis::GamesV1::EventChild::Representation - - property :description, as: 'description' - property :display_name, as: 'displayName' - property :id, as: 'id' - property :image_url, as: 'imageUrl' - property :is_default_image_url, as: 'isDefaultImageUrl' - property :kind, as: 'kind' - property :visibility, as: 'visibility' - end - end - - # @private - class ListEventDefinitionResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::EventDefinition, decorator: Google::Apis::GamesV1::EventDefinition::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class EventPeriodRange - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :period_end_millis, as: 'periodEndMillis' - property :period_start_millis, as: 'periodStartMillis' - end - end - - # @private - class EventPeriodUpdate - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :time_period, as: 'timePeriod', class: Google::Apis::GamesV1::EventPeriodRange, decorator: Google::Apis::GamesV1::EventPeriodRange::Representation - - collection :updates, as: 'updates', class: Google::Apis::GamesV1::UpdateEventRequest, decorator: Google::Apis::GamesV1::UpdateEventRequest::Representation - - end - end - - # @private - class EventRecordFailure - class Representation < Google::Apis::Core::JsonRepresentation - property :event_id, as: 'eventId' - property :failure_cause, as: 'failureCause' - property :kind, as: 'kind' - end - end - - # @private - class EventRecordRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :current_time_millis, as: 'currentTimeMillis' - property :kind, as: 'kind' - property :request_id, as: 'requestId' - collection :time_periods, as: 'timePeriods', class: Google::Apis::GamesV1::EventPeriodUpdate, decorator: Google::Apis::GamesV1::EventPeriodUpdate::Representation - - end - end - - # @private - class UpdateEventRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :definition_id, as: 'definitionId' - property :kind, as: 'kind' - property :update_count, as: 'updateCount' - end - end - - # @private - class UpdateEventResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :batch_failures, as: 'batchFailures', class: Google::Apis::GamesV1::EventBatchRecordFailure, decorator: Google::Apis::GamesV1::EventBatchRecordFailure::Representation - - collection :event_failures, as: 'eventFailures', class: Google::Apis::GamesV1::EventRecordFailure, decorator: Google::Apis::GamesV1::EventRecordFailure::Representation - - property :kind, as: 'kind' - collection :player_events, as: 'playerEvents', class: Google::Apis::GamesV1::PlayerEvent, decorator: Google::Apis::GamesV1::PlayerEvent::Representation - - end - end - - # @private - class GamesAchievementIncrement - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :request_id, as: 'requestId' - property :steps, as: 'steps' - end - end - - # @private - class GamesAchievementSetStepsAtLeast - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :steps, as: 'steps' - end - end - - # @private - class ImageAsset - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :kind, as: 'kind' - property :name, as: 'name' - property :url, as: 'url' - property :width, as: 'width' - end - end - - # @private - class Instance - class Representation < Google::Apis::Core::JsonRepresentation - property :acquisition_uri, as: 'acquisitionUri' - property :android_instance, as: 'androidInstance', class: Google::Apis::GamesV1::InstanceAndroidDetails, decorator: Google::Apis::GamesV1::InstanceAndroidDetails::Representation - - property :ios_instance, as: 'iosInstance', class: Google::Apis::GamesV1::InstanceIosDetails, decorator: Google::Apis::GamesV1::InstanceIosDetails::Representation - - property :kind, as: 'kind' - property :name, as: 'name' - property :platform_type, as: 'platformType' - property :realtime_play, as: 'realtimePlay' - property :turn_based_play, as: 'turnBasedPlay' - property :web_instance, as: 'webInstance', class: Google::Apis::GamesV1::InstanceWebDetails, decorator: Google::Apis::GamesV1::InstanceWebDetails::Representation - - end - end - - # @private - class InstanceAndroidDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :enable_piracy_check, as: 'enablePiracyCheck' - property :kind, as: 'kind' - property :package_name, as: 'packageName' - property :preferred, as: 'preferred' - end - end - - # @private - class InstanceIosDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :bundle_identifier, as: 'bundleIdentifier' - property :itunes_app_id, as: 'itunesAppId' - property :kind, as: 'kind' - property :preferred_for_ipad, as: 'preferredForIpad' - property :preferred_for_iphone, as: 'preferredForIphone' - property :support_ipad, as: 'supportIpad' - property :support_iphone, as: 'supportIphone' - end - end - - # @private - class InstanceWebDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :launch_url, as: 'launchUrl' - property :preferred, as: 'preferred' - end - end - - # @private - class Leaderboard - class Representation < Google::Apis::Core::JsonRepresentation - property :icon_url, as: 'iconUrl' - property :id, as: 'id' - property :is_icon_url_default, as: 'isIconUrlDefault' - property :kind, as: 'kind' - property :name, as: 'name' - property :order, as: 'order' - end - end - - # @private - class LeaderboardEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_score, as: 'formattedScore' - property :formatted_score_rank, as: 'formattedScoreRank' - property :kind, as: 'kind' - property :player, as: 'player', class: Google::Apis::GamesV1::Player, decorator: Google::Apis::GamesV1::Player::Representation - - property :score_rank, as: 'scoreRank' - property :score_tag, as: 'scoreTag' - property :score_value, as: 'scoreValue' - property :time_span, as: 'timeSpan' - property :write_timestamp_millis, as: 'writeTimestampMillis' - end - end - - # @private - class ListLeaderboardResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::Leaderboard, decorator: Google::Apis::GamesV1::Leaderboard::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class LeaderboardScoreRank - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_num_scores, as: 'formattedNumScores' - property :formatted_rank, as: 'formattedRank' - property :kind, as: 'kind' - property :num_scores, as: 'numScores' - property :rank, as: 'rank' - end - end - - # @private - class LeaderboardScores - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::LeaderboardEntry, decorator: Google::Apis::GamesV1::LeaderboardEntry::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :num_scores, as: 'numScores' - property :player_score, as: 'playerScore', class: Google::Apis::GamesV1::LeaderboardEntry, decorator: Google::Apis::GamesV1::LeaderboardEntry::Representation - - property :prev_page_token, as: 'prevPageToken' - end - end - - # @private - class MetagameConfig - class Representation < Google::Apis::Core::JsonRepresentation - property :current_version, as: 'currentVersion' - property :kind, as: 'kind' - collection :player_levels, as: 'playerLevels', class: Google::Apis::GamesV1::PlayerLevel, decorator: Google::Apis::GamesV1::PlayerLevel::Representation - - end - end - - # @private - class NetworkDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation - property :android_network_subtype, as: 'androidNetworkSubtype' - property :android_network_type, as: 'androidNetworkType' - property :ios_network_type, as: 'iosNetworkType' - property :kind, as: 'kind' - property :network_operator_code, as: 'networkOperatorCode' - property :network_operator_name, as: 'networkOperatorName' - property :registration_latency_millis, as: 'registrationLatencyMillis' - end - end - - # @private - class ParticipantResult - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :participant_id, as: 'participantId' - property :placing, as: 'placing' - property :result, as: 'result' - end - end - - # @private - class PeerChannelDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation - property :bytes_received, as: 'bytesReceived', class: Google::Apis::GamesV1::AggregateStats, decorator: Google::Apis::GamesV1::AggregateStats::Representation - - property :bytes_sent, as: 'bytesSent', class: Google::Apis::GamesV1::AggregateStats, decorator: Google::Apis::GamesV1::AggregateStats::Representation - - property :kind, as: 'kind' - property :num_messages_lost, as: 'numMessagesLost' - property :num_messages_received, as: 'numMessagesReceived' - property :num_messages_sent, as: 'numMessagesSent' - property :num_send_failures, as: 'numSendFailures' - property :roundtrip_latency_millis, as: 'roundtripLatencyMillis', class: Google::Apis::GamesV1::AggregateStats, decorator: Google::Apis::GamesV1::AggregateStats::Representation - - end - end - - # @private - class PeerSessionDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation - property :connected_timestamp_millis, as: 'connectedTimestampMillis' - property :kind, as: 'kind' - property :participant_id, as: 'participantId' - property :reliable_channel, as: 'reliableChannel', class: Google::Apis::GamesV1::PeerChannelDiagnostics, decorator: Google::Apis::GamesV1::PeerChannelDiagnostics::Representation - - property :unreliable_channel, as: 'unreliableChannel', class: Google::Apis::GamesV1::PeerChannelDiagnostics, decorator: Google::Apis::GamesV1::PeerChannelDiagnostics::Representation - - end - end - - # @private - class Played - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_matched, as: 'autoMatched' - property :kind, as: 'kind' - property :time_millis, as: 'timeMillis' - end - end - - # @private - class Player - class Representation < Google::Apis::Core::JsonRepresentation - property :avatar_image_url, as: 'avatarImageUrl' - property :display_name, as: 'displayName' - property :experience_info, as: 'experienceInfo', class: Google::Apis::GamesV1::PlayerExperienceInfo, decorator: Google::Apis::GamesV1::PlayerExperienceInfo::Representation - - property :kind, as: 'kind' - property :last_played_with, as: 'lastPlayedWith', class: Google::Apis::GamesV1::Played, decorator: Google::Apis::GamesV1::Played::Representation - - property :name, as: 'name', class: Google::Apis::GamesV1::Player::Name, decorator: Google::Apis::GamesV1::Player::Name::Representation - - property :player_id, as: 'playerId' - property :title, as: 'title' - end - - # @private - class Name - class Representation < Google::Apis::Core::JsonRepresentation - property :family_name, as: 'familyName' - property :given_name, as: 'givenName' - end - end - end - - # @private - class PlayerAchievement - class Representation < Google::Apis::Core::JsonRepresentation - property :achievement_state, as: 'achievementState' - property :current_steps, as: 'currentSteps' - property :experience_points, as: 'experiencePoints' - property :formatted_current_steps_string, as: 'formattedCurrentStepsString' - property :id, as: 'id' - property :kind, as: 'kind' - property :last_updated_timestamp, as: 'lastUpdatedTimestamp' - end - end - - # @private - class ListPlayerAchievementResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::PlayerAchievement, decorator: Google::Apis::GamesV1::PlayerAchievement::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class PlayerEvent - class Representation < Google::Apis::Core::JsonRepresentation - property :definition_id, as: 'definitionId' - property :formatted_num_events, as: 'formattedNumEvents' - property :kind, as: 'kind' - property :num_events, as: 'numEvents' - property :player_id, as: 'playerId' - end - end - - # @private - class ListPlayerEventResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::PlayerEvent, decorator: Google::Apis::GamesV1::PlayerEvent::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class PlayerExperienceInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :current_experience_points, as: 'currentExperiencePoints' - property :current_level, as: 'currentLevel', class: Google::Apis::GamesV1::PlayerLevel, decorator: Google::Apis::GamesV1::PlayerLevel::Representation - - property :kind, as: 'kind' - property :last_level_up_timestamp_millis, as: 'lastLevelUpTimestampMillis' - property :next_level, as: 'nextLevel', class: Google::Apis::GamesV1::PlayerLevel, decorator: Google::Apis::GamesV1::PlayerLevel::Representation - - end - end - - # @private - class PlayerLeaderboardScore - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :leaderboard_id, as: 'leaderboard_id' - property :public_rank, as: 'publicRank', class: Google::Apis::GamesV1::LeaderboardScoreRank, decorator: Google::Apis::GamesV1::LeaderboardScoreRank::Representation - - property :score_string, as: 'scoreString' - property :score_tag, as: 'scoreTag' - property :score_value, as: 'scoreValue' - property :social_rank, as: 'socialRank', class: Google::Apis::GamesV1::LeaderboardScoreRank, decorator: Google::Apis::GamesV1::LeaderboardScoreRank::Representation - - property :time_span, as: 'timeSpan' - property :write_timestamp, as: 'writeTimestamp' - end - end - - # @private - class ListPlayerLeaderboardScoreResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::PlayerLeaderboardScore, decorator: Google::Apis::GamesV1::PlayerLeaderboardScore::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :player, as: 'player', class: Google::Apis::GamesV1::Player, decorator: Google::Apis::GamesV1::Player::Representation - - end - end - - # @private - class PlayerLevel - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :level, as: 'level' - property :max_experience_points, as: 'maxExperiencePoints' - property :min_experience_points, as: 'minExperiencePoints' - end - end - - # @private - class ListPlayerResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::Player, decorator: Google::Apis::GamesV1::Player::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class PlayerScore - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_score, as: 'formattedScore' - property :kind, as: 'kind' - property :score, as: 'score' - property :score_tag, as: 'scoreTag' - property :time_span, as: 'timeSpan' - end - end - - # @private - class ListPlayerScoreResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :submitted_scores, as: 'submittedScores', class: Google::Apis::GamesV1::PlayerScoreResponse, decorator: Google::Apis::GamesV1::PlayerScoreResponse::Representation - - end - end - - # @private - class PlayerScoreResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :beaten_score_time_spans, as: 'beatenScoreTimeSpans' - property :formatted_score, as: 'formattedScore' - property :kind, as: 'kind' - property :leaderboard_id, as: 'leaderboardId' - property :score_tag, as: 'scoreTag' - collection :unbeaten_scores, as: 'unbeatenScores', class: Google::Apis::GamesV1::PlayerScore, decorator: Google::Apis::GamesV1::PlayerScore::Representation - - end - end - - # @private - class PlayerScoreSubmissionList - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :scores, as: 'scores', class: Google::Apis::GamesV1::ScoreSubmission, decorator: Google::Apis::GamesV1::ScoreSubmission::Representation - - end - end - - # @private - class PushToken - class Representation < Google::Apis::Core::JsonRepresentation - property :client_revision, as: 'clientRevision' - property :id, as: 'id', class: Google::Apis::GamesV1::PushTokenId, decorator: Google::Apis::GamesV1::PushTokenId::Representation - - property :kind, as: 'kind' - property :language, as: 'language' - end - end - - # @private - class PushTokenId - class Representation < Google::Apis::Core::JsonRepresentation - property :ios, as: 'ios', class: Google::Apis::GamesV1::PushTokenId::Ios, decorator: Google::Apis::GamesV1::PushTokenId::Ios::Representation - - property :kind, as: 'kind' - end - - # @private - class Ios - class Representation < Google::Apis::Core::JsonRepresentation - property :apns_device_token, :base64 => true, as: 'apns_device_token' - property :apns_environment, as: 'apns_environment' - end - end - end - - # @private - class Quest - class Representation < Google::Apis::Core::JsonRepresentation - property :accepted_timestamp_millis, as: 'acceptedTimestampMillis' - property :application_id, as: 'applicationId' - property :banner_url, as: 'bannerUrl' - property :description, as: 'description' - property :end_timestamp_millis, as: 'endTimestampMillis' - property :icon_url, as: 'iconUrl' - property :id, as: 'id' - property :is_default_banner_url, as: 'isDefaultBannerUrl' - property :is_default_icon_url, as: 'isDefaultIconUrl' - property :kind, as: 'kind' - property :last_updated_timestamp_millis, as: 'lastUpdatedTimestampMillis' - collection :milestones, as: 'milestones', class: Google::Apis::GamesV1::QuestMilestone, decorator: Google::Apis::GamesV1::QuestMilestone::Representation - - property :name, as: 'name' - property :notify_timestamp_millis, as: 'notifyTimestampMillis' - property :start_timestamp_millis, as: 'startTimestampMillis' - property :state, as: 'state' - end - end - - # @private - class QuestContribution - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_value, as: 'formattedValue' - property :kind, as: 'kind' - property :value, as: 'value' - end - end - - # @private - class QuestCriterion - class Representation < Google::Apis::Core::JsonRepresentation - property :completion_contribution, as: 'completionContribution', class: Google::Apis::GamesV1::QuestContribution, decorator: Google::Apis::GamesV1::QuestContribution::Representation - - property :current_contribution, as: 'currentContribution', class: Google::Apis::GamesV1::QuestContribution, decorator: Google::Apis::GamesV1::QuestContribution::Representation - - property :event_id, as: 'eventId' - property :initial_player_progress, as: 'initialPlayerProgress', class: Google::Apis::GamesV1::QuestContribution, decorator: Google::Apis::GamesV1::QuestContribution::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListQuestResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::Quest, decorator: Google::Apis::GamesV1::Quest::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class QuestMilestone - class Representation < Google::Apis::Core::JsonRepresentation - property :completion_reward_data, :base64 => true, as: 'completionRewardData' - collection :criteria, as: 'criteria', class: Google::Apis::GamesV1::QuestCriterion, decorator: Google::Apis::GamesV1::QuestCriterion::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :state, as: 'state' - end - end - - # @private - class CheckRevisionResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :api_version, as: 'apiVersion' - property :kind, as: 'kind' - property :revision_status, as: 'revisionStatus' - end - end - - # @private - class Room - class Representation < Google::Apis::Core::JsonRepresentation - property :application_id, as: 'applicationId' - property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::RoomAutoMatchingCriteria, decorator: Google::Apis::GamesV1::RoomAutoMatchingCriteria::Representation - - property :auto_matching_status, as: 'autoMatchingStatus', class: Google::Apis::GamesV1::RoomAutoMatchStatus, decorator: Google::Apis::GamesV1::RoomAutoMatchStatus::Representation - - property :creation_details, as: 'creationDetails', class: Google::Apis::GamesV1::RoomModification, decorator: Google::Apis::GamesV1::RoomModification::Representation - - property :description, as: 'description' - property :inviter_id, as: 'inviterId' - property :kind, as: 'kind' - property :last_update_details, as: 'lastUpdateDetails', class: Google::Apis::GamesV1::RoomModification, decorator: Google::Apis::GamesV1::RoomModification::Representation - - collection :participants, as: 'participants', class: Google::Apis::GamesV1::RoomParticipant, decorator: Google::Apis::GamesV1::RoomParticipant::Representation - - property :room_id, as: 'roomId' - property :room_status_version, as: 'roomStatusVersion' - property :status, as: 'status' - property :variant, as: 'variant' - end - end - - # @private - class RoomAutoMatchStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :wait_estimate_seconds, as: 'waitEstimateSeconds' - end - end - - # @private - class RoomAutoMatchingCriteria - class Representation < Google::Apis::Core::JsonRepresentation - property :exclusive_bitmask, as: 'exclusiveBitmask' - property :kind, as: 'kind' - property :max_auto_matching_players, as: 'maxAutoMatchingPlayers' - property :min_auto_matching_players, as: 'minAutoMatchingPlayers' - end - end - - # @private - class RoomClientAddress - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :xmpp_address, as: 'xmppAddress' - end - end - - # @private - class CreateRoomRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::RoomAutoMatchingCriteria, decorator: Google::Apis::GamesV1::RoomAutoMatchingCriteria::Representation - - collection :capabilities, as: 'capabilities' - property :client_address, as: 'clientAddress', class: Google::Apis::GamesV1::RoomClientAddress, decorator: Google::Apis::GamesV1::RoomClientAddress::Representation - - collection :invited_player_ids, as: 'invitedPlayerIds' - property :kind, as: 'kind' - property :network_diagnostics, as: 'networkDiagnostics', class: Google::Apis::GamesV1::NetworkDiagnostics, decorator: Google::Apis::GamesV1::NetworkDiagnostics::Representation - - property :request_id, as: 'requestId' - property :variant, as: 'variant' - end - end - - # @private - class JoinRoomRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :capabilities, as: 'capabilities' - property :client_address, as: 'clientAddress', class: Google::Apis::GamesV1::RoomClientAddress, decorator: Google::Apis::GamesV1::RoomClientAddress::Representation - - property :kind, as: 'kind' - property :network_diagnostics, as: 'networkDiagnostics', class: Google::Apis::GamesV1::NetworkDiagnostics, decorator: Google::Apis::GamesV1::NetworkDiagnostics::Representation - - end - end - - # @private - class RoomLeaveDiagnostics - class Representation < Google::Apis::Core::JsonRepresentation - property :android_network_subtype, as: 'androidNetworkSubtype' - property :android_network_type, as: 'androidNetworkType' - property :ios_network_type, as: 'iosNetworkType' - property :kind, as: 'kind' - property :network_operator_code, as: 'networkOperatorCode' - property :network_operator_name, as: 'networkOperatorName' - collection :peer_session, as: 'peerSession', class: Google::Apis::GamesV1::PeerSessionDiagnostics, decorator: Google::Apis::GamesV1::PeerSessionDiagnostics::Representation - - property :sockets_used, as: 'socketsUsed' - end - end - - # @private - class LeaveRoomRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :leave_diagnostics, as: 'leaveDiagnostics', class: Google::Apis::GamesV1::RoomLeaveDiagnostics, decorator: Google::Apis::GamesV1::RoomLeaveDiagnostics::Representation - - property :reason, as: 'reason' - end - end - - # @private - class RoomList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::Room, decorator: Google::Apis::GamesV1::Room::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class RoomModification - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :modified_timestamp_millis, as: 'modifiedTimestampMillis' - property :participant_id, as: 'participantId' - end - end - - # @private - class RoomP2PStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :connection_setup_latency_millis, as: 'connectionSetupLatencyMillis' - property :error, as: 'error' - property :error_reason, as: 'error_reason' - property :kind, as: 'kind' - property :participant_id, as: 'participantId' - property :status, as: 'status' - property :unreliable_roundtrip_latency_millis, as: 'unreliableRoundtripLatencyMillis' - end - end - - # @private - class RoomP2PStatuses - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :updates, as: 'updates', class: Google::Apis::GamesV1::RoomP2PStatus, decorator: Google::Apis::GamesV1::RoomP2PStatus::Representation - - end - end - - # @private - class RoomParticipant - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_matched, as: 'autoMatched' - property :auto_matched_player, as: 'autoMatchedPlayer', class: Google::Apis::GamesV1::AnonymousPlayer, decorator: Google::Apis::GamesV1::AnonymousPlayer::Representation - - collection :capabilities, as: 'capabilities' - property :client_address, as: 'clientAddress', class: Google::Apis::GamesV1::RoomClientAddress, decorator: Google::Apis::GamesV1::RoomClientAddress::Representation - - property :connected, as: 'connected' - property :id, as: 'id' - property :kind, as: 'kind' - property :leave_reason, as: 'leaveReason' - property :player, as: 'player', class: Google::Apis::GamesV1::Player, decorator: Google::Apis::GamesV1::Player::Representation - - property :status, as: 'status' - end - end - - # @private - class RoomStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_matching_status, as: 'autoMatchingStatus', class: Google::Apis::GamesV1::RoomAutoMatchStatus, decorator: Google::Apis::GamesV1::RoomAutoMatchStatus::Representation - - property :kind, as: 'kind' - collection :participants, as: 'participants', class: Google::Apis::GamesV1::RoomParticipant, decorator: Google::Apis::GamesV1::RoomParticipant::Representation - - property :room_id, as: 'roomId' - property :status, as: 'status' - property :status_version, as: 'statusVersion' - end - end - - # @private - class ScoreSubmission - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :leaderboard_id, as: 'leaderboardId' - property :score, as: 'score' - property :score_tag, as: 'scoreTag' - property :signature, as: 'signature' - end - end - - # @private - class Snapshot - class Representation < Google::Apis::Core::JsonRepresentation - property :cover_image, as: 'coverImage', class: Google::Apis::GamesV1::SnapshotImage, decorator: Google::Apis::GamesV1::SnapshotImage::Representation - - property :description, as: 'description' - property :drive_id, as: 'driveId' - property :duration_millis, as: 'durationMillis' - property :id, as: 'id' - property :kind, as: 'kind' - property :last_modified_millis, as: 'lastModifiedMillis' - property :progress_value, as: 'progressValue' - property :title, as: 'title' - property :type, as: 'type' - property :unique_name, as: 'uniqueName' - end - end - - # @private - class SnapshotImage - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :kind, as: 'kind' - property :mime_type, as: 'mime_type' - property :url, as: 'url' - property :width, as: 'width' - end - end - - # @private - class ListSnapshotResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::Snapshot, decorator: Google::Apis::GamesV1::Snapshot::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class TurnBasedAutoMatchingCriteria - class Representation < Google::Apis::Core::JsonRepresentation - property :exclusive_bitmask, as: 'exclusiveBitmask' - property :kind, as: 'kind' - property :max_auto_matching_players, as: 'maxAutoMatchingPlayers' - property :min_auto_matching_players, as: 'minAutoMatchingPlayers' - end - end - - # @private - class TurnBasedMatch - class Representation < Google::Apis::Core::JsonRepresentation - property :application_id, as: 'applicationId' - property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria, decorator: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria::Representation - - property :creation_details, as: 'creationDetails', class: Google::Apis::GamesV1::TurnBasedMatchModification, decorator: Google::Apis::GamesV1::TurnBasedMatchModification::Representation - - property :data, as: 'data', class: Google::Apis::GamesV1::TurnBasedMatchData, decorator: Google::Apis::GamesV1::TurnBasedMatchData::Representation - - property :description, as: 'description' - property :inviter_id, as: 'inviterId' - property :kind, as: 'kind' - property :last_update_details, as: 'lastUpdateDetails', class: Google::Apis::GamesV1::TurnBasedMatchModification, decorator: Google::Apis::GamesV1::TurnBasedMatchModification::Representation - - property :match_id, as: 'matchId' - property :match_number, as: 'matchNumber' - property :match_version, as: 'matchVersion' - collection :participants, as: 'participants', class: Google::Apis::GamesV1::TurnBasedMatchParticipant, decorator: Google::Apis::GamesV1::TurnBasedMatchParticipant::Representation - - property :pending_participant_id, as: 'pendingParticipantId' - property :previous_match_data, as: 'previousMatchData', class: Google::Apis::GamesV1::TurnBasedMatchData, decorator: Google::Apis::GamesV1::TurnBasedMatchData::Representation - - property :rematch_id, as: 'rematchId' - collection :results, as: 'results', class: Google::Apis::GamesV1::ParticipantResult, decorator: Google::Apis::GamesV1::ParticipantResult::Representation - - property :status, as: 'status' - property :user_match_status, as: 'userMatchStatus' - property :variant, as: 'variant' - property :with_participant_id, as: 'withParticipantId' - end - end - - # @private - class CreateTurnBasedMatchRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria, decorator: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria::Representation - - collection :invited_player_ids, as: 'invitedPlayerIds' - property :kind, as: 'kind' - property :request_id, as: 'requestId' - property :variant, as: 'variant' - end - end - - # @private - class TurnBasedMatchData - class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' - property :data_available, as: 'dataAvailable' - property :kind, as: 'kind' - end - end - - # @private - class TurnBasedMatchDataRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' - property :kind, as: 'kind' - end - end - - # @private - class TurnBasedMatchList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class TurnBasedMatchModification - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :modified_timestamp_millis, as: 'modifiedTimestampMillis' - property :participant_id, as: 'participantId' - end - end - - # @private - class TurnBasedMatchParticipant - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_matched, as: 'autoMatched' - property :auto_matched_player, as: 'autoMatchedPlayer', class: Google::Apis::GamesV1::AnonymousPlayer, decorator: Google::Apis::GamesV1::AnonymousPlayer::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :player, as: 'player', class: Google::Apis::GamesV1::Player, decorator: Google::Apis::GamesV1::Player::Representation - - property :status, as: 'status' - end - end - - # @private - class TurnBasedMatchRematch - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :previous_match, as: 'previousMatch', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation - - property :rematch, as: 'rematch', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation - - end - end - - # @private - class TurnBasedMatchResults - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data', class: Google::Apis::GamesV1::TurnBasedMatchDataRequest, decorator: Google::Apis::GamesV1::TurnBasedMatchDataRequest::Representation - - property :kind, as: 'kind' - property :match_version, as: 'matchVersion' - collection :results, as: 'results', class: Google::Apis::GamesV1::ParticipantResult, decorator: Google::Apis::GamesV1::ParticipantResult::Representation - - end - end - - # @private - class TurnBasedMatchSync - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation - - property :kind, as: 'kind' - property :more_available, as: 'moreAvailable' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class TurnBasedMatchTurn - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data', class: Google::Apis::GamesV1::TurnBasedMatchDataRequest, decorator: Google::Apis::GamesV1::TurnBasedMatchDataRequest::Representation - - property :kind, as: 'kind' - property :match_version, as: 'matchVersion' - property :pending_participant_id, as: 'pendingParticipantId' - collection :results, as: 'results', class: Google::Apis::GamesV1::ParticipantResult, decorator: Google::Apis::GamesV1::ParticipantResult::Representation - - end - end - end - end -end diff --git a/generated/google/apis/games_v1/service.rb b/generated/google/apis/games_v1/service.rb deleted file mode 100644 index 72e44eefe..000000000 --- a/generated/google/apis/games_v1/service.rb +++ /dev/null @@ -1,2306 +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 GamesV1 - # Google Play Game Services API - # - # The API for Google Play Game Services. - # - # @example - # require 'google/apis/games_v1' - # - # Games = Google::Apis::GamesV1 # Alias the module - # service = Games::GamesService.new - # - # @see https://developers.google.com/games/services/ - class GamesService < 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/', 'games/v1/') - end - - # Lists all the achievement definitions for your application. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of achievement resources to return in the response, used - # for paging. For any response, the actual number of achievement resources - # returned may be less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListAchievementDefinitionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListAchievementDefinitionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_achievement_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListAchievementDefinitionsResponse::Representation - command.response_class = Google::Apis::GamesV1::ListAchievementDefinitionsResponse - command.query['language'] = language unless language.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 - - # Increments the steps of the achievement with the given ID for the currently - # authenticated player. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [String] request_id - # A randomly generated numeric ID for each request specified by the caller. This - # number is used at the server to ensure that the request is handled correctly - # across retries. - # @param [Fixnum] steps_to_increment - # The number of steps to increment. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::AchievementIncrementResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::AchievementIncrementResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def increment_achievement(achievement_id, request_id: nil, steps_to_increment: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}/increment' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::AchievementIncrementResponse::Representation - command.response_class = Google::Apis::GamesV1::AchievementIncrementResponse - command.params['achievementId'] = achievement_id unless achievement_id.nil? - command.query['requestId'] = request_id unless request_id.nil? - command.query['stepsToIncrement'] = steps_to_increment unless steps_to_increment.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the progress for all your application's achievements for the currently - # authenticated player. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # ID. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of achievement resources to return in the response, used - # for paging. For any response, the actual number of achievement resources - # returned may be less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] state - # Tells the server to return only achievements with the specified state. If this - # parameter isn't specified, all achievements 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::GamesV1::ListPlayerAchievementResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListPlayerAchievementResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_achievements(player_id, language: nil, max_results: nil, page_token: nil, state: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'players/{playerId}/achievements' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListPlayerAchievementResponse::Representation - command.response_class = Google::Apis::GamesV1::ListPlayerAchievementResponse - command.params['playerId'] = player_id unless player_id.nil? - command.query['language'] = language unless language.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['state'] = state unless state.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets the state of the achievement with the given ID to REVEALED for the - # currently authenticated player. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::AchievementRevealResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::AchievementRevealResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reveal_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}/reveal' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::AchievementRevealResponse::Representation - command.response_class = Google::Apis::GamesV1::AchievementRevealResponse - command.params['achievementId'] = achievement_id unless achievement_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets the steps for the currently authenticated player towards unlocking an - # achievement. If the steps parameter is less than the current number of steps - # that the player already gained for the achievement, the achievement is not - # modified. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [Fixnum] steps - # The minimum value to set the steps to. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::AchievementSetStepsAtLeastResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_steps_at_least_achievement(achievement_id, steps: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}/setStepsAtLeast' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse::Representation - command.response_class = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse - command.params['achievementId'] = achievement_id unless achievement_id.nil? - command.query['steps'] = steps unless steps.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 - - # Unlocks this achievement for the currently authenticated player. - # @param [String] achievement_id - # The ID of the achievement used by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::AchievementUnlockResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::AchievementUnlockResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def unlock_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/{achievementId}/unlock' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::AchievementUnlockResponse::Representation - command.response_class = Google::Apis::GamesV1::AchievementUnlockResponse - command.params['achievementId'] = achievement_id unless achievement_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 multiple achievements for the currently authenticated player. - # @param [Google::Apis::GamesV1::AchievementUpdateMultipleRequest] achievement_update_multiple_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::GamesV1::AchievementUpdateMultipleResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::AchievementUpdateMultipleResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_multiple_achievements(achievement_update_multiple_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'achievements/updateMultiple' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::AchievementUpdateMultipleRequest::Representation - command.request_object = achievement_update_multiple_request_object - command.response_representation = Google::Apis::GamesV1::AchievementUpdateMultipleResponse::Representation - command.response_class = Google::Apis::GamesV1::AchievementUpdateMultipleResponse - 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 metadata of the application with the given ID. If the requested - # application is not available for the specified platformType, the returned - # response will not include any instance data. - # @param [String] application_id - # The application ID from the Google Play developer console. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] platform_type - # Restrict application details returned to the specific platform. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Application] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Application] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_application(application_id, language: nil, platform_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/{applicationId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::Application::Representation - command.response_class = Google::Apis::GamesV1::Application - command.params['applicationId'] = application_id unless application_id.nil? - command.query['language'] = language unless language.nil? - command.query['platformType'] = platform_type unless platform_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Indicate that the the currently authenticated user is playing your application. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 played_application(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'applications/played' - command = make_simple_command(:post, path, options) - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list showing the current progress on events in this application for - # the currently authenticated user. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of events to return in the response, used for paging. For - # any response, the actual number of events to return may be less than the - # specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListPlayerEventResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListPlayerEventResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_by_player_event(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'events' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListPlayerEventResponse::Representation - command.response_class = Google::Apis::GamesV1::ListPlayerEventResponse - command.query['language'] = language unless language.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 - - # Returns a list of the event definitions in this application. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of event definitions to return in the response, used for - # paging. For any response, the actual number of event definitions to return may - # be less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListEventDefinitionResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListEventDefinitionResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_event_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'eventDefinitions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListEventDefinitionResponse::Representation - command.response_class = Google::Apis::GamesV1::ListEventDefinitionResponse - command.query['language'] = language unless language.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 - - # Records a batch of changes to the number of times events have occurred for the - # currently authenticated user of this application. - # @param [Google::Apis::GamesV1::EventRecordRequest] event_record_request_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::UpdateEventResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::UpdateEventResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def record_event(event_record_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'events' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::EventRecordRequest::Representation - command.request_object = event_record_request_object - command.response_representation = Google::Apis::GamesV1::UpdateEventResponse::Representation - command.response_class = Google::Apis::GamesV1::UpdateEventResponse - command.query['language'] = language unless language.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 metadata of the leaderboard with the given ID. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Leaderboard] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Leaderboard] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_leaderboard(leaderboard_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::Leaderboard::Representation - command.response_class = Google::Apis::GamesV1::Leaderboard - command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? - command.query['language'] = language unless language.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 leaderboard metadata for your application. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of leaderboards to return in the response. For any response, - # the actual number of leaderboards returned may be less than the specified - # maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListLeaderboardResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListLeaderboardResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_leaderboards(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListLeaderboardResponse::Representation - command.response_class = Google::Apis::GamesV1::ListLeaderboardResponse - command.query['language'] = language unless language.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 - - # Return the metagame configuration data for the calling application. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::MetagameConfig] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::MetagameConfig] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_metagame_config(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'metagameConfig' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::MetagameConfig::Representation - command.response_class = Google::Apis::GamesV1::MetagameConfig - 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 play data aggregated per category for the player corresponding to - # playerId. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # ID. - # @param [String] collection - # The collection of categories for which data will be returned. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of category resources to return in the response, used for - # paging. For any response, the actual number of category resources returned may - # be less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListCategoryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListCategoryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_categories_by_player_metagame(player_id, collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'players/{playerId}/categories/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListCategoryResponse::Representation - command.response_class = Google::Apis::GamesV1::ListCategoryResponse - command.params['playerId'] = player_id unless player_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['language'] = language unless language.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 - - # Retrieves the Player resource with the given ID. To retrieve the player for - # the currently authenticated user, set playerId to me. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # ID. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Player] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Player] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_player(player_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'players/{playerId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::Player::Representation - command.response_class = Google::Apis::GamesV1::Player - command.params['playerId'] = player_id unless player_id.nil? - command.query['language'] = language unless language.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 collection of players for the currently authenticated user. - # @param [String] collection - # Collection of players being retrieved - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of player resources to return in the response, used for - # paging. For any response, the actual number of player resources returned may - # be less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListPlayerResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListPlayerResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_players(collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'players/me/players/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListPlayerResponse::Representation - command.response_class = Google::Apis::GamesV1::ListPlayerResponse - command.params['collection'] = collection unless collection.nil? - command.query['language'] = language unless language.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 - - # Removes a push token for the current user and application. Removing a non- - # existent push token will report success. - # @param [Google::Apis::GamesV1::PushTokenId] push_token_id_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 remove_pushtoken(push_token_id_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'pushtokens/remove' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::PushTokenId::Representation - command.request_object = push_token_id_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 - - # Registers a push token for the current user and application. - # @param [Google::Apis::GamesV1::PushToken] push_token_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 update_pushtoken(push_token_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'pushtokens' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GamesV1::PushToken::Representation - command.request_object = push_token_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 - - # Report that a reward for the milestone corresponding to milestoneId for the - # quest corresponding to questId has been claimed by the currently authorized - # user. - # @param [String] quest_id - # The ID of the quest. - # @param [String] milestone_id - # The ID of the milestone. - # @param [String] request_id - # A numeric ID to ensure that the request is handled correctly across retries. - # Your client application must generate this ID randomly. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 claim_quest_milestone(quest_id, milestone_id, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'quests/{questId}/milestones/{milestoneId}/claim' - command = make_simple_command(:put, path, options) - command.params['questId'] = quest_id unless quest_id.nil? - command.params['milestoneId'] = milestone_id unless milestone_id.nil? - command.query['requestId'] = request_id unless request_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Indicates that the currently authorized user will participate in the quest. - # @param [String] quest_id - # The ID of the quest. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Quest] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Quest] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def accept_quest(quest_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'quests/{questId}/accept' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::Quest::Representation - command.response_class = Google::Apis::GamesV1::Quest - command.params['questId'] = quest_id unless quest_id.nil? - command.query['language'] = language unless language.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a list of quests for your application and the currently authenticated - # player. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # ID. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of quest resources to return in the response, used for - # paging. For any response, the actual number of quest resources returned may be - # less than the specified maxResults. Acceptable values are 1 to 50, inclusive. ( - # Default: 50). - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListQuestResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListQuestResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_quests(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'players/{playerId}/quests' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListQuestResponse::Representation - command.response_class = Google::Apis::GamesV1::ListQuestResponse - command.params['playerId'] = player_id unless player_id.nil? - command.query['language'] = language unless language.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 - - # Checks whether the games client is out of date. - # @param [String] client_revision - # The revision of the client SDK used by your application. Format: - # [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: - # - # - "ANDROID" - Client is running the Android SDK. - # - "IOS" - Client is running the iOS SDK. - # - "WEB_APP" - Client is running as a Web App. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::CheckRevisionResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::CheckRevisionResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def check_revision(client_revision: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'revisions/check' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::CheckRevisionResponse::Representation - command.response_class = Google::Apis::GamesV1::CheckRevisionResponse - command.query['clientRevision'] = client_revision unless client_revision.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 - - # Create a room. For internal use by the Games SDK only. Calling this method - # directly is unsupported. - # @param [Google::Apis::GamesV1::CreateRoomRequest] create_room_request_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Room] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Room] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_room(create_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/create' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::CreateRoomRequest::Representation - command.request_object = create_room_request_object - command.response_representation = Google::Apis::GamesV1::Room::Representation - command.response_class = Google::Apis::GamesV1::Room - command.query['language'] = language unless language.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 - - # Decline an invitation to join a room. For internal use by the Games SDK only. - # Calling this method directly is unsupported. - # @param [String] room_id - # The ID of the room. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Room] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Room] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def decline_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/{roomId}/decline' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::Room::Representation - command.response_class = Google::Apis::GamesV1::Room - command.params['roomId'] = room_id unless room_id.nil? - command.query['language'] = language unless language.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 - - # Dismiss an invitation to join a room. For internal use by the Games SDK only. - # Calling this method directly is unsupported. - # @param [String] room_id - # The ID of the room. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 dismiss_room(room_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/{roomId}/dismiss' - command = make_simple_command(:post, path, options) - command.params['roomId'] = room_id unless room_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 the data for a room. - # @param [String] room_id - # The ID of the room. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Room] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Room] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/{roomId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::Room::Representation - command.response_class = Google::Apis::GamesV1::Room - command.params['roomId'] = room_id unless room_id.nil? - command.query['language'] = language unless language.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 - - # Join a room. For internal use by the Games SDK only. Calling this method - # directly is unsupported. - # @param [String] room_id - # The ID of the room. - # @param [Google::Apis::GamesV1::JoinRoomRequest] join_room_request_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Room] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Room] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def join_room(room_id, join_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/{roomId}/join' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::JoinRoomRequest::Representation - command.request_object = join_room_request_object - command.response_representation = Google::Apis::GamesV1::Room::Representation - command.response_class = Google::Apis::GamesV1::Room - command.params['roomId'] = room_id unless room_id.nil? - command.query['language'] = language unless language.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 - - # Leave a room. For internal use by the Games SDK only. Calling this method - # directly is unsupported. - # @param [String] room_id - # The ID of the room. - # @param [Google::Apis::GamesV1::LeaveRoomRequest] leave_room_request_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Room] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Room] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def leave_room(room_id, leave_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/{roomId}/leave' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::LeaveRoomRequest::Representation - command.request_object = leave_room_request_object - command.response_representation = Google::Apis::GamesV1::Room::Representation - command.response_class = Google::Apis::GamesV1::Room - command.params['roomId'] = room_id unless room_id.nil? - command.query['language'] = language unless language.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 invitations to join rooms. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of rooms to return in the response, used for paging. For - # any response, the actual number of rooms to return may be less than the - # specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::RoomList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::RoomList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rooms(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::RoomList::Representation - command.response_class = Google::Apis::GamesV1::RoomList - command.query['language'] = language unless language.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 - - # Updates sent by a client reporting the status of peers in a room. For internal - # use by the Games SDK only. Calling this method directly is unsupported. - # @param [String] room_id - # The ID of the room. - # @param [Google::Apis::GamesV1::RoomP2PStatuses] room_p2_p_statuses_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::RoomStatus] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::RoomStatus] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def report_room_status(room_id, room_p2_p_statuses_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rooms/{roomId}/reportstatus' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::RoomP2PStatuses::Representation - command.request_object = room_p2_p_statuses_object - command.response_representation = Google::Apis::GamesV1::RoomStatus::Representation - command.response_class = Google::Apis::GamesV1::RoomStatus - command.params['roomId'] = room_id unless room_id.nil? - command.query['language'] = language unless language.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 high scores, and optionally ranks, in leaderboards for the currently - # authenticated player. For a specific time span, leaderboardId can be set to - # ALL to retrieve data for all leaderboards in a given time span. - # NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same - # request; only one parameter may be set to 'ALL'. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # ID. - # @param [String] leaderboard_id - # The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all - # leaderboards for this application. - # @param [String] time_span - # The time span for the scores and ranks you're requesting. - # @param [String] include_rank_type - # The types of ranks to return. If the parameter is omitted, no ranks will be - # returned. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of leaderboard scores to return in the response. For any - # response, the actual number of leaderboard scores returned may be less than - # the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListPlayerLeaderboardScoreResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_score(player_id, leaderboard_id, time_span, include_rank_type: nil, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse::Representation - command.response_class = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse - command.params['playerId'] = player_id unless player_id.nil? - command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? - command.params['timeSpan'] = time_span unless time_span.nil? - command.query['includeRankType'] = include_rank_type unless include_rank_type.nil? - command.query['language'] = language unless language.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 - - # Lists the scores in a leaderboard, starting from the top. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] collection - # The collection of scores you're requesting. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of leaderboard scores to return in the response. For any - # response, the actual number of leaderboard scores returned may be less than - # the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] time_span - # The time span for the scores and ranks you're requesting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::LeaderboardScores] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::LeaderboardScores] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_scores(leaderboard_id, collection, language: nil, max_results: nil, page_token: nil, time_span: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}/scores/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation - command.response_class = Google::Apis::GamesV1::LeaderboardScores - command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['language'] = language unless language.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['timeSpan'] = time_span unless time_span.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the scores in a leaderboard around (and including) a player's score. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] collection - # The collection of scores you're requesting. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of leaderboard scores to return in the response. For any - # response, the actual number of leaderboard scores returned may be less than - # the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [Fixnum] results_above - # The preferred number of scores to return above the player's score. More scores - # may be returned if the player is at the bottom of the leaderboard; fewer may - # be returned if the player is at the top. Must be less than or equal to - # maxResults. - # @param [Boolean] return_top_if_absent - # True if the top scores should be returned when the player is not in the - # leaderboard. Defaults to true. - # @param [String] time_span - # The time span for the scores and ranks you're requesting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::LeaderboardScores] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::LeaderboardScores] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_window_score(leaderboard_id, collection, language: nil, max_results: nil, page_token: nil, results_above: nil, return_top_if_absent: nil, time_span: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}/window/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation - command.response_class = Google::Apis::GamesV1::LeaderboardScores - command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['language'] = language unless language.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['resultsAbove'] = results_above unless results_above.nil? - command.query['returnTopIfAbsent'] = return_top_if_absent unless return_top_if_absent.nil? - command.query['timeSpan'] = time_span unless time_span.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 - - # Submits a score to the specified leaderboard. - # @param [String] leaderboard_id - # The ID of the leaderboard. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] score - # The score you're submitting. The submitted score is ignored if it is worse - # than a previously submitted score, where worse depends on the leaderboard sort - # order. The meaning of the score value depends on the leaderboard format type. - # For fixed-point, the score represents the raw value. For time, the score - # represents elapsed time in milliseconds. For currency, the score represents a - # value in micro units. - # @param [String] score_tag - # Additional information about the score you're submitting. Values must contain - # no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::PlayerScoreResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::PlayerScoreResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def submit_score(leaderboard_id, language: nil, score: nil, score_tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/{leaderboardId}/scores' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::PlayerScoreResponse::Representation - command.response_class = Google::Apis::GamesV1::PlayerScoreResponse - command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? - command.query['language'] = language unless language.nil? - command.query['score'] = score unless score.nil? - command.query['scoreTag'] = score_tag unless score_tag.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 - - # Submits multiple scores to leaderboards. - # @param [Google::Apis::GamesV1::PlayerScoreSubmissionList] player_score_submission_list_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::ListPlayerScoreResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListPlayerScoreResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def submit_multiple_score(player_score_submission_list_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'leaderboards/scores' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::PlayerScoreSubmissionList::Representation - command.request_object = player_score_submission_list_object - command.response_representation = Google::Apis::GamesV1::ListPlayerScoreResponse::Representation - command.response_class = Google::Apis::GamesV1::ListPlayerScoreResponse - command.query['language'] = language unless language.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 metadata for a given snapshot ID. - # @param [String] snapshot_id - # The ID of the snapshot. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::Snapshot] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::Snapshot] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_snapshot(snapshot_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'snapshots/{snapshotId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::Snapshot::Representation - command.response_class = Google::Apis::GamesV1::Snapshot - command.params['snapshotId'] = snapshot_id unless snapshot_id.nil? - command.query['language'] = language unless language.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 snapshots created by your application for the player - # corresponding to the player ID. - # @param [String] player_id - # A player ID. A value of me may be used in place of the authenticated player's - # ID. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_results - # The maximum number of snapshot resources to return in the response, used for - # paging. For any response, the actual number of snapshot resources returned may - # be less than the specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::ListSnapshotResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::ListSnapshotResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_snapshots(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'players/{playerId}/snapshots' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::ListSnapshotResponse::Representation - command.response_class = Google::Apis::GamesV1::ListSnapshotResponse - command.params['playerId'] = player_id unless player_id.nil? - command.query['language'] = language unless language.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 - - # Cancel a turn-based match. - # @param [String] match_id - # The ID of the match. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/cancel' - command = make_simple_command(:put, path, options) - command.params['matchId'] = match_id unless match_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 - - # Create a turn-based match. - # @param [Google::Apis::GamesV1::CreateTurnBasedMatchRequest] create_turn_based_match_request_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_turn_based_match(create_turn_based_match_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/create' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GamesV1::CreateTurnBasedMatchRequest::Representation - command.request_object = create_turn_based_match_request_object - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.query['language'] = language unless language.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 - - # Decline an invitation to play a turn-based match. - # @param [String] match_id - # The ID of the match. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def decline_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/decline' - command = make_simple_command(:put, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.params['matchId'] = match_id unless match_id.nil? - command.query['language'] = language unless language.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 - - # Dismiss a turn-based match from the match list. The match will no longer show - # up in the list and will not generate notifications. - # @param [String] match_id - # The ID of the match. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 dismiss_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/dismiss' - command = make_simple_command(:put, path, options) - command.params['matchId'] = match_id unless match_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 - - # Finish a turn-based match. Each player should make this call once, after all - # results are in. Only the player whose turn it is may make the first call to - # Finish, and can pass in the final match state. - # @param [String] match_id - # The ID of the match. - # @param [Google::Apis::GamesV1::TurnBasedMatchResults] turn_based_match_results_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def finish_turn_based_match(match_id, turn_based_match_results_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/finish' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GamesV1::TurnBasedMatchResults::Representation - command.request_object = turn_based_match_results_object - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.params['matchId'] = match_id unless match_id.nil? - command.query['language'] = language unless language.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 data for a turn-based match. - # @param [String] match_id - # The ID of the match. - # @param [Boolean] include_match_data - # Get match data along with metadata. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_turn_based_match(match_id, include_match_data: nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.params['matchId'] = match_id unless match_id.nil? - command.query['includeMatchData'] = include_match_data unless include_match_data.nil? - command.query['language'] = language unless language.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 - - # Join a turn-based match. - # @param [String] match_id - # The ID of the match. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def join_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/join' - command = make_simple_command(:put, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.params['matchId'] = match_id unless match_id.nil? - command.query['language'] = language unless language.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 - - # Leave a turn-based match when it is not the current player's turn, without - # canceling the match. - # @param [String] match_id - # The ID of the match. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def leave_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/leave' - command = make_simple_command(:put, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.params['matchId'] = match_id unless match_id.nil? - command.query['language'] = language unless language.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 - - # Leave a turn-based match during the current player's turn, without canceling - # the match. - # @param [String] match_id - # The ID of the match. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] match_version - # The version of the match being updated. - # @param [String] pending_participant_id - # The ID of another participant who should take their turn next. If not set, the - # match will wait for other player(s) to join via automatching; this is only - # valid if automatch criteria is set on the match with remaining slots for - # automatched players. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def leave_turn(match_id, language: nil, match_version: nil, pending_participant_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/leaveTurn' - command = make_simple_command(:put, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.params['matchId'] = match_id unless match_id.nil? - command.query['language'] = language unless language.nil? - command.query['matchVersion'] = match_version unless match_version.nil? - command.query['pendingParticipantId'] = pending_participant_id unless pending_participant_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 turn-based matches the player is or was involved in. - # @param [Boolean] include_match_data - # True if match data should be returned in the response. Note that not all data - # will necessarily be returned if include_match_data is true; the server may - # decide to only return data for some of the matches to limit download size for - # the client. The remainder of the data for these matches will be retrievable on - # request. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_completed_matches - # The maximum number of completed or canceled matches to return in the response. - # If not set, all matches returned could be completed or canceled. - # @param [Fixnum] max_results - # The maximum number of matches to return in the response, used for paging. For - # any response, the actual number of matches to return may be less than the - # specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::TurnBasedMatchList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatchList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_turn_based_matches(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatchList::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatchList - command.query['includeMatchData'] = include_match_data unless include_match_data.nil? - command.query['language'] = language unless language.nil? - command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.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 - - # Create a rematch of a match that was previously completed, with the same - # participants. This can be called by only one player on a match still in their - # list; the player must have called Finish first. Returns the newly created - # match; it will be the caller's turn. - # @param [String] match_id - # The ID of the match. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] request_id - # A randomly generated numeric ID for each request specified by the caller. This - # number is used at the server to ensure that the request is handled correctly - # across retries. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatchRematch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatchRematch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def rematch_turn_based_match(match_id, language: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/rematch' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatchRematch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatchRematch - command.params['matchId'] = match_id unless match_id.nil? - command.query['language'] = language unless language.nil? - command.query['requestId'] = request_id unless request_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns turn-based matches the player is or was involved in that changed since - # the last sync call, with the least recent changes coming first. Matches that - # should be removed from the local cache will have a status of MATCH_DELETED. - # @param [Boolean] include_match_data - # True if match data should be returned in the response. Note that not all data - # will necessarily be returned if include_match_data is true; the server may - # decide to only return data for some of the matches to limit download size for - # the client. The remainder of the data for these matches will be retrievable on - # request. - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [Fixnum] max_completed_matches - # The maximum number of completed or canceled matches to return in the response. - # If not set, all matches returned could be completed or canceled. - # @param [Fixnum] max_results - # The maximum number of matches to return in the response, used for paging. For - # any response, the actual number of matches to return may be less than the - # specified maxResults. - # @param [String] page_token - # The token returned by the previous request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GamesV1::TurnBasedMatchSync] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatchSync] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def sync_turn_based_match(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/sync' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GamesV1::TurnBasedMatchSync::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatchSync - command.query['includeMatchData'] = include_match_data unless include_match_data.nil? - command.query['language'] = language unless language.nil? - command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.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 - - # Commit the results of a player turn. - # @param [String] match_id - # The ID of the match. - # @param [Google::Apis::GamesV1::TurnBasedMatchTurn] turn_based_match_turn_object - # @param [String] language - # The preferred language to use for strings returned by this method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GamesV1::TurnBasedMatch] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GamesV1::TurnBasedMatch] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def take_turn(match_id, turn_based_match_turn_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'turnbasedmatches/{matchId}/turn' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GamesV1::TurnBasedMatchTurn::Representation - command.request_object = turn_based_match_turn_object - command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation - command.response_class = Google::Apis::GamesV1::TurnBasedMatch - command.params['matchId'] = match_id unless match_id.nil? - command.query['language'] = language unless language.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 diff --git a/generated/google/apis/gan_v1beta1.rb b/generated/google/apis/gan_v1beta1.rb deleted file mode 100644 index 8cc59e3e8..000000000 --- a/generated/google/apis/gan_v1beta1.rb +++ /dev/null @@ -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/gan_v1beta1/service.rb' -require 'google/apis/gan_v1beta1/classes.rb' -require 'google/apis/gan_v1beta1/representations.rb' - -module Google - module Apis - # Google Affiliate Network API - # - # Lets you have programmatic access to your Google Affiliate Network data. - # - # @see https://developers.google.com/affiliate-network/ - module GanV1beta1 - VERSION = 'V1beta1' - REVISION = '20130205' - end - end -end diff --git a/generated/google/apis/gan_v1beta1/classes.rb b/generated/google/apis/gan_v1beta1/classes.rb deleted file mode 100644 index ad4cfa325..000000000 --- a/generated/google/apis/gan_v1beta1/classes.rb +++ /dev/null @@ -1,1428 +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 GanV1beta1 - - # An AdvertiserResource. - class Advertiser - include Google::Apis::Core::Hashable - - # True if the advertiser allows publisher created links, otherwise false. - # Corresponds to the JSON property `allowPublisherCreatedLinks` - # @return [Boolean] - attr_accessor :allow_publisher_created_links - alias_method :allow_publisher_created_links?, :allow_publisher_created_links - - # Category that this advertiser belongs to. A valid list of categories can be - # found here: http://www.google.com/support/affiliatenetwork/advertiser/bin/ - # answer.py?hl=en&answer=107581 - # Corresponds to the JSON property `category` - # @return [String] - attr_accessor :category - - # The longest possible length of a commission (how long the cookies on the - # customer's browser last before they expire). - # Corresponds to the JSON property `commissionDuration` - # @return [Fixnum] - attr_accessor :commission_duration - - # Email that this advertiser would like publishers to contact them with. - # Corresponds to the JSON property `contactEmail` - # @return [String] - attr_accessor :contact_email - - # Phone that this advertiser would like publishers to contact them with. - # Corresponds to the JSON property `contactPhone` - # @return [String] - attr_accessor :contact_phone - - # The default link id for this advertiser. - # Corresponds to the JSON property `defaultLinkId` - # @return [String] - attr_accessor :default_link_id - - # Description of the website the advertiser advertises from. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # An ApiMoneyProto. - # Corresponds to the JSON property `epcNinetyDayAverage` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :epc_ninety_day_average - - # An ApiMoneyProto. - # Corresponds to the JSON property `epcSevenDayAverage` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :epc_seven_day_average - - # The ID of this advertiser. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # An AdvertiserResource. - # Corresponds to the JSON property `item` - # @return [Google::Apis::GanV1beta1::Advertiser] - attr_accessor :item - - # Date that this advertiser was approved as a Google Affiliate Network - # advertiser. - # Corresponds to the JSON property `joinDate` - # @return [DateTime] - attr_accessor :join_date - - # The kind for an advertiser. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # URL to the logo this advertiser uses on the Google Affiliate Network. - # Corresponds to the JSON property `logoUrl` - # @return [String] - attr_accessor :logo_url - - # List of merchant center ids for this advertiser - # Corresponds to the JSON property `merchantCenterIds` - # @return [Array] - attr_accessor :merchant_center_ids - - # The name of this advertiser. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A rank based on commissions paid to publishers over the past 90 days. A number - # between 1 and 4 where 4 means the top quartile (most money paid) and 1 means - # the bottom quartile (least money paid). - # Corresponds to the JSON property `payoutRank` - # @return [String] - attr_accessor :payout_rank - - # Allows advertisers to submit product listings to Google Product Search. - # Corresponds to the JSON property `productFeedsEnabled` - # @return [Boolean] - attr_accessor :product_feeds_enabled - alias_method :product_feeds_enabled?, :product_feeds_enabled - - # List of redirect URLs for this advertiser - # Corresponds to the JSON property `redirectDomains` - # @return [Array] - attr_accessor :redirect_domains - - # URL of the website this advertiser advertises from. - # Corresponds to the JSON property `siteUrl` - # @return [String] - attr_accessor :site_url - - # The status of the requesting publisher's relationship this advertiser. - # 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) - @allow_publisher_created_links = args[:allow_publisher_created_links] unless args[:allow_publisher_created_links].nil? - @category = args[:category] unless args[:category].nil? - @commission_duration = args[:commission_duration] unless args[:commission_duration].nil? - @contact_email = args[:contact_email] unless args[:contact_email].nil? - @contact_phone = args[:contact_phone] unless args[:contact_phone].nil? - @default_link_id = args[:default_link_id] unless args[:default_link_id].nil? - @description = args[:description] unless args[:description].nil? - @epc_ninety_day_average = args[:epc_ninety_day_average] unless args[:epc_ninety_day_average].nil? - @epc_seven_day_average = args[:epc_seven_day_average] unless args[:epc_seven_day_average].nil? - @id = args[:id] unless args[:id].nil? - @item = args[:item] unless args[:item].nil? - @join_date = args[:join_date] unless args[:join_date].nil? - @kind = args[:kind] unless args[:kind].nil? - @logo_url = args[:logo_url] unless args[:logo_url].nil? - @merchant_center_ids = args[:merchant_center_ids] unless args[:merchant_center_ids].nil? - @name = args[:name] unless args[:name].nil? - @payout_rank = args[:payout_rank] unless args[:payout_rank].nil? - @product_feeds_enabled = args[:product_feeds_enabled] unless args[:product_feeds_enabled].nil? - @redirect_domains = args[:redirect_domains] unless args[:redirect_domains].nil? - @site_url = args[:site_url] unless args[:site_url].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class Advertisers - include Google::Apis::Core::Hashable - - # The advertiser list. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind for a page of advertisers. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The 'pageToken' to pass to the next request to get the next page, if there are - # more to retrieve. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 - - # A credit card offer. There are many possible result fields. We provide two - # different views of the data, or "projections." The "full" projection includes - # every result field. And the "summary" projection, which is the default, - # includes a smaller subset of the fields. The fields included in the summary - # projection are marked as such in their descriptions. - class CcOffer - include Google::Apis::Core::Hashable - - # More marketing copy about the card's benefits. A summary field. - # Corresponds to the JSON property `additionalCardBenefits` - # @return [Array] - attr_accessor :additional_card_benefits - - # Any extra fees levied on card holders. - # Corresponds to the JSON property `additionalCardHolderFee` - # @return [String] - attr_accessor :additional_card_holder_fee - - # The youngest a recipient of this card may be. - # Corresponds to the JSON property `ageMinimum` - # @return [Float] - attr_accessor :age_minimum - - # Text describing the details of the age minimum restriction. - # Corresponds to the JSON property `ageMinimumDetails` - # @return [String] - attr_accessor :age_minimum_details - - # The ongoing annual fee, in dollars. - # Corresponds to the JSON property `annualFee` - # @return [Float] - attr_accessor :annual_fee - - # Text describing the annual fee, including any difference for the first year. A - # summary field. - # Corresponds to the JSON property `annualFeeDisplay` - # @return [String] - attr_accessor :annual_fee_display - - # The largest number of units you may accumulate in a year. - # Corresponds to the JSON property `annualRewardMaximum` - # @return [Float] - attr_accessor :annual_reward_maximum - - # Possible categories for this card, eg "Low Interest" or "Good." A summary - # field. - # Corresponds to the JSON property `approvedCategories` - # @return [Array] - attr_accessor :approved_categories - - # Text describing the purchase APR. A summary field. - # Corresponds to the JSON property `aprDisplay` - # @return [String] - attr_accessor :apr_display - - # Text describing how the balance is computed. A summary field. - # Corresponds to the JSON property `balanceComputationMethod` - # @return [String] - attr_accessor :balance_computation_method - - # Text describing the terms for balance transfers. A summary field. - # Corresponds to the JSON property `balanceTransferTerms` - # @return [String] - attr_accessor :balance_transfer_terms - - # For cards with rewards programs, extra circumstances whereby additional - # rewards may be granted. - # Corresponds to the JSON property `bonusRewards` - # @return [Array] - attr_accessor :bonus_rewards - - # If you get coverage when you use the card for the given activity, this field - # describes it. - # Corresponds to the JSON property `carRentalInsurance` - # @return [String] - attr_accessor :car_rental_insurance - - # A list of what the issuer thinks are the most important benefits of the card. - # Usually summarizes the rewards program, if there is one. A summary field. - # Corresponds to the JSON property `cardBenefits` - # @return [Array] - attr_accessor :card_benefits - - # The issuer's name for the card, including any trademark or service mark - # designators. A summary field. - # Corresponds to the JSON property `cardName` - # @return [String] - attr_accessor :card_name - - # What kind of credit card this is, for example secured or unsecured. - # Corresponds to the JSON property `cardType` - # @return [String] - attr_accessor :card_type - - # Text describing the terms for cash advances. A summary field. - # Corresponds to the JSON property `cashAdvanceTerms` - # @return [String] - attr_accessor :cash_advance_terms - - # The high end for credit limits the issuer imposes on recipients of this card. - # Corresponds to the JSON property `creditLimitMax` - # @return [Float] - attr_accessor :credit_limit_max - - # The low end for credit limits the issuer imposes on recipients of this card. - # Corresponds to the JSON property `creditLimitMin` - # @return [Float] - attr_accessor :credit_limit_min - - # Text describing the credit ratings required for recipients of this card, for - # example "Excellent/Good." A summary field. - # Corresponds to the JSON property `creditRatingDisplay` - # @return [String] - attr_accessor :credit_rating_display - - # Fees for defaulting on your payments. - # Corresponds to the JSON property `defaultFees` - # @return [Array] - attr_accessor :default_fees - - # A notice that, if present, is referenced via an asterisk by many of the other - # summary fields. If this field is present, it will always start with an - # asterisk ("*"), and must be prominently displayed with the offer. A summary - # field. - # Corresponds to the JSON property `disclaimer` - # @return [String] - attr_accessor :disclaimer - - # If you get coverage when you use the card for the given activity, this field - # describes it. - # Corresponds to the JSON property `emergencyInsurance` - # @return [String] - attr_accessor :emergency_insurance - - # Whether this card is only available to existing customers of the issuer. - # Corresponds to the JSON property `existingCustomerOnly` - # @return [Boolean] - attr_accessor :existing_customer_only - alias_method :existing_customer_only?, :existing_customer_only - - # If you get coverage when you use the card for the given activity, this field - # describes it. - # Corresponds to the JSON property `extendedWarranty` - # @return [String] - attr_accessor :extended_warranty - - # The annual fee for the first year, if different from the ongoing fee. Optional. - # Corresponds to the JSON property `firstYearAnnualFee` - # @return [Float] - attr_accessor :first_year_annual_fee - - # If you get coverage when you use the card for the given activity, this field - # describes it. - # Corresponds to the JSON property `flightAccidentInsurance` - # @return [String] - attr_accessor :flight_accident_insurance - - # Fee for each transaction involving a foreign currency. - # Corresponds to the JSON property `foreignCurrencyTransactionFee` - # @return [String] - attr_accessor :foreign_currency_transaction_fee - - # If you get coverage when you use the card for the given activity, this field - # describes it. - # Corresponds to the JSON property `fraudLiability` - # @return [String] - attr_accessor :fraud_liability - - # Text describing the grace period before finance charges apply. A summary field. - # Corresponds to the JSON property `gracePeriodDisplay` - # @return [String] - attr_accessor :grace_period_display - - # The link to the image of the card that is shown on Connect Commerce. A summary - # field. - # Corresponds to the JSON property `imageUrl` - # @return [String] - attr_accessor :image_url - - # Fee for setting up the card. - # Corresponds to the JSON property `initialSetupAndProcessingFee` - # @return [String] - attr_accessor :initial_setup_and_processing_fee - - # Text describing the terms for introductory period balance transfers. A summary - # field. - # Corresponds to the JSON property `introBalanceTransferTerms` - # @return [String] - attr_accessor :intro_balance_transfer_terms - - # Text describing the terms for introductory period cash advances. A summary - # field. - # Corresponds to the JSON property `introCashAdvanceTerms` - # @return [String] - attr_accessor :intro_cash_advance_terms - - # Text describing the terms for introductory period purchases. A summary field. - # Corresponds to the JSON property `introPurchaseTerms` - # @return [String] - attr_accessor :intro_purchase_terms - - # Name of card issuer. A summary field. - # Corresponds to the JSON property `issuer` - # @return [String] - attr_accessor :issuer - - # The Google Affiliate Network ID of the advertiser making this offer. - # Corresponds to the JSON property `issuerId` - # @return [String] - attr_accessor :issuer_id - - # The generic link to the issuer's site. - # Corresponds to the JSON property `issuerWebsite` - # @return [String] - attr_accessor :issuer_website - - # The kind for one credit card offer. A summary field. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The link to the issuer's page for this card. A summary field. - # Corresponds to the JSON property `landingPageUrl` - # @return [String] - attr_accessor :landing_page_url - - # Text describing how much a late payment will cost, eg "up to $35." A summary - # field. - # Corresponds to the JSON property `latePaymentFee` - # @return [String] - attr_accessor :late_payment_fee - - # If you get coverage when you use the card for the given activity, this field - # describes it. - # Corresponds to the JSON property `luggageInsurance` - # @return [String] - attr_accessor :luggage_insurance - - # The highest interest rate the issuer charges on this card. Expressed as an - # absolute number, not as a percentage. - # Corresponds to the JSON property `maxPurchaseRate` - # @return [Float] - attr_accessor :max_purchase_rate - - # The lowest interest rate the issuer charges on this card. Expressed as an - # absolute number, not as a percentage. - # Corresponds to the JSON property `minPurchaseRate` - # @return [Float] - attr_accessor :min_purchase_rate - - # Text describing how much missing the grace period will cost. - # Corresponds to the JSON property `minimumFinanceCharge` - # @return [String] - attr_accessor :minimum_finance_charge - - # Which network (eg Visa) the card belongs to. A summary field. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # This offer's ID. A summary field. - # Corresponds to the JSON property `offerId` - # @return [String] - attr_accessor :offer_id - - # Whether a cash reward program lets you get cash back sooner than end of year - # or other longish period. - # Corresponds to the JSON property `offersImmediateCashReward` - # @return [Boolean] - attr_accessor :offers_immediate_cash_reward - alias_method :offers_immediate_cash_reward?, :offers_immediate_cash_reward - - # Fee for exceeding the card's charge limit. - # Corresponds to the JSON property `overLimitFee` - # @return [String] - attr_accessor :over_limit_fee - - # Categories in which the issuer does not wish the card to be displayed. A - # summary field. - # Corresponds to the JSON property `prohibitedCategories` - # @return [Array] - attr_accessor :prohibited_categories - - # Text describing any additional details for the purchase rate. A summary field. - # Corresponds to the JSON property `purchaseRateAdditionalDetails` - # @return [String] - attr_accessor :purchase_rate_additional_details - - # Fixed or variable. - # Corresponds to the JSON property `purchaseRateType` - # @return [String] - attr_accessor :purchase_rate_type - - # Text describing the fee for a payment that doesn't clear. A summary field. - # Corresponds to the JSON property `returnedPaymentFee` - # @return [String] - attr_accessor :returned_payment_fee - - # The company that redeems the rewards, if different from the issuer. - # Corresponds to the JSON property `rewardPartner` - # @return [String] - attr_accessor :reward_partner - - # For cards with rewards programs, the unit of reward. For example, miles, cash - # back, points. - # Corresponds to the JSON property `rewardUnit` - # @return [String] - attr_accessor :reward_unit - - # For cards with rewards programs, detailed rules about how the program works. - # Corresponds to the JSON property `rewards` - # @return [Array] - attr_accessor :rewards - - # Whether accumulated rewards ever expire. - # Corresponds to the JSON property `rewardsExpire` - # @return [Boolean] - attr_accessor :rewards_expire - alias_method :rewards_expire?, :rewards_expire - - # For airline miles rewards, tells whether blackout dates apply to the miles. - # Corresponds to the JSON property `rewardsHaveBlackoutDates` - # @return [Boolean] - attr_accessor :rewards_have_blackout_dates - alias_method :rewards_have_blackout_dates?, :rewards_have_blackout_dates - - # Fee for requesting a copy of your statement. - # Corresponds to the JSON property `statementCopyFee` - # @return [String] - attr_accessor :statement_copy_fee - - # The link to ping to register a click on this offer. A summary field. - # Corresponds to the JSON property `trackingUrl` - # @return [String] - attr_accessor :tracking_url - - # If you get coverage when you use the card for the given activity, this field - # describes it. - # Corresponds to the JSON property `travelInsurance` - # @return [String] - attr_accessor :travel_insurance - - # When variable rates were last updated. - # Corresponds to the JSON property `variableRatesLastUpdated` - # @return [String] - attr_accessor :variable_rates_last_updated - - # How often variable rates are updated. - # Corresponds to the JSON property `variableRatesUpdateFrequency` - # @return [String] - attr_accessor :variable_rates_update_frequency - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_card_benefits = args[:additional_card_benefits] unless args[:additional_card_benefits].nil? - @additional_card_holder_fee = args[:additional_card_holder_fee] unless args[:additional_card_holder_fee].nil? - @age_minimum = args[:age_minimum] unless args[:age_minimum].nil? - @age_minimum_details = args[:age_minimum_details] unless args[:age_minimum_details].nil? - @annual_fee = args[:annual_fee] unless args[:annual_fee].nil? - @annual_fee_display = args[:annual_fee_display] unless args[:annual_fee_display].nil? - @annual_reward_maximum = args[:annual_reward_maximum] unless args[:annual_reward_maximum].nil? - @approved_categories = args[:approved_categories] unless args[:approved_categories].nil? - @apr_display = args[:apr_display] unless args[:apr_display].nil? - @balance_computation_method = args[:balance_computation_method] unless args[:balance_computation_method].nil? - @balance_transfer_terms = args[:balance_transfer_terms] unless args[:balance_transfer_terms].nil? - @bonus_rewards = args[:bonus_rewards] unless args[:bonus_rewards].nil? - @car_rental_insurance = args[:car_rental_insurance] unless args[:car_rental_insurance].nil? - @card_benefits = args[:card_benefits] unless args[:card_benefits].nil? - @card_name = args[:card_name] unless args[:card_name].nil? - @card_type = args[:card_type] unless args[:card_type].nil? - @cash_advance_terms = args[:cash_advance_terms] unless args[:cash_advance_terms].nil? - @credit_limit_max = args[:credit_limit_max] unless args[:credit_limit_max].nil? - @credit_limit_min = args[:credit_limit_min] unless args[:credit_limit_min].nil? - @credit_rating_display = args[:credit_rating_display] unless args[:credit_rating_display].nil? - @default_fees = args[:default_fees] unless args[:default_fees].nil? - @disclaimer = args[:disclaimer] unless args[:disclaimer].nil? - @emergency_insurance = args[:emergency_insurance] unless args[:emergency_insurance].nil? - @existing_customer_only = args[:existing_customer_only] unless args[:existing_customer_only].nil? - @extended_warranty = args[:extended_warranty] unless args[:extended_warranty].nil? - @first_year_annual_fee = args[:first_year_annual_fee] unless args[:first_year_annual_fee].nil? - @flight_accident_insurance = args[:flight_accident_insurance] unless args[:flight_accident_insurance].nil? - @foreign_currency_transaction_fee = args[:foreign_currency_transaction_fee] unless args[:foreign_currency_transaction_fee].nil? - @fraud_liability = args[:fraud_liability] unless args[:fraud_liability].nil? - @grace_period_display = args[:grace_period_display] unless args[:grace_period_display].nil? - @image_url = args[:image_url] unless args[:image_url].nil? - @initial_setup_and_processing_fee = args[:initial_setup_and_processing_fee] unless args[:initial_setup_and_processing_fee].nil? - @intro_balance_transfer_terms = args[:intro_balance_transfer_terms] unless args[:intro_balance_transfer_terms].nil? - @intro_cash_advance_terms = args[:intro_cash_advance_terms] unless args[:intro_cash_advance_terms].nil? - @intro_purchase_terms = args[:intro_purchase_terms] unless args[:intro_purchase_terms].nil? - @issuer = args[:issuer] unless args[:issuer].nil? - @issuer_id = args[:issuer_id] unless args[:issuer_id].nil? - @issuer_website = args[:issuer_website] unless args[:issuer_website].nil? - @kind = args[:kind] unless args[:kind].nil? - @landing_page_url = args[:landing_page_url] unless args[:landing_page_url].nil? - @late_payment_fee = args[:late_payment_fee] unless args[:late_payment_fee].nil? - @luggage_insurance = args[:luggage_insurance] unless args[:luggage_insurance].nil? - @max_purchase_rate = args[:max_purchase_rate] unless args[:max_purchase_rate].nil? - @min_purchase_rate = args[:min_purchase_rate] unless args[:min_purchase_rate].nil? - @minimum_finance_charge = args[:minimum_finance_charge] unless args[:minimum_finance_charge].nil? - @network = args[:network] unless args[:network].nil? - @offer_id = args[:offer_id] unless args[:offer_id].nil? - @offers_immediate_cash_reward = args[:offers_immediate_cash_reward] unless args[:offers_immediate_cash_reward].nil? - @over_limit_fee = args[:over_limit_fee] unless args[:over_limit_fee].nil? - @prohibited_categories = args[:prohibited_categories] unless args[:prohibited_categories].nil? - @purchase_rate_additional_details = args[:purchase_rate_additional_details] unless args[:purchase_rate_additional_details].nil? - @purchase_rate_type = args[:purchase_rate_type] unless args[:purchase_rate_type].nil? - @returned_payment_fee = args[:returned_payment_fee] unless args[:returned_payment_fee].nil? - @reward_partner = args[:reward_partner] unless args[:reward_partner].nil? - @reward_unit = args[:reward_unit] unless args[:reward_unit].nil? - @rewards = args[:rewards] unless args[:rewards].nil? - @rewards_expire = args[:rewards_expire] unless args[:rewards_expire].nil? - @rewards_have_blackout_dates = args[:rewards_have_blackout_dates] unless args[:rewards_have_blackout_dates].nil? - @statement_copy_fee = args[:statement_copy_fee] unless args[:statement_copy_fee].nil? - @tracking_url = args[:tracking_url] unless args[:tracking_url].nil? - @travel_insurance = args[:travel_insurance] unless args[:travel_insurance].nil? - @variable_rates_last_updated = args[:variable_rates_last_updated] unless args[:variable_rates_last_updated].nil? - @variable_rates_update_frequency = args[:variable_rates_update_frequency] unless args[:variable_rates_update_frequency].nil? - end - - # - class BonusReward - include Google::Apis::Core::Hashable - - # How many units of reward will be granted. - # Corresponds to the JSON property `amount` - # @return [Float] - attr_accessor :amount - - # The circumstances under which this rule applies, for example, booking a flight - # via Orbitz. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @amount = args[:amount] unless args[:amount].nil? - @details = args[:details] unless args[:details].nil? - end - end - - # - class DefaultFee - include Google::Apis::Core::Hashable - - # The type of charge, for example Purchases. - # Corresponds to the JSON property `category` - # @return [String] - attr_accessor :category - - # The highest rate the issuer may charge for defaulting on debt in this category. - # Expressed as an absolute number, not as a percentage. - # Corresponds to the JSON property `maxRate` - # @return [Float] - attr_accessor :max_rate - - # The lowest rate the issuer may charge for defaulting on debt in this category. - # Expressed as an absolute number, not as a percentage. - # Corresponds to the JSON property `minRate` - # @return [Float] - attr_accessor :min_rate - - # Fixed or variable. - # Corresponds to the JSON property `rateType` - # @return [String] - attr_accessor :rate_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @category = args[:category] unless args[:category].nil? - @max_rate = args[:max_rate] unless args[:max_rate].nil? - @min_rate = args[:min_rate] unless args[:min_rate].nil? - @rate_type = args[:rate_type] unless args[:rate_type].nil? - end - end - - # - class Reward - include Google::Apis::Core::Hashable - - # Other limits, for example, if this rule only applies during an introductory - # period. - # Corresponds to the JSON property `additionalDetails` - # @return [String] - attr_accessor :additional_details - - # The number of units rewarded per purchase dollar. - # Corresponds to the JSON property `amount` - # @return [Float] - attr_accessor :amount - - # The kind of purchases covered by this rule. - # Corresponds to the JSON property `category` - # @return [String] - attr_accessor :category - - # How long rewards granted by this rule last. - # Corresponds to the JSON property `expirationMonths` - # @return [Float] - attr_accessor :expiration_months - - # The maximum purchase amount in the given category for this rule to apply. - # Corresponds to the JSON property `maxRewardTier` - # @return [Float] - attr_accessor :max_reward_tier - - # The minimum purchase amount in the given category before this rule applies. - # Corresponds to the JSON property `minRewardTier` - # @return [Float] - attr_accessor :min_reward_tier - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_details = args[:additional_details] unless args[:additional_details].nil? - @amount = args[:amount] unless args[:amount].nil? - @category = args[:category] unless args[:category].nil? - @expiration_months = args[:expiration_months] unless args[:expiration_months].nil? - @max_reward_tier = args[:max_reward_tier] unless args[:max_reward_tier].nil? - @min_reward_tier = args[:min_reward_tier] unless args[:min_reward_tier].nil? - end - end - end - - # - class CcOffers - include Google::Apis::Core::Hashable - - # The credit card offers. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind for a page of credit card offers. - # 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 - - # An EventResource. - class Event - include Google::Apis::Core::Hashable - - # The ID of advertiser for this event. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # The name of the advertiser for this event. - # Corresponds to the JSON property `advertiserName` - # @return [String] - attr_accessor :advertiser_name - - # The charge ID for this event. Only returned for charge events. - # Corresponds to the JSON property `chargeId` - # @return [String] - attr_accessor :charge_id - - # Charge type of the event (other|slotting_fee|monthly_minimum|tier_bonus|debit| - # credit). Only returned for charge events. - # Corresponds to the JSON property `chargeType` - # @return [String] - attr_accessor :charge_type - - # An ApiMoneyProto. - # Corresponds to the JSON property `commissionableSales` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :commissionable_sales - - # An ApiMoneyProto. - # Corresponds to the JSON property `earnings` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :earnings - - # The date-time this event was initiated as a RFC 3339 date-time value. - # Corresponds to the JSON property `eventDate` - # @return [DateTime] - attr_accessor :event_date - - # The kind for one event. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The ID of the member attached to this event. Only returned for conversion - # events. - # Corresponds to the JSON property `memberId` - # @return [String] - attr_accessor :member_id - - # The date-time this event was last modified as a RFC 3339 date-time value. - # Corresponds to the JSON property `modifyDate` - # @return [DateTime] - attr_accessor :modify_date - - # An ApiMoneyProto. - # Corresponds to the JSON property `networkFee` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :network_fee - - # The order ID for this event. Only returned for conversion events. - # Corresponds to the JSON property `orderId` - # @return [String] - attr_accessor :order_id - - # Products associated with the event. - # Corresponds to the JSON property `products` - # @return [Array] - attr_accessor :products - - # An ApiMoneyProto. - # Corresponds to the JSON property `publisherFee` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :publisher_fee - - # The ID of the publisher for this event. - # Corresponds to the JSON property `publisherId` - # @return [String] - attr_accessor :publisher_id - - # The name of the publisher for this event. - # Corresponds to the JSON property `publisherName` - # @return [String] - attr_accessor :publisher_name - - # Status of the event (active|canceled). Only returned for charge and conversion - # events. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Type of the event (action|transaction|charge). - # 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) - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @advertiser_name = args[:advertiser_name] unless args[:advertiser_name].nil? - @charge_id = args[:charge_id] unless args[:charge_id].nil? - @charge_type = args[:charge_type] unless args[:charge_type].nil? - @commissionable_sales = args[:commissionable_sales] unless args[:commissionable_sales].nil? - @earnings = args[:earnings] unless args[:earnings].nil? - @event_date = args[:event_date] unless args[:event_date].nil? - @kind = args[:kind] unless args[:kind].nil? - @member_id = args[:member_id] unless args[:member_id].nil? - @modify_date = args[:modify_date] unless args[:modify_date].nil? - @network_fee = args[:network_fee] unless args[:network_fee].nil? - @order_id = args[:order_id] unless args[:order_id].nil? - @products = args[:products] unless args[:products].nil? - @publisher_fee = args[:publisher_fee] unless args[:publisher_fee].nil? - @publisher_id = args[:publisher_id] unless args[:publisher_id].nil? - @publisher_name = args[:publisher_name] unless args[:publisher_name].nil? - @status = args[:status] unless args[:status].nil? - @type = args[:type] unless args[:type].nil? - end - - # - class Product - include Google::Apis::Core::Hashable - - # Id of the category this product belongs to. - # Corresponds to the JSON property `categoryId` - # @return [String] - attr_accessor :category_id - - # Name of the category this product belongs to. - # Corresponds to the JSON property `categoryName` - # @return [String] - attr_accessor :category_name - - # An ApiMoneyProto. - # Corresponds to the JSON property `earnings` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :earnings - - # An ApiMoneyProto. - # Corresponds to the JSON property `networkFee` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :network_fee - - # An ApiMoneyProto. - # Corresponds to the JSON property `publisherFee` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :publisher_fee - - # Quantity of this product bought/exchanged. - # Corresponds to the JSON property `quantity` - # @return [String] - attr_accessor :quantity - - # Sku of this product. - # Corresponds to the JSON property `sku` - # @return [String] - attr_accessor :sku - - # Sku name of this product. - # Corresponds to the JSON property `skuName` - # @return [String] - attr_accessor :sku_name - - # An ApiMoneyProto. - # Corresponds to the JSON property `unitPrice` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :unit_price - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @category_id = args[:category_id] unless args[:category_id].nil? - @category_name = args[:category_name] unless args[:category_name].nil? - @earnings = args[:earnings] unless args[:earnings].nil? - @network_fee = args[:network_fee] unless args[:network_fee].nil? - @publisher_fee = args[:publisher_fee] unless args[:publisher_fee].nil? - @quantity = args[:quantity] unless args[:quantity].nil? - @sku = args[:sku] unless args[:sku].nil? - @sku_name = args[:sku_name] unless args[:sku_name].nil? - @unit_price = args[:unit_price] unless args[:unit_price].nil? - end - end - end - - # - class Events - include Google::Apis::Core::Hashable - - # The event list. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind for a page of events. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The 'pageToken' to pass to the next request to get the next page, if there are - # more to retrieve. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 - - # A LinkResource. - class Link - include Google::Apis::Core::Hashable - - # The advertiser id for the advertiser who owns this link. - # Corresponds to the JSON property `advertiserId` - # @return [String] - attr_accessor :advertiser_id - - # Authorship - # Corresponds to the JSON property `authorship` - # @return [String] - attr_accessor :authorship - - # Availability. - # Corresponds to the JSON property `availability` - # @return [String] - attr_accessor :availability - - # Tracking url for clicks. - # Corresponds to the JSON property `clickTrackingUrl` - # @return [String] - attr_accessor :click_tracking_url - - # Date that this link was created. - # Corresponds to the JSON property `createDate` - # @return [DateTime] - attr_accessor :create_date - - # Description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The destination URL for the link. - # Corresponds to the JSON property `destinationUrl` - # @return [String] - attr_accessor :destination_url - - # Duration - # Corresponds to the JSON property `duration` - # @return [String] - attr_accessor :duration - - # Date that this link becomes inactive. - # Corresponds to the JSON property `endDate` - # @return [DateTime] - attr_accessor :end_date - - # An ApiMoneyProto. - # Corresponds to the JSON property `epcNinetyDayAverage` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :epc_ninety_day_average - - # An ApiMoneyProto. - # Corresponds to the JSON property `epcSevenDayAverage` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :epc_seven_day_average - - # The ID of this link. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # image alt text. - # Corresponds to the JSON property `imageAltText` - # @return [String] - attr_accessor :image_alt_text - - # Tracking url for impressions. - # Corresponds to the JSON property `impressionTrackingUrl` - # @return [String] - attr_accessor :impression_tracking_url - - # Flag for if this link is active. - # Corresponds to the JSON property `isActive` - # @return [Boolean] - attr_accessor :is_active - alias_method :is_active?, :is_active - - # The kind for one entity. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The link type. - # Corresponds to the JSON property `linkType` - # @return [String] - attr_accessor :link_type - - # The logical name for this link. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Promotion Type - # Corresponds to the JSON property `promotionType` - # @return [String] - attr_accessor :promotion_type - - # Special offers on the link. - # Corresponds to the JSON property `specialOffers` - # @return [Google::Apis::GanV1beta1::Link::SpecialOffers] - attr_accessor :special_offers - - # Date that this link becomes active. - # Corresponds to the JSON property `startDate` - # @return [DateTime] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil? - @authorship = args[:authorship] unless args[:authorship].nil? - @availability = args[:availability] unless args[:availability].nil? - @click_tracking_url = args[:click_tracking_url] unless args[:click_tracking_url].nil? - @create_date = args[:create_date] unless args[:create_date].nil? - @description = args[:description] unless args[:description].nil? - @destination_url = args[:destination_url] unless args[:destination_url].nil? - @duration = args[:duration] unless args[:duration].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @epc_ninety_day_average = args[:epc_ninety_day_average] unless args[:epc_ninety_day_average].nil? - @epc_seven_day_average = args[:epc_seven_day_average] unless args[:epc_seven_day_average].nil? - @id = args[:id] unless args[:id].nil? - @image_alt_text = args[:image_alt_text] unless args[:image_alt_text].nil? - @impression_tracking_url = args[:impression_tracking_url] unless args[:impression_tracking_url].nil? - @is_active = args[:is_active] unless args[:is_active].nil? - @kind = args[:kind] unless args[:kind].nil? - @link_type = args[:link_type] unless args[:link_type].nil? - @name = args[:name] unless args[:name].nil? - @promotion_type = args[:promotion_type] unless args[:promotion_type].nil? - @special_offers = args[:special_offers] unless args[:special_offers].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - end - - # Special offers on the link. - class SpecialOffers - include Google::Apis::Core::Hashable - - # Whether there is a free gift - # Corresponds to the JSON property `freeGift` - # @return [Boolean] - attr_accessor :free_gift - alias_method :free_gift?, :free_gift - - # Whether there is free shipping - # Corresponds to the JSON property `freeShipping` - # @return [Boolean] - attr_accessor :free_shipping - alias_method :free_shipping?, :free_shipping - - # An ApiMoneyProto. - # Corresponds to the JSON property `freeShippingMin` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :free_shipping_min - - # Percent off on the purchase - # Corresponds to the JSON property `percentOff` - # @return [Float] - attr_accessor :percent_off - - # An ApiMoneyProto. - # Corresponds to the JSON property `percentOffMin` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :percent_off_min - - # An ApiMoneyProto. - # Corresponds to the JSON property `priceCut` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :price_cut - - # An ApiMoneyProto. - # Corresponds to the JSON property `priceCutMin` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :price_cut_min - - # List of promotion code associated with the link - # Corresponds to the JSON property `promotionCodes` - # @return [Array] - attr_accessor :promotion_codes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @free_gift = args[:free_gift] unless args[:free_gift].nil? - @free_shipping = args[:free_shipping] unless args[:free_shipping].nil? - @free_shipping_min = args[:free_shipping_min] unless args[:free_shipping_min].nil? - @percent_off = args[:percent_off] unless args[:percent_off].nil? - @percent_off_min = args[:percent_off_min] unless args[:percent_off_min].nil? - @price_cut = args[:price_cut] unless args[:price_cut].nil? - @price_cut_min = args[:price_cut_min] unless args[:price_cut_min].nil? - @promotion_codes = args[:promotion_codes] unless args[:promotion_codes].nil? - end - end - end - - # - class Links - include Google::Apis::Core::Hashable - - # The links. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind for a page of links. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 - - # An ApiMoneyProto. - class Money - include Google::Apis::Core::Hashable - - # The amount of money. - # Corresponds to the JSON property `amount` - # @return [Float] - attr_accessor :amount - - # The 3-letter code of the currency in question. - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @amount = args[:amount] unless args[:amount].nil? - @currency_code = args[:currency_code] unless args[:currency_code].nil? - end - end - - # A PublisherResource. - class Publisher - include Google::Apis::Core::Hashable - - # Classification that this publisher belongs to. See this link for all publisher - # classifications: http://www.google.com/support/affiliatenetwork/advertiser/bin/ - # answer.py?hl=en&answer=107625&ctx=cb&src=cb&cbid=-k5fihzthfaik&cbrank=4 - # Corresponds to the JSON property `classification` - # @return [String] - attr_accessor :classification - - # An ApiMoneyProto. - # Corresponds to the JSON property `epcNinetyDayAverage` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :epc_ninety_day_average - - # An ApiMoneyProto. - # Corresponds to the JSON property `epcSevenDayAverage` - # @return [Google::Apis::GanV1beta1::Money] - attr_accessor :epc_seven_day_average - - # The ID of this publisher. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A PublisherResource. - # Corresponds to the JSON property `item` - # @return [Google::Apis::GanV1beta1::Publisher] - attr_accessor :item - - # Date that this publisher was approved as a Google Affiliate Network publisher. - # Corresponds to the JSON property `joinDate` - # @return [DateTime] - attr_accessor :join_date - - # The kind for a publisher. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of this publisher. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A rank based on commissions paid to this publisher over the past 90 days. A - # number between 1 and 4 where 4 means the top quartile (most money paid) and 1 - # means the bottom quartile (least money paid). - # Corresponds to the JSON property `payoutRank` - # @return [String] - attr_accessor :payout_rank - - # Websites that this publisher uses to advertise. - # Corresponds to the JSON property `sites` - # @return [Array] - attr_accessor :sites - - # The status of the requesting advertiser's relationship with this publisher. - # 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) - @classification = args[:classification] unless args[:classification].nil? - @epc_ninety_day_average = args[:epc_ninety_day_average] unless args[:epc_ninety_day_average].nil? - @epc_seven_day_average = args[:epc_seven_day_average] unless args[:epc_seven_day_average].nil? - @id = args[:id] unless args[:id].nil? - @item = args[:item] unless args[:item].nil? - @join_date = args[:join_date] unless args[:join_date].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @payout_rank = args[:payout_rank] unless args[:payout_rank].nil? - @sites = args[:sites] unless args[:sites].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class Publishers - include Google::Apis::Core::Hashable - - # The entity list. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind for a page of entities. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The 'pageToken' to pass to the next request to get the next page, if there are - # more to retrieve. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 - - # A ReportResource representing a report of a certain type either for an - # advertiser or publisher. - class Report - include Google::Apis::Core::Hashable - - # The column names for the report - # Corresponds to the JSON property `column_names` - # @return [Array] - attr_accessor :column_names - - # The end of the date range for this report, exclusive. - # Corresponds to the JSON property `end_date` - # @return [String] - attr_accessor :end_date - - # The kind for a report. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of matching rows before paging is applied. - # Corresponds to the JSON property `matching_row_count` - # @return [String] - attr_accessor :matching_row_count - - # The rows of data for the report - # Corresponds to the JSON property `rows` - # @return [Array>] - attr_accessor :rows - - # The start of the date range for this report, inclusive. - # Corresponds to the JSON property `start_date` - # @return [String] - attr_accessor :start_date - - # The totals rows for the report - # Corresponds to the JSON property `totals_rows` - # @return [Array>] - attr_accessor :totals_rows - - # The report 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) - @column_names = args[:column_names] unless args[:column_names].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @kind = args[:kind] unless args[:kind].nil? - @matching_row_count = args[:matching_row_count] unless args[:matching_row_count].nil? - @rows = args[:rows] unless args[:rows].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @totals_rows = args[:totals_rows] unless args[:totals_rows].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - end -end diff --git a/generated/google/apis/gan_v1beta1/representations.rb b/generated/google/apis/gan_v1beta1/representations.rb deleted file mode 100644 index a4a082592..000000000 --- a/generated/google/apis/gan_v1beta1/representations.rb +++ /dev/null @@ -1,428 +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 GanV1beta1 - - class Advertiser - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Advertisers - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CcOffer - class Representation < Google::Apis::Core::JsonRepresentation; end - - class BonusReward - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DefaultFee - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Reward - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CcOffers - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Event - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Product - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Events - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Link - class Representation < Google::Apis::Core::JsonRepresentation; end - - class SpecialOffers - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Links - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Money - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Publisher - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Publishers - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Report - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Advertiser - class Representation < Google::Apis::Core::JsonRepresentation - property :allow_publisher_created_links, as: 'allowPublisherCreatedLinks' - property :category, as: 'category' - property :commission_duration, as: 'commissionDuration' - property :contact_email, as: 'contactEmail' - property :contact_phone, as: 'contactPhone' - property :default_link_id, as: 'defaultLinkId' - property :description, as: 'description' - property :epc_ninety_day_average, as: 'epcNinetyDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :epc_seven_day_average, as: 'epcSevenDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :id, as: 'id' - property :item, as: 'item', class: Google::Apis::GanV1beta1::Advertiser, decorator: Google::Apis::GanV1beta1::Advertiser::Representation - - property :join_date, as: 'joinDate', type: DateTime - - property :kind, as: 'kind' - property :logo_url, as: 'logoUrl' - collection :merchant_center_ids, as: 'merchantCenterIds' - property :name, as: 'name' - property :payout_rank, as: 'payoutRank' - property :product_feeds_enabled, as: 'productFeedsEnabled' - collection :redirect_domains, as: 'redirectDomains' - property :site_url, as: 'siteUrl' - property :status, as: 'status' - end - end - - # @private - class Advertisers - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GanV1beta1::Advertiser, decorator: Google::Apis::GanV1beta1::Advertiser::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class CcOffer - class Representation < Google::Apis::Core::JsonRepresentation - collection :additional_card_benefits, as: 'additionalCardBenefits' - property :additional_card_holder_fee, as: 'additionalCardHolderFee' - property :age_minimum, as: 'ageMinimum' - property :age_minimum_details, as: 'ageMinimumDetails' - property :annual_fee, as: 'annualFee' - property :annual_fee_display, as: 'annualFeeDisplay' - property :annual_reward_maximum, as: 'annualRewardMaximum' - collection :approved_categories, as: 'approvedCategories' - property :apr_display, as: 'aprDisplay' - property :balance_computation_method, as: 'balanceComputationMethod' - property :balance_transfer_terms, as: 'balanceTransferTerms' - collection :bonus_rewards, as: 'bonusRewards', class: Google::Apis::GanV1beta1::CcOffer::BonusReward, decorator: Google::Apis::GanV1beta1::CcOffer::BonusReward::Representation - - property :car_rental_insurance, as: 'carRentalInsurance' - collection :card_benefits, as: 'cardBenefits' - property :card_name, as: 'cardName' - property :card_type, as: 'cardType' - property :cash_advance_terms, as: 'cashAdvanceTerms' - property :credit_limit_max, as: 'creditLimitMax' - property :credit_limit_min, as: 'creditLimitMin' - property :credit_rating_display, as: 'creditRatingDisplay' - collection :default_fees, as: 'defaultFees', class: Google::Apis::GanV1beta1::CcOffer::DefaultFee, decorator: Google::Apis::GanV1beta1::CcOffer::DefaultFee::Representation - - property :disclaimer, as: 'disclaimer' - property :emergency_insurance, as: 'emergencyInsurance' - property :existing_customer_only, as: 'existingCustomerOnly' - property :extended_warranty, as: 'extendedWarranty' - property :first_year_annual_fee, as: 'firstYearAnnualFee' - property :flight_accident_insurance, as: 'flightAccidentInsurance' - property :foreign_currency_transaction_fee, as: 'foreignCurrencyTransactionFee' - property :fraud_liability, as: 'fraudLiability' - property :grace_period_display, as: 'gracePeriodDisplay' - property :image_url, as: 'imageUrl' - property :initial_setup_and_processing_fee, as: 'initialSetupAndProcessingFee' - property :intro_balance_transfer_terms, as: 'introBalanceTransferTerms' - property :intro_cash_advance_terms, as: 'introCashAdvanceTerms' - property :intro_purchase_terms, as: 'introPurchaseTerms' - property :issuer, as: 'issuer' - property :issuer_id, as: 'issuerId' - property :issuer_website, as: 'issuerWebsite' - property :kind, as: 'kind' - property :landing_page_url, as: 'landingPageUrl' - property :late_payment_fee, as: 'latePaymentFee' - property :luggage_insurance, as: 'luggageInsurance' - property :max_purchase_rate, as: 'maxPurchaseRate' - property :min_purchase_rate, as: 'minPurchaseRate' - property :minimum_finance_charge, as: 'minimumFinanceCharge' - property :network, as: 'network' - property :offer_id, as: 'offerId' - property :offers_immediate_cash_reward, as: 'offersImmediateCashReward' - property :over_limit_fee, as: 'overLimitFee' - collection :prohibited_categories, as: 'prohibitedCategories' - property :purchase_rate_additional_details, as: 'purchaseRateAdditionalDetails' - property :purchase_rate_type, as: 'purchaseRateType' - property :returned_payment_fee, as: 'returnedPaymentFee' - property :reward_partner, as: 'rewardPartner' - property :reward_unit, as: 'rewardUnit' - collection :rewards, as: 'rewards', class: Google::Apis::GanV1beta1::CcOffer::Reward, decorator: Google::Apis::GanV1beta1::CcOffer::Reward::Representation - - property :rewards_expire, as: 'rewardsExpire' - property :rewards_have_blackout_dates, as: 'rewardsHaveBlackoutDates' - property :statement_copy_fee, as: 'statementCopyFee' - property :tracking_url, as: 'trackingUrl' - property :travel_insurance, as: 'travelInsurance' - property :variable_rates_last_updated, as: 'variableRatesLastUpdated' - property :variable_rates_update_frequency, as: 'variableRatesUpdateFrequency' - end - - # @private - class BonusReward - class Representation < Google::Apis::Core::JsonRepresentation - property :amount, as: 'amount' - property :details, as: 'details' - end - end - - # @private - class DefaultFee - class Representation < Google::Apis::Core::JsonRepresentation - property :category, as: 'category' - property :max_rate, as: 'maxRate' - property :min_rate, as: 'minRate' - property :rate_type, as: 'rateType' - end - end - - # @private - class Reward - class Representation < Google::Apis::Core::JsonRepresentation - property :additional_details, as: 'additionalDetails' - property :amount, as: 'amount' - property :category, as: 'category' - property :expiration_months, as: 'expirationMonths' - property :max_reward_tier, as: 'maxRewardTier' - property :min_reward_tier, as: 'minRewardTier' - end - end - end - - # @private - class CcOffers - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GanV1beta1::CcOffer, decorator: Google::Apis::GanV1beta1::CcOffer::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Event - class Representation < Google::Apis::Core::JsonRepresentation - property :advertiser_id, as: 'advertiserId' - property :advertiser_name, as: 'advertiserName' - property :charge_id, as: 'chargeId' - property :charge_type, as: 'chargeType' - property :commissionable_sales, as: 'commissionableSales', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :earnings, as: 'earnings', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :event_date, as: 'eventDate', type: DateTime - - property :kind, as: 'kind' - property :member_id, as: 'memberId' - property :modify_date, as: 'modifyDate', type: DateTime - - property :network_fee, as: 'networkFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :order_id, as: 'orderId' - collection :products, as: 'products', class: Google::Apis::GanV1beta1::Event::Product, decorator: Google::Apis::GanV1beta1::Event::Product::Representation - - property :publisher_fee, as: 'publisherFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :publisher_id, as: 'publisherId' - property :publisher_name, as: 'publisherName' - property :status, as: 'status' - property :type, as: 'type' - end - - # @private - class Product - class Representation < Google::Apis::Core::JsonRepresentation - property :category_id, as: 'categoryId' - property :category_name, as: 'categoryName' - property :earnings, as: 'earnings', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :network_fee, as: 'networkFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :publisher_fee, as: 'publisherFee', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :quantity, as: 'quantity' - property :sku, as: 'sku' - property :sku_name, as: 'skuName' - property :unit_price, as: 'unitPrice', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - end - end - end - - # @private - class Events - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GanV1beta1::Event, decorator: Google::Apis::GanV1beta1::Event::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Link - class Representation < Google::Apis::Core::JsonRepresentation - property :advertiser_id, as: 'advertiserId' - property :authorship, as: 'authorship' - property :availability, as: 'availability' - property :click_tracking_url, as: 'clickTrackingUrl' - property :create_date, as: 'createDate', type: DateTime - - property :description, as: 'description' - property :destination_url, as: 'destinationUrl' - property :duration, as: 'duration' - property :end_date, as: 'endDate', type: DateTime - - property :epc_ninety_day_average, as: 'epcNinetyDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :epc_seven_day_average, as: 'epcSevenDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :id, as: 'id' - property :image_alt_text, as: 'imageAltText' - property :impression_tracking_url, as: 'impressionTrackingUrl' - property :is_active, as: 'isActive' - property :kind, as: 'kind' - property :link_type, as: 'linkType' - property :name, as: 'name' - property :promotion_type, as: 'promotionType' - property :special_offers, as: 'specialOffers', class: Google::Apis::GanV1beta1::Link::SpecialOffers, decorator: Google::Apis::GanV1beta1::Link::SpecialOffers::Representation - - property :start_date, as: 'startDate', type: DateTime - - end - - # @private - class SpecialOffers - class Representation < Google::Apis::Core::JsonRepresentation - property :free_gift, as: 'freeGift' - property :free_shipping, as: 'freeShipping' - property :free_shipping_min, as: 'freeShippingMin', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :percent_off, as: 'percentOff' - property :percent_off_min, as: 'percentOffMin', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :price_cut, as: 'priceCut', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :price_cut_min, as: 'priceCutMin', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - collection :promotion_codes, as: 'promotionCodes' - end - end - end - - # @private - class Links - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GanV1beta1::Link, decorator: Google::Apis::GanV1beta1::Link::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Money - class Representation < Google::Apis::Core::JsonRepresentation - property :amount, as: 'amount' - property :currency_code, as: 'currencyCode' - end - end - - # @private - class Publisher - class Representation < Google::Apis::Core::JsonRepresentation - property :classification, as: 'classification' - property :epc_ninety_day_average, as: 'epcNinetyDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :epc_seven_day_average, as: 'epcSevenDayAverage', class: Google::Apis::GanV1beta1::Money, decorator: Google::Apis::GanV1beta1::Money::Representation - - property :id, as: 'id' - property :item, as: 'item', class: Google::Apis::GanV1beta1::Publisher, decorator: Google::Apis::GanV1beta1::Publisher::Representation - - property :join_date, as: 'joinDate', type: DateTime - - property :kind, as: 'kind' - property :name, as: 'name' - property :payout_rank, as: 'payoutRank' - collection :sites, as: 'sites' - property :status, as: 'status' - end - end - - # @private - class Publishers - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::GanV1beta1::Publisher, decorator: Google::Apis::GanV1beta1::Publisher::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Report - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_names, as: 'column_names' - property :end_date, as: 'end_date' - property :kind, as: 'kind' - property :matching_row_count, as: 'matching_row_count' - collection :rows, as: 'rows', :class => Array do - include Representable::JSON::Collection - items - end - - property :start_date, as: 'start_date' - collection :totals_rows, as: 'totals_rows', :class => Array do - include Representable::JSON::Collection - items - end - - property :type, as: 'type' - end - end - end - end -end diff --git a/generated/google/apis/gan_v1beta1/service.rb b/generated/google/apis/gan_v1beta1/service.rb deleted file mode 100644 index 68fb3a9a0..000000000 --- a/generated/google/apis/gan_v1beta1/service.rb +++ /dev/null @@ -1,692 +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 GanV1beta1 - # Google Affiliate Network API - # - # Lets you have programmatic access to your Google Affiliate Network data. - # - # @example - # require 'google/apis/gan_v1beta1' - # - # Gan = Google::Apis::GanV1beta1 # Alias the module - # service = Gan::GanService.new - # - # @see https://developers.google.com/affiliate-network/ - class GanService < 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/', 'gan/v1beta1/') - end - - # Retrieves data about a single advertiser if that the requesting advertiser/ - # publisher has access to it. Only publishers can lookup advertisers. - # Advertisers can request information about themselves by omitting the - # advertiserId query parameter. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [String] advertiser_id - # The ID of the advertiser to look up. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GanV1beta1::Advertiser] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Advertiser] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertiser(role, role_id, advertiser_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/advertiser' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Advertiser::Representation - command.response_class = Google::Apis::GanV1beta1::Advertiser - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_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 data about all advertisers that the requesting advertiser/publisher - # has access to. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [String] advertiser_category - # Caret(^) delimted list of advertiser categories. Valid categories are defined - # here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py? - # hl=en&answer=107581. Filters out all advertisers not in one of the given - # advertiser categories. Optional. - # @param [Fixnum] max_results - # Max number of items to return in this page. Optional. Defaults to 20. - # @param [Float] min_ninety_day_epc - # Filters out all advertisers that have a ninety day EPC average lower than the - # given value (inclusive). Min value: 0.0. Optional. - # @param [Fixnum] min_payout_rank - # A value between 1 and 4, where 1 represents the quartile of advertisers with - # the lowest ranks and 4 represents the quartile of advertisers with the highest - # ranks. Filters out all advertisers with a lower rank than the given quartile. - # For example if a 2 was given only advertisers with a payout rank of 25 or - # higher would be included. Optional. - # @param [Float] min_seven_day_epc - # Filters out all advertisers that have a seven day EPC average lower than the - # given value (inclusive). Min value: 0.0. Optional. - # @param [String] page_token - # The value of 'nextPageToken' from the previous page. Optional. - # @param [String] relationship_status - # Filters out all advertisers for which do not have the given relationship - # status with the requesting publisher. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GanV1beta1::Advertisers] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Advertisers] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_advertisers(role, role_id, advertiser_category: nil, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/advertisers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Advertisers::Representation - command.response_class = Google::Apis::GanV1beta1::Advertisers - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.query['advertiserCategory'] = advertiser_category unless advertiser_category.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['minNinetyDayEpc'] = min_ninety_day_epc unless min_ninety_day_epc.nil? - command.query['minPayoutRank'] = min_payout_rank unless min_payout_rank.nil? - command.query['minSevenDayEpc'] = min_seven_day_epc unless min_seven_day_epc.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['relationshipStatus'] = relationship_status unless relationship_status.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 credit card offers for the given publisher. - # @param [String] publisher - # The ID of the publisher in question. - # @param [Array, String] advertiser - # The advertiser ID of a card issuer whose offers to include. Optional, may be - # repeated. - # @param [String] projection - # The set of fields 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::GanV1beta1::CcOffers] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::CcOffers] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_cc_offers(publisher, advertiser: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'publishers/{publisher}/ccOffers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::CcOffers::Representation - command.response_class = Google::Apis::GanV1beta1::CcOffers - command.params['publisher'] = publisher unless publisher.nil? - command.query['advertiser'] = advertiser unless advertiser.nil? - command.query['projection'] = projection unless projection.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 event data for a given advertiser/publisher. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [String] advertiser_id - # Caret(^) delimited list of advertiser IDs. Filters out all events that do not - # reference one of the given advertiser IDs. Only used when under publishers - # role. Optional. - # @param [String] charge_type - # Filters out all charge events that are not of the given charge type. Valid - # values: 'other', 'slotting_fee', 'monthly_minimum', 'tier_bonus', 'credit', ' - # debit'. Optional. - # @param [String] event_date_max - # Filters out all events later than given date. Optional. Defaults to 24 hours - # after eventMin. - # @param [String] event_date_min - # Filters out all events earlier than given date. Optional. Defaults to 24 hours - # from current date/time. - # @param [String] link_id - # Caret(^) delimited list of link IDs. Filters out all events that do not - # reference one of the given link IDs. Optional. - # @param [Fixnum] max_results - # Max number of offers to return in this page. Optional. Defaults to 20. - # @param [String] member_id - # Caret(^) delimited list of member IDs. Filters out all events that do not - # reference one of the given member IDs. Optional. - # @param [String] modify_date_max - # Filters out all events modified later than given date. Optional. Defaults to - # 24 hours after modifyDateMin, if modifyDateMin is explicitly set. - # @param [String] modify_date_min - # Filters out all events modified earlier than given date. Optional. Defaults to - # 24 hours before the current modifyDateMax, if modifyDateMax is explicitly set. - # @param [String] order_id - # Caret(^) delimited list of order IDs. Filters out all events that do not - # reference one of the given order IDs. Optional. - # @param [String] page_token - # The value of 'nextPageToken' from the previous page. Optional. - # @param [String] product_category - # Caret(^) delimited list of product categories. Filters out all events that do - # not reference a product in one of the given product categories. Optional. - # @param [String] publisher_id - # Caret(^) delimited list of publisher IDs. Filters out all events that do not - # reference one of the given publishers IDs. Only used when under advertiser - # role. Optional. - # @param [String] sku - # Caret(^) delimited list of SKUs. Filters out all events that do not reference - # one of the given SKU. Optional. - # @param [String] status - # Filters out all events that do not have the given status. Valid values: ' - # active', 'canceled'. Optional. - # @param [String] type - # Filters out all events that are not of the given type. Valid values: 'action', - # 'transaction', 'charge'. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GanV1beta1::Events] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Events] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_events(role, role_id, advertiser_id: nil, charge_type: nil, event_date_max: nil, event_date_min: nil, link_id: nil, max_results: nil, member_id: nil, modify_date_max: nil, modify_date_min: nil, order_id: nil, page_token: nil, product_category: nil, publisher_id: nil, sku: nil, status: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/events' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Events::Representation - command.response_class = Google::Apis::GanV1beta1::Events - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['chargeType'] = charge_type unless charge_type.nil? - command.query['eventDateMax'] = event_date_max unless event_date_max.nil? - command.query['eventDateMin'] = event_date_min unless event_date_min.nil? - command.query['linkId'] = link_id unless link_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['memberId'] = member_id unless member_id.nil? - command.query['modifyDateMax'] = modify_date_max unless modify_date_max.nil? - command.query['modifyDateMin'] = modify_date_min unless modify_date_min.nil? - command.query['orderId'] = order_id unless order_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['productCategory'] = product_category unless product_category.nil? - command.query['publisherId'] = publisher_id unless publisher_id.nil? - command.query['sku'] = sku unless sku.nil? - command.query['status'] = status unless status.nil? - command.query['type'] = type unless type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves data about a single link if the requesting advertiser/publisher has - # access to it. Advertisers can look up their own links. Publishers can look up - # visible links or links belonging to advertisers they are in a relationship - # with. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [String] link_id - # The ID of the link to look up. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GanV1beta1::Link] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Link] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_link(role, role_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/link/{linkId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Link::Representation - command.response_class = Google::Apis::GanV1beta1::Link - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.params['linkId'] = link_id unless link_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 link. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [Google::Apis::GanV1beta1::Link] link_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::GanV1beta1::Link] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Link] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_link(role, role_id, link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/link' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GanV1beta1::Link::Representation - command.request_object = link_object - command.response_representation = Google::Apis::GanV1beta1::Link::Representation - command.response_class = Google::Apis::GanV1beta1::Link - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_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 all links that match the query parameters. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [Array, String] advertiser_id - # Limits the resulting links to the ones belonging to the listed advertisers. - # @param [Array, String] asset_size - # The size of the given asset. - # @param [String] authorship - # The role of the author of the link. - # @param [String] create_date_max - # The end of the create date range. - # @param [String] create_date_min - # The beginning of the create date range. - # @param [String] link_type - # The type of the link. - # @param [Fixnum] max_results - # Max number of items to return in this page. Optional. Defaults to 20. - # @param [String] page_token - # The value of 'nextPageToken' from the previous page. Optional. - # @param [Array, String] promotion_type - # The promotion type. - # @param [String] relationship_status - # The status of the relationship. - # @param [String] search_text - # Field for full text search across title and merchandising text, supports link - # id search. - # @param [String] start_date_max - # The end of the start date range. - # @param [String] start_date_min - # The beginning of the start date range. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GanV1beta1::Links] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Links] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_links(role, role_id, advertiser_id: nil, asset_size: nil, authorship: nil, create_date_max: nil, create_date_min: nil, link_type: nil, max_results: nil, page_token: nil, promotion_type: nil, relationship_status: nil, search_text: nil, start_date_max: nil, start_date_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/links' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Links::Representation - command.response_class = Google::Apis::GanV1beta1::Links - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['assetSize'] = asset_size unless asset_size.nil? - command.query['authorship'] = authorship unless authorship.nil? - command.query['createDateMax'] = create_date_max unless create_date_max.nil? - command.query['createDateMin'] = create_date_min unless create_date_min.nil? - command.query['linkType'] = link_type unless link_type.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['promotionType'] = promotion_type unless promotion_type.nil? - command.query['relationshipStatus'] = relationship_status unless relationship_status.nil? - command.query['searchText'] = search_text unless search_text.nil? - command.query['startDateMax'] = start_date_max unless start_date_max.nil? - command.query['startDateMin'] = start_date_min unless start_date_min.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 data about a single advertiser if that the requesting advertiser/ - # publisher has access to it. Only advertisers can look up publishers. - # Publishers can request information about themselves by omitting the - # publisherId query parameter. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [String] publisher_id - # The ID of the publisher to look up. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GanV1beta1::Publisher] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Publisher] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_publisher(role, role_id, publisher_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/publisher' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Publisher::Representation - command.response_class = Google::Apis::GanV1beta1::Publisher - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.query['publisherId'] = publisher_id unless publisher_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 data about all publishers that the requesting advertiser/publisher - # has access to. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [Fixnum] max_results - # Max number of items to return in this page. Optional. Defaults to 20. - # @param [Float] min_ninety_day_epc - # Filters out all publishers that have a ninety day EPC average lower than the - # given value (inclusive). Min value: 0.0. Optional. - # @param [Fixnum] min_payout_rank - # A value between 1 and 4, where 1 represents the quartile of publishers with - # the lowest ranks and 4 represents the quartile of publishers with the highest - # ranks. Filters out all publishers with a lower rank than the given quartile. - # For example if a 2 was given only publishers with a payout rank of 25 or - # higher would be included. Optional. - # @param [Float] min_seven_day_epc - # Filters out all publishers that have a seven day EPC average lower than the - # given value (inclusive). Min value 0.0. Optional. - # @param [String] page_token - # The value of 'nextPageToken' from the previous page. Optional. - # @param [String] publisher_category - # Caret(^) delimted list of publisher categories. Valid categories: ( - # unclassified|community_and_content|shopping_and_promotion|loyalty_and_rewards| - # network|search_specialist|comparison_shopping|email). Filters out all - # publishers not in one of the given advertiser categories. Optional. - # @param [String] relationship_status - # Filters out all publishers for which do not have the given relationship status - # with the requesting publisher. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GanV1beta1::Publishers] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::Publishers] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_publishers(role, role_id, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, publisher_category: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/publishers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Publishers::Representation - command.response_class = Google::Apis::GanV1beta1::Publishers - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['minNinetyDayEpc'] = min_ninety_day_epc unless min_ninety_day_epc.nil? - command.query['minPayoutRank'] = min_payout_rank unless min_payout_rank.nil? - command.query['minSevenDayEpc'] = min_seven_day_epc unless min_seven_day_epc.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['publisherCategory'] = publisher_category unless publisher_category.nil? - command.query['relationshipStatus'] = relationship_status unless relationship_status.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 of the specified type. - # @param [String] role - # The role of the requester. Valid values: 'advertisers' or 'publishers'. - # @param [String] role_id - # The ID of the requesting advertiser or publisher. - # @param [String] report_type - # The type of report being requested. Valid values: 'order_delta'. Required. - # @param [Array, String] advertiser_id - # The IDs of the advertisers to look up, if applicable. - # @param [Boolean] calculate_totals - # Whether or not to calculate totals rows. Optional. - # @param [String] end_date - # The end date (exclusive), in RFC 3339 format, for the report data to be - # returned. Defaults to one day after startDate, if that is given, or today. - # Optional. - # @param [String] event_type - # Filters out all events that are not of the given type. Valid values: 'action', - # 'transaction', or 'charge'. Optional. - # @param [Array, String] link_id - # Filters to capture one of given link IDs. Optional. - # @param [Fixnum] max_results - # Max number of items to return in this page. Optional. Defaults to return all - # results. - # @param [Array, String] order_id - # Filters to capture one of the given order IDs. Optional. - # @param [Array, String] publisher_id - # The IDs of the publishers to look up, if applicable. - # @param [String] start_date - # The start date (inclusive), in RFC 3339 format, for the report data to be - # returned. Defaults to one day before endDate, if that is given, or yesterday. - # Optional. - # @param [Fixnum] start_index - # Offset on which to return results when paging. Optional. - # @param [String] status - # Filters out all events that do not have the given status. Valid values: ' - # active', 'canceled', or 'invalid'. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GanV1beta1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GanV1beta1::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 get_report(role, role_id, report_type, advertiser_id: nil, calculate_totals: nil, end_date: nil, event_type: nil, link_id: nil, max_results: nil, order_id: nil, publisher_id: nil, start_date: nil, start_index: nil, status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{role}/{roleId}/report/{reportType}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GanV1beta1::Report::Representation - command.response_class = Google::Apis::GanV1beta1::Report - command.params['role'] = role unless role.nil? - command.params['roleId'] = role_id unless role_id.nil? - command.params['reportType'] = report_type unless report_type.nil? - command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? - command.query['calculateTotals'] = calculate_totals unless calculate_totals.nil? - command.query['endDate'] = end_date unless end_date.nil? - command.query['eventType'] = event_type unless event_type.nil? - command.query['linkId'] = link_id unless link_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderId'] = order_id unless order_id.nil? - command.query['publisherId'] = publisher_id unless publisher_id.nil? - command.query['startDate'] = start_date unless start_date.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['status'] = status unless status.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 diff --git a/generated/google/apis/genomics_v1beta2.rb b/generated/google/apis/genomics_v1beta2.rb deleted file mode 100644 index 01580d5db..000000000 --- a/generated/google/apis/genomics_v1beta2.rb +++ /dev/null @@ -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/genomics_v1beta2/service.rb' -require 'google/apis/genomics_v1beta2/classes.rb' -require 'google/apis/genomics_v1beta2/representations.rb' - -module Google - module Apis - # Genomics API - # - # Provides access to Genomics data. - # - # @see https://developers.google.com/genomics/v1beta2/reference - module GenomicsV1beta2 - VERSION = 'V1beta2' - REVISION = '20150526' - - # View and manage your data in Google BigQuery - AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # Manage your data in Google Cloud Storage - AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write' - - # View and manage Genomics data - AUTH_GENOMICS = 'https://www.googleapis.com/auth/genomics' - - # View Genomics data - AUTH_GENOMICS_READONLY = 'https://www.googleapis.com/auth/genomics.readonly' - end - end -end diff --git a/generated/google/apis/genomics_v1beta2/classes.rb b/generated/google/apis/genomics_v1beta2/classes.rb deleted file mode 100644 index 1c4b0583d..000000000 --- a/generated/google/apis/genomics_v1beta2/classes.rb +++ /dev/null @@ -1,3282 +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 GenomicsV1beta2 - - # The read group set align request. - class AlignReadGroupSetsRequest - include Google::Apis::Core::Hashable - - # The BAM source files for alignment. Exactly one of readGroupSetId, - # bamSourceUris, interleavedFastqSource or pairedFastqSource must be provided. - # The caller must have READ permissions for these files. - # Corresponds to the JSON property `bamSourceUris` - # @return [Array] - attr_accessor :bam_source_uris - - # Required. The ID of the dataset the newly aligned read group sets will belong - # to. The caller must have WRITE permissions to this dataset. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # Describes an interleaved FASTQ file source for alignment. - # Corresponds to the JSON property `interleavedFastqSource` - # @return [Google::Apis::GenomicsV1beta2::InterleavedFastqSource] - attr_accessor :interleaved_fastq_source - - # Describes a paired-end FASTQ file source for alignment. - # Corresponds to the JSON property `pairedFastqSource` - # @return [Google::Apis::GenomicsV1beta2::PairedFastqSource] - attr_accessor :paired_fastq_source - - # The ID of the read group set which will be aligned. A new read group set will - # be generated to hold the aligned data, the originals will not be modified. The - # caller must have READ permissions for this read group set. Exactly one of - # readGroupSetId, bamSourceUris, interleavedFastqSource or pairedFastqSource - # must be provided. - # Corresponds to the JSON property `readGroupSetId` - # @return [String] - attr_accessor :read_group_set_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bam_source_uris = args[:bam_source_uris] unless args[:bam_source_uris].nil? - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @interleaved_fastq_source = args[:interleaved_fastq_source] unless args[:interleaved_fastq_source].nil? - @paired_fastq_source = args[:paired_fastq_source] unless args[:paired_fastq_source].nil? - @read_group_set_id = args[:read_group_set_id] unless args[:read_group_set_id].nil? - end - end - - # The read group set align response. - class AlignReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # A job ID that can be used to get status information. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - end - end - - # An annotation describes a region of reference genome. The value of an - # annotation may be one of several canonical types, supplemented by arbitrary - # info tags. A variant annotation is represented by one or more of these - # canonical types. An annotation is not inherently associated with a specific - # sample or individual (though a client could choose to use annotations in this - # way). Example canonical annotation types are 'Gene' and 'Variant'. - class Annotation - include Google::Apis::Core::Hashable - - # The ID of the containing annotation set. - # Corresponds to the JSON property `annotationSetId` - # @return [String] - attr_accessor :annotation_set_id - - # The generated unique ID for this annotation. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The display name of this annotation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A 0-based half-open genomic coordinate range over a reference sequence, for - # representing the position of a genomic resource. - # Corresponds to the JSON property `position` - # @return [Google::Apis::GenomicsV1beta2::RangePosition] - attr_accessor :position - - # A transcript represents the assertion that a particular region of the - # reference genome may be transcribed as RNA. - # Corresponds to the JSON property `transcript` - # @return [Google::Apis::GenomicsV1beta2::Transcript] - attr_accessor :transcript - - # The data type for this annotation. Must match the containing annotation set's - # type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A Variant annotation. - # Corresponds to the JSON property `variant` - # @return [Google::Apis::GenomicsV1beta2::VariantAnnotation] - attr_accessor :variant - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation_set_id = args[:annotation_set_id] unless args[:annotation_set_id].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @name = args[:name] unless args[:name].nil? - @position = args[:position] unless args[:position].nil? - @transcript = args[:transcript] unless args[:transcript].nil? - @type = args[:type] unless args[:type].nil? - @variant = args[:variant] unless args[:variant].nil? - end - end - - # An annotation set is a logical grouping of annotations that share consistent - # type information and provenance. Examples of annotation sets include 'all - # genes from refseq', and 'all variant annotations from ClinVar'. - class AnnotationSet - include Google::Apis::Core::Hashable - - # The ID of the containing dataset. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The generated unique ID for this annotation set. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The display name for this annotation set. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the reference set that defines the coordinate space for this set's - # annotations. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The source URI describing the file from which this annotation set was - # generated, if any. - # Corresponds to the JSON property `sourceUri` - # @return [String] - attr_accessor :source_uri - - # The type of annotations contained within this set. - # 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) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @name = args[:name] unless args[:name].nil? - @reference_set_id = args[:reference_set_id] unless args[:reference_set_id].nil? - @source_uri = args[:source_uri] unless args[:source_uri].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class BatchAnnotationsResponse - include Google::Apis::Core::Hashable - - # The resulting per-annotation entries, ordered consistently with the original - # request. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] unless args[:entries].nil? - end - end - - # - class BatchAnnotationsResponseEntry - include Google::Apis::Core::Hashable - - # An annotation describes a region of reference genome. The value of an - # annotation may be one of several canonical types, supplemented by arbitrary - # info tags. A variant annotation is represented by one or more of these - # canonical types. An annotation is not inherently associated with a specific - # sample or individual (though a client could choose to use annotations in this - # way). Example canonical annotation types are 'Gene' and 'Variant'. - # Corresponds to the JSON property `annotation` - # @return [Google::Apis::GenomicsV1beta2::Annotation] - attr_accessor :annotation - - # - # Corresponds to the JSON property `status` - # @return [Google::Apis::GenomicsV1beta2::BatchAnnotationsResponseEntryStatus] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation = args[:annotation] unless args[:annotation].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class BatchAnnotationsResponseEntryStatus - include Google::Apis::Core::Hashable - - # The HTTP status code for this operation. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # Error message for this status, if any. - # 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? - @message = args[:message] unless args[:message].nil? - end - end - - # - class BatchCreateAnnotationsRequest - include Google::Apis::Core::Hashable - - # The annotations to be created. At most 4096 can be specified in a single - # request. - # Corresponds to the JSON property `annotations` - # @return [Array] - attr_accessor :annotations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotations = args[:annotations] unless args[:annotations].nil? - end - end - - # A call represents the determination of genotype with respect to a particular - # variant. It may include associated information such as quality and phasing. - # For example, a call might assign a probability of 0.32 to the occurrence of a - # SNP named rs1234 in a call set with the name NA12345. - class Call - include Google::Apis::Core::Hashable - - # The ID of the call set this variant call belongs to. - # Corresponds to the JSON property `callSetId` - # @return [String] - attr_accessor :call_set_id - - # The name of the call set this variant call belongs to. - # Corresponds to the JSON property `callSetName` - # @return [String] - attr_accessor :call_set_name - - # The genotype of this variant call. Each value represents either the value of - # the referenceBases field or a 1-based index into alternateBases. If a variant - # had a referenceBases value of T and an alternateBases value of ["A", "C"], and - # the genotype was [2, 1], that would mean the call represented the heterozygous - # value CA for this variant. If the genotype was instead [0, 1], the represented - # value would be TA. Ordering of the genotype values is important if the - # phaseset is present. If a genotype is not called (that is, a . is present in - # the GT string) -1 is returned. - # Corresponds to the JSON property `genotype` - # @return [Array] - attr_accessor :genotype - - # The genotype likelihoods for this variant call. Each array entry represents - # how likely a specific genotype is for this call. The value ordering is defined - # by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) - # are available and log10(P) genotype likelihood scores (GL) are not, PL scores - # are converted to GL scores. If both are available, PL scores are stored in - # info. - # Corresponds to the JSON property `genotypeLikelihood` - # @return [Array] - attr_accessor :genotype_likelihood - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # If this field is present, this variant call's genotype ordering implies the - # phase of the bases and is consistent with any other variant calls in the same - # reference sequence which have the same phaseset value. When importing data - # from VCF, if the genotype data was phased but no phase set was specified this - # field will be set to *. - # Corresponds to the JSON property `phaseset` - # @return [String] - attr_accessor :phaseset - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_set_id = args[:call_set_id] unless args[:call_set_id].nil? - @call_set_name = args[:call_set_name] unless args[:call_set_name].nil? - @genotype = args[:genotype] unless args[:genotype].nil? - @genotype_likelihood = args[:genotype_likelihood] unless args[:genotype_likelihood].nil? - @info = args[:info] unless args[:info].nil? - @phaseset = args[:phaseset] unless args[:phaseset].nil? - end - end - - # The read group set call request. - class CallReadGroupSetsRequest - include Google::Apis::Core::Hashable - - # Required. The ID of the dataset the called variants will belong to. The caller - # must have WRITE permissions to this dataset. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The IDs of the read group sets which will be called. The caller must have READ - # permissions for these read group sets. One of readGroupSetId or sourceUris - # must be provided. - # Corresponds to the JSON property `readGroupSetId` - # @return [String] - attr_accessor :read_group_set_id - - # A list of URIs pointing at BAM files in Google Cloud Storage which will be - # called. FASTQ files are not allowed. The caller must have READ permissions for - # these files. One of readGroupSetId or sourceUris must be provided. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @read_group_set_id = args[:read_group_set_id] unless args[:read_group_set_id].nil? - @source_uris = args[:source_uris] unless args[:source_uris].nil? - end - end - - # The read group set call response. - class CallReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # A job ID that can be used to get status information. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - end - end - - # A call set is a collection of variant calls, typically for one sample. It - # belongs to a variant set. - class CallSet - include Google::Apis::Core::Hashable - - # The date this call set was created in milliseconds from the epoch. - # Corresponds to the JSON property `created` - # @return [String] - attr_accessor :created - - # The Google generated ID of the call set, immutable. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The call set name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The sample ID this call set corresponds to. - # Corresponds to the JSON property `sampleId` - # @return [String] - attr_accessor :sample_id - - # The IDs of the variant sets this call set belongs to. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @created = args[:created] unless args[:created].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @name = args[:name] unless args[:name].nil? - @sample_id = args[:sample_id] unless args[:sample_id].nil? - @variant_set_ids = args[:variant_set_ids] unless args[:variant_set_ids].nil? - end - end - - # A single CIGAR operation. - class CigarUnit - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `operation` - # @return [String] - attr_accessor :operation - - # The number of bases that the operation runs for. Required. - # Corresponds to the JSON property `operationLength` - # @return [String] - attr_accessor :operation_length - - # referenceSequence is only used at mismatches (SEQUENCE_MISMATCH) and deletions - # (DELETE). Filling this field replaces SAM's MD tag. If the relevant - # information is not available, this field is unset. - # Corresponds to the JSON property `referenceSequence` - # @return [String] - attr_accessor :reference_sequence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operation = args[:operation] unless args[:operation].nil? - @operation_length = args[:operation_length] unless args[:operation_length].nil? - @reference_sequence = args[:reference_sequence] unless args[:reference_sequence].nil? - end - end - - # A bucket over which read coverage has been precomputed. A bucket corresponds - # to a specific range of the reference sequence. - class CoverageBucket - include Google::Apis::Core::Hashable - - # The average number of reads which are aligned to each individual reference - # base in this bucket. - # Corresponds to the JSON property `meanCoverage` - # @return [Float] - attr_accessor :mean_coverage - - # A 0-based half-open genomic coordinate range over a reference sequence. - # Corresponds to the JSON property `range` - # @return [Google::Apis::GenomicsV1beta2::Range] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @mean_coverage = args[:mean_coverage] unless args[:mean_coverage].nil? - @range = args[:range] unless args[:range].nil? - end - end - - # A Dataset is a collection of genomic data. - class Dataset - include Google::Apis::Core::Hashable - - # The Google generated ID of the dataset, immutable. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Flag indicating whether or not a dataset is publicly viewable. If a dataset is - # not public, it inherits viewing permissions from its project. - # Corresponds to the JSON property `isPublic` - # @return [Boolean] - attr_accessor :is_public - alias_method :is_public?, :is_public - - # The dataset name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The Google Developers Console project number that this dataset belongs to. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @is_public = args[:is_public] unless args[:is_public].nil? - @name = args[:name] unless args[:name].nil? - @project_number = args[:project_number] unless args[:project_number].nil? - end - end - - # The job creation request. - class ExperimentalCreateJobRequest - include Google::Apis::Core::Hashable - - # Specifies whether or not to run the alignment pipeline. Either align or - # callVariants must be set. - # Corresponds to the JSON property `align` - # @return [Boolean] - attr_accessor :align - alias_method :align?, :align - - # Specifies whether or not to run the variant calling pipeline. Either align or - # callVariants must be set. - # Corresponds to the JSON property `callVariants` - # @return [Boolean] - attr_accessor :call_variants - alias_method :call_variants?, :call_variants - - # Specifies where to copy the results of certain pipelines. This should be in - # the form of gs://bucket/path. - # Corresponds to the JSON property `gcsOutputPath` - # @return [String] - attr_accessor :gcs_output_path - - # A list of Google Cloud Storage URIs of paired end .fastq files to operate upon. - # If specified, this represents the second file of each paired .fastq file. The - # first file of each pair should be specified in sourceUris. - # Corresponds to the JSON property `pairedSourceUris` - # @return [Array] - attr_accessor :paired_source_uris - - # Required. The Google Cloud Project ID with which to associate the request. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # A list of Google Cloud Storage URIs of data files to operate upon. These can - # be .bam, interleaved .fastq, or paired .fastq. If specifying paired .fastq - # files, the first of each pair of files should be listed here, and the second - # of each pair should be listed in pairedSourceUris. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @align = args[:align] unless args[:align].nil? - @call_variants = args[:call_variants] unless args[:call_variants].nil? - @gcs_output_path = args[:gcs_output_path] unless args[:gcs_output_path].nil? - @paired_source_uris = args[:paired_source_uris] unless args[:paired_source_uris].nil? - @project_number = args[:project_number] unless args[:project_number].nil? - @source_uris = args[:source_uris] unless args[:source_uris].nil? - end - end - - # The job creation response. - class ExperimentalCreateJobResponse - include Google::Apis::Core::Hashable - - # A job ID that can be used to get status information. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - end - end - - # The read group set export request. - class ExportReadGroupSetsRequest - include Google::Apis::Core::Hashable - - # Required. A Google Cloud Storage URI for the exported BAM file. The currently - # authenticated user must have write access to the new file. An error will be - # returned if the URI already contains data. - # Corresponds to the JSON property `exportUri` - # @return [String] - attr_accessor :export_uri - - # Required. The Google Developers Console project number that owns this export. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # Required. The IDs of the read group sets to export. - # Corresponds to the JSON property `readGroupSetIds` - # @return [Array] - attr_accessor :read_group_set_ids - - # The reference names to export. If this is not specified, all reference - # sequences, including unmapped reads, are exported. Use * to export only - # unmapped reads. - # Corresponds to the JSON property `referenceNames` - # @return [Array] - attr_accessor :reference_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @export_uri = args[:export_uri] unless args[:export_uri].nil? - @project_number = args[:project_number] unless args[:project_number].nil? - @read_group_set_ids = args[:read_group_set_ids] unless args[:read_group_set_ids].nil? - @reference_names = args[:reference_names] unless args[:reference_names].nil? - end - end - - # The read group set export response. - class ExportReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # A job ID that can be used to get status information. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - end - end - - # The variant data export request. - class ExportVariantSetRequest - include Google::Apis::Core::Hashable - - # Required. The BigQuery dataset to export data to. This dataset must already - # exist. Note that this is distinct from the Genomics concept of "dataset". - # Corresponds to the JSON property `bigqueryDataset` - # @return [String] - attr_accessor :bigquery_dataset - - # Required. The BigQuery table to export data to. If the table doesn't exist, it - # will be created. If it already exists, it will be overwritten. - # Corresponds to the JSON property `bigqueryTable` - # @return [String] - attr_accessor :bigquery_table - - # If provided, only variant call information from the specified call sets will - # be exported. By default all variant calls are exported. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # The format for the exported data. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Required. The Google Cloud project number that owns the destination BigQuery - # dataset. The caller must have WRITE access to this project. This project will - # also own the resulting export job. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bigquery_dataset = args[:bigquery_dataset] unless args[:bigquery_dataset].nil? - @bigquery_table = args[:bigquery_table] unless args[:bigquery_table].nil? - @call_set_ids = args[:call_set_ids] unless args[:call_set_ids].nil? - @format = args[:format] unless args[:format].nil? - @project_number = args[:project_number] unless args[:project_number].nil? - end - end - - # The variant data export response. - class ExportVariantSetResponse - include Google::Apis::Core::Hashable - - # A job ID that can be used to get status information. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - end - end - - # - class ExternalId - include Google::Apis::Core::Hashable - - # The id used by the source of this data. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of the source of this data. - # Corresponds to the JSON property `sourceName` - # @return [String] - attr_accessor :source_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @source_name = args[:source_name] unless args[:source_name].nil? - end - end - - # - class FastqMetadata - include Google::Apis::Core::Hashable - - # Optionally specifies the library name for alignment from FASTQ. - # Corresponds to the JSON property `libraryName` - # @return [String] - attr_accessor :library_name - - # Optionally specifies the platform name for alignment from FASTQ. For example: - # CAPILLARY, LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT, PACBIO. - # Corresponds to the JSON property `platformName` - # @return [String] - attr_accessor :platform_name - - # Optionally specifies the platform unit for alignment from FASTQ. For example: - # flowcell-barcode.lane for Illumina or slide for SOLID. - # Corresponds to the JSON property `platformUnit` - # @return [String] - attr_accessor :platform_unit - - # Optionally specifies the read group name for alignment from FASTQ. - # Corresponds to the JSON property `readGroupName` - # @return [String] - attr_accessor :read_group_name - - # Optionally specifies the sample name for alignment from FASTQ. - # Corresponds to the JSON property `sampleName` - # @return [String] - attr_accessor :sample_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @library_name = args[:library_name] unless args[:library_name].nil? - @platform_name = args[:platform_name] unless args[:platform_name].nil? - @platform_unit = args[:platform_unit] unless args[:platform_unit].nil? - @read_group_name = args[:read_group_name] unless args[:read_group_name].nil? - @sample_name = args[:sample_name] unless args[:sample_name].nil? - end - end - - # The read group set import request. - class ImportReadGroupSetsRequest - include Google::Apis::Core::Hashable - - # Required. The ID of the dataset these read group sets will belong to. The - # caller must have WRITE permissions to this dataset. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The partition strategy describes how read groups are partitioned into read - # group sets. - # Corresponds to the JSON property `partitionStrategy` - # @return [String] - attr_accessor :partition_strategy - - # The reference set to which the imported read group sets are aligned to, if any. - # The reference names of this reference set must be a superset of those found - # in the imported file headers. If no reference set id is provided, a best - # effort is made to associate with a matching reference set. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # A list of URIs pointing at BAM files in Google Cloud Storage. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @partition_strategy = args[:partition_strategy] unless args[:partition_strategy].nil? - @reference_set_id = args[:reference_set_id] unless args[:reference_set_id].nil? - @source_uris = args[:source_uris] unless args[:source_uris].nil? - end - end - - # The read group set import response. - class ImportReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # A job ID that can be used to get status information. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - end - end - - # The variant data import request. - class ImportVariantsRequest - include Google::Apis::Core::Hashable - - # The format of the variant data being imported. If unspecified, defaults to to " - # VCF". - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Convert reference names to the canonical representation. hg19 haploytypes ( - # those reference names containing "_hap") are not modified in any way. All - # other reference names are modified according to the following rules: The - # reference name is capitalized. The "chr" prefix is dropped for all autosomes - # and sex chromsomes. For example "chr17" becomes "17" and "chrX" becomes "X". - # All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". - # Corresponds to the JSON property `normalizeReferenceNames` - # @return [Boolean] - attr_accessor :normalize_reference_names - alias_method :normalize_reference_names?, :normalize_reference_names - - # A list of URIs referencing variant files in Google Cloud Storage. URIs can - # include wildcards as described here. Note that recursive wildcards ('**') are - # not supported. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @format = args[:format] unless args[:format].nil? - @normalize_reference_names = args[:normalize_reference_names] unless args[:normalize_reference_names].nil? - @source_uris = args[:source_uris] unless args[:source_uris].nil? - end - end - - # The variant data import response. - class ImportVariantsResponse - include Google::Apis::Core::Hashable - - # A job ID that can be used to get status information. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_id = args[:job_id] unless args[:job_id].nil? - end - end - - # Wrapper message for `int32`. - # The JSON representation for `Int32Value` is JSON number. - class Int32Value - include Google::Apis::Core::Hashable - - # The int32 value. - # Corresponds to the JSON property `value` - # @return [Fixnum] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] unless args[:value].nil? - end - end - - # Describes an interleaved FASTQ file source for alignment. - class InterleavedFastqSource - include Google::Apis::Core::Hashable - - # Optionally specifies the metadata to be associated with the final aligned read - # group set. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::GenomicsV1beta2::FastqMetadata] - attr_accessor :metadata - - # A list of URIs pointing at interleaved FASTQ files in Google Cloud Storage - # which will be aligned. The caller must have READ permissions for these files. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] unless args[:metadata].nil? - @source_uris = args[:source_uris] unless args[:source_uris].nil? - end - end - - # A Job represents an ongoing process that can be monitored for status - # information. - class Job - include Google::Apis::Core::Hashable - - # The date this job was created, in milliseconds from the epoch. - # Corresponds to the JSON property `created` - # @return [String] - attr_accessor :created - - # A more detailed description of this job's current status. - # Corresponds to the JSON property `detailedStatus` - # @return [String] - attr_accessor :detailed_status - - # Any errors that occurred during processing. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # The job ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # If this Job represents an import, this field will contain the IDs of the - # objects that were successfully imported. - # Corresponds to the JSON property `importedIds` - # @return [Array] - attr_accessor :imported_ids - - # The Google Developers Console project number to which this job belongs. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # A summary representation of the service request that spawned the job. - # Corresponds to the JSON property `request` - # @return [Google::Apis::GenomicsV1beta2::JobRequest] - attr_accessor :request - - # The status of this job. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Any warnings that occurred during processing. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @created = args[:created] unless args[:created].nil? - @detailed_status = args[:detailed_status] unless args[:detailed_status].nil? - @errors = args[:errors] unless args[:errors].nil? - @id = args[:id] unless args[:id].nil? - @imported_ids = args[:imported_ids] unless args[:imported_ids].nil? - @project_number = args[:project_number] unless args[:project_number].nil? - @request = args[:request] unless args[:request].nil? - @status = args[:status] unless args[:status].nil? - @warnings = args[:warnings] unless args[:warnings].nil? - end - end - - # A summary representation of the service request that spawned the job. - class JobRequest - include Google::Apis::Core::Hashable - - # The data destination of the request, for example, a Google BigQuery Table or - # Dataset ID. - # Corresponds to the JSON property `destination` - # @return [Array] - attr_accessor :destination - - # The data source of the request, for example, a Google Cloud Storage object - # path or Readset ID. - # Corresponds to the JSON property `source` - # @return [Array] - attr_accessor :source - - # The original request 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) - @destination = args[:destination] unless args[:destination].nil? - @source = args[:source] unless args[:source].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Used to hold basic key value information. - class KeyValue - include Google::Apis::Core::Hashable - - # A string which maps to an array of values. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The string values. - # Corresponds to the JSON property `value` - # @return [Array] - 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 - - # A linear alignment can be represented by one CIGAR string. Describes the - # mapped position and local alignment of the read to the reference. - class LinearAlignment - include Google::Apis::Core::Hashable - - # Represents the local alignment of this sequence (alignment matches, indels, - # etc) against the reference. - # Corresponds to the JSON property `cigar` - # @return [Array] - attr_accessor :cigar - - # The mapping quality of this alignment. Represents how likely the read maps to - # this position as opposed to other locations. - # Corresponds to the JSON property `mappingQuality` - # @return [Fixnum] - attr_accessor :mapping_quality - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a reference - # name, a base number on that reference (0-based), and a determination of - # forward or reverse strand. - # Corresponds to the JSON property `position` - # @return [Google::Apis::GenomicsV1beta2::Position] - attr_accessor :position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cigar = args[:cigar] unless args[:cigar].nil? - @mapping_quality = args[:mapping_quality] unless args[:mapping_quality].nil? - @position = args[:position] unless args[:position].nil? - end - end - - # - class ListBasesResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The offset position (0-based) of the given sequence from the start of this - # Reference. This value will differ for each page in a paginated request. - # Corresponds to the JSON property `offset` - # @return [String] - attr_accessor :offset - - # A substring of the bases that make up this reference. - # Corresponds to the JSON property `sequence` - # @return [String] - attr_accessor :sequence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @offset = args[:offset] unless args[:offset].nil? - @sequence = args[:sequence] unless args[:sequence].nil? - end - end - - # - class ListCoverageBucketsResponse - include Google::Apis::Core::Hashable - - # The length of each coverage bucket in base pairs. Note that buckets at the end - # of a reference sequence may be shorter. This value is omitted if the bucket - # width is infinity (the default behaviour, with no range or targetBucketWidth). - # Corresponds to the JSON property `bucketWidth` - # @return [String] - attr_accessor :bucket_width - - # The coverage buckets. The list of buckets is sparse; a bucket with 0 - # overlapping reads is not returned. A bucket never crosses more than one - # reference sequence. Each bucket has width bucketWidth, unless its end is the - # end of the reference sequence. - # Corresponds to the JSON property `coverageBuckets` - # @return [Array] - attr_accessor :coverage_buckets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional 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) - @bucket_width = args[:bucket_width] unless args[:bucket_width].nil? - @coverage_buckets = args[:coverage_buckets] unless args[:coverage_buckets].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # The dataset list response. - class ListDatasetsResponse - include Google::Apis::Core::Hashable - - # The list of matching Datasets. - # Corresponds to the JSON property `datasets` - # @return [Array] - attr_accessor :datasets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional 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) - @datasets = args[:datasets] unless args[:datasets].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # - class MergeVariantsRequest - include Google::Apis::Core::Hashable - - # The variants to be merged with existing variants. - # Corresponds to the JSON property `variants` - # @return [Array] - attr_accessor :variants - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variants = args[:variants] unless args[:variants].nil? - end - end - - # Metadata describes a single piece of variant call metadata. These data include - # a top level key and either a single value string (value) or a list of key- - # value pairs (info.) Value and info are mutually exclusive. - class Metadata - include Google::Apis::Core::Hashable - - # A textual description of this metadata. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # User-provided ID field, not enforced by this API. Two or more pieces of - # structured metadata with identical id and key fields are considered equivalent. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The top-level key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The number of values that can be included in a field described by this - # metadata. - # Corresponds to the JSON property `number` - # @return [String] - attr_accessor :number - - # The type of data. Possible types include: Integer, Float, Flag, Character, and - # String. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The value field for simple metadata - # 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) - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @key = args[:key] unless args[:key].nil? - @number = args[:number] unless args[:number].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Describes a paired-end FASTQ file source for alignment. - class PairedFastqSource - include Google::Apis::Core::Hashable - - # A list of URIs pointing at paired end FASTQ files in Google Cloud Storage - # which will be aligned. The first of each paired file should be specified here, - # in an order that matches the second of each paired file specified in - # secondSourceUris. For example: firstSourceUris: [file1_1.fq, file2_1.fq], - # secondSourceUris: [file1_2.fq, file2_2.fq]. The caller must have READ - # permissions for these files. - # Corresponds to the JSON property `firstSourceUris` - # @return [Array] - attr_accessor :first_source_uris - - # Optionally specifies the metadata to be associated with the final aligned read - # group set. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::GenomicsV1beta2::FastqMetadata] - attr_accessor :metadata - - # A list of URIs pointing at paired end FASTQ files in Google Cloud Storage - # which will be aligned. The second of each paired file should be specified here, - # in an order that matches the first of each paired file specified in - # firstSourceUris. For example: firstSourceUris: [file1_1.fq, file2_1.fq], - # secondSourceUris: [file1_2.fq, file2_2.fq]. The caller must have READ - # permissions for these files. - # Corresponds to the JSON property `secondSourceUris` - # @return [Array] - attr_accessor :second_source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @first_source_uris = args[:first_source_uris] unless args[:first_source_uris].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @second_source_uris = args[:second_source_uris] unless args[:second_source_uris].nil? - end - end - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a reference - # name, a base number on that reference (0-based), and a determination of - # forward or reverse strand. - class Position - include Google::Apis::Core::Hashable - - # The 0-based offset from the start of the forward strand for that reference. - # Corresponds to the JSON property `position` - # @return [String] - attr_accessor :position - - # The name of the reference in whatever reference set is being used. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # Whether this position is on the reverse strand, as opposed to the forward - # strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] unless args[:position].nil? - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @reverse_strand = args[:reverse_strand] unless args[:reverse_strand].nil? - end - end - - # A 0-based half-open genomic coordinate range for search requests. - class QueryRange - include Google::Apis::Core::Hashable - - # The end position of the range on the reference, 0-based exclusive. If - # specified, referenceId or referenceName must also be specified. If unset or 0, - # defaults to the length of the reference. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The ID of the reference to query. At most one of referenceId and referenceName - # should be specified. - # Corresponds to the JSON property `referenceId` - # @return [String] - attr_accessor :reference_id - - # The name of the reference to query, within the reference set associated with - # this query. At most one of referenceId and referenceName pshould be specified. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. If - # specified, referenceId or referenceName must also be specified. Defaults to 0. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @reference_id = args[:reference_id] unless args[:reference_id].nil? - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # A 0-based half-open genomic coordinate range over a reference sequence. - class Range - include Google::Apis::Core::Hashable - - # The end position of the range on the reference, 0-based exclusive. If - # specified, referenceName must also be specified. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The reference sequence name, for example chr1, 1, or chrX. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. If - # specified, referenceName must also be specified. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # A 0-based half-open genomic coordinate range over a reference sequence, for - # representing the position of a genomic resource. - class RangePosition - include Google::Apis::Core::Hashable - - # The end position of the range on the reference, 0-based exclusive. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The ID of the Google Genomics reference associated with this range. - # Corresponds to the JSON property `referenceId` - # @return [String] - attr_accessor :reference_id - - # The display name corresponding to the reference specified by referenceId, for - # example chr1, 1, or chrX. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # Whether this range refers to the reverse strand, as opposed to the forward - # strand. Note that regardless of this field, the start/end position of the - # range always refer to the forward strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand - - # The start position of the range on the reference, 0-based inclusive. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @reference_id = args[:reference_id] unless args[:reference_id].nil? - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @reverse_strand = args[:reverse_strand] unless args[:reverse_strand].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # A read alignment describes a linear alignment of a string of DNA to a - # reference sequence, in addition to metadata about the fragment (the molecule - # of DNA sequenced) and the read (the bases which were read by the sequencer). A - # read is equivalent to a line in a SAM file. A read belongs to exactly one read - # group and exactly one read group set. Generating a reference-aligned sequence - # string When interacting with mapped reads, it's often useful to produce a - # string representing the local alignment of the read to reference. The - # following pseudocode demonstrates one way of doing this: - # out = "" offset = 0 for c in read.alignment.cigar ` switch c.operation ` case " - # ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH": out += read. - # alignedSequence[offset:offset+c.operationLength] offset += c.operationLength - # break case "CLIP_SOFT", "INSERT": offset += c.operationLength break case "PAD": - # out += repeat("*", c.operationLength) break case "DELETE": out += repeat("-", - # c.operationLength) break case "SKIP": out += repeat(" ", c.operationLength) - # break case "CLIP_HARD": break ` ` return out - # Converting to SAM's CIGAR string The following pseudocode generates a SAM - # CIGAR string from the cigar field. Note that this is a lossy conversion (cigar. - # referenceSequence is lost). - # cigarMap = ` "ALIGNMENT_MATCH": "M", "INSERT": "I", "DELETE": "D", "SKIP": "N", - # "CLIP_SOFT": "S", "CLIP_HARD": "H", "PAD": "P", "SEQUENCE_MATCH": "=", " - # SEQUENCE_MISMATCH": "X", ` cigarStr = "" for c in read.alignment.cigar ` - # cigarStr += c.operationLength + cigarMap[c.operation] ` return cigarStr - class Read - include Google::Apis::Core::Hashable - - # The quality of the read sequence contained in this alignment record. - # alignedSequence and alignedQuality may be shorter than the full read sequence - # and quality. This will occur if the alignment is part of a chimeric alignment, - # or if the read was trimmed. When this occurs, the CIGAR for this read will - # begin/end with a hard clip operator that will indicate the length of the - # excised sequence. - # Corresponds to the JSON property `alignedQuality` - # @return [Array] - attr_accessor :aligned_quality - - # The bases of the read sequence contained in this alignment record, without - # CIGAR operations applied. alignedSequence and alignedQuality may be shorter - # than the full read sequence and quality. This will occur if the alignment is - # part of a chimeric alignment, or if the read was trimmed. When this occurs, - # the CIGAR for this read will begin/end with a hard clip operator that will - # indicate the length of the excised sequence. - # Corresponds to the JSON property `alignedSequence` - # @return [String] - attr_accessor :aligned_sequence - - # A linear alignment can be represented by one CIGAR string. Describes the - # mapped position and local alignment of the read to the reference. - # Corresponds to the JSON property `alignment` - # @return [Google::Apis::GenomicsV1beta2::LinearAlignment] - attr_accessor :alignment - - # The fragment is a PCR or optical duplicate (SAM flag 0x400) - # Corresponds to the JSON property `duplicateFragment` - # @return [Boolean] - attr_accessor :duplicate_fragment - alias_method :duplicate_fragment?, :duplicate_fragment - - # SAM flag 0x200 - # Corresponds to the JSON property `failedVendorQualityChecks` - # @return [Boolean] - attr_accessor :failed_vendor_quality_checks - alias_method :failed_vendor_quality_checks?, :failed_vendor_quality_checks - - # The observed length of the fragment, equivalent to TLEN in SAM. - # Corresponds to the JSON property `fragmentLength` - # @return [Fixnum] - attr_accessor :fragment_length - - # The fragment name. Equivalent to QNAME (query template name) in SAM. - # Corresponds to the JSON property `fragmentName` - # @return [String] - attr_accessor :fragment_name - - # The unique ID for this read. This is a generated unique ID, not to be confused - # with fragmentName. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a reference - # name, a base number on that reference (0-based), and a determination of - # forward or reverse strand. - # Corresponds to the JSON property `nextMatePosition` - # @return [Google::Apis::GenomicsV1beta2::Position] - attr_accessor :next_mate_position - - # The number of reads in the fragment (extension to SAM flag 0x1). - # Corresponds to the JSON property `numberReads` - # @return [Fixnum] - attr_accessor :number_reads - - # The orientation and the distance between reads from the fragment are - # consistent with the sequencing protocol (SAM flag 0x2) - # Corresponds to the JSON property `properPlacement` - # @return [Boolean] - attr_accessor :proper_placement - alias_method :proper_placement?, :proper_placement - - # The ID of the read group this read belongs to. (Every read must belong to - # exactly one read group.) - # Corresponds to the JSON property `readGroupId` - # @return [String] - attr_accessor :read_group_id - - # The ID of the read group set this read belongs to. (Every read must belong to - # exactly one read group set.) - # Corresponds to the JSON property `readGroupSetId` - # @return [String] - attr_accessor :read_group_set_id - - # The read number in sequencing. 0-based and less than numberReads. This field - # replaces SAM flag 0x40 and 0x80. - # Corresponds to the JSON property `readNumber` - # @return [Fixnum] - attr_accessor :read_number - - # Whether this alignment is secondary. Equivalent to SAM flag 0x100. A secondary - # alignment represents an alternative to the primary alignment for this read. - # Aligners may return secondary alignments if a read can map ambiguously to - # multiple coordinates in the genome. By convention, each read has one and only - # one alignment where both secondaryAlignment and supplementaryAlignment are - # false. - # Corresponds to the JSON property `secondaryAlignment` - # @return [Boolean] - attr_accessor :secondary_alignment - alias_method :secondary_alignment?, :secondary_alignment - - # Whether this alignment is supplementary. Equivalent to SAM flag 0x800. - # Supplementary alignments are used in the representation of a chimeric - # alignment. In a chimeric alignment, a read is split into multiple linear - # alignments that map to different reference contigs. The first linear alignment - # in the read will be designated as the representative alignment; the remaining - # linear alignments will be designated as supplementary alignments. These - # alignments may have different mapping quality scores. In each linear alignment - # in a chimeric alignment, the read will be hard clipped. The alignedSequence - # and alignedQuality fields in the alignment record will only represent the - # bases for its respective linear alignment. - # Corresponds to the JSON property `supplementaryAlignment` - # @return [Boolean] - attr_accessor :supplementary_alignment - alias_method :supplementary_alignment?, :supplementary_alignment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aligned_quality = args[:aligned_quality] unless args[:aligned_quality].nil? - @aligned_sequence = args[:aligned_sequence] unless args[:aligned_sequence].nil? - @alignment = args[:alignment] unless args[:alignment].nil? - @duplicate_fragment = args[:duplicate_fragment] unless args[:duplicate_fragment].nil? - @failed_vendor_quality_checks = args[:failed_vendor_quality_checks] unless args[:failed_vendor_quality_checks].nil? - @fragment_length = args[:fragment_length] unless args[:fragment_length].nil? - @fragment_name = args[:fragment_name] unless args[:fragment_name].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @next_mate_position = args[:next_mate_position] unless args[:next_mate_position].nil? - @number_reads = args[:number_reads] unless args[:number_reads].nil? - @proper_placement = args[:proper_placement] unless args[:proper_placement].nil? - @read_group_id = args[:read_group_id] unless args[:read_group_id].nil? - @read_group_set_id = args[:read_group_set_id] unless args[:read_group_set_id].nil? - @read_number = args[:read_number] unless args[:read_number].nil? - @secondary_alignment = args[:secondary_alignment] unless args[:secondary_alignment].nil? - @supplementary_alignment = args[:supplementary_alignment] unless args[:supplementary_alignment].nil? - end - end - - # A read group is all the data that's processed the same way by the sequencer. - class ReadGroup - include Google::Apis::Core::Hashable - - # The ID of the dataset this read group belongs to. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # A free-form text description of this read group. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The experiment used to generate this read group. - # Corresponds to the JSON property `experiment` - # @return [Google::Apis::GenomicsV1beta2::ReadGroupExperiment] - attr_accessor :experiment - - # The generated unique read group ID. Note: This is different than the @RG ID - # field in the SAM spec. For that value, see the name field. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The read group name. This corresponds to the @RG ID field in the SAM spec. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The predicted insert size of this read group. The insert size is the length - # the sequenced DNA fragment from end-to-end, not including the adapters. - # Corresponds to the JSON property `predictedInsertSize` - # @return [Fixnum] - attr_accessor :predicted_insert_size - - # The programs used to generate this read group. Programs are always identical - # for all read groups within a read group set. For this reason, only the first - # read group in a returned set will have this field populated. - # Corresponds to the JSON property `programs` - # @return [Array] - attr_accessor :programs - - # The reference set the reads in this read group are aligned to. Required if - # there are any read alignments. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The sample this read group's data was generated from. Note: This is not an - # actual ID within this repository, but rather an identifier for a sample which - # may be meaningful to some external system. - # Corresponds to the JSON property `sampleId` - # @return [String] - attr_accessor :sample_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @description = args[:description] unless args[:description].nil? - @experiment = args[:experiment] unless args[:experiment].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @name = args[:name] unless args[:name].nil? - @predicted_insert_size = args[:predicted_insert_size] unless args[:predicted_insert_size].nil? - @programs = args[:programs] unless args[:programs].nil? - @reference_set_id = args[:reference_set_id] unless args[:reference_set_id].nil? - @sample_id = args[:sample_id] unless args[:sample_id].nil? - end - end - - # - class ReadGroupExperiment - include Google::Apis::Core::Hashable - - # The instrument model used as part of this experiment. This maps to sequencing - # technology in BAM. - # Corresponds to the JSON property `instrumentModel` - # @return [String] - attr_accessor :instrument_model - - # The library used as part of this experiment. Note: This is not an actual ID - # within this repository, but rather an identifier for a library which may be - # meaningful to some external system. - # Corresponds to the JSON property `libraryId` - # @return [String] - attr_accessor :library_id - - # The platform unit used as part of this experiment e.g. flowcell-barcode.lane - # for Illumina or slide for SOLiD. Corresponds to the - # Corresponds to the JSON property `platformUnit` - # @return [String] - attr_accessor :platform_unit - - # The sequencing center used as part of this experiment. - # Corresponds to the JSON property `sequencingCenter` - # @return [String] - attr_accessor :sequencing_center - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instrument_model = args[:instrument_model] unless args[:instrument_model].nil? - @library_id = args[:library_id] unless args[:library_id].nil? - @platform_unit = args[:platform_unit] unless args[:platform_unit].nil? - @sequencing_center = args[:sequencing_center] unless args[:sequencing_center].nil? - end - end - - # - class ReadGroupProgram - include Google::Apis::Core::Hashable - - # The command line used to run this program. - # Corresponds to the JSON property `commandLine` - # @return [String] - attr_accessor :command_line - - # The user specified locally unique ID of the program. Used along with - # prevProgramId to define an ordering between programs. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of the program. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the program run before this one. - # Corresponds to the JSON property `prevProgramId` - # @return [String] - attr_accessor :prev_program_id - - # The version of the program run. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @command_line = args[:command_line] unless args[:command_line].nil? - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - @prev_program_id = args[:prev_program_id] unless args[:prev_program_id].nil? - @version = args[:version] unless args[:version].nil? - end - end - - # A read group set is a logical collection of read groups, which are collections - # of reads produced by a sequencer. A read group set typically models reads - # corresponding to one sample, sequenced one way, and aligned one way. - # - A read group set belongs to one dataset. - # - A read group belongs to one read group set. - # - A read belongs to one read group. - class ReadGroupSet - include Google::Apis::Core::Hashable - - # The dataset ID. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The filename of the original source file for this read group set, if any. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - - # The read group set ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The read group set name. By default this will be initialized to the sample - # name of the sequenced data contained in this set. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The read groups in this set. There are typically 1-10 read groups in a read - # group set. - # Corresponds to the JSON property `readGroups` - # @return [Array] - attr_accessor :read_groups - - # The reference set the reads in this read group set are aligned to. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @filename = args[:filename] unless args[:filename].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @name = args[:name] unless args[:name].nil? - @read_groups = args[:read_groups] unless args[:read_groups].nil? - @reference_set_id = args[:reference_set_id] unless args[:reference_set_id].nil? - end - end - - # A reference is a canonical assembled DNA sequence, intended to act as a - # reference coordinate space for other genomic annotations. A single reference - # might represent the human chromosome 1 or mitochandrial DNA, for instance. A - # reference belongs to one or more reference sets. - class Reference - include Google::Apis::Core::Hashable - - # The Google generated immutable ID of the reference. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The length of this reference's sequence. - # Corresponds to the JSON property `length` - # @return [String] - attr_accessor :length - - # MD5 of the upper-case sequence excluding all whitespace characters (this is - # equivalent to SQ:M5 in SAM). This value is represented in lower case - # hexadecimal format. - # Corresponds to the JSON property `md5checksum` - # @return [String] - attr_accessor :md5checksum - - # The name of this reference, for example 22. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # ID from http://www.ncbi.nlm.nih.gov/taxonomy (e.g. 9606->human) if not - # specified by the containing reference set. - # Corresponds to the JSON property `ncbiTaxonId` - # @return [Fixnum] - attr_accessor :ncbi_taxon_id - - # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with - # a version number, for example GCF_000001405.26. - # Corresponds to the JSON property `sourceAccessions` - # @return [Array] - attr_accessor :source_accessions - - # The URI from which the sequence was obtained. Specifies a FASTA format file/ - # string with one name, sequence pair. - # Corresponds to the JSON property `sourceURI` - # @return [String] - attr_accessor :source_uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @length = args[:length] unless args[:length].nil? - @md5checksum = args[:md5checksum] unless args[:md5checksum].nil? - @name = args[:name] unless args[:name].nil? - @ncbi_taxon_id = args[:ncbi_taxon_id] unless args[:ncbi_taxon_id].nil? - @source_accessions = args[:source_accessions] unless args[:source_accessions].nil? - @source_uri = args[:source_uri] unless args[:source_uri].nil? - end - end - - # ReferenceBound records an upper bound for the starting coordinate of variants - # in a particular reference. - class ReferenceBound - include Google::Apis::Core::Hashable - - # The reference the bound is associate with. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # An upper bound (inclusive) on the starting coordinate of any variant in the - # reference sequence. - # Corresponds to the JSON property `upperBound` - # @return [String] - attr_accessor :upper_bound - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @upper_bound = args[:upper_bound] unless args[:upper_bound].nil? - end - end - - # A reference set is a set of references which typically comprise a reference - # assembly for a species, such as GRCh38 which is representative of the human - # genome. A reference set defines a common coordinate space for comparing - # reference-aligned experimental data. A reference set contains 1 or more - # references. - class ReferenceSet - include Google::Apis::Core::Hashable - - # Public id of this reference set, such as GRCh37. - # Corresponds to the JSON property `assemblyId` - # @return [String] - attr_accessor :assembly_id - - # Free text description of this reference set. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The Google generated immutable ID of the reference set. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Order-independent MD5 checksum which identifies this reference set. The - # checksum is computed by sorting all lower case hexidecimal string reference. - # md5checksum (for all reference in this set) in ascending lexicographic order, - # concatenating, and taking the MD5 of that value. The resulting value is - # represented in lower case hexadecimal format. - # Corresponds to the JSON property `md5checksum` - # @return [String] - attr_accessor :md5checksum - - # ID from http://www.ncbi.nlm.nih.gov/taxonomy (e.g. 9606->human) indicating the - # species which this assembly is intended to model. Note that contained - # references may specify a different ncbiTaxonId, as assemblies may contain - # reference sequences which do not belong to the modeled species, e.g. EBV in a - # human reference genome. - # Corresponds to the JSON property `ncbiTaxonId` - # @return [Fixnum] - attr_accessor :ncbi_taxon_id - - # The IDs of the reference objects that are part of this set. Reference. - # md5checksum must be unique within this set. - # Corresponds to the JSON property `referenceIds` - # @return [Array] - attr_accessor :reference_ids - - # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with - # a version number, for example NC_000001.11. - # Corresponds to the JSON property `sourceAccessions` - # @return [Array] - attr_accessor :source_accessions - - # The URI from which the references were obtained. - # Corresponds to the JSON property `sourceURI` - # @return [String] - attr_accessor :source_uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @assembly_id = args[:assembly_id] unless args[:assembly_id].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @md5checksum = args[:md5checksum] unless args[:md5checksum].nil? - @ncbi_taxon_id = args[:ncbi_taxon_id] unless args[:ncbi_taxon_id].nil? - @reference_ids = args[:reference_ids] unless args[:reference_ids].nil? - @source_accessions = args[:source_accessions] unless args[:source_accessions].nil? - @source_uri = args[:source_uri] unless args[:source_uri].nil? - end - end - - # - class SearchAnnotationSetsRequest - include Google::Apis::Core::Hashable - - # The dataset IDs to search within. Caller must have READ access to these - # datasets. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # Only return annotations sets for which a substring of the name matches this - # string (case insensitive). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Specifies number of results to return in a single page. If unspecified, it - # will default to 128. The maximum value is 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # If specified, only annotation sets associated with the given reference set are - # returned. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # If specified, only annotation sets that have any of these types are returned. - # Corresponds to the JSON property `types` - # @return [Array] - attr_accessor :types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_ids = args[:dataset_ids] unless args[:dataset_ids].nil? - @name = args[:name] unless args[:name].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @reference_set_id = args[:reference_set_id] unless args[:reference_set_id].nil? - @types = args[:types] unless args[:types].nil? - end - end - - # - class SearchAnnotationSetsResponse - include Google::Apis::Core::Hashable - - # The matching annotation sets. - # Corresponds to the JSON property `annotationSets` - # @return [Array] - attr_accessor :annotation_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional 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) - @annotation_sets = args[:annotation_sets] unless args[:annotation_sets].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # - class SearchAnnotationsRequest - include Google::Apis::Core::Hashable - - # The annotation sets to search within. The caller must have READ access to - # these annotation sets. Required. All queried annotation sets must have the - # same type. - # Corresponds to the JSON property `annotationSetIds` - # @return [Array] - attr_accessor :annotation_set_ids - - # Specifies number of results to return in a single page. If unspecified, it - # will default to 256. The maximum value is 2048. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # A 0-based half-open genomic coordinate range for search requests. - # Corresponds to the JSON property `range` - # @return [Google::Apis::GenomicsV1beta2::QueryRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation_set_ids = args[:annotation_set_ids] unless args[:annotation_set_ids].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @range = args[:range] unless args[:range].nil? - end - end - - # - class SearchAnnotationsResponse - include Google::Apis::Core::Hashable - - # The matching annotations. - # Corresponds to the JSON property `annotations` - # @return [Array] - attr_accessor :annotations - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional 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) - @annotations = args[:annotations] unless args[:annotations].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # The call set search request. - class SearchCallSetsRequest - include Google::Apis::Core::Hashable - - # Only return call sets for which a substring of the name matches this string. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The maximum number of call sets to return. If unspecified, defaults to 1000. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Restrict the query to call sets within the given variant sets. At least one ID - # must be provided. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @variant_set_ids = args[:variant_set_ids] unless args[:variant_set_ids].nil? - end - end - - # The call set search response. - class SearchCallSetsResponse - include Google::Apis::Core::Hashable - - # The list of matching call sets. - # Corresponds to the JSON property `callSets` - # @return [Array] - attr_accessor :call_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional 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) - @call_sets = args[:call_sets] unless args[:call_sets].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # The jobs search request. - class SearchJobsRequest - include Google::Apis::Core::Hashable - - # If specified, only jobs created on or after this date, given in milliseconds - # since Unix epoch, will be returned. - # Corresponds to the JSON property `createdAfter` - # @return [String] - attr_accessor :created_after - - # If specified, only jobs created prior to this date, given in milliseconds - # since Unix epoch, will be returned. - # Corresponds to the JSON property `createdBefore` - # @return [String] - attr_accessor :created_before - - # Specifies the number of results to return in a single page. Defaults to 128. - # The maximum value is 256. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token which is used to page through large result sets. To get - # the next page of results, set this parameter to the value of the nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Required. Only return jobs which belong to this Google Developers Console - # project. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # Only return jobs which have a matching status. - # Corresponds to the JSON property `status` - # @return [Array] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @created_after = args[:created_after] unless args[:created_after].nil? - @created_before = args[:created_before] unless args[:created_before].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @project_number = args[:project_number] unless args[:project_number].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # The job search response. - class SearchJobsResponse - include Google::Apis::Core::Hashable - - # The list of jobs results, ordered newest to oldest. - # Corresponds to the JSON property `jobs` - # @return [Array] - attr_accessor :jobs - - # The continuation token which is used to page through large result sets. - # Provide this value is a subsequent request to return the next page of results. - # This field will be empty if there are no more 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) - @jobs = args[:jobs] unless args[:jobs].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # The read group set search request. - class SearchReadGroupSetsRequest - include Google::Apis::Core::Hashable - - # Restricts this query to read group sets within the given datasets. At least - # one ID must be provided. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # Only return read group sets for which a substring of the name matches this - # string. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Specifies number of results to return in a single page. If unspecified, it - # will default to 256. The maximum value is 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_ids = args[:dataset_ids] unless args[:dataset_ids].nil? - @name = args[:name] unless args[:name].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - end - end - - # The read group set search response. - class SearchReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of matching read group sets. - # Corresponds to the JSON property `readGroupSets` - # @return [Array] - attr_accessor :read_group_sets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @read_group_sets = args[:read_group_sets] unless args[:read_group_sets].nil? - end - end - - # The read search request. - class SearchReadsRequest - include Google::Apis::Core::Hashable - - # The end position of the range on the reference, 0-based exclusive. If - # specified, referenceName must also be specified. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # Specifies number of results to return in a single page. If unspecified, it - # will default to 256. The maximum value is 2048. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The IDs of the read groups within which to search for reads. All specified - # read groups must belong to the same read group sets. Must specify one of - # readGroupSetIds or readGroupIds. - # Corresponds to the JSON property `readGroupIds` - # @return [Array] - attr_accessor :read_group_ids - - # The IDs of the read groups sets within which to search for reads. All - # specified read group sets must be aligned against a common set of reference - # sequences; this defines the genomic coordinates for the query. Must specify - # one of readGroupSetIds or readGroupIds. - # Corresponds to the JSON property `readGroupSetIds` - # @return [Array] - attr_accessor :read_group_set_ids - - # The reference sequence name, for example chr1, 1, or chrX. If set to *, only - # unmapped reads are returned. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. If - # specified, referenceName must also be specified. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @read_group_ids = args[:read_group_ids] unless args[:read_group_ids].nil? - @read_group_set_ids = args[:read_group_set_ids] unless args[:read_group_set_ids].nil? - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # The read search response. - class SearchReadsResponse - include Google::Apis::Core::Hashable - - # The list of matching alignments sorted by mapped genomic coordinate, if any, - # ascending in position within the same reference. Unmapped reads, which have no - # position, are returned last and are further sorted in ascending lexicographic - # order by fragment name. - # Corresponds to the JSON property `alignments` - # @return [Array] - attr_accessor :alignments - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional 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) - @alignments = args[:alignments] unless args[:alignments].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # - class SearchReferenceSetsRequest - include Google::Apis::Core::Hashable - - # If present, return references for which the accession matches any of these - # strings. Best to give a version number, for example GCF_000001405.26. If only - # the main accession number is given then all records with that main accession - # will be returned, whichever version. Note that different versions will have - # different sequences. - # Corresponds to the JSON property `accessions` - # @return [Array] - attr_accessor :accessions - - # If present, return reference sets for which a substring of their assemblyId - # matches this string (case insensitive). - # Corresponds to the JSON property `assemblyId` - # @return [String] - attr_accessor :assembly_id - - # If present, return references for which the md5checksum matches. See - # ReferenceSet.md5checksum for details. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - - # Specifies the maximum number of results to return in a single page. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @accessions = args[:accessions] unless args[:accessions].nil? - @assembly_id = args[:assembly_id] unless args[:assembly_id].nil? - @md5checksums = args[:md5checksums] unless args[:md5checksums].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - end - end - - # - class SearchReferenceSetsResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The matching references sets. - # Corresponds to the JSON property `referenceSets` - # @return [Array] - attr_accessor :reference_sets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @reference_sets = args[:reference_sets] unless args[:reference_sets].nil? - end - end - - # - class SearchReferencesRequest - include Google::Apis::Core::Hashable - - # If present, return references for which the accession matches this string. - # Best to give a version number, for example GCF_000001405.26. If only the main - # accession number is given then all records with that main accession will be - # returned, whichever version. Note that different versions will have different - # sequences. - # Corresponds to the JSON property `accessions` - # @return [Array] - attr_accessor :accessions - - # If present, return references for which the md5checksum matches. See Reference. - # md5checksum for construction details. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - - # Specifies the maximum number of results to return in a single page. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # If present, return only references which belong to this reference set. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @accessions = args[:accessions] unless args[:accessions].nil? - @md5checksums = args[:md5checksums] unless args[:md5checksums].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @reference_set_id = args[:reference_set_id] unless args[:reference_set_id].nil? - end - end - - # - class SearchReferencesResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The matching references. - # Corresponds to the JSON property `references` - # @return [Array] - attr_accessor :references - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @references = args[:references] unless args[:references].nil? - end - end - - # The search variant sets request. - class SearchVariantSetsRequest - include Google::Apis::Core::Hashable - - # Exactly one dataset ID must be provided here. Only variant sets which belong - # to this dataset will be returned. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # The maximum number of variant sets to return in a request. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_ids = args[:dataset_ids] unless args[:dataset_ids].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - end - end - - # The search variant sets response. - class SearchVariantSetsResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The variant sets belonging to the requested dataset. - # Corresponds to the JSON property `variantSets` - # @return [Array] - attr_accessor :variant_sets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @variant_sets = args[:variant_sets] unless args[:variant_sets].nil? - end - end - - # The variant search request. - class SearchVariantsRequest - include Google::Apis::Core::Hashable - - # Only return variant calls which belong to call sets with these ids. Leaving - # this blank returns all variant calls. If a variant has no calls belonging to - # any of these call sets, it won't be returned at all. Currently, variants with - # no calls from any call set will never be returned. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # The end of the window, 0-based exclusive. If unspecified or 0, defaults to the - # length of the reference. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The maximum number of calls to return. However, at least one variant will - # always be returned, even if it has more calls than this limit. If unspecified, - # defaults to 5000. - # Corresponds to the JSON property `maxCalls` - # @return [Fixnum] - attr_accessor :max_calls - - # The maximum number of variants to return. If unspecified, defaults to 5000. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Required. Only return variants in this reference sequence. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The beginning of the window (0-based, inclusive) for which overlapping - # variants should be returned. If unspecified, defaults to 0. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # Only return variants which have exactly this name. - # Corresponds to the JSON property `variantName` - # @return [String] - attr_accessor :variant_name - - # At most one variant set ID must be provided. Only variants from this variant - # set will be returned. If omitted, a call set id must be included in the - # request. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_set_ids = args[:call_set_ids] unless args[:call_set_ids].nil? - @end = args[:end] unless args[:end].nil? - @max_calls = args[:max_calls] unless args[:max_calls].nil? - @page_size = args[:page_size] unless args[:page_size].nil? - @page_token = args[:page_token] unless args[:page_token].nil? - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @start = args[:start] unless args[:start].nil? - @variant_name = args[:variant_name] unless args[:variant_name].nil? - @variant_set_ids = args[:variant_set_ids] unless args[:variant_set_ids].nil? - end - end - - # The variant search response. - class SearchVariantsResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of matching Variants. - # Corresponds to the JSON property `variants` - # @return [Array] - attr_accessor :variants - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @variants = args[:variants] unless args[:variants].nil? - end - end - - # A transcript represents the assertion that a particular region of the - # reference genome may be transcribed as RNA. - class Transcript - include Google::Apis::Core::Hashable - - # The range of the coding sequence for this transcript, if any. To determine the - # exact ranges of coding sequence, intersect this range with those of the exons, - # if any. If there are any exons, the codingSequence must start and end within - # them. - # Note that in some cases, the reference genome will not exactly match the - # observed mRNA transcript e.g. due to variance in the source genome from - # reference. In these cases, exon.frame will not necessarily match the expected - # reference reading frame and coding exon reference bases cannot necessarily be - # concatenated to produce the original transcript mRNA. - # Corresponds to the JSON property `codingSequence` - # @return [Google::Apis::GenomicsV1beta2::TranscriptCodingSequence] - attr_accessor :coding_sequence - - # The exons that compose this transcript. This field should be unset for genomes - # where transcript splicing does not occur, for example prokaryotes. - # Introns are regions of the transcript that are not included in the spliced RNA - # product. Though not explicitly modeled here, intron ranges can be deduced; all - # regions of this transcript that are not exons are introns. - # Exonic sequences do not necessarily code for a translational product (amino - # acids). Only the regions of exons bounded by the codingSequence correspond to - # coding DNA sequence. - # Exons are ordered by start position and may not overlap. - # Corresponds to the JSON property `exons` - # @return [Array] - attr_accessor :exons - - # The annotation ID of the gene from which this transcript is transcribed. - # Corresponds to the JSON property `geneId` - # @return [String] - attr_accessor :gene_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @coding_sequence = args[:coding_sequence] unless args[:coding_sequence].nil? - @exons = args[:exons] unless args[:exons].nil? - @gene_id = args[:gene_id] unless args[:gene_id].nil? - end - end - - # - class TranscriptCodingSequence - include Google::Apis::Core::Hashable - - # The end of the coding sequence on this annotation's reference sequence, 0- - # based exclusive. Note that this position is relative to the reference start, - # and not the containing annotation start. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The start of the coding sequence on this annotation's reference sequence, 0- - # based inclusive. Note that this position is relative to the reference start, - # and not the containing annotation start. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # - class TranscriptExon - include Google::Apis::Core::Hashable - - # The end position of the exon on this annotation's reference sequence, 0-based - # exclusive. Note that this is relative to the reference start, and not the - # containing annotation start. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # Wrapper message for `int32`. - # The JSON representation for `Int32Value` is JSON number. - # Corresponds to the JSON property `frame` - # @return [Google::Apis::GenomicsV1beta2::Int32Value] - attr_accessor :frame - - # The start position of the exon on this annotation's reference sequence, 0- - # based inclusive. Note that this is relative to the reference start, and not - # the containing annotation start. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @frame = args[:frame] unless args[:frame].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # A variant represents a change in DNA sequence relative to a reference sequence. - # For example, a variant could represent a SNP or an insertion. Variants belong - # to a variant set. Each of the calls on a variant represent a determination of - # genotype with respect to that variant. For example, a call might assign - # probability of 0.32 to the occurrence of a SNP named rs1234 in a sample named - # NA12345. A call belongs to a call set, which contains related calls typically - # from one sample. - class Variant - include Google::Apis::Core::Hashable - - # The bases that appear instead of the reference bases. - # Corresponds to the JSON property `alternateBases` - # @return [Array] - attr_accessor :alternate_bases - - # The variant calls for this particular variant. Each one represents the - # determination of genotype with respect to this variant. - # Corresponds to the JSON property `calls` - # @return [Array] - attr_accessor :calls - - # The date this variant was created, in milliseconds from the epoch. - # Corresponds to the JSON property `created` - # @return [String] - attr_accessor :created - - # The end position (0-based) of this variant. This corresponds to the first base - # after the last base in the reference allele. So, the length of the reference - # allele is (end - start). This is useful for variants that don't explicitly - # give alternate bases, for example large deletions. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # A list of filters (normally quality filters) this variant has failed. PASS - # indicates this variant has passed all filters. - # Corresponds to the JSON property `filter` - # @return [Array] - attr_accessor :filter - - # The Google generated ID of the variant, immutable. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A string which maps to an array of values. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # Names for the variant, for example a RefSNP ID. - # Corresponds to the JSON property `names` - # @return [Array] - attr_accessor :names - - # A measure of how likely this variant is to be real. A higher value is better. - # Corresponds to the JSON property `quality` - # @return [Float] - attr_accessor :quality - - # The reference bases for this variant. They start at the given position. - # Corresponds to the JSON property `referenceBases` - # @return [String] - attr_accessor :reference_bases - - # The reference on which this variant occurs. (such as chr20 or X) - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The position at which this variant occurs (0-based). This corresponds to the - # first base of the string of reference bases. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The ID of the variant set this variant belongs to. - # Corresponds to the JSON property `variantSetId` - # @return [String] - attr_accessor :variant_set_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alternate_bases = args[:alternate_bases] unless args[:alternate_bases].nil? - @calls = args[:calls] unless args[:calls].nil? - @created = args[:created] unless args[:created].nil? - @end = args[:end] unless args[:end].nil? - @filter = args[:filter] unless args[:filter].nil? - @id = args[:id] unless args[:id].nil? - @info = args[:info] unless args[:info].nil? - @names = args[:names] unless args[:names].nil? - @quality = args[:quality] unless args[:quality].nil? - @reference_bases = args[:reference_bases] unless args[:reference_bases].nil? - @reference_name = args[:reference_name] unless args[:reference_name].nil? - @start = args[:start] unless args[:start].nil? - @variant_set_id = args[:variant_set_id] unless args[:variant_set_id].nil? - end - end - - # A Variant annotation. - class VariantAnnotation - include Google::Apis::Core::Hashable - - # The alternate allele for this variant. If multiple alternate alleles exist at - # this location, create a separate variant for each one, as they may represent - # distinct conditions. - # Corresponds to the JSON property `alternateBases` - # @return [String] - attr_accessor :alternate_bases - - # Describes the clinical significance of a variant. It is adapted from the - # ClinVar controlled vocabulary for clinical significance described at: http:// - # www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ - # Corresponds to the JSON property `clinicalSignificance` - # @return [String] - attr_accessor :clinical_significance - - # The set of conditions associated with this variant. A condition describes the - # way a variant influences human health. - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - - # Effect of the variant on the coding sequence. - # Corresponds to the JSON property `effect` - # @return [String] - attr_accessor :effect - - # Google annotation ID of the gene affected by this variant. This should be - # provided when the variant is created. - # Corresponds to the JSON property `geneId` - # @return [String] - attr_accessor :gene_id - - # Google annotation IDs of the transcripts affected by this variant. These - # should be provided when the variant is created. - # Corresponds to the JSON property `transcriptIds` - # @return [Array] - attr_accessor :transcript_ids - - # Type has been adapted from ClinVar's list of variant types. - # 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) - @alternate_bases = args[:alternate_bases] unless args[:alternate_bases].nil? - @clinical_significance = args[:clinical_significance] unless args[:clinical_significance].nil? - @conditions = args[:conditions] unless args[:conditions].nil? - @effect = args[:effect] unless args[:effect].nil? - @gene_id = args[:gene_id] unless args[:gene_id].nil? - @transcript_ids = args[:transcript_ids] unless args[:transcript_ids].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class VariantAnnotationCondition - include Google::Apis::Core::Hashable - - # The MedGen concept id associated with this gene. Search for these IDs at http:/ - # /www.ncbi.nlm.nih.gov/medgen/ - # Corresponds to the JSON property `conceptId` - # @return [String] - attr_accessor :concept_id - - # The set of external IDs for this condition. - # Corresponds to the JSON property `externalIds` - # @return [Array] - attr_accessor :external_ids - - # A set of names for the condition. - # Corresponds to the JSON property `names` - # @return [Array] - attr_accessor :names - - # The OMIM id for this condition. Search for these IDs at http://omim.org/ - # Corresponds to the JSON property `omimId` - # @return [String] - attr_accessor :omim_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @concept_id = args[:concept_id] unless args[:concept_id].nil? - @external_ids = args[:external_ids] unless args[:external_ids].nil? - @names = args[:names] unless args[:names].nil? - @omim_id = args[:omim_id] unless args[:omim_id].nil? - end - end - - # A variant set is a collection of call sets and variants. It contains summary - # statistics of those contents. A variant set belongs to a dataset. - class VariantSet - include Google::Apis::Core::Hashable - - # The dataset to which this variant set belongs. Immutable. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The Google-generated ID of the variant set. Immutable. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The metadata associated with this variant set. - # Corresponds to the JSON property `metadata` - # @return [Array] - attr_accessor :metadata - - # A list of all references used by the variants in a variant set with associated - # coordinate upper bounds for each one. - # Corresponds to the JSON property `referenceBounds` - # @return [Array] - attr_accessor :reference_bounds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] unless args[:dataset_id].nil? - @id = args[:id] unless args[:id].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @reference_bounds = args[:reference_bounds] unless args[:reference_bounds].nil? - end - end - end - end -end diff --git a/generated/google/apis/genomics_v1beta2/representations.rb b/generated/google/apis/genomics_v1beta2/representations.rb deleted file mode 100644 index c38892f95..000000000 --- a/generated/google/apis/genomics_v1beta2/representations.rb +++ /dev/null @@ -1,1193 +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 GenomicsV1beta2 - - class AlignReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AlignReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Annotation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AnnotationSet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAnnotationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAnnotationsResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchAnnotationsResponseEntryStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchCreateAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Call - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CallReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CallReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CallSet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CigarUnit - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CoverageBucket - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Dataset - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExperimentalCreateJobRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExperimentalCreateJobResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExportReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExportReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExportVariantSetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExportVariantSetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExternalId - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FastqMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Int32Value - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InterleavedFastqSource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Job - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class JobRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class KeyValue - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LinearAlignment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListBasesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListCoverageBucketsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDatasetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MergeVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PairedFastqSource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Position - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QueryRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Range - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RangePosition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Read - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReadGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReadGroupExperiment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReadGroupProgram - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReadGroupSet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Reference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReferenceBound - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReferenceSet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchAnnotationSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchAnnotationSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchAnnotationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchCallSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchCallSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchJobsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchJobsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReadsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReadsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReferenceSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReferenceSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReferencesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchReferencesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchVariantSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchVariantSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Transcript - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TranscriptCodingSequence - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TranscriptExon - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Variant - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VariantAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VariantAnnotationCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VariantSet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AlignReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :bam_source_uris, as: 'bamSourceUris' - property :dataset_id, as: 'datasetId' - property :interleaved_fastq_source, as: 'interleavedFastqSource', class: Google::Apis::GenomicsV1beta2::InterleavedFastqSource, decorator: Google::Apis::GenomicsV1beta2::InterleavedFastqSource::Representation - - property :paired_fastq_source, as: 'pairedFastqSource', class: Google::Apis::GenomicsV1beta2::PairedFastqSource, decorator: Google::Apis::GenomicsV1beta2::PairedFastqSource::Representation - - property :read_group_set_id, as: 'readGroupSetId' - end - end - - # @private - class AlignReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :job_id, as: 'jobId' - end - end - - # @private - class Annotation - class Representation < Google::Apis::Core::JsonRepresentation - property :annotation_set_id, as: 'annotationSetId' - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :name, as: 'name' - property :position, as: 'position', class: Google::Apis::GenomicsV1beta2::RangePosition, decorator: Google::Apis::GenomicsV1beta2::RangePosition::Representation - - property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1beta2::Transcript, decorator: Google::Apis::GenomicsV1beta2::Transcript::Representation - - property :type, as: 'type' - property :variant, as: 'variant', class: Google::Apis::GenomicsV1beta2::VariantAnnotation, decorator: Google::Apis::GenomicsV1beta2::VariantAnnotation::Representation - - end - end - - # @private - class AnnotationSet - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :name, as: 'name' - property :reference_set_id, as: 'referenceSetId' - property :source_uri, as: 'sourceUri' - property :type, as: 'type' - end - end - - # @private - class BatchAnnotationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::GenomicsV1beta2::BatchAnnotationsResponseEntry, decorator: Google::Apis::GenomicsV1beta2::BatchAnnotationsResponseEntry::Representation - - end - end - - # @private - class BatchAnnotationsResponseEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :annotation, as: 'annotation', class: Google::Apis::GenomicsV1beta2::Annotation, decorator: Google::Apis::GenomicsV1beta2::Annotation::Representation - - property :status, as: 'status', class: Google::Apis::GenomicsV1beta2::BatchAnnotationsResponseEntryStatus, decorator: Google::Apis::GenomicsV1beta2::BatchAnnotationsResponseEntryStatus::Representation - - end - end - - # @private - class BatchAnnotationsResponseEntryStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - end - end - - # @private - class BatchCreateAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1beta2::Annotation, decorator: Google::Apis::GenomicsV1beta2::Annotation::Representation - - end - end - - # @private - class Call - class Representation < Google::Apis::Core::JsonRepresentation - property :call_set_id, as: 'callSetId' - property :call_set_name, as: 'callSetName' - collection :genotype, as: 'genotype' - collection :genotype_likelihood, as: 'genotypeLikelihood' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :phaseset, as: 'phaseset' - end - end - - # @private - class CallReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :read_group_set_id, as: 'readGroupSetId' - collection :source_uris, as: 'sourceUris' - end - end - - # @private - class CallReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :job_id, as: 'jobId' - end - end - - # @private - class CallSet - class Representation < Google::Apis::Core::JsonRepresentation - property :created, as: 'created' - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :name, as: 'name' - property :sample_id, as: 'sampleId' - collection :variant_set_ids, as: 'variantSetIds' - end - end - - # @private - class CigarUnit - class Representation < Google::Apis::Core::JsonRepresentation - property :operation, as: 'operation' - property :operation_length, as: 'operationLength' - property :reference_sequence, as: 'referenceSequence' - end - end - - # @private - class CoverageBucket - class Representation < Google::Apis::Core::JsonRepresentation - property :mean_coverage, as: 'meanCoverage' - property :range, as: 'range', class: Google::Apis::GenomicsV1beta2::Range, decorator: Google::Apis::GenomicsV1beta2::Range::Representation - - end - end - - # @private - class Dataset - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :is_public, as: 'isPublic' - property :name, as: 'name' - property :project_number, as: 'projectNumber' - end - end - - # @private - class ExperimentalCreateJobRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :align, as: 'align' - property :call_variants, as: 'callVariants' - property :gcs_output_path, as: 'gcsOutputPath' - collection :paired_source_uris, as: 'pairedSourceUris' - property :project_number, as: 'projectNumber' - collection :source_uris, as: 'sourceUris' - end - end - - # @private - class ExperimentalCreateJobResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :job_id, as: 'jobId' - end - end - - # @private - class ExportReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :export_uri, as: 'exportUri' - property :project_number, as: 'projectNumber' - collection :read_group_set_ids, as: 'readGroupSetIds' - collection :reference_names, as: 'referenceNames' - end - end - - # @private - class ExportReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :job_id, as: 'jobId' - end - end - - # @private - class ExportVariantSetRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :bigquery_dataset, as: 'bigqueryDataset' - property :bigquery_table, as: 'bigqueryTable' - collection :call_set_ids, as: 'callSetIds' - property :format, as: 'format' - property :project_number, as: 'projectNumber' - end - end - - # @private - class ExportVariantSetResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :job_id, as: 'jobId' - end - end - - # @private - class ExternalId - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :source_name, as: 'sourceName' - end - end - - # @private - class FastqMetadata - class Representation < Google::Apis::Core::JsonRepresentation - property :library_name, as: 'libraryName' - property :platform_name, as: 'platformName' - property :platform_unit, as: 'platformUnit' - property :read_group_name, as: 'readGroupName' - property :sample_name, as: 'sampleName' - end - end - - # @private - class ImportReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :partition_strategy, as: 'partitionStrategy' - property :reference_set_id, as: 'referenceSetId' - collection :source_uris, as: 'sourceUris' - end - end - - # @private - class ImportReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :job_id, as: 'jobId' - end - end - - # @private - class ImportVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :format, as: 'format' - property :normalize_reference_names, as: 'normalizeReferenceNames' - collection :source_uris, as: 'sourceUris' - end - end - - # @private - class ImportVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :job_id, as: 'jobId' - end - end - - # @private - class Int32Value - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - end - end - - # @private - class InterleavedFastqSource - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::GenomicsV1beta2::FastqMetadata, decorator: Google::Apis::GenomicsV1beta2::FastqMetadata::Representation - - collection :source_uris, as: 'sourceUris' - end - end - - # @private - class Job - class Representation < Google::Apis::Core::JsonRepresentation - property :created, as: 'created' - property :detailed_status, as: 'detailedStatus' - collection :errors, as: 'errors' - property :id, as: 'id' - collection :imported_ids, as: 'importedIds' - property :project_number, as: 'projectNumber' - property :request, as: 'request', class: Google::Apis::GenomicsV1beta2::JobRequest, decorator: Google::Apis::GenomicsV1beta2::JobRequest::Representation - - property :status, as: 'status' - collection :warnings, as: 'warnings' - end - end - - # @private - class JobRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :destination, as: 'destination' - collection :source, as: 'source' - property :type, as: 'type' - end - end - - # @private - class KeyValue - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - collection :value, as: 'value' - end - end - - # @private - class LinearAlignment - class Representation < Google::Apis::Core::JsonRepresentation - collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1beta2::CigarUnit, decorator: Google::Apis::GenomicsV1beta2::CigarUnit::Representation - - property :mapping_quality, as: 'mappingQuality' - property :position, as: 'position', class: Google::Apis::GenomicsV1beta2::Position, decorator: Google::Apis::GenomicsV1beta2::Position::Representation - - end - end - - # @private - class ListBasesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - property :offset, as: 'offset' - property :sequence, as: 'sequence' - end - end - - # @private - class ListCoverageBucketsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket_width, as: 'bucketWidth' - collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1beta2::CoverageBucket, decorator: Google::Apis::GenomicsV1beta2::CoverageBucket::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListDatasetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :datasets, as: 'datasets', class: Google::Apis::GenomicsV1beta2::Dataset, decorator: Google::Apis::GenomicsV1beta2::Dataset::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class MergeVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :variants, as: 'variants', class: Google::Apis::GenomicsV1beta2::Variant, decorator: Google::Apis::GenomicsV1beta2::Variant::Representation - - end - end - - # @private - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :key, as: 'key' - property :number, as: 'number' - property :type, as: 'type' - property :value, as: 'value' - end - end - - # @private - class PairedFastqSource - class Representation < Google::Apis::Core::JsonRepresentation - collection :first_source_uris, as: 'firstSourceUris' - property :metadata, as: 'metadata', class: Google::Apis::GenomicsV1beta2::FastqMetadata, decorator: Google::Apis::GenomicsV1beta2::FastqMetadata::Representation - - collection :second_source_uris, as: 'secondSourceUris' - end - end - - # @private - class Position - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position' - property :reference_name, as: 'referenceName' - property :reverse_strand, as: 'reverseStrand' - end - end - - # @private - class QueryRange - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end' - property :reference_id, as: 'referenceId' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - end - end - - # @private - class Range - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - end - end - - # @private - class RangePosition - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end' - property :reference_id, as: 'referenceId' - property :reference_name, as: 'referenceName' - property :reverse_strand, as: 'reverseStrand' - property :start, as: 'start' - end - end - - # @private - class Read - class Representation < Google::Apis::Core::JsonRepresentation - collection :aligned_quality, as: 'alignedQuality' - property :aligned_sequence, as: 'alignedSequence' - property :alignment, as: 'alignment', class: Google::Apis::GenomicsV1beta2::LinearAlignment, decorator: Google::Apis::GenomicsV1beta2::LinearAlignment::Representation - - property :duplicate_fragment, as: 'duplicateFragment' - property :failed_vendor_quality_checks, as: 'failedVendorQualityChecks' - property :fragment_length, as: 'fragmentLength' - property :fragment_name, as: 'fragmentName' - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :next_mate_position, as: 'nextMatePosition', class: Google::Apis::GenomicsV1beta2::Position, decorator: Google::Apis::GenomicsV1beta2::Position::Representation - - property :number_reads, as: 'numberReads' - property :proper_placement, as: 'properPlacement' - property :read_group_id, as: 'readGroupId' - property :read_group_set_id, as: 'readGroupSetId' - property :read_number, as: 'readNumber' - property :secondary_alignment, as: 'secondaryAlignment' - property :supplementary_alignment, as: 'supplementaryAlignment' - end - end - - # @private - class ReadGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :description, as: 'description' - property :experiment, as: 'experiment', class: Google::Apis::GenomicsV1beta2::ReadGroupExperiment, decorator: Google::Apis::GenomicsV1beta2::ReadGroupExperiment::Representation - - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :name, as: 'name' - property :predicted_insert_size, as: 'predictedInsertSize' - collection :programs, as: 'programs', class: Google::Apis::GenomicsV1beta2::ReadGroupProgram, decorator: Google::Apis::GenomicsV1beta2::ReadGroupProgram::Representation - - property :reference_set_id, as: 'referenceSetId' - property :sample_id, as: 'sampleId' - end - end - - # @private - class ReadGroupExperiment - class Representation < Google::Apis::Core::JsonRepresentation - property :instrument_model, as: 'instrumentModel' - property :library_id, as: 'libraryId' - property :platform_unit, as: 'platformUnit' - property :sequencing_center, as: 'sequencingCenter' - end - end - - # @private - class ReadGroupProgram - class Representation < Google::Apis::Core::JsonRepresentation - property :command_line, as: 'commandLine' - property :id, as: 'id' - property :name, as: 'name' - property :prev_program_id, as: 'prevProgramId' - property :version, as: 'version' - end - end - - # @private - class ReadGroupSet - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :filename, as: 'filename' - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :name, as: 'name' - collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1beta2::ReadGroup, decorator: Google::Apis::GenomicsV1beta2::ReadGroup::Representation - - property :reference_set_id, as: 'referenceSetId' - end - end - - # @private - class Reference - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :length, as: 'length' - property :md5checksum, as: 'md5checksum' - property :name, as: 'name' - property :ncbi_taxon_id, as: 'ncbiTaxonId' - collection :source_accessions, as: 'sourceAccessions' - property :source_uri, as: 'sourceURI' - end - end - - # @private - class ReferenceBound - class Representation < Google::Apis::Core::JsonRepresentation - property :reference_name, as: 'referenceName' - property :upper_bound, as: 'upperBound' - end - end - - # @private - class ReferenceSet - class Representation < Google::Apis::Core::JsonRepresentation - property :assembly_id, as: 'assemblyId' - property :description, as: 'description' - property :id, as: 'id' - property :md5checksum, as: 'md5checksum' - property :ncbi_taxon_id, as: 'ncbiTaxonId' - collection :reference_ids, as: 'referenceIds' - collection :source_accessions, as: 'sourceAccessions' - property :source_uri, as: 'sourceURI' - end - end - - # @private - class SearchAnnotationSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :dataset_ids, as: 'datasetIds' - property :name, as: 'name' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - property :reference_set_id, as: 'referenceSetId' - collection :types, as: 'types' - end - end - - # @private - class SearchAnnotationSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1beta2::AnnotationSet, decorator: Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class SearchAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotation_set_ids, as: 'annotationSetIds' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - property :range, as: 'range', class: Google::Apis::GenomicsV1beta2::QueryRange, decorator: Google::Apis::GenomicsV1beta2::QueryRange::Representation - - end - end - - # @private - class SearchAnnotationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1beta2::Annotation, decorator: Google::Apis::GenomicsV1beta2::Annotation::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class SearchCallSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - collection :variant_set_ids, as: 'variantSetIds' - end - end - - # @private - class SearchCallSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :call_sets, as: 'callSets', class: Google::Apis::GenomicsV1beta2::CallSet, decorator: Google::Apis::GenomicsV1beta2::CallSet::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class SearchJobsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :created_after, as: 'createdAfter' - property :created_before, as: 'createdBefore' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - property :project_number, as: 'projectNumber' - collection :status, as: 'status' - end - end - - # @private - class SearchJobsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :jobs, as: 'jobs', class: Google::Apis::GenomicsV1beta2::Job, decorator: Google::Apis::GenomicsV1beta2::Job::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class SearchReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :dataset_ids, as: 'datasetIds' - property :name, as: 'name' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - end - end - - # @private - class SearchReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1beta2::ReadGroupSet, decorator: Google::Apis::GenomicsV1beta2::ReadGroupSet::Representation - - end - end - - # @private - class SearchReadsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - collection :read_group_ids, as: 'readGroupIds' - collection :read_group_set_ids, as: 'readGroupSetIds' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - end - end - - # @private - class SearchReadsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :alignments, as: 'alignments', class: Google::Apis::GenomicsV1beta2::Read, decorator: Google::Apis::GenomicsV1beta2::Read::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class SearchReferenceSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :accessions, as: 'accessions' - property :assembly_id, as: 'assemblyId' - collection :md5checksums, as: 'md5checksums' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - end - end - - # @private - class SearchReferenceSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :reference_sets, as: 'referenceSets', class: Google::Apis::GenomicsV1beta2::ReferenceSet, decorator: Google::Apis::GenomicsV1beta2::ReferenceSet::Representation - - end - end - - # @private - class SearchReferencesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :accessions, as: 'accessions' - collection :md5checksums, as: 'md5checksums' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - property :reference_set_id, as: 'referenceSetId' - end - end - - # @private - class SearchReferencesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :references, as: 'references', class: Google::Apis::GenomicsV1beta2::Reference, decorator: Google::Apis::GenomicsV1beta2::Reference::Representation - - end - end - - # @private - class SearchVariantSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :dataset_ids, as: 'datasetIds' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - end - end - - # @private - class SearchVariantSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :variant_sets, as: 'variantSets', class: Google::Apis::GenomicsV1beta2::VariantSet, decorator: Google::Apis::GenomicsV1beta2::VariantSet::Representation - - end - end - - # @private - class SearchVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :call_set_ids, as: 'callSetIds' - property :end, as: 'end' - property :max_calls, as: 'maxCalls' - property :page_size, as: 'pageSize' - property :page_token, as: 'pageToken' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :variant_name, as: 'variantName' - collection :variant_set_ids, as: 'variantSetIds' - end - end - - # @private - class SearchVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :variants, as: 'variants', class: Google::Apis::GenomicsV1beta2::Variant, decorator: Google::Apis::GenomicsV1beta2::Variant::Representation - - end - end - - # @private - class Transcript - class Representation < Google::Apis::Core::JsonRepresentation - property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1beta2::TranscriptCodingSequence, decorator: Google::Apis::GenomicsV1beta2::TranscriptCodingSequence::Representation - - collection :exons, as: 'exons', class: Google::Apis::GenomicsV1beta2::TranscriptExon, decorator: Google::Apis::GenomicsV1beta2::TranscriptExon::Representation - - property :gene_id, as: 'geneId' - end - end - - # @private - class TranscriptCodingSequence - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end' - property :start, as: 'start' - end - end - - # @private - class TranscriptExon - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end' - property :frame, as: 'frame', class: Google::Apis::GenomicsV1beta2::Int32Value, decorator: Google::Apis::GenomicsV1beta2::Int32Value::Representation - - property :start, as: 'start' - end - end - - # @private - class Variant - class Representation < Google::Apis::Core::JsonRepresentation - collection :alternate_bases, as: 'alternateBases' - collection :calls, as: 'calls', class: Google::Apis::GenomicsV1beta2::Call, decorator: Google::Apis::GenomicsV1beta2::Call::Representation - - property :created, as: 'created' - property :end, as: 'end' - collection :filter, as: 'filter' - property :id, as: 'id' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - collection :names, as: 'names' - property :quality, as: 'quality' - property :reference_bases, as: 'referenceBases' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :variant_set_id, as: 'variantSetId' - end - end - - # @private - class VariantAnnotation - class Representation < Google::Apis::Core::JsonRepresentation - property :alternate_bases, as: 'alternateBases' - property :clinical_significance, as: 'clinicalSignificance' - collection :conditions, as: 'conditions', class: Google::Apis::GenomicsV1beta2::VariantAnnotationCondition, decorator: Google::Apis::GenomicsV1beta2::VariantAnnotationCondition::Representation - - property :effect, as: 'effect' - property :gene_id, as: 'geneId' - collection :transcript_ids, as: 'transcriptIds' - property :type, as: 'type' - end - end - - # @private - class VariantAnnotationCondition - class Representation < Google::Apis::Core::JsonRepresentation - property :concept_id, as: 'conceptId' - collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1beta2::ExternalId, decorator: Google::Apis::GenomicsV1beta2::ExternalId::Representation - - collection :names, as: 'names' - property :omim_id, as: 'omimId' - end - end - - # @private - class VariantSet - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :id, as: 'id' - collection :metadata, as: 'metadata', class: Google::Apis::GenomicsV1beta2::Metadata, decorator: Google::Apis::GenomicsV1beta2::Metadata::Representation - - collection :reference_bounds, as: 'referenceBounds', class: Google::Apis::GenomicsV1beta2::ReferenceBound, decorator: Google::Apis::GenomicsV1beta2::ReferenceBound::Representation - - end - end - end - end -end diff --git a/generated/google/apis/genomics_v1beta2/service.rb b/generated/google/apis/genomics_v1beta2/service.rb deleted file mode 100644 index 4873cf37d..000000000 --- a/generated/google/apis/genomics_v1beta2/service.rb +++ /dev/null @@ -1,2356 +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 GenomicsV1beta2 - # Genomics API - # - # Provides access to Genomics data. - # - # @example - # require 'google/apis/genomics_v1beta2' - # - # Genomics = Google::Apis::GenomicsV1beta2 # Alias the module - # service = Genomics::GenomicsService.new - # - # @see https://developers.google.com/genomics/v1beta2/reference - class GenomicsService < 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/', 'genomics/v1beta2/') - end - - # Creates a new annotation set. Caller must have WRITE permission for the - # associated dataset. - # @param [Google::Apis::GenomicsV1beta2::AnnotationSet] annotation_set_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::GenomicsV1beta2::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation_set(annotation_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotationSets' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::AnnotationSet - 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 annotation set. Caller must have WRITE permission for the - # associated annotation set. - # @param [String] annotation_set_id - # The ID of the annotation set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_annotation_set(annotation_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotationSets/{annotationSetId}' - command = make_simple_command(:delete, path, options) - command.params['annotationSetId'] = annotation_set_id unless annotation_set_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 an annotation set. Caller must have READ permission for the associated - # dataset. - # @param [String] annotation_set_id - # The ID of the annotation set 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::GenomicsV1beta2::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation_set(annotation_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotationSets/{annotationSetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_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 annotation set. The update must respect all mutability restrictions - # and other invariants described on the annotation set resource. Caller must - # have WRITE permission for the associated dataset. This method supports patch - # semantics. - # @param [String] annotation_set_id - # The ID of the annotation set to be updated. - # @param [Google::Apis::GenomicsV1beta2::AnnotationSet] annotation_set_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::GenomicsV1beta2::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation_set(annotation_set_id, annotation_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotationSets/{annotationSetId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_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 - - # Searches for annotation sets that match the given criteria. Results are - # returned in a deterministic order. Caller must have READ permission for the - # queried datasets. - # @param [Google::Apis::GenomicsV1beta2::SearchAnnotationSetsRequest] search_annotation_sets_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::GenomicsV1beta2::SearchAnnotationSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchAnnotationSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation_sets(search_annotation_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotationSets/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchAnnotationSetsRequest::Representation - command.request_object = search_annotation_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchAnnotationSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchAnnotationSetsResponse - 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 annotation set. The update must respect all mutability restrictions - # and other invariants described on the annotation set resource. Caller must - # have WRITE permission for the associated dataset. - # @param [String] annotation_set_id - # The ID of the annotation set to be updated. - # @param [Google::Apis::GenomicsV1beta2::AnnotationSet] annotation_set_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::GenomicsV1beta2::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation_set(annotation_set_id, annotation_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotationSets/{annotationSetId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_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 one or more new annotations atomically. All annotations must belong to - # the same annotation set. Caller must have WRITE permission for this annotation - # set. For optimal performance, batch positionally adjacent annotations together. - # If the request has a systemic issue, such as an attempt to write to an - # inaccessible annotation set, the entire RPC will fail accordingly. For lesser - # data issues, when possible an error will be isolated to the corresponding - # batch entry in the response; the remaining well formed annotations will be - # created normally. - # @param [Google::Apis::GenomicsV1beta2::BatchCreateAnnotationsRequest] batch_create_annotations_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::GenomicsV1beta2::BatchAnnotationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::BatchAnnotationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_create_annotations(batch_create_annotations_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotations:batchCreate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::BatchCreateAnnotationsRequest::Representation - command.request_object = batch_create_annotations_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::BatchAnnotationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::BatchAnnotationsResponse - 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 new annotation. Caller must have WRITE permission for the associated - # annotation set. - # @param [Google::Apis::GenomicsV1beta2::Annotation] annotation_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::GenomicsV1beta2::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation(annotation_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotations' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::GenomicsV1beta2::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Annotation - 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 annotation. Caller must have WRITE permission for the associated - # annotation set. - # @param [String] annotation_id - # The ID of the annotation set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_annotation(annotation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotations/{annotationId}' - command = make_simple_command(:delete, path, options) - command.params['annotationId'] = annotation_id unless annotation_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 an annotation. Caller must have READ permission for the associated - # annotation set. - # @param [String] annotation_id - # The ID of the annotation set 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::GenomicsV1beta2::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation(annotation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotations/{annotationId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Annotation - command.params['annotationId'] = annotation_id unless annotation_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 annotation. The update must respect all mutability restrictions and - # other invariants described on the annotation resource. Caller must have WRITE - # permission for the associated dataset. This method supports patch semantics. - # @param [String] annotation_id - # The ID of the annotation set to be updated. - # @param [Google::Apis::GenomicsV1beta2::Annotation] annotation_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::GenomicsV1beta2::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation(annotation_id, annotation_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotations/{annotationId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::GenomicsV1beta2::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Annotation - command.params['annotationId'] = annotation_id unless annotation_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 - - # Searches for annotations that match the given criteria. Results are returned - # ordered by start position. Annotations that have matching start positions are - # ordered deterministically. Caller must have READ permission for the queried - # annotation sets. - # @param [Google::Apis::GenomicsV1beta2::SearchAnnotationsRequest] search_annotations_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::GenomicsV1beta2::SearchAnnotationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchAnnotationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotations(search_annotations_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotations/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchAnnotationsRequest::Representation - command.request_object = search_annotations_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchAnnotationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchAnnotationsResponse - 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 annotation. The update must respect all mutability restrictions and - # other invariants described on the annotation resource. Caller must have WRITE - # permission for the associated dataset. - # @param [String] annotation_id - # The ID of the annotation set to be updated. - # @param [Google::Apis::GenomicsV1beta2::Annotation] annotation_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::GenomicsV1beta2::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_annotation(annotation_id, annotation_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'annotations/{annotationId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::GenomicsV1beta2::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Annotation - command.params['annotationId'] = annotation_id unless annotation_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 new call set. - # @param [Google::Apis::GenomicsV1beta2::CallSet] call_set_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::GenomicsV1beta2::CallSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::CallSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_call_set(call_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'callsets' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::CallSet::Representation - command.request_object = call_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::CallSet - 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 call set. - # @param [String] call_set_id - # The ID of the call set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_call_set(call_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'callsets/{callSetId}' - command = make_simple_command(:delete, path, options) - command.params['callSetId'] = call_set_id unless call_set_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 call set by ID. - # @param [String] call_set_id - # The ID of the call set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::CallSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::CallSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_call_set(call_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'callsets/{callSetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::CallSet - command.params['callSetId'] = call_set_id unless call_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a call set. This method supports patch semantics. - # @param [String] call_set_id - # The ID of the call set to be updated. - # @param [Google::Apis::GenomicsV1beta2::CallSet] call_set_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::GenomicsV1beta2::CallSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::CallSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_call_set(call_set_id, call_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'callsets/{callSetId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::CallSet::Representation - command.request_object = call_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::CallSet - command.params['callSetId'] = call_set_id unless call_set_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 list of call sets matching the criteria. - # Implements GlobalAllianceApi.searchCallSets. - # @param [Google::Apis::GenomicsV1beta2::SearchCallSetsRequest] search_call_sets_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::GenomicsV1beta2::SearchCallSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchCallSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_call_sets(search_call_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'callsets/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchCallSetsRequest::Representation - command.request_object = search_call_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchCallSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchCallSetsResponse - 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 call set. - # @param [String] call_set_id - # The ID of the call set to be updated. - # @param [Google::Apis::GenomicsV1beta2::CallSet] call_set_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::GenomicsV1beta2::CallSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::CallSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_call_set(call_set_id, call_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'callsets/{callSetId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::CallSet::Representation - command.request_object = call_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::CallSet - command.params['callSetId'] = call_set_id unless call_set_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 new dataset. - # @param [Google::Apis::GenomicsV1beta2::Dataset] dataset_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::GenomicsV1beta2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datasets' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Dataset - 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 dataset. - # @param [String] dataset_id - # The ID of the dataset to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_dataset(dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datasets/{datasetId}' - command = make_simple_command(:delete, path, options) - command.params['datasetId'] = dataset_id unless dataset_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 dataset by ID. - # @param [String] dataset_id - # The ID of the dataset. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datasets/{datasetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Dataset - command.params['datasetId'] = dataset_id unless dataset_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 datasets within a project. - # @param [Fixnum] page_size - # The maximum number of results returned by this request. If unspecified, - # defaults to 50. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # @param [String] project_number - # The project to list datasets 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::GenomicsV1beta2::ListDatasetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ListDatasetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_datasets(page_size: nil, page_token: nil, project_number: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datasets' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::ListDatasetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ListDatasetsResponse - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projectNumber'] = project_number unless project_number.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 dataset. This method supports patch semantics. - # @param [String] dataset_id - # The ID of the dataset to be updated. - # @param [Google::Apis::GenomicsV1beta2::Dataset] dataset_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::GenomicsV1beta2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datasets/{datasetId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Dataset - command.params['datasetId'] = dataset_id unless dataset_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 - - # Undeletes a dataset by restoring a dataset which was deleted via this API. - # This operation is only possible for a week after the deletion occurred. - # @param [String] dataset_id - # The ID of the dataset to be undeleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datasets/{datasetId}/undelete' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a dataset. - # @param [String] dataset_id - # The ID of the dataset to be updated. - # @param [Google::Apis::GenomicsV1beta2::Dataset] dataset_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::GenomicsV1beta2::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_dataset(dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'datasets/{datasetId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1beta2::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Dataset - command.params['datasetId'] = dataset_id unless dataset_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 and asynchronously runs an ad-hoc job. This is an experimental call - # and may be removed or changed at any time. - # @param [Google::Apis::GenomicsV1beta2::ExperimentalCreateJobRequest] experimental_create_job_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GenomicsV1beta2::ExperimentalCreateJobResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ExperimentalCreateJobResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_experimental_job(experimental_create_job_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'experimental/jobs/create' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::ExperimentalCreateJobRequest::Representation - command.request_object = experimental_create_job_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::ExperimentalCreateJobResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ExperimentalCreateJobResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Cancels a job by ID. Note that it is possible for partial results to be - # generated and stored for cancelled jobs. - # @param [String] job_id - # Required. The ID of the job. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [NilClass] No result returned for this method - # @yieldparam err [StandardError] error object if request failed - # - # @return [void] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_job(job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'jobs/{jobId}/cancel' - command = make_simple_command(:post, path, options) - 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 - - # Gets a job by ID. - # @param [String] job_id - # Required. The ID of the job. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GenomicsV1beta2::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::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(job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'jobs/{jobId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::Job::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Job - 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 - - # Gets a list of jobs matching the criteria. - # @param [Google::Apis::GenomicsV1beta2::SearchJobsRequest] search_jobs_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::GenomicsV1beta2::SearchJobsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchJobsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_jobs(search_jobs_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'jobs/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchJobsRequest::Representation - command.request_object = search_jobs_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchJobsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchJobsResponse - 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 - - # Aligns read data from existing read group sets or files from Google Cloud - # Storage. See the alignment and variant calling documentation for more details. - # @param [Google::Apis::GenomicsV1beta2::AlignReadGroupSetsRequest] align_read_group_sets_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::GenomicsV1beta2::AlignReadGroupSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::AlignReadGroupSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def align_read_group_sets(align_read_group_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/align' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::AlignReadGroupSetsRequest::Representation - command.request_object = align_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::AlignReadGroupSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::AlignReadGroupSetsResponse - 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 - - # Calls variants on read data from existing read group sets or files from Google - # Cloud Storage. See the alignment and variant calling documentation for more - # details. - # @param [Google::Apis::GenomicsV1beta2::CallReadGroupSetsRequest] call_read_group_sets_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::GenomicsV1beta2::CallReadGroupSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::CallReadGroupSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def call_read_group_sets(call_read_group_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/call' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::CallReadGroupSetsRequest::Representation - command.request_object = call_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::CallReadGroupSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::CallReadGroupSetsResponse - 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 read group set. - # @param [String] read_group_set_id - # The ID of the read group set to be deleted. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_read_group_set(read_group_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/{readGroupSetId}' - command = make_simple_command(:delete, path, options) - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_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 - - # Exports read group sets to a BAM file in Google Cloud Storage. - # Note that currently there may be some differences between exported BAM files - # and the original BAM file at the time of import. In particular, comments in - # the input file header will not be preserved, some custom tags will be - # converted to strings, and original reference sequence order is not necessarily - # preserved. - # @param [Google::Apis::GenomicsV1beta2::ExportReadGroupSetsRequest] export_read_group_sets_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::GenomicsV1beta2::ExportReadGroupSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ExportReadGroupSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def export_read_group_sets(export_read_group_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/export' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::ExportReadGroupSetsRequest::Representation - command.request_object = export_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::ExportReadGroupSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ExportReadGroupSetsResponse - 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 read group set by ID. - # @param [String] read_group_set_id - # The ID of the read group set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::ReadGroupSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ReadGroupSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_read_group_set(read_group_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/{readGroupSetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::ReadGroupSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ReadGroupSet - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_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 read group sets by asynchronously importing the provided information. - # Note that currently comments in the input file header are not imported and - # some custom tags will be converted to strings, rather than preserving tag - # types. The caller must have WRITE permissions to the dataset. - # @param [Google::Apis::GenomicsV1beta2::ImportReadGroupSetsRequest] import_read_group_sets_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::GenomicsV1beta2::ImportReadGroupSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ImportReadGroupSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_read_group_sets(import_read_group_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/import' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::ImportReadGroupSetsRequest::Representation - command.request_object = import_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::ImportReadGroupSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ImportReadGroupSetsResponse - 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 read group set. This method supports patch semantics. - # @param [String] read_group_set_id - # The ID of the read group set to be updated. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @param [Google::Apis::GenomicsV1beta2::ReadGroupSet] read_group_set_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::GenomicsV1beta2::ReadGroupSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ReadGroupSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_read_group_set(read_group_set_id, read_group_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/{readGroupSetId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::ReadGroupSet::Representation - command.request_object = read_group_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::ReadGroupSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ReadGroupSet - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_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 - - # Searches for read group sets matching the criteria. - # Implements GlobalAllianceApi.searchReadGroupSets. - # @param [Google::Apis::GenomicsV1beta2::SearchReadGroupSetsRequest] search_read_group_sets_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::GenomicsV1beta2::SearchReadGroupSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchReadGroupSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_read_group_sets(search_read_group_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchReadGroupSetsRequest::Representation - command.request_object = search_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchReadGroupSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchReadGroupSetsResponse - 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 read group set. - # @param [String] read_group_set_id - # The ID of the read group set to be updated. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @param [Google::Apis::GenomicsV1beta2::ReadGroupSet] read_group_set_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::GenomicsV1beta2::ReadGroupSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ReadGroupSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_read_group_set(read_group_set_id, read_group_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/{readGroupSetId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::ReadGroupSet::Representation - command.request_object = read_group_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::ReadGroupSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ReadGroupSet - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_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 fixed width coverage buckets for a read group set, each of which - # correspond to a range of a reference sequence. Each bucket summarizes coverage - # information across its corresponding genomic range. - # Coverage is defined as the number of reads which are aligned to a given base - # in the reference sequence. Coverage buckets are available at several - # precomputed bucket widths, enabling retrieval of various coverage 'zoom levels' - # . The caller must have READ permissions for the target read group set. - # @param [String] read_group_set_id - # Required. The ID of the read group set over which coverage is requested. - # @param [Fixnum] page_size - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. The maximum value is 2048. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # @param [String] range_end - # The end position of the range on the reference, 0-based exclusive. If - # specified, referenceName must also be specified. - # @param [String] range_reference_name - # The reference sequence name, for example chr1, 1, or chrX. - # @param [String] range_start - # The start position of the range on the reference, 0-based inclusive. If - # specified, referenceName must also be specified. - # @param [String] target_bucket_width - # The desired width of each reported coverage bucket in base pairs. This will be - # rounded down to the nearest precomputed bucket width; the value of which is - # returned as bucketWidth in the response. Defaults to infinity (each bucket - # spans an entire reference sequence) or the length of the target range, if - # specified. The smallest precomputed bucketWidth is currently 2048 base pairs; - # this is subject to change. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::ListCoverageBucketsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ListCoverageBucketsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_coverage_buckets(read_group_set_id, page_size: nil, page_token: nil, range_end: nil, range_reference_name: nil, range_start: nil, target_bucket_width: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'readgroupsets/{readGroupSetId}/coveragebuckets' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::ListCoverageBucketsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ListCoverageBucketsResponse - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['range.end'] = range_end unless range_end.nil? - command.query['range.referenceName'] = range_reference_name unless range_reference_name.nil? - command.query['range.start'] = range_start unless range_start.nil? - command.query['targetBucketWidth'] = target_bucket_width unless target_bucket_width.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 list of reads for one or more read group sets. Reads search operates - # over a genomic coordinate space of reference sequence & position defined over - # the reference sequences to which the requested read group sets are aligned. - # If a target positional range is specified, search returns all reads whose - # alignment to the reference genome overlap the range. A query which specifies - # only read group set IDs yields all reads in those read group sets, including - # unmapped reads. - # All reads returned (including reads on subsequent pages) are ordered by - # genomic coordinate (reference sequence & position). Reads with equivalent - # genomic coordinates are returned in a deterministic order. - # Implements GlobalAllianceApi.searchReads. - # @param [Google::Apis::GenomicsV1beta2::SearchReadsRequest] search_reads_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::GenomicsV1beta2::SearchReadsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchReadsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reads(search_reads_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reads/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchReadsRequest::Representation - command.request_object = search_reads_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchReadsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchReadsResponse - 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 reference. - # Implements GlobalAllianceApi.getReference. - # @param [String] reference_id - # The ID of the reference. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::Reference] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Reference] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reference(reference_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'references/{referenceId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::Reference::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Reference - command.params['referenceId'] = reference_id unless reference_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 - - # Searches for references which match the given criteria. - # Implements GlobalAllianceApi.searchReferences. - # @param [Google::Apis::GenomicsV1beta2::SearchReferencesRequest] search_references_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::GenomicsV1beta2::SearchReferencesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchReferencesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_references(search_references_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'references/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchReferencesRequest::Representation - command.request_object = search_references_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchReferencesResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchReferencesResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the bases in a reference, optionally restricted to a range. - # Implements GlobalAllianceApi.getReferenceBases. - # @param [String] reference_id - # The ID of the reference. - # @param [String] end_position - # The end position (0-based, exclusive) of this query. Defaults to the length of - # this reference. - # @param [Fixnum] page_size - # Specifies the maximum number of bases to return in a single page. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of nextPageToken - # from the previous response. - # @param [String] start_position - # The start position (0-based) of this query. Defaults to 0. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::ListBasesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ListBasesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reference_bases(reference_id, end_position: nil, page_size: nil, page_token: nil, start_position: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'references/{referenceId}/bases' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::ListBasesResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ListBasesResponse - command.params['referenceId'] = reference_id unless reference_id.nil? - command.query['end'] = end_position unless end_position.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['start'] = start_position unless start_position.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 reference set. - # Implements GlobalAllianceApi.getReferenceSet. - # @param [String] reference_set_id - # The ID of the reference set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::ReferenceSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ReferenceSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reference_set(reference_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'referencesets/{referenceSetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::ReferenceSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ReferenceSet - command.params['referenceSetId'] = reference_set_id unless reference_set_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 - - # Searches for reference sets which match the given criteria. - # Implements GlobalAllianceApi.searchReferenceSets. - # @param [Google::Apis::GenomicsV1beta2::SearchReferenceSetsRequest] search_reference_sets_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::GenomicsV1beta2::SearchReferenceSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchReferenceSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_reference_sets(search_reference_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'referencesets/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchReferenceSetsRequest::Representation - command.request_object = search_reference_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchReferenceSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchReferenceSetsResponse - 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 new variant. - # @param [Google::Apis::GenomicsV1beta2::Variant] variant_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::GenomicsV1beta2::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variant(variant_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variants' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Variant::Representation - command.request_object = variant_object - command.response_representation = Google::Apis::GenomicsV1beta2::Variant::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Variant - 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 variant. - # @param [String] variant_id - # The ID of the variant to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_variant(variant_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variants/{variantId}' - command = make_simple_command(:delete, path, options) - command.params['variantId'] = variant_id unless variant_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 variant by ID. - # @param [String] variant_id - # The ID of the variant. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variant(variant_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variants/{variantId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::Variant::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Variant - command.params['variantId'] = variant_id unless variant_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 list of variants matching the criteria. - # Implements GlobalAllianceApi.searchVariants. - # @param [Google::Apis::GenomicsV1beta2::SearchVariantsRequest] search_variants_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::GenomicsV1beta2::SearchVariantsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchVariantsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variants(search_variants_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variants/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchVariantsRequest::Representation - command.request_object = search_variants_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchVariantsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchVariantsResponse - 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 variant's names and info fields. All other modifications are - # silently ignored. Returns the modified variant without its calls. - # @param [String] variant_id - # The ID of the variant to be updated. - # @param [Google::Apis::GenomicsV1beta2::Variant] variant_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::GenomicsV1beta2::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variant(variant_id, variant_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variants/{variantId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::Variant::Representation - command.request_object = variant_object - command.response_representation = Google::Apis::GenomicsV1beta2::Variant::Representation - command.response_class = Google::Apis::GenomicsV1beta2::Variant - command.params['variantId'] = variant_id unless variant_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 contents of a variant set. The variant set object is not deleted. - # @param [String] variant_set_id - # The ID of the variant set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_variantset(variant_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/{variantSetId}' - command = make_simple_command(:delete, path, options) - command.params['variantSetId'] = variant_set_id unless variant_set_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 - - # Exports variant set data to an external destination. - # @param [String] variant_set_id - # Required. The ID of the variant set that contains variant data which should be - # exported. The caller must have READ access to this variant set. - # @param [Google::Apis::GenomicsV1beta2::ExportVariantSetRequest] export_variant_set_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::GenomicsV1beta2::ExportVariantSetResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ExportVariantSetResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def export_variant_set(variant_set_id, export_variant_set_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/{variantSetId}/export' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::ExportVariantSetRequest::Representation - command.request_object = export_variant_set_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::ExportVariantSetResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ExportVariantSetResponse - command.params['variantSetId'] = variant_set_id unless variant_set_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 variant set by ID. - # @param [String] variant_set_id - # Required. The ID of the variant set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GenomicsV1beta2::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::VariantSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variantset(variant_set_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/{variantSetId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GenomicsV1beta2::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::VariantSet - command.params['variantSetId'] = variant_set_id unless variant_set_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 variant data by asynchronously importing the provided information. - # The variants for import will be merged with any existing data and each other - # according to the behavior of mergeVariants. In particular, this means for - # merged VCF variants that have conflicting INFO fields, some data will be - # arbitrarily discarded. As a special case, for single-sample VCF files, QUAL - # and FILTER fields will be moved to the call level; these are sometimes - # interpreted in a call-specific context. Imported VCF headers are appended to - # the metadata already in a variant set. - # @param [String] variant_set_id - # Required. The variant set to which variant data should be imported. - # @param [Google::Apis::GenomicsV1beta2::ImportVariantsRequest] import_variants_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::GenomicsV1beta2::ImportVariantsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::ImportVariantsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_variants(variant_set_id, import_variants_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/{variantSetId}/importVariants' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::ImportVariantsRequest::Representation - command.request_object = import_variants_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::ImportVariantsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::ImportVariantsResponse - command.params['variantSetId'] = variant_set_id unless variant_set_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 - - # Merges the given variants with existing variants. Each variant will be merged - # with an existing variant that matches its reference sequence, start, end, - # reference bases, and alternative bases. If no such variant exists, a new one - # will be created. - # When variants are merged, the call information from the new variant is added - # to the existing variant, and other fields (such as key/value pairs) are - # discarded. - # @param [String] variant_set_id - # The destination variant set. - # @param [Google::Apis::GenomicsV1beta2::MergeVariantsRequest] merge_variants_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 [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 merge_variants(variant_set_id, merge_variants_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/{variantSetId}/mergeVariants' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::MergeVariantsRequest::Representation - command.request_object = merge_variants_request_object - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a variant set's metadata. All other modifications are silently ignored. - # This method supports patch semantics. - # @param [String] variant_set_id - # The ID of the variant to be updated (must already exist). - # @param [Google::Apis::GenomicsV1beta2::VariantSet] variant_set_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::GenomicsV1beta2::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::VariantSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variantset(variant_set_id, variant_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/{variantSetId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::VariantSet::Representation - command.request_object = variant_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::VariantSet - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of all variant sets matching search criteria. - # Implements GlobalAllianceApi.searchVariantSets. - # @param [Google::Apis::GenomicsV1beta2::SearchVariantSetsRequest] search_variant_sets_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::GenomicsV1beta2::SearchVariantSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::SearchVariantSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variant_sets(search_variant_sets_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::SearchVariantSetsRequest::Representation - command.request_object = search_variant_sets_request_object - command.response_representation = Google::Apis::GenomicsV1beta2::SearchVariantSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1beta2::SearchVariantSetsResponse - 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 variant set's metadata. All other modifications are silently ignored. - # @param [String] variant_set_id - # The ID of the variant to be updated (must already exist). - # @param [Google::Apis::GenomicsV1beta2::VariantSet] variant_set_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::GenomicsV1beta2::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1beta2::VariantSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variantset(variant_set_id, variant_set_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'variantsets/{variantSetId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GenomicsV1beta2::VariantSet::Representation - command.request_object = variant_set_object - command.response_representation = Google::Apis::GenomicsV1beta2::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1beta2::VariantSet - command.params['variantSetId'] = variant_set_id unless variant_set_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 diff --git a/generated/google/apis/gmail_v1.rb b/generated/google/apis/gmail_v1.rb deleted file mode 100644 index a8c382507..000000000 --- a/generated/google/apis/gmail_v1.rb +++ /dev/null @@ -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/gmail_v1/service.rb' -require 'google/apis/gmail_v1/classes.rb' -require 'google/apis/gmail_v1/representations.rb' - -module Google - module Apis - # Gmail API - # - # The Gmail REST API. - # - # @see https://developers.google.com/gmail/api/ - module GmailV1 - VERSION = 'V1' - REVISION = '20150526' - - # View and manage your mail - AUTH_SCOPE = 'https://mail.google.com/' - - # Manage drafts and send emails - AUTH_GMAIL_COMPOSE = 'https://www.googleapis.com/auth/gmail.compose' - - # Insert mail into your mailbox - AUTH_GMAIL_INSERT = 'https://www.googleapis.com/auth/gmail.insert' - - # Manage mailbox labels - AUTH_GMAIL_LABELS = 'https://www.googleapis.com/auth/gmail.labels' - - # View and modify but not delete your email - AUTH_GMAIL_MODIFY = 'https://www.googleapis.com/auth/gmail.modify' - - # View your emails messages and settings - AUTH_GMAIL_READONLY = 'https://www.googleapis.com/auth/gmail.readonly' - end - end -end diff --git a/generated/google/apis/gmail_v1/classes.rb b/generated/google/apis/gmail_v1/classes.rb deleted file mode 100644 index 326d9a868..000000000 --- a/generated/google/apis/gmail_v1/classes.rb +++ /dev/null @@ -1,784 +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 GmailV1 - - # A draft email in the user's mailbox. - class Draft - include Google::Apis::Core::Hashable - - # The immutable ID of the draft. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # An email message. - # Corresponds to the JSON property `message` - # @return [Google::Apis::GmailV1::Message] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @message = args[:message] unless args[:message].nil? - end - end - - # A record of a change to the user's mailbox. Each history change may affect - # multiple messages in multiple ways. - class History - include Google::Apis::Core::Hashable - - # The mailbox sequence ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Labels added to messages in this history record. - # Corresponds to the JSON property `labelsAdded` - # @return [Array] - attr_accessor :labels_added - - # Labels removed from messages in this history record. - # Corresponds to the JSON property `labelsRemoved` - # @return [Array] - attr_accessor :labels_removed - - # List of messages changed in this history record. The fields for specific - # change types, such as messagesAdded may duplicate messages in this field. We - # recommend using the specific change-type fields instead of this. - # Corresponds to the JSON property `messages` - # @return [Array] - attr_accessor :messages - - # Messages added to the mailbox in this history record. - # Corresponds to the JSON property `messagesAdded` - # @return [Array] - attr_accessor :messages_added - - # Messages deleted (not Trashed) from the mailbox in this history record. - # Corresponds to the JSON property `messagesDeleted` - # @return [Array] - attr_accessor :messages_deleted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @labels_added = args[:labels_added] unless args[:labels_added].nil? - @labels_removed = args[:labels_removed] unless args[:labels_removed].nil? - @messages = args[:messages] unless args[:messages].nil? - @messages_added = args[:messages_added] unless args[:messages_added].nil? - @messages_deleted = args[:messages_deleted] unless args[:messages_deleted].nil? - end - end - - # - class HistoryLabelAdded - include Google::Apis::Core::Hashable - - # Label IDs added to the message. - # Corresponds to the JSON property `labelIds` - # @return [Array] - attr_accessor :label_ids - - # An email message. - # Corresponds to the JSON property `message` - # @return [Google::Apis::GmailV1::Message] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @label_ids = args[:label_ids] unless args[:label_ids].nil? - @message = args[:message] unless args[:message].nil? - end - end - - # - class HistoryLabelRemoved - include Google::Apis::Core::Hashable - - # Label IDs removed from the message. - # Corresponds to the JSON property `labelIds` - # @return [Array] - attr_accessor :label_ids - - # An email message. - # Corresponds to the JSON property `message` - # @return [Google::Apis::GmailV1::Message] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @label_ids = args[:label_ids] unless args[:label_ids].nil? - @message = args[:message] unless args[:message].nil? - end - end - - # - class HistoryMessageAdded - include Google::Apis::Core::Hashable - - # An email message. - # Corresponds to the JSON property `message` - # @return [Google::Apis::GmailV1::Message] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message = args[:message] unless args[:message].nil? - end - end - - # - class HistoryMessageDeleted - include Google::Apis::Core::Hashable - - # An email message. - # Corresponds to the JSON property `message` - # @return [Google::Apis::GmailV1::Message] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message = args[:message] unless args[:message].nil? - end - end - - # Labels are used to categorize messages and threads within the user's mailbox. - class Label - include Google::Apis::Core::Hashable - - # The immutable ID of the label. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The visibility of the label in the label list in the Gmail web interface. - # Corresponds to the JSON property `labelListVisibility` - # @return [String] - attr_accessor :label_list_visibility - - # The visibility of the label in the message list in the Gmail web interface. - # Corresponds to the JSON property `messageListVisibility` - # @return [String] - attr_accessor :message_list_visibility - - # The total number of messages with the label. - # Corresponds to the JSON property `messagesTotal` - # @return [Fixnum] - attr_accessor :messages_total - - # The number of unread messages with the label. - # Corresponds to the JSON property `messagesUnread` - # @return [Fixnum] - attr_accessor :messages_unread - - # The display name of the label. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The total number of threads with the label. - # Corresponds to the JSON property `threadsTotal` - # @return [Fixnum] - attr_accessor :threads_total - - # The number of unread threads with the label. - # Corresponds to the JSON property `threadsUnread` - # @return [Fixnum] - attr_accessor :threads_unread - - # The owner type for the label. User labels are created by the user and can be - # modified and deleted by the user and can be applied to any message or thread. - # System labels are internally created and cannot be added, modified, or deleted. - # System labels may be able to be applied to or removed from messages and - # threads under some circumstances but this is not guaranteed. For example, - # users can apply and remove the INBOX and UNREAD labels from messages and - # threads, but cannot apply or remove the DRAFTS or SENT labels from messages or - # threads. - # 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? - @label_list_visibility = args[:label_list_visibility] unless args[:label_list_visibility].nil? - @message_list_visibility = args[:message_list_visibility] unless args[:message_list_visibility].nil? - @messages_total = args[:messages_total] unless args[:messages_total].nil? - @messages_unread = args[:messages_unread] unless args[:messages_unread].nil? - @name = args[:name] unless args[:name].nil? - @threads_total = args[:threads_total] unless args[:threads_total].nil? - @threads_unread = args[:threads_unread] unless args[:threads_unread].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class ListDraftsResponse - include Google::Apis::Core::Hashable - - # List of drafts. - # Corresponds to the JSON property `drafts` - # @return [Array] - attr_accessor :drafts - - # Token to retrieve the next page of results in the list. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Estimated total number of results. - # Corresponds to the JSON property `resultSizeEstimate` - # @return [Fixnum] - attr_accessor :result_size_estimate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @drafts = args[:drafts] unless args[:drafts].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @result_size_estimate = args[:result_size_estimate] unless args[:result_size_estimate].nil? - end - end - - # - class ListHistoryResponse - include Google::Apis::Core::Hashable - - # List of history records. Any messages contained in the response will typically - # only have id and threadId fields populated. - # Corresponds to the JSON property `history` - # @return [Array] - attr_accessor :history - - # The ID of the mailbox's current history record. - # Corresponds to the JSON property `historyId` - # @return [String] - attr_accessor :history_id - - # Page token to retrieve the next page of results in the list. - # 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) - @history = args[:history] unless args[:history].nil? - @history_id = args[:history_id] unless args[:history_id].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # - class ListLabelsResponse - include Google::Apis::Core::Hashable - - # List of labels. - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @labels = args[:labels] unless args[:labels].nil? - end - end - - # - class ListMessagesResponse - include Google::Apis::Core::Hashable - - # List of messages. - # Corresponds to the JSON property `messages` - # @return [Array] - attr_accessor :messages - - # Token to retrieve the next page of results in the list. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Estimated total number of results. - # Corresponds to the JSON property `resultSizeEstimate` - # @return [Fixnum] - attr_accessor :result_size_estimate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @messages = args[:messages] unless args[:messages].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @result_size_estimate = args[:result_size_estimate] unless args[:result_size_estimate].nil? - end - end - - # - class ListThreadsResponse - include Google::Apis::Core::Hashable - - # Page token to retrieve the next page of results in the list. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Estimated total number of results. - # Corresponds to the JSON property `resultSizeEstimate` - # @return [Fixnum] - attr_accessor :result_size_estimate - - # List of threads. - # Corresponds to the JSON property `threads` - # @return [Array] - attr_accessor :threads - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @result_size_estimate = args[:result_size_estimate] unless args[:result_size_estimate].nil? - @threads = args[:threads] unless args[:threads].nil? - end - end - - # An email message. - class Message - include Google::Apis::Core::Hashable - - # The ID of the last history record that modified this message. - # Corresponds to the JSON property `historyId` - # @return [String] - attr_accessor :history_id - - # The immutable ID of the message. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # List of IDs of labels applied to this message. - # Corresponds to the JSON property `labelIds` - # @return [Array] - attr_accessor :label_ids - - # A single MIME message part. - # Corresponds to the JSON property `payload` - # @return [Google::Apis::GmailV1::MessagePart] - attr_accessor :payload - - # The entire email message in an RFC 2822 formatted and base64url encoded string. - # Returned in messages.get and drafts.get responses when the format=RAW - # parameter is supplied. - # Corresponds to the JSON property `raw` - # @return [String] - attr_accessor :raw - - # Estimated size in bytes of the message. - # Corresponds to the JSON property `sizeEstimate` - # @return [Fixnum] - attr_accessor :size_estimate - - # A short part of the message text. - # Corresponds to the JSON property `snippet` - # @return [String] - attr_accessor :snippet - - # The ID of the thread the message belongs to. To add a message or draft to a - # thread, the following criteria must be met: - # - The requested threadId must be specified on the Message or Draft.Message you - # supply with your request. - # - The References and In-Reply-To headers must be set in compliance with the - # RFC 2822 standard. - # - The Subject headers must match. - # Corresponds to the JSON property `threadId` - # @return [String] - attr_accessor :thread_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @history_id = args[:history_id] unless args[:history_id].nil? - @id = args[:id] unless args[:id].nil? - @label_ids = args[:label_ids] unless args[:label_ids].nil? - @payload = args[:payload] unless args[:payload].nil? - @raw = args[:raw] unless args[:raw].nil? - @size_estimate = args[:size_estimate] unless args[:size_estimate].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @thread_id = args[:thread_id] unless args[:thread_id].nil? - end - end - - # A single MIME message part. - class MessagePart - include Google::Apis::Core::Hashable - - # The body of a single MIME message part. - # Corresponds to the JSON property `body` - # @return [Google::Apis::GmailV1::MessagePartBody] - attr_accessor :body - - # The filename of the attachment. Only present if this message part represents - # an attachment. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - - # List of headers on this message part. For the top-level message part, - # representing the entire message payload, it will contain the standard RFC 2822 - # email headers such as To, From, and Subject. - # Corresponds to the JSON property `headers` - # @return [Array] - attr_accessor :headers - - # The MIME type of the message part. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # The immutable ID of the message part. - # Corresponds to the JSON property `partId` - # @return [String] - attr_accessor :part_id - - # The child MIME message parts of this part. This only applies to container MIME - # message parts, for example multipart/*. For non- container MIME message part - # types, such as text/plain, this field is empty. For more information, see RFC - # 1521. - # Corresponds to the JSON property `parts` - # @return [Array] - attr_accessor :parts - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @body = args[:body] unless args[:body].nil? - @filename = args[:filename] unless args[:filename].nil? - @headers = args[:headers] unless args[:headers].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - @part_id = args[:part_id] unless args[:part_id].nil? - @parts = args[:parts] unless args[:parts].nil? - end - end - - # The body of a single MIME message part. - class MessagePartBody - include Google::Apis::Core::Hashable - - # When present, contains the ID of an external attachment that can be retrieved - # in a separate messages.attachments.get request. When not present, the entire - # content of the message part body is contained in the data field. - # Corresponds to the JSON property `attachmentId` - # @return [String] - attr_accessor :attachment_id - - # The body data of a MIME message part. May be empty for MIME container types - # that have no message body or when the body data is sent as a separate - # attachment. An attachment ID is present if the body data is contained in a - # separate attachment. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Total number of bytes in the body of the message part. - # Corresponds to the JSON property `size` - # @return [Fixnum] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attachment_id = args[:attachment_id] unless args[:attachment_id].nil? - @data = args[:data] unless args[:data].nil? - @size = args[:size] unless args[:size].nil? - end - end - - # - class MessagePartHeader - include Google::Apis::Core::Hashable - - # The name of the header before the : separator. For example, To. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The value of the header after the : separator. For example, someuser@example. - # com. - # 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) - @name = args[:name] unless args[:name].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class ModifyMessageRequest - include Google::Apis::Core::Hashable - - # A list of IDs of labels to add to this message. - # Corresponds to the JSON property `addLabelIds` - # @return [Array] - attr_accessor :add_label_ids - - # A list IDs of labels to remove from this message. - # Corresponds to the JSON property `removeLabelIds` - # @return [Array] - attr_accessor :remove_label_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @add_label_ids = args[:add_label_ids] unless args[:add_label_ids].nil? - @remove_label_ids = args[:remove_label_ids] unless args[:remove_label_ids].nil? - end - end - - # - class ModifyThreadRequest - include Google::Apis::Core::Hashable - - # A list of IDs of labels to add to this thread. - # Corresponds to the JSON property `addLabelIds` - # @return [Array] - attr_accessor :add_label_ids - - # A list of IDs of labels to remove from this thread. - # Corresponds to the JSON property `removeLabelIds` - # @return [Array] - attr_accessor :remove_label_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @add_label_ids = args[:add_label_ids] unless args[:add_label_ids].nil? - @remove_label_ids = args[:remove_label_ids] unless args[:remove_label_ids].nil? - end - end - - # Profile for a Gmail user. - class Profile - include Google::Apis::Core::Hashable - - # The user's email address. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # The ID of the mailbox's current history record. - # Corresponds to the JSON property `historyId` - # @return [String] - attr_accessor :history_id - - # The total number of messages in the mailbox. - # Corresponds to the JSON property `messagesTotal` - # @return [Fixnum] - attr_accessor :messages_total - - # The total number of threads in the mailbox. - # Corresponds to the JSON property `threadsTotal` - # @return [Fixnum] - attr_accessor :threads_total - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @email_address = args[:email_address] unless args[:email_address].nil? - @history_id = args[:history_id] unless args[:history_id].nil? - @messages_total = args[:messages_total] unless args[:messages_total].nil? - @threads_total = args[:threads_total] unless args[:threads_total].nil? - end - end - - # A collection of messages representing a conversation. - class Thread - include Google::Apis::Core::Hashable - - # The ID of the last history record that modified this thread. - # Corresponds to the JSON property `historyId` - # @return [String] - attr_accessor :history_id - - # The unique ID of the thread. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The list of messages in the thread. - # Corresponds to the JSON property `messages` - # @return [Array] - attr_accessor :messages - - # A short part of the message text. - # Corresponds to the JSON property `snippet` - # @return [String] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @history_id = args[:history_id] unless args[:history_id].nil? - @id = args[:id] unless args[:id].nil? - @messages = args[:messages] unless args[:messages].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # Set up or update a new push notification watch on this user's mailbox. - class WatchRequest - include Google::Apis::Core::Hashable - - # Filtering behavior of labelIds list specified. - # Corresponds to the JSON property `labelFilterAction` - # @return [String] - attr_accessor :label_filter_action - - # List of label_ids to restrict notifications about. By default, if unspecified, - # all changes are pushed out. If specified then dictates which labels are - # required for a push notification to be generated. - # Corresponds to the JSON property `labelIds` - # @return [Array] - attr_accessor :label_ids - - # Fully qualified Cloud PubSub API topic name to publish events to. This topic - # name should already exist in Cloud PubSub and you should have already granted - # gmail "publish" privileges on it. For example, "projects/my-project-identifier/ - # topics/my-topic-name" (using the new Cloud PubSub "v1beta2" topic naming - # format). - # Note that the "my-project-identifier" portion must exactly match your - # developer console project id (the one executing this watch request). - # Corresponds to the JSON property `topicName` - # @return [String] - attr_accessor :topic_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @label_filter_action = args[:label_filter_action] unless args[:label_filter_action].nil? - @label_ids = args[:label_ids] unless args[:label_ids].nil? - @topic_name = args[:topic_name] unless args[:topic_name].nil? - end - end - - # Push notification watch response. - class WatchResponse - include Google::Apis::Core::Hashable - - # When Gmail will stop sending notifications for mailbox updates. Call watch - # again before this time to renew the subscription. - # Corresponds to the JSON property `expiration` - # @return [String] - attr_accessor :expiration - - # The ID of the mailbox's current history record. - # Corresponds to the JSON property `historyId` - # @return [String] - attr_accessor :history_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expiration = args[:expiration] unless args[:expiration].nil? - @history_id = args[:history_id] unless args[:history_id].nil? - end - end - end - end -end diff --git a/generated/google/apis/gmail_v1/representations.rb b/generated/google/apis/gmail_v1/representations.rb deleted file mode 100644 index 56ffdf658..000000000 --- a/generated/google/apis/gmail_v1/representations.rb +++ /dev/null @@ -1,338 +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 GmailV1 - - class Draft - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class History - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HistoryLabelAdded - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HistoryLabelRemoved - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HistoryMessageAdded - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HistoryMessageDeleted - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Label - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDraftsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListHistoryResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLabelsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListMessagesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListThreadsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Message - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MessagePart - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MessagePartBody - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MessagePartHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ModifyMessageRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ModifyThreadRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Profile - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Thread - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WatchRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WatchResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Draft - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :message, as: 'message', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - end - end - - # @private - class History - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :labels_added, as: 'labelsAdded', class: Google::Apis::GmailV1::HistoryLabelAdded, decorator: Google::Apis::GmailV1::HistoryLabelAdded::Representation - - collection :labels_removed, as: 'labelsRemoved', class: Google::Apis::GmailV1::HistoryLabelRemoved, decorator: Google::Apis::GmailV1::HistoryLabelRemoved::Representation - - collection :messages, as: 'messages', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - collection :messages_added, as: 'messagesAdded', class: Google::Apis::GmailV1::HistoryMessageAdded, decorator: Google::Apis::GmailV1::HistoryMessageAdded::Representation - - collection :messages_deleted, as: 'messagesDeleted', class: Google::Apis::GmailV1::HistoryMessageDeleted, decorator: Google::Apis::GmailV1::HistoryMessageDeleted::Representation - - end - end - - # @private - class HistoryLabelAdded - class Representation < Google::Apis::Core::JsonRepresentation - collection :label_ids, as: 'labelIds' - property :message, as: 'message', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - end - end - - # @private - class HistoryLabelRemoved - class Representation < Google::Apis::Core::JsonRepresentation - collection :label_ids, as: 'labelIds' - property :message, as: 'message', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - end - end - - # @private - class HistoryMessageAdded - class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - end - end - - # @private - class HistoryMessageDeleted - class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - end - end - - # @private - class Label - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :label_list_visibility, as: 'labelListVisibility' - property :message_list_visibility, as: 'messageListVisibility' - property :messages_total, as: 'messagesTotal' - property :messages_unread, as: 'messagesUnread' - property :name, as: 'name' - property :threads_total, as: 'threadsTotal' - property :threads_unread, as: 'threadsUnread' - property :type, as: 'type' - end - end - - # @private - class ListDraftsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :drafts, as: 'drafts', class: Google::Apis::GmailV1::Draft, decorator: Google::Apis::GmailV1::Draft::Representation - - property :next_page_token, as: 'nextPageToken' - property :result_size_estimate, as: 'resultSizeEstimate' - end - end - - # @private - class ListHistoryResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :history, as: 'history', class: Google::Apis::GmailV1::History, decorator: Google::Apis::GmailV1::History::Representation - - property :history_id, as: 'historyId' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListLabelsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :labels, as: 'labels', class: Google::Apis::GmailV1::Label, decorator: Google::Apis::GmailV1::Label::Representation - - end - end - - # @private - class ListMessagesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :messages, as: 'messages', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - property :next_page_token, as: 'nextPageToken' - property :result_size_estimate, as: 'resultSizeEstimate' - end - end - - # @private - class ListThreadsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - property :result_size_estimate, as: 'resultSizeEstimate' - collection :threads, as: 'threads', class: Google::Apis::GmailV1::Thread, decorator: Google::Apis::GmailV1::Thread::Representation - - end - end - - # @private - class Message - class Representation < Google::Apis::Core::JsonRepresentation - property :history_id, as: 'historyId' - property :id, as: 'id' - collection :label_ids, as: 'labelIds' - property :payload, as: 'payload', class: Google::Apis::GmailV1::MessagePart, decorator: Google::Apis::GmailV1::MessagePart::Representation - - property :raw, :base64 => true, as: 'raw' - property :size_estimate, as: 'sizeEstimate' - property :snippet, as: 'snippet' - property :thread_id, as: 'threadId' - end - end - - # @private - class MessagePart - class Representation < Google::Apis::Core::JsonRepresentation - property :body, as: 'body', class: Google::Apis::GmailV1::MessagePartBody, decorator: Google::Apis::GmailV1::MessagePartBody::Representation - - property :filename, as: 'filename' - collection :headers, as: 'headers', class: Google::Apis::GmailV1::MessagePartHeader, decorator: Google::Apis::GmailV1::MessagePartHeader::Representation - - property :mime_type, as: 'mimeType' - property :part_id, as: 'partId' - collection :parts, as: 'parts', class: Google::Apis::GmailV1::MessagePart, decorator: Google::Apis::GmailV1::MessagePart::Representation - - end - end - - # @private - class MessagePartBody - class Representation < Google::Apis::Core::JsonRepresentation - property :attachment_id, as: 'attachmentId' - property :data, :base64 => true, as: 'data' - property :size, as: 'size' - end - end - - # @private - class MessagePartHeader - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :value, as: 'value' - end - end - - # @private - class ModifyMessageRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :add_label_ids, as: 'addLabelIds' - collection :remove_label_ids, as: 'removeLabelIds' - end - end - - # @private - class ModifyThreadRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :add_label_ids, as: 'addLabelIds' - collection :remove_label_ids, as: 'removeLabelIds' - end - end - - # @private - class Profile - class Representation < Google::Apis::Core::JsonRepresentation - property :email_address, as: 'emailAddress' - property :history_id, as: 'historyId' - property :messages_total, as: 'messagesTotal' - property :threads_total, as: 'threadsTotal' - end - end - - # @private - class Thread - class Representation < Google::Apis::Core::JsonRepresentation - property :history_id, as: 'historyId' - property :id, as: 'id' - collection :messages, as: 'messages', class: Google::Apis::GmailV1::Message, decorator: Google::Apis::GmailV1::Message::Representation - - property :snippet, as: 'snippet' - end - end - - # @private - class WatchRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :label_filter_action, as: 'labelFilterAction' - collection :label_ids, as: 'labelIds' - property :topic_name, as: 'topicName' - end - end - - # @private - class WatchResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :expiration, as: 'expiration' - property :history_id, as: 'historyId' - end - end - end - end -end diff --git a/generated/google/apis/gmail_v1/service.rb b/generated/google/apis/gmail_v1/service.rb deleted file mode 100644 index c5505becf..000000000 --- a/generated/google/apis/gmail_v1/service.rb +++ /dev/null @@ -1,1502 +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 GmailV1 - # Gmail API - # - # The Gmail REST API. - # - # @example - # require 'google/apis/gmail_v1' - # - # Gmail = Google::Apis::GmailV1 # Alias the module - # service = Gmail::GmailService.new - # - # @see https://developers.google.com/gmail/api/ - class GmailService < 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/', 'gmail/v1/users/') - end - - # Gets the current user's Gmail profile. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate 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::GmailV1::Profile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Profile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_profile(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/profile' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::Profile::Representation - command.response_class = Google::Apis::GmailV1::Profile - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Stop receiving push notifications for the given user mailbox. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate 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 [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_user(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/stop' - command = make_simple_command(:post, path, options) - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Set up or update a push notification watch on the given user mailbox. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Google::Apis::GmailV1::WatchRequest] watch_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::GmailV1::WatchResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::WatchResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(user_id, watch_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GmailV1::WatchRequest::Representation - command.request_object = watch_request_object - command.response_representation = Google::Apis::GmailV1::WatchResponse::Representation - command.response_class = Google::Apis::GmailV1::WatchResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new draft with the DRAFT label. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Google::Apis::GmailV1::Draft] draft_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GmailV1::Draft] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Draft] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{userId}/drafts' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::GmailV1::Draft::Representation - command.request_object = draft_object - command.response_representation = Google::Apis::GmailV1::Draft::Representation - command.response_class = Google::Apis::GmailV1::Draft - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Immediately and permanently deletes the specified draft. Does not simply trash - # it. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the draft 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_user_draft(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/drafts/{id}' - command = make_simple_command(:delete, path, options) - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified draft. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the draft to retrieve. - # @param [String] format - # The format to return the draft in. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::Draft] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Draft] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_draft(user_id, id, format: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/drafts/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::Draft::Representation - command.response_class = Google::Apis::GmailV1::Draft - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['format'] = format unless format.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the drafts in the user's mailbox. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Fixnum] max_results - # Maximum number of drafts to return. - # @param [String] page_token - # Page token to retrieve a specific page of results in the list. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::ListDraftsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::ListDraftsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_drafts(user_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/drafts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::ListDraftsResponse::Representation - command.response_class = Google::Apis::GmailV1::ListDraftsResponse - command.params['userId'] = user_id unless user_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 - - # Sends the specified, existing draft to the recipients in the To, Cc, and Bcc - # headers. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Google::Apis::GmailV1::Draft] draft_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def send_user_draft(user_id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{userId}/drafts/send' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::GmailV1::Draft::Representation - command.request_object = draft_object - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Replaces a draft's content. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the draft to update. - # @param [Google::Apis::GmailV1::Draft] draft_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GmailV1::Draft] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Draft] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_draft(user_id, id, draft_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{userId}/drafts/{id}' - if upload_source.nil? - command = make_simple_command(:put, path, options) - else - command = make_upload_command(:put, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::GmailV1::Draft::Representation - command.request_object = draft_object - command.response_representation = Google::Apis::GmailV1::Draft::Representation - command.response_class = Google::Apis::GmailV1::Draft - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the history of all changes to the given mailbox. History results are - # returned in chronological order (increasing historyId). - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] label_id - # Only return messages with a label matching the ID. - # @param [Fixnum] max_results - # The maximum number of history records to return. - # @param [String] page_token - # Page token to retrieve a specific page of results in the list. - # @param [String] start_history_id - # Required. Returns history records after the specified startHistoryId. The - # supplied startHistoryId should be obtained from the historyId of a message, - # thread, or previous list response. History IDs increase chronologically but - # are not contiguous with random gaps in between valid IDs. Supplying an invalid - # or out of date startHistoryId typically returns an HTTP 404 error code. A - # historyId is typically valid for at least a week, but in some circumstances - # may be valid for only a few hours. If you receive an HTTP 404 error response, - # your application should perform a full sync. If you receive no nextPageToken - # in the response, there are no updates to retrieve and you can store the - # returned historyId for a future request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::GmailV1::ListHistoryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::ListHistoryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_histories(user_id, label_id: nil, max_results: nil, page_token: nil, start_history_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/history' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::ListHistoryResponse::Representation - command.response_class = Google::Apis::GmailV1::ListHistoryResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['labelId'] = label_id unless label_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startHistoryId'] = start_history_id unless start_history_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 new label. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Google::Apis::GmailV1::Label] label_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::GmailV1::Label] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Label] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_label(user_id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/labels' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GmailV1::Label::Representation - command.request_object = label_object - command.response_representation = Google::Apis::GmailV1::Label::Representation - command.response_class = Google::Apis::GmailV1::Label - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Immediately and permanently deletes the specified label and removes it from - # any messages and threads that it is applied to. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the label 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_user_label(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/labels/{id}' - command = make_simple_command(:delete, path, options) - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified label. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the label 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::GmailV1::Label] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Label] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_label(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/labels/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::Label::Representation - command.response_class = Google::Apis::GmailV1::Label - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all labels in the user's mailbox. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate 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::GmailV1::ListLabelsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::ListLabelsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_labels(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/labels' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::ListLabelsResponse::Representation - command.response_class = Google::Apis::GmailV1::ListLabelsResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the specified label. This method supports patch semantics. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the label to update. - # @param [Google::Apis::GmailV1::Label] label_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::GmailV1::Label] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Label] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/labels/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GmailV1::Label::Representation - command.request_object = label_object - command.response_representation = Google::Apis::GmailV1::Label::Representation - command.response_class = Google::Apis::GmailV1::Label - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the specified label. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the label to update. - # @param [Google::Apis::GmailV1::Label] label_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::GmailV1::Label] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Label] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_user_label(user_id, id, label_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/labels/{id}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GmailV1::Label::Representation - command.request_object = label_object - command.response_representation = Google::Apis::GmailV1::Label::Representation - command.response_class = Google::Apis::GmailV1::Label - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Immediately and permanently deletes the specified message. This operation - # cannot be undone. Prefer messages.trash instead. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the message 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_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/messages/{id}' - command = make_simple_command(:delete, path, options) - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified message. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the message to retrieve. - # @param [String] format - # The format to return the message in. - # @param [Array, String] metadata_headers - # When given and format is METADATA, only include headers specified. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_message(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/messages/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['format'] = format unless format.nil? - command.query['metadataHeaders'] = metadata_headers unless metadata_headers.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 - - # Imports a message into only this user's mailbox, with standard email delivery - # scanning and classification similar to receiving via SMTP. Does not send a - # message. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Google::Apis::GmailV1::Message] message_object - # @param [Boolean] deleted - # Mark the email as permanently deleted (not TRASH) and only visible in Google - # Apps Vault to a Vault administrator. Only used for Google Apps for Work - # accounts. - # @param [String] internal_date_source - # Source for Gmail's internal date of the message. - # @param [Boolean] never_mark_spam - # Ignore the Gmail spam classifier decision and never mark this email as SPAM in - # the mailbox. - # @param [Boolean] process_for_calendar - # Process calendar invites in the email and add any extracted meetings to the - # Google Calendar for this 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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, never_mark_spam: nil, process_for_calendar: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{userId}/messages/import' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::GmailV1::Message::Representation - command.request_object = message_object - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.query['deleted'] = deleted unless deleted.nil? - command.query['internalDateSource'] = internal_date_source unless internal_date_source.nil? - command.query['neverMarkSpam'] = never_mark_spam unless never_mark_spam.nil? - command.query['processForCalendar'] = process_for_calendar unless process_for_calendar.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 - - # Directly inserts a message into only this user's mailbox similar to IMAP - # APPEND, bypassing most scanning and classification. Does not send a message. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Google::Apis::GmailV1::Message] message_object - # @param [Boolean] deleted - # Mark the email as permanently deleted (not TRASH) and only visible in Google - # Apps Vault to a Vault administrator. Only used for Google Apps for Work - # accounts. - # @param [String] internal_date_source - # Source for Gmail's internal date of the message. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_user_message(user_id, message_object = nil, deleted: nil, internal_date_source: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{userId}/messages' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::GmailV1::Message::Representation - command.request_object = message_object - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.query['deleted'] = deleted unless deleted.nil? - command.query['internalDateSource'] = internal_date_source unless internal_date_source.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the messages in the user's mailbox. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Boolean] include_spam_trash - # Include messages from SPAM and TRASH in the results. - # @param [Array, String] label_ids - # Only return messages with labels that match all of the specified label IDs. - # @param [Fixnum] max_results - # Maximum number of messages to return. - # @param [String] page_token - # Page token to retrieve a specific page of results in the list. - # @param [String] q - # Only return messages matching the specified query. Supports the same query - # format as the Gmail search box. For example, "from:someuser@example.com - # rfc822msgid: is:unread". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::ListMessagesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::ListMessagesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_messages(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/messages' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::ListMessagesResponse::Representation - command.response_class = Google::Apis::GmailV1::ListMessagesResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil? - command.query['labelIds'] = label_ids unless label_ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['q'] = q unless q.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 - - # Modifies the labels on the specified message. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the message to modify. - # @param [Google::Apis::GmailV1::ModifyMessageRequest] modify_message_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::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def modify_message(user_id, id, modify_message_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/messages/{id}/modify' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GmailV1::ModifyMessageRequest::Representation - command.request_object = modify_message_request_object - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sends the specified message to the recipients in the To, Cc, and Bcc headers. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Google::Apis::GmailV1::Message] message_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def send_user_message(user_id, message_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{userId}/messages/send' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::GmailV1::Message::Representation - command.request_object = message_object - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Moves the specified message to the trash. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the message to Trash. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def trash_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/messages/{id}/trash' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes the specified message from the trash. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the message to remove from Trash. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::Message] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Message] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def untrash_user_message(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/messages/{id}/untrash' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GmailV1::Message::Representation - command.response_class = Google::Apis::GmailV1::Message - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified message attachment. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] message_id - # The ID of the message containing the attachment. - # @param [String] id - # The ID of the attachment. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::MessagePartBody] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::MessagePartBody] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_message_attachment(user_id, message_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/messages/{messageId}/attachments/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::MessagePartBody::Representation - command.response_class = Google::Apis::GmailV1::MessagePartBody - command.params['userId'] = user_id unless user_id.nil? - command.params['messageId'] = message_id unless message_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Immediately and permanently deletes the specified thread. This operation - # cannot be undone. Prefer threads.trash instead. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # ID of the Thread 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_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/threads/{id}' - command = make_simple_command(:delete, path, options) - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified thread. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the thread to retrieve. - # @param [String] format - # The format to return the messages in. - # @param [Array, String] metadata_headers - # When given and format is METADATA, only include headers specified. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::Thread] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Thread] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_thread(user_id, id, format: nil, metadata_headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/threads/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::Thread::Representation - command.response_class = Google::Apis::GmailV1::Thread - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['format'] = format unless format.nil? - command.query['metadataHeaders'] = metadata_headers unless metadata_headers.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the threads in the user's mailbox. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [Boolean] include_spam_trash - # Include threads from SPAM and TRASH in the results. - # @param [Array, String] label_ids - # Only return threads with labels that match all of the specified label IDs. - # @param [Fixnum] max_results - # Maximum number of threads to return. - # @param [String] page_token - # Page token to retrieve a specific page of results in the list. - # @param [String] q - # Only return threads matching the specified query. Supports the same query - # format as the Gmail search box. For example, "from:someuser@example.com - # rfc822msgid: is:unread". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::ListThreadsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::ListThreadsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_threads(user_id, include_spam_trash: nil, label_ids: nil, max_results: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/threads' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GmailV1::ListThreadsResponse::Representation - command.response_class = Google::Apis::GmailV1::ListThreadsResponse - command.params['userId'] = user_id unless user_id.nil? - command.query['includeSpamTrash'] = include_spam_trash unless include_spam_trash.nil? - command.query['labelIds'] = label_ids unless label_ids.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['q'] = q unless q.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 - - # Modifies the labels applied to the thread. This applies to all messages in the - # thread. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the thread to modify. - # @param [Google::Apis::GmailV1::ModifyThreadRequest] modify_thread_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::GmailV1::Thread] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Thread] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def modify_thread(user_id, id, modify_thread_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/threads/{id}/modify' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::GmailV1::ModifyThreadRequest::Representation - command.request_object = modify_thread_request_object - command.response_representation = Google::Apis::GmailV1::Thread::Representation - command.response_class = Google::Apis::GmailV1::Thread - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Moves the specified thread to the trash. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the thread to Trash. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::Thread] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Thread] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def trash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/threads/{id}/trash' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GmailV1::Thread::Representation - command.response_class = Google::Apis::GmailV1::Thread - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes the specified thread from the trash. - # @param [String] user_id - # The user's email address. The special value me can be used to indicate the - # authenticated user. - # @param [String] id - # The ID of the thread to remove from Trash. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::GmailV1::Thread] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GmailV1::Thread] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def untrash_user_thread(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{userId}/threads/{id}/untrash' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::GmailV1::Thread::Representation - command.response_class = Google::Apis::GmailV1::Thread - command.params['userId'] = user_id unless user_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['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 diff --git a/generated/google/apis/groupsmigration_v1.rb b/generated/google/apis/groupsmigration_v1.rb deleted file mode 100644 index f5864f109..000000000 --- a/generated/google/apis/groupsmigration_v1.rb +++ /dev/null @@ -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/groupsmigration_v1/service.rb' -require 'google/apis/groupsmigration_v1/classes.rb' -require 'google/apis/groupsmigration_v1/representations.rb' - -module Google - module Apis - # Groups Migration API - # - # Groups Migration Api. - # - # @see https://developers.google.com/google-apps/groups-migration/ - module GroupsmigrationV1 - VERSION = 'V1' - REVISION = '20140416' - - # Manage messages in groups on your domain - AUTH_APPS_GROUPS_MIGRATION = 'https://www.googleapis.com/auth/apps.groups.migration' - end - end -end diff --git a/generated/google/apis/groupsmigration_v1/classes.rb b/generated/google/apis/groupsmigration_v1/classes.rb deleted file mode 100644 index ec6c3833b..000000000 --- a/generated/google/apis/groupsmigration_v1/classes.rb +++ /dev/null @@ -1,51 +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 GroupsmigrationV1 - - # JSON response template for groups migration API. - class Groups - include Google::Apis::Core::Hashable - - # The kind of insert resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The status of the insert request. - # Corresponds to the JSON property `responseCode` - # @return [String] - attr_accessor :response_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @response_code = args[:response_code] unless args[:response_code].nil? - end - end - end - end -end diff --git a/generated/google/apis/groupsmigration_v1/representations.rb b/generated/google/apis/groupsmigration_v1/representations.rb deleted file mode 100644 index 35faf7deb..000000000 --- a/generated/google/apis/groupsmigration_v1/representations.rb +++ /dev/null @@ -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 '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 GroupsmigrationV1 - - class Groups - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Groups - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :response_code, as: 'responseCode' - end - end - end - end -end diff --git a/generated/google/apis/groupsmigration_v1/service.rb b/generated/google/apis/groupsmigration_v1/service.rb deleted file mode 100644 index bd31291bc..000000000 --- a/generated/google/apis/groupsmigration_v1/service.rb +++ /dev/null @@ -1,111 +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 GroupsmigrationV1 - # Groups Migration API - # - # Groups Migration Api. - # - # @example - # require 'google/apis/groupsmigration_v1' - # - # Groupsmigration = Google::Apis::GroupsmigrationV1 # Alias the module - # service = Groupsmigration::GroupsMigrationService.new - # - # @see https://developers.google.com/google-apps/groups-migration/ - class GroupsMigrationService < 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/', 'groups/v1/groups/') - end - - # Inserts a new mail into the archive of the Google group. - # @param [String] group_id - # The group ID - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GroupsmigrationV1::Groups] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GroupsmigrationV1::Groups] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_archive(group_id, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = '{groupId}/archive' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::GroupsmigrationV1::Groups::Representation - command.response_class = Google::Apis::GroupsmigrationV1::Groups - command.params['groupId'] = group_id unless group_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 diff --git a/generated/google/apis/groupssettings_v1.rb b/generated/google/apis/groupssettings_v1.rb deleted file mode 100644 index f9c196999..000000000 --- a/generated/google/apis/groupssettings_v1.rb +++ /dev/null @@ -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/groupssettings_v1/service.rb' -require 'google/apis/groupssettings_v1/classes.rb' -require 'google/apis/groupssettings_v1/representations.rb' - -module Google - module Apis - # Groups Settings API - # - # Lets you manage permission levels and related settings of a group. - # - # @see https://developers.google.com/google-apps/groups-settings/get_started - module GroupssettingsV1 - VERSION = 'V1' - REVISION = '20140428' - - # View and manage the settings of a Google Apps Group - AUTH_APPS_GROUPS_SETTINGS = 'https://www.googleapis.com/auth/apps.groups.settings' - end - end -end diff --git a/generated/google/apis/groupssettings_v1/classes.rb b/generated/google/apis/groupssettings_v1/classes.rb deleted file mode 100644 index be66d188b..000000000 --- a/generated/google/apis/groupssettings_v1/classes.rb +++ /dev/null @@ -1,221 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require '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 GroupssettingsV1 - - # JSON template for Group resource - class Groups - include Google::Apis::Core::Hashable - - # Are external members allowed to join the group. - # Corresponds to the JSON property `allowExternalMembers` - # @return [String] - attr_accessor :allow_external_members - - # Is google allowed to contact admins. - # Corresponds to the JSON property `allowGoogleCommunication` - # @return [String] - attr_accessor :allow_google_communication - - # If posting from web is allowed. - # Corresponds to the JSON property `allowWebPosting` - # @return [String] - attr_accessor :allow_web_posting - - # If the group is archive only - # Corresponds to the JSON property `archiveOnly` - # @return [String] - attr_accessor :archive_only - - # Default email to which reply to any message should go. - # Corresponds to the JSON property `customReplyTo` - # @return [String] - attr_accessor :custom_reply_to - - # Default message deny notification message - # Corresponds to the JSON property `defaultMessageDenyNotificationText` - # @return [String] - attr_accessor :default_message_deny_notification_text - - # Description of the group - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Email id of the group - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # If this groups should be included in global address list or not. - # Corresponds to the JSON property `includeInGlobalAddressList` - # @return [String] - attr_accessor :include_in_global_address_list - - # If the contents of the group are archived. - # Corresponds to the JSON property `isArchived` - # @return [String] - attr_accessor :is_archived - - # The type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Maximum message size allowed. - # Corresponds to the JSON property `maxMessageBytes` - # @return [Fixnum] - attr_accessor :max_message_bytes - - # Can members post using the group email address. - # Corresponds to the JSON property `membersCanPostAsTheGroup` - # @return [String] - attr_accessor :members_can_post_as_the_group - - # Default message display font. Possible values are: DEFAULT_FONT - # FIXED_WIDTH_FONT - # Corresponds to the JSON property `messageDisplayFont` - # @return [String] - attr_accessor :message_display_font - - # Moderation level for messages. Possible values are: MODERATE_ALL_MESSAGES - # MODERATE_NON_MEMBERS MODERATE_NEW_MEMBERS MODERATE_NONE - # Corresponds to the JSON property `messageModerationLevel` - # @return [String] - attr_accessor :message_moderation_level - - # Name of the Group - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Primary language for the group. - # Corresponds to the JSON property `primaryLanguage` - # @return [String] - attr_accessor :primary_language - - # Whome should the default reply to a message go to. Possible values are: - # REPLY_TO_CUSTOM REPLY_TO_SENDER REPLY_TO_LIST REPLY_TO_OWNER REPLY_TO_IGNORE - # REPLY_TO_MANAGERS - # Corresponds to the JSON property `replyTo` - # @return [String] - attr_accessor :reply_to - - # Should the member be notified if his message is denied by owner. - # Corresponds to the JSON property `sendMessageDenyNotification` - # @return [String] - attr_accessor :send_message_deny_notification - - # Is the group listed in groups directory - # Corresponds to the JSON property `showInGroupDirectory` - # @return [String] - attr_accessor :show_in_group_directory - - # Moderation level for messages detected as spam. Possible values are: ALLOW - # MODERATE SILENTLY_MODERATE REJECT - # Corresponds to the JSON property `spamModerationLevel` - # @return [String] - attr_accessor :spam_moderation_level - - # Permission to contact owner of the group via web UI. Possbile values are: - # ANYONE_CAN_CONTACT ALL_IN_DOMAIN_CAN_CONTACT ALL_MEMBERS_CAN_CONTACT - # ALL_MANAGERS_CAN_CONTACT - # Corresponds to the JSON property `whoCanContactOwner` - # @return [String] - attr_accessor :who_can_contact_owner - - # Permissions to invite members. Possbile values are: ALL_MEMBERS_CAN_INVITE - # ALL_MANAGERS_CAN_INVITE - # Corresponds to the JSON property `whoCanInvite` - # @return [String] - attr_accessor :who_can_invite - - # Permissions to join the group. Possible values are: ANYONE_CAN_JOIN - # ALL_IN_DOMAIN_CAN_JOIN INVITED_CAN_JOIN CAN_REQUEST_TO_JOIN - # Corresponds to the JSON property `whoCanJoin` - # @return [String] - attr_accessor :who_can_join - - # Permission to leave the group. Possible values are: ALL_MANAGERS_CAN_LEAVE - # ALL_MEMBERS_CAN_LEAVE - # Corresponds to the JSON property `whoCanLeaveGroup` - # @return [String] - attr_accessor :who_can_leave_group - - # Permissions to post messages to the group. Possible values are: NONE_CAN_POST - # ALL_MANAGERS_CAN_POST ALL_MEMBERS_CAN_POST ALL_IN_DOMAIN_CAN_POST - # ANYONE_CAN_POST - # Corresponds to the JSON property `whoCanPostMessage` - # @return [String] - attr_accessor :who_can_post_message - - # Permissions to view group. Possbile values are: ANYONE_CAN_VIEW - # ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW - # Corresponds to the JSON property `whoCanViewGroup` - # @return [String] - attr_accessor :who_can_view_group - - # Permissions to view membership. Possbile values are: ALL_IN_DOMAIN_CAN_VIEW - # ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW - # Corresponds to the JSON property `whoCanViewMembership` - # @return [String] - attr_accessor :who_can_view_membership - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allow_external_members = args[:allow_external_members] unless args[:allow_external_members].nil? - @allow_google_communication = args[:allow_google_communication] unless args[:allow_google_communication].nil? - @allow_web_posting = args[:allow_web_posting] unless args[:allow_web_posting].nil? - @archive_only = args[:archive_only] unless args[:archive_only].nil? - @custom_reply_to = args[:custom_reply_to] unless args[:custom_reply_to].nil? - @default_message_deny_notification_text = args[:default_message_deny_notification_text] unless args[:default_message_deny_notification_text].nil? - @description = args[:description] unless args[:description].nil? - @email = args[:email] unless args[:email].nil? - @include_in_global_address_list = args[:include_in_global_address_list] unless args[:include_in_global_address_list].nil? - @is_archived = args[:is_archived] unless args[:is_archived].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_message_bytes = args[:max_message_bytes] unless args[:max_message_bytes].nil? - @members_can_post_as_the_group = args[:members_can_post_as_the_group] unless args[:members_can_post_as_the_group].nil? - @message_display_font = args[:message_display_font] unless args[:message_display_font].nil? - @message_moderation_level = args[:message_moderation_level] unless args[:message_moderation_level].nil? - @name = args[:name] unless args[:name].nil? - @primary_language = args[:primary_language] unless args[:primary_language].nil? - @reply_to = args[:reply_to] unless args[:reply_to].nil? - @send_message_deny_notification = args[:send_message_deny_notification] unless args[:send_message_deny_notification].nil? - @show_in_group_directory = args[:show_in_group_directory] unless args[:show_in_group_directory].nil? - @spam_moderation_level = args[:spam_moderation_level] unless args[:spam_moderation_level].nil? - @who_can_contact_owner = args[:who_can_contact_owner] unless args[:who_can_contact_owner].nil? - @who_can_invite = args[:who_can_invite] unless args[:who_can_invite].nil? - @who_can_join = args[:who_can_join] unless args[:who_can_join].nil? - @who_can_leave_group = args[:who_can_leave_group] unless args[:who_can_leave_group].nil? - @who_can_post_message = args[:who_can_post_message] unless args[:who_can_post_message].nil? - @who_can_view_group = args[:who_can_view_group] unless args[:who_can_view_group].nil? - @who_can_view_membership = args[:who_can_view_membership] unless args[:who_can_view_membership].nil? - end - end - end - end -end diff --git a/generated/google/apis/groupssettings_v1/representations.rb b/generated/google/apis/groupssettings_v1/representations.rb deleted file mode 100644 index f434949db..000000000 --- a/generated/google/apis/groupssettings_v1/representations.rb +++ /dev/null @@ -1,64 +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 GroupssettingsV1 - - class Groups - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Groups - class Representation < Google::Apis::Core::JsonRepresentation - property :allow_external_members, as: 'allowExternalMembers' - property :allow_google_communication, as: 'allowGoogleCommunication' - property :allow_web_posting, as: 'allowWebPosting' - property :archive_only, as: 'archiveOnly' - property :custom_reply_to, as: 'customReplyTo' - property :default_message_deny_notification_text, as: 'defaultMessageDenyNotificationText' - property :description, as: 'description' - property :email, as: 'email' - property :include_in_global_address_list, as: 'includeInGlobalAddressList' - property :is_archived, as: 'isArchived' - property :kind, as: 'kind' - property :max_message_bytes, as: 'maxMessageBytes' - property :members_can_post_as_the_group, as: 'membersCanPostAsTheGroup' - property :message_display_font, as: 'messageDisplayFont' - property :message_moderation_level, as: 'messageModerationLevel' - property :name, as: 'name' - property :primary_language, as: 'primaryLanguage' - property :reply_to, as: 'replyTo' - property :send_message_deny_notification, as: 'sendMessageDenyNotification' - property :show_in_group_directory, as: 'showInGroupDirectory' - property :spam_moderation_level, as: 'spamModerationLevel' - property :who_can_contact_owner, as: 'whoCanContactOwner' - property :who_can_invite, as: 'whoCanInvite' - property :who_can_join, as: 'whoCanJoin' - property :who_can_leave_group, as: 'whoCanLeaveGroup' - property :who_can_post_message, as: 'whoCanPostMessage' - property :who_can_view_group, as: 'whoCanViewGroup' - property :who_can_view_membership, as: 'whoCanViewMembership' - end - end - end - end -end diff --git a/generated/google/apis/groupssettings_v1/service.rb b/generated/google/apis/groupssettings_v1/service.rb deleted file mode 100644 index 13e0f2056..000000000 --- a/generated/google/apis/groupssettings_v1/service.rb +++ /dev/null @@ -1,179 +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 GroupssettingsV1 - # Groups Settings API - # - # Lets you manage permission levels and related settings of a group. - # - # @example - # require 'google/apis/groupssettings_v1' - # - # Groupssettings = Google::Apis::GroupssettingsV1 # Alias the module - # service = Groupssettings::GroupssettingsService.new - # - # @see https://developers.google.com/google-apps/groups-settings/get_started - class GroupssettingsService < 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/', 'groups/v1/groups/') - end - - # Gets one resource by id. - # @param [String] group_unique_id - # The resource 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::GroupssettingsV1::Groups] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GroupssettingsV1::Groups] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_group(group_unique_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{groupUniqueId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::GroupssettingsV1::Groups::Representation - command.response_class = Google::Apis::GroupssettingsV1::Groups - command.params['groupUniqueId'] = group_unique_id unless group_unique_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 resource. This method supports patch semantics. - # @param [String] group_unique_id - # The resource ID - # @param [Google::Apis::GroupssettingsV1::Groups] groups_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::GroupssettingsV1::Groups] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GroupssettingsV1::Groups] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group(group_unique_id, groups_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{groupUniqueId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::GroupssettingsV1::Groups::Representation - command.request_object = groups_object - command.response_representation = Google::Apis::GroupssettingsV1::Groups::Representation - command.response_class = Google::Apis::GroupssettingsV1::Groups - command.params['groupUniqueId'] = group_unique_id unless group_unique_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 resource. - # @param [String] group_unique_id - # The resource ID - # @param [Google::Apis::GroupssettingsV1::Groups] groups_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::GroupssettingsV1::Groups] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GroupssettingsV1::Groups] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group(group_unique_id, groups_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{groupUniqueId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::GroupssettingsV1::Groups::Representation - command.request_object = groups_object - command.response_representation = Google::Apis::GroupssettingsV1::Groups::Representation - command.response_class = Google::Apis::GroupssettingsV1::Groups - command.params['groupUniqueId'] = group_unique_id unless group_unique_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 diff --git a/generated/google/apis/identitytoolkit_v3.rb b/generated/google/apis/identitytoolkit_v3.rb deleted file mode 100644 index e992678b6..000000000 --- a/generated/google/apis/identitytoolkit_v3.rb +++ /dev/null @@ -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/identitytoolkit_v3/service.rb' -require 'google/apis/identitytoolkit_v3/classes.rb' -require 'google/apis/identitytoolkit_v3/representations.rb' - -module Google - module Apis - # Google Identity Toolkit API - # - # Help the third party sites to implement federated login. - # - # @see https://developers.google.com/identity-toolkit/v3/ - module IdentitytoolkitV3 - VERSION = 'V3' - REVISION = '20150513' - end - end -end diff --git a/generated/google/apis/identitytoolkit_v3/classes.rb b/generated/google/apis/identitytoolkit_v3/classes.rb deleted file mode 100644 index f9c1e0860..000000000 --- a/generated/google/apis/identitytoolkit_v3/classes.rb +++ /dev/null @@ -1,1229 +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 IdentitytoolkitV3 - - # Response of creating the IDP authentication URL. - class CreateAuthUriResponse - include Google::Apis::Core::Hashable - - # The URI used by the IDP to authenticate the user. - # Corresponds to the JSON property `authUri` - # @return [String] - attr_accessor :auth_uri - - # True if captcha is required. - # Corresponds to the JSON property `captchaRequired` - # @return [Boolean] - attr_accessor :captcha_required - alias_method :captcha_required?, :captcha_required - - # True if the authUri is for user's existing provider. - # Corresponds to the JSON property `forExistingProvider` - # @return [Boolean] - attr_accessor :for_existing_provider - alias_method :for_existing_provider?, :for_existing_provider - - # The fixed string identitytoolkit#CreateAuthUriResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The provider ID of the auth URI. - # Corresponds to the JSON property `providerId` - # @return [String] - attr_accessor :provider_id - - # Whether the user is registered if the identifier is an email. - # Corresponds to the JSON property `registered` - # @return [Boolean] - attr_accessor :registered - alias_method :registered?, :registered - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auth_uri = args[:auth_uri] unless args[:auth_uri].nil? - @captcha_required = args[:captcha_required] unless args[:captcha_required].nil? - @for_existing_provider = args[:for_existing_provider] unless args[:for_existing_provider].nil? - @kind = args[:kind] unless args[:kind].nil? - @provider_id = args[:provider_id] unless args[:provider_id].nil? - @registered = args[:registered] unless args[:registered].nil? - end - end - - # Respone of deleting account. - class DeleteAccountResponse - include Google::Apis::Core::Hashable - - # The fixed string "identitytoolkit#DeleteAccountResponse". - # 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 - - # Respone of downloading accounts in batch. - class DownloadAccountResponse - include Google::Apis::Core::Hashable - - # The fixed string "identitytoolkit#DownloadAccountResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The next page token. To be used in a subsequent request to return the next - # page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The user accounts data. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - 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? - @users = args[:users] unless args[:users].nil? - end - end - - # Response of getting account information. - class GetAccountInfoResponse - include Google::Apis::Core::Hashable - - # The fixed string "identitytoolkit#GetAccountInfoResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The info of the users. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @users = args[:users] unless args[:users].nil? - end - end - - # Response of getting a code for user confirmation (reset password, change email - # etc.). - class GetOobConfirmationCodeResponse - include Google::Apis::Core::Hashable - - # The fixed string "identitytoolkit#GetOobConfirmationCodeResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The code to be send to the user. - # Corresponds to the JSON property `oobCode` - # @return [String] - attr_accessor :oob_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @oob_code = args[:oob_code] unless args[:oob_code].nil? - end - end - - # Response of getting recaptcha param. - class GetRecaptchaParamResponse - include Google::Apis::Core::Hashable - - # The fixed string "identitytoolkit#GetRecaptchaParamResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Site key registered at recaptcha. - # Corresponds to the JSON property `recaptchaSiteKey` - # @return [String] - attr_accessor :recaptcha_site_key - - # The stoken field for the recaptcha widget, used to request captcha challenge. - # Corresponds to the JSON property `recaptchaStoken` - # @return [String] - attr_accessor :recaptcha_stoken - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @recaptcha_site_key = args[:recaptcha_site_key] unless args[:recaptcha_site_key].nil? - @recaptcha_stoken = args[:recaptcha_stoken] unless args[:recaptcha_stoken].nil? - end - end - - # Request to get the IDP authentication URL. - class CreateAuthUriRequest - include Google::Apis::Core::Hashable - - # The app ID of the mobile app, base64(CERT_SHA1):PACKAGE_NAME for Android, - # BUNDLE_ID for iOS. - # Corresponds to the JSON property `appId` - # @return [String] - attr_accessor :app_id - - # The relying party OAuth client ID. - # Corresponds to the JSON property `clientId` - # @return [String] - attr_accessor :client_id - - # The opaque value used by the client to maintain context info between the - # authentication request and the IDP callback. - # Corresponds to the JSON property `context` - # @return [String] - attr_accessor :context - - # The URI to which the IDP redirects the user after the federated login flow. - # Corresponds to the JSON property `continueUri` - # @return [String] - attr_accessor :continue_uri - - # The email or federated ID of the user. - # Corresponds to the JSON property `identifier` - # @return [String] - attr_accessor :identifier - - # The developer's consumer key for OpenId OAuth Extension - # Corresponds to the JSON property `oauthConsumerKey` - # @return [String] - attr_accessor :oauth_consumer_key - - # Additional oauth scopes, beyond the basid user profile, that the user would be - # prompted to grant - # Corresponds to the JSON property `oauthScope` - # @return [String] - attr_accessor :oauth_scope - - # Optional realm for OpenID protocol. The sub string "scheme://domain:port" of - # the param "continueUri" is used if this is not set. - # Corresponds to the JSON property `openidRealm` - # @return [String] - attr_accessor :openid_realm - - # The native app package for OTA installation. - # Corresponds to the JSON property `otaApp` - # @return [String] - attr_accessor :ota_app - - # The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, - # aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier. - # Corresponds to the JSON property `providerId` - # @return [String] - attr_accessor :provider_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @app_id = args[:app_id] unless args[:app_id].nil? - @client_id = args[:client_id] unless args[:client_id].nil? - @context = args[:context] unless args[:context].nil? - @continue_uri = args[:continue_uri] unless args[:continue_uri].nil? - @identifier = args[:identifier] unless args[:identifier].nil? - @oauth_consumer_key = args[:oauth_consumer_key] unless args[:oauth_consumer_key].nil? - @oauth_scope = args[:oauth_scope] unless args[:oauth_scope].nil? - @openid_realm = args[:openid_realm] unless args[:openid_realm].nil? - @ota_app = args[:ota_app] unless args[:ota_app].nil? - @provider_id = args[:provider_id] unless args[:provider_id].nil? - end - end - - # Request to delete account. - class DeleteAccountRequest - include Google::Apis::Core::Hashable - - # The local ID of the user. - # Corresponds to the JSON property `localId` - # @return [String] - attr_accessor :local_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @local_id = args[:local_id] unless args[:local_id].nil? - end - end - - # Request to download user account in batch. - class DownloadAccountRequest - include Google::Apis::Core::Hashable - - # The max number of results to return in the response. - # Corresponds to the JSON property `maxResults` - # @return [Fixnum] - attr_accessor :max_results - - # The token for the next page. This should be taken from the previous response. - # 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) - @max_results = args[:max_results] unless args[:max_results].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Request to get the account information. - class GetAccountInfoRequest - include Google::Apis::Core::Hashable - - # The list of emails of the users to inquiry. - # Corresponds to the JSON property `email` - # @return [Array] - attr_accessor :email - - # The GITKit token of the authenticated user. - # Corresponds to the JSON property `idToken` - # @return [String] - attr_accessor :id_token - - # The list of local ID's of the users to inquiry. - # Corresponds to the JSON property `localId` - # @return [Array] - attr_accessor :local_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @email = args[:email] unless args[:email].nil? - @id_token = args[:id_token] unless args[:id_token].nil? - @local_id = args[:local_id] unless args[:local_id].nil? - end - end - - # Request to reset the password. - class ResetPasswordRequest - include Google::Apis::Core::Hashable - - # The email address of the user. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The new password inputted by the user. - # Corresponds to the JSON property `newPassword` - # @return [String] - attr_accessor :new_password - - # The old password inputted by the user. - # Corresponds to the JSON property `oldPassword` - # @return [String] - attr_accessor :old_password - - # The confirmation code. - # Corresponds to the JSON property `oobCode` - # @return [String] - attr_accessor :oob_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @email = args[:email] unless args[:email].nil? - @new_password = args[:new_password] unless args[:new_password].nil? - @old_password = args[:old_password] unless args[:old_password].nil? - @oob_code = args[:oob_code] unless args[:oob_code].nil? - end - end - - # Request to set the account information. - class SetAccountInfoRequest - include Google::Apis::Core::Hashable - - # The captcha challenge. - # Corresponds to the JSON property `captchaChallenge` - # @return [String] - attr_accessor :captcha_challenge - - # Response to the captcha. - # Corresponds to the JSON property `captchaResponse` - # @return [String] - attr_accessor :captcha_response - - # Whether to disable the user. - # Corresponds to the JSON property `disableUser` - # @return [Boolean] - attr_accessor :disable_user - alias_method :disable_user?, :disable_user - - # The name of the user. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The email of the user. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # Mark the email as verified or not. - # Corresponds to the JSON property `emailVerified` - # @return [Boolean] - attr_accessor :email_verified - alias_method :email_verified?, :email_verified - - # The GITKit token of the authenticated user. - # Corresponds to the JSON property `idToken` - # @return [String] - attr_accessor :id_token - - # The local ID of the user. - # Corresponds to the JSON property `localId` - # @return [String] - attr_accessor :local_id - - # The out-of-band code of the change email request. - # Corresponds to the JSON property `oobCode` - # @return [String] - attr_accessor :oob_code - - # The new password of the user. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # The associated IDPs of the user. - # Corresponds to the JSON property `provider` - # @return [Array] - attr_accessor :provider - - # Mark the user to upgrade to federated login. - # Corresponds to the JSON property `upgradeToFederatedLogin` - # @return [Boolean] - attr_accessor :upgrade_to_federated_login - alias_method :upgrade_to_federated_login?, :upgrade_to_federated_login - - # Timestamp in seconds for valid login token. - # Corresponds to the JSON property `validSince` - # @return [String] - attr_accessor :valid_since - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @captcha_challenge = args[:captcha_challenge] unless args[:captcha_challenge].nil? - @captcha_response = args[:captcha_response] unless args[:captcha_response].nil? - @disable_user = args[:disable_user] unless args[:disable_user].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @email_verified = args[:email_verified] unless args[:email_verified].nil? - @id_token = args[:id_token] unless args[:id_token].nil? - @local_id = args[:local_id] unless args[:local_id].nil? - @oob_code = args[:oob_code] unless args[:oob_code].nil? - @password = args[:password] unless args[:password].nil? - @provider = args[:provider] unless args[:provider].nil? - @upgrade_to_federated_login = args[:upgrade_to_federated_login] unless args[:upgrade_to_federated_login].nil? - @valid_since = args[:valid_since] unless args[:valid_since].nil? - end - end - - # Request to upload user account in batch. - class UploadAccountRequest - include Google::Apis::Core::Hashable - - # The password hash algorithm. - # Corresponds to the JSON property `hashAlgorithm` - # @return [String] - attr_accessor :hash_algorithm - - # Memory cost for hash calculation. Used by scrypt similar algorithms. - # Corresponds to the JSON property `memoryCost` - # @return [Fixnum] - attr_accessor :memory_cost - - # Rounds for hash calculation. Used by scrypt and similar algorithms. - # Corresponds to the JSON property `rounds` - # @return [Fixnum] - attr_accessor :rounds - - # The salt separator. - # Corresponds to the JSON property `saltSeparator` - # @return [String] - attr_accessor :salt_separator - - # The key for to hash the password. - # Corresponds to the JSON property `signerKey` - # @return [String] - attr_accessor :signer_key - - # The account info to be stored. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hash_algorithm = args[:hash_algorithm] unless args[:hash_algorithm].nil? - @memory_cost = args[:memory_cost] unless args[:memory_cost].nil? - @rounds = args[:rounds] unless args[:rounds].nil? - @salt_separator = args[:salt_separator] unless args[:salt_separator].nil? - @signer_key = args[:signer_key] unless args[:signer_key].nil? - @users = args[:users] unless args[:users].nil? - end - end - - # Request to verify the IDP assertion. - class VerifyAssertionRequest - include Google::Apis::Core::Hashable - - # The GITKit token for the non-trusted IDP pending to be confirmed by the user. - # Corresponds to the JSON property `pendingIdToken` - # @return [String] - attr_accessor :pending_id_token - - # The post body if the request is a HTTP POST. - # Corresponds to the JSON property `postBody` - # @return [String] - attr_accessor :post_body - - # The URI to which the IDP redirects the user back. It may contain federated - # login result params added by the IDP. - # Corresponds to the JSON property `requestUri` - # @return [String] - attr_accessor :request_uri - - # Whether to return refresh tokens. - # Corresponds to the JSON property `returnRefreshToken` - # @return [Boolean] - attr_accessor :return_refresh_token - alias_method :return_refresh_token?, :return_refresh_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pending_id_token = args[:pending_id_token] unless args[:pending_id_token].nil? - @post_body = args[:post_body] unless args[:post_body].nil? - @request_uri = args[:request_uri] unless args[:request_uri].nil? - @return_refresh_token = args[:return_refresh_token] unless args[:return_refresh_token].nil? - end - end - - # Request to verify the password. - class VerifyPasswordRequest - include Google::Apis::Core::Hashable - - # The captcha challenge. - # Corresponds to the JSON property `captchaChallenge` - # @return [String] - attr_accessor :captcha_challenge - - # Response to the captcha. - # Corresponds to the JSON property `captchaResponse` - # @return [String] - attr_accessor :captcha_response - - # The email of the user. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The password inputed by the user. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # The GITKit token for the non-trusted IDP, which is to be confirmed by the user. - # Corresponds to the JSON property `pendingIdToken` - # @return [String] - attr_accessor :pending_id_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @captcha_challenge = args[:captcha_challenge] unless args[:captcha_challenge].nil? - @captcha_response = args[:captcha_response] unless args[:captcha_response].nil? - @email = args[:email] unless args[:email].nil? - @password = args[:password] unless args[:password].nil? - @pending_id_token = args[:pending_id_token] unless args[:pending_id_token].nil? - end - end - - # Request of getting a code for user confirmation (reset password, change email - # etc.) - class Relyingparty - include Google::Apis::Core::Hashable - - # The recaptcha response from the user. - # Corresponds to the JSON property `captchaResp` - # @return [String] - attr_accessor :captcha_resp - - # The recaptcha challenge presented to the user. - # Corresponds to the JSON property `challenge` - # @return [String] - attr_accessor :challenge - - # The email of the user. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The user's Gitkit login token for email change. - # Corresponds to the JSON property `idToken` - # @return [String] - attr_accessor :id_token - - # The fixed string "identitytoolkit#relyingparty". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The new email if the code is for email change. - # Corresponds to the JSON property `newEmail` - # @return [String] - attr_accessor :new_email - - # The request type. - # Corresponds to the JSON property `requestType` - # @return [String] - attr_accessor :request_type - - # The IP address of the user. - # Corresponds to the JSON property `userIp` - # @return [String] - attr_accessor :user_ip - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @captcha_resp = args[:captcha_resp] unless args[:captcha_resp].nil? - @challenge = args[:challenge] unless args[:challenge].nil? - @email = args[:email] unless args[:email].nil? - @id_token = args[:id_token] unless args[:id_token].nil? - @kind = args[:kind] unless args[:kind].nil? - @new_email = args[:new_email] unless args[:new_email].nil? - @request_type = args[:request_type] unless args[:request_type].nil? - @user_ip = args[:user_ip] unless args[:user_ip].nil? - end - end - - # Response of resetting the password. - class ResetPasswordResponse - include Google::Apis::Core::Hashable - - # The user's email. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The fixed string "identitytoolkit#ResetPasswordResponse". - # 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) - @email = args[:email] unless args[:email].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Respone of setting the account information. - class SetAccountInfoResponse - include Google::Apis::Core::Hashable - - # The name of the user. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The email of the user. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The Gitkit id token to login the newly sign up user. - # Corresponds to the JSON property `idToken` - # @return [String] - attr_accessor :id_token - - # The fixed string "identitytoolkit#SetAccountInfoResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The user's profiles at the associated IdPs. - # Corresponds to the JSON property `providerUserInfo` - # @return [Array] - attr_accessor :provider_user_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @id_token = args[:id_token] unless args[:id_token].nil? - @kind = args[:kind] unless args[:kind].nil? - @provider_user_info = args[:provider_user_info] unless args[:provider_user_info].nil? - end - - # - class ProviderUserInfo - include Google::Apis::Core::Hashable - - # The user's display name at the IDP. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The user's photo url at the IDP. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - # The IdP ID. For whitelisted IdPs it's a short domain name, e.g., google.com, - # aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier. - # Corresponds to the JSON property `providerId` - # @return [String] - attr_accessor :provider_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @photo_url = args[:photo_url] unless args[:photo_url].nil? - @provider_id = args[:provider_id] unless args[:provider_id].nil? - end - end - end - - # Respone of uploading accounts in batch. - class UploadAccountResponse - include Google::Apis::Core::Hashable - - # The error encountered while processing the account info. - # Corresponds to the JSON property `error` - # @return [Array] - attr_accessor :error - - # The fixed string "identitytoolkit#UploadAccountResponse". - # 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) - @error = args[:error] unless args[:error].nil? - @kind = args[:kind] unless args[:kind].nil? - end - - # - class Error - include Google::Apis::Core::Hashable - - # The index of the malformed account, starting from 0. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # Detailed error message for the account info. - # 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) - @index = args[:index] unless args[:index].nil? - @message = args[:message] unless args[:message].nil? - end - end - end - - # Template for an individual account info. - class UserInfo - include Google::Apis::Core::Hashable - - # Whether the user is disabled. - # Corresponds to the JSON property `disabled` - # @return [Boolean] - attr_accessor :disabled - alias_method :disabled?, :disabled - - # The name of the user. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The email of the user. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # Whether the email has been verified. - # Corresponds to the JSON property `emailVerified` - # @return [Boolean] - attr_accessor :email_verified - alias_method :email_verified?, :email_verified - - # The local ID of the user. - # Corresponds to the JSON property `localId` - # @return [String] - attr_accessor :local_id - - # The user's hashed password. - # Corresponds to the JSON property `passwordHash` - # @return [String] - attr_accessor :password_hash - - # The timestamp when the password was last updated. - # Corresponds to the JSON property `passwordUpdatedAt` - # @return [Float] - attr_accessor :password_updated_at - - # The URL of the user profile photo. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - # The IDP of the user. - # Corresponds to the JSON property `providerUserInfo` - # @return [Array] - attr_accessor :provider_user_info - - # The user's password salt. - # Corresponds to the JSON property `salt` - # @return [String] - attr_accessor :salt - - # Timestamp in seconds for valid login token. - # Corresponds to the JSON property `validSince` - # @return [String] - attr_accessor :valid_since - - # Version of the user's password. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disabled = args[:disabled] unless args[:disabled].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @email_verified = args[:email_verified] unless args[:email_verified].nil? - @local_id = args[:local_id] unless args[:local_id].nil? - @password_hash = args[:password_hash] unless args[:password_hash].nil? - @password_updated_at = args[:password_updated_at] unless args[:password_updated_at].nil? - @photo_url = args[:photo_url] unless args[:photo_url].nil? - @provider_user_info = args[:provider_user_info] unless args[:provider_user_info].nil? - @salt = args[:salt] unless args[:salt].nil? - @valid_since = args[:valid_since] unless args[:valid_since].nil? - @version = args[:version] unless args[:version].nil? - end - - # - class ProviderUserInfo - include Google::Apis::Core::Hashable - - # The user's display name at the IDP. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # User's identifier at IDP. - # Corresponds to the JSON property `federatedId` - # @return [String] - attr_accessor :federated_id - - # The user's photo url at the IDP. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - # The IdP ID. For white listed IdPs it's a short domain name, e.g., google.com, - # aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier. - # Corresponds to the JSON property `providerId` - # @return [String] - attr_accessor :provider_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @federated_id = args[:federated_id] unless args[:federated_id].nil? - @photo_url = args[:photo_url] unless args[:photo_url].nil? - @provider_id = args[:provider_id] unless args[:provider_id].nil? - end - end - end - - # Response of verifying the IDP assertion. - class VerifyAssertionResponse - include Google::Apis::Core::Hashable - - # The action code. - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - # URL for OTA app installation. - # Corresponds to the JSON property `appInstallationUrl` - # @return [String] - attr_accessor :app_installation_url - - # The custom scheme used by mobile app. - # Corresponds to the JSON property `appScheme` - # @return [String] - attr_accessor :app_scheme - - # The opaque value used by the client to maintain context info between the - # authentication request and the IDP callback. - # Corresponds to the JSON property `context` - # @return [String] - attr_accessor :context - - # The birth date of the IdP account. - # Corresponds to the JSON property `dateOfBirth` - # @return [String] - attr_accessor :date_of_birth - - # The display name of the user. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The email returned by the IdP. NOTE: The federated login user may not own the - # email. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # It's true if the email is recycled. - # Corresponds to the JSON property `emailRecycled` - # @return [Boolean] - attr_accessor :email_recycled - alias_method :email_recycled?, :email_recycled - - # The value is true if the IDP is also the email provider. It means the user - # owns the email. - # Corresponds to the JSON property `emailVerified` - # @return [Boolean] - attr_accessor :email_verified - alias_method :email_verified?, :email_verified - - # The unique ID identifies the IdP account. - # Corresponds to the JSON property `federatedId` - # @return [String] - attr_accessor :federated_id - - # The first name of the user. - # Corresponds to the JSON property `firstName` - # @return [String] - attr_accessor :first_name - - # The full name of the user. - # Corresponds to the JSON property `fullName` - # @return [String] - attr_accessor :full_name - - # The ID token. - # Corresponds to the JSON property `idToken` - # @return [String] - attr_accessor :id_token - - # It's the identifier param in the createAuthUri request if the identifier is an - # email. It can be used to check whether the user input email is different from - # the asserted email. - # Corresponds to the JSON property `inputEmail` - # @return [String] - attr_accessor :input_email - - # The fixed string "identitytoolkit#VerifyAssertionResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The language preference of the user. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # The last name of the user. - # Corresponds to the JSON property `lastName` - # @return [String] - attr_accessor :last_name - - # The RP local ID if it's already been mapped to the IdP account identified by - # the federated ID. - # Corresponds to the JSON property `localId` - # @return [String] - attr_accessor :local_id - - # Whether the assertion is from a non-trusted IDP and need account linking - # confirmation. - # Corresponds to the JSON property `needConfirmation` - # @return [Boolean] - attr_accessor :need_confirmation - alias_method :need_confirmation?, :need_confirmation - - # The nick name of the user. - # Corresponds to the JSON property `nickName` - # @return [String] - attr_accessor :nick_name - - # The OAuth2 access token. - # Corresponds to the JSON property `oauthAccessToken` - # @return [String] - attr_accessor :oauth_access_token - - # The OAuth2 authorization code. - # Corresponds to the JSON property `oauthAuthorizationCode` - # @return [String] - attr_accessor :oauth_authorization_code - - # The lifetime in seconds of the OAuth2 access token. - # Corresponds to the JSON property `oauthExpireIn` - # @return [Fixnum] - attr_accessor :oauth_expire_in - - # The user approved request token for the OpenID OAuth extension. - # Corresponds to the JSON property `oauthRequestToken` - # @return [String] - attr_accessor :oauth_request_token - - # The scope for the OpenID OAuth extension. - # Corresponds to the JSON property `oauthScope` - # @return [String] - attr_accessor :oauth_scope - - # The original email stored in the mapping storage. It's returned when the - # federated ID is associated to a different email. - # Corresponds to the JSON property `originalEmail` - # @return [String] - attr_accessor :original_email - - # The URI of the public accessible profiel picture. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - # The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, - # aol.com, live.net and yahoo.com. If the "providerId" param is set to OpenID OP - # identifer other than the whilte listed IdPs the OP identifier is returned. If - # the "identifier" param is federated ID in the createAuthUri request. The - # domain part of the federated ID is returned. - # Corresponds to the JSON property `providerId` - # @return [String] - attr_accessor :provider_id - - # The timezone of the user. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - # When action is 'map', contains the idps which can be used for confirmation. - # Corresponds to the JSON property `verifiedProvider` - # @return [Array] - attr_accessor :verified_provider - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @action = args[:action] unless args[:action].nil? - @app_installation_url = args[:app_installation_url] unless args[:app_installation_url].nil? - @app_scheme = args[:app_scheme] unless args[:app_scheme].nil? - @context = args[:context] unless args[:context].nil? - @date_of_birth = args[:date_of_birth] unless args[:date_of_birth].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @email_recycled = args[:email_recycled] unless args[:email_recycled].nil? - @email_verified = args[:email_verified] unless args[:email_verified].nil? - @federated_id = args[:federated_id] unless args[:federated_id].nil? - @first_name = args[:first_name] unless args[:first_name].nil? - @full_name = args[:full_name] unless args[:full_name].nil? - @id_token = args[:id_token] unless args[:id_token].nil? - @input_email = args[:input_email] unless args[:input_email].nil? - @kind = args[:kind] unless args[:kind].nil? - @language = args[:language] unless args[:language].nil? - @last_name = args[:last_name] unless args[:last_name].nil? - @local_id = args[:local_id] unless args[:local_id].nil? - @need_confirmation = args[:need_confirmation] unless args[:need_confirmation].nil? - @nick_name = args[:nick_name] unless args[:nick_name].nil? - @oauth_access_token = args[:oauth_access_token] unless args[:oauth_access_token].nil? - @oauth_authorization_code = args[:oauth_authorization_code] unless args[:oauth_authorization_code].nil? - @oauth_expire_in = args[:oauth_expire_in] unless args[:oauth_expire_in].nil? - @oauth_request_token = args[:oauth_request_token] unless args[:oauth_request_token].nil? - @oauth_scope = args[:oauth_scope] unless args[:oauth_scope].nil? - @original_email = args[:original_email] unless args[:original_email].nil? - @photo_url = args[:photo_url] unless args[:photo_url].nil? - @provider_id = args[:provider_id] unless args[:provider_id].nil? - @time_zone = args[:time_zone] unless args[:time_zone].nil? - @verified_provider = args[:verified_provider] unless args[:verified_provider].nil? - end - end - - # Request of verifying the password. - class VerifyPasswordResponse - include Google::Apis::Core::Hashable - - # The name of the user. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The email returned by the IdP. NOTE: The federated login user may not own the - # email. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The GITKit token for authenticated user. - # Corresponds to the JSON property `idToken` - # @return [String] - attr_accessor :id_token - - # The fixed string "identitytoolkit#VerifyPasswordResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The RP local ID if it's already been mapped to the IdP account identified by - # the federated ID. - # Corresponds to the JSON property `localId` - # @return [String] - attr_accessor :local_id - - # The URI of the user's photo at IdP - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - # Whether the email is registered. - # Corresponds to the JSON property `registered` - # @return [Boolean] - attr_accessor :registered - alias_method :registered?, :registered - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @email = args[:email] unless args[:email].nil? - @id_token = args[:id_token] unless args[:id_token].nil? - @kind = args[:kind] unless args[:kind].nil? - @local_id = args[:local_id] unless args[:local_id].nil? - @photo_url = args[:photo_url] unless args[:photo_url].nil? - @registered = args[:registered] unless args[:registered].nil? - end - end - end - end -end diff --git a/generated/google/apis/identitytoolkit_v3/representations.rb b/generated/google/apis/identitytoolkit_v3/representations.rb deleted file mode 100644 index 3e5521ea2..000000000 --- a/generated/google/apis/identitytoolkit_v3/representations.rb +++ /dev/null @@ -1,422 +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 IdentitytoolkitV3 - - class CreateAuthUriResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeleteAccountResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DownloadAccountResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GetAccountInfoResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GetOobConfirmationCodeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GetRecaptchaParamResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreateAuthUriRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeleteAccountRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DownloadAccountRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GetAccountInfoRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ResetPasswordRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SetAccountInfoRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UploadAccountRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VerifyAssertionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VerifyPasswordRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Relyingparty - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ResetPasswordResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SetAccountInfoResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ProviderUserInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class UploadAccountResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Error - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class UserInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ProviderUserInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class VerifyAssertionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VerifyPasswordResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class CreateAuthUriResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :auth_uri, as: 'authUri' - property :captcha_required, as: 'captchaRequired' - property :for_existing_provider, as: 'forExistingProvider' - property :kind, as: 'kind' - property :provider_id, as: 'providerId' - property :registered, as: 'registered' - end - end - - # @private - class DeleteAccountResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - end - end - - # @private - class DownloadAccountResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :users, as: 'users', class: Google::Apis::IdentitytoolkitV3::UserInfo, decorator: Google::Apis::IdentitytoolkitV3::UserInfo::Representation - - end - end - - # @private - class GetAccountInfoResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - collection :users, as: 'users', class: Google::Apis::IdentitytoolkitV3::UserInfo, decorator: Google::Apis::IdentitytoolkitV3::UserInfo::Representation - - end - end - - # @private - class GetOobConfirmationCodeResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :oob_code, as: 'oobCode' - end - end - - # @private - class GetRecaptchaParamResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :recaptcha_site_key, as: 'recaptchaSiteKey' - property :recaptcha_stoken, as: 'recaptchaStoken' - end - end - - # @private - class CreateAuthUriRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :app_id, as: 'appId' - property :client_id, as: 'clientId' - property :context, as: 'context' - property :continue_uri, as: 'continueUri' - property :identifier, as: 'identifier' - property :oauth_consumer_key, as: 'oauthConsumerKey' - property :oauth_scope, as: 'oauthScope' - property :openid_realm, as: 'openidRealm' - property :ota_app, as: 'otaApp' - property :provider_id, as: 'providerId' - end - end - - # @private - class DeleteAccountRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :local_id, as: 'localId' - end - end - - # @private - class DownloadAccountRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :max_results, as: 'maxResults' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class GetAccountInfoRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :email, as: 'email' - property :id_token, as: 'idToken' - collection :local_id, as: 'localId' - end - end - - # @private - class ResetPasswordRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :email, as: 'email' - property :new_password, as: 'newPassword' - property :old_password, as: 'oldPassword' - property :oob_code, as: 'oobCode' - end - end - - # @private - class SetAccountInfoRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :captcha_challenge, as: 'captchaChallenge' - property :captcha_response, as: 'captchaResponse' - property :disable_user, as: 'disableUser' - property :display_name, as: 'displayName' - property :email, as: 'email' - property :email_verified, as: 'emailVerified' - property :id_token, as: 'idToken' - property :local_id, as: 'localId' - property :oob_code, as: 'oobCode' - property :password, as: 'password' - collection :provider, as: 'provider' - property :upgrade_to_federated_login, as: 'upgradeToFederatedLogin' - property :valid_since, as: 'validSince' - end - end - - # @private - class UploadAccountRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :hash_algorithm, as: 'hashAlgorithm' - property :memory_cost, as: 'memoryCost' - property :rounds, as: 'rounds' - property :salt_separator, :base64 => true, as: 'saltSeparator' - property :signer_key, :base64 => true, as: 'signerKey' - collection :users, as: 'users', class: Google::Apis::IdentitytoolkitV3::UserInfo, decorator: Google::Apis::IdentitytoolkitV3::UserInfo::Representation - - end - end - - # @private - class VerifyAssertionRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :pending_id_token, as: 'pendingIdToken' - property :post_body, as: 'postBody' - property :request_uri, as: 'requestUri' - property :return_refresh_token, as: 'returnRefreshToken' - end - end - - # @private - class VerifyPasswordRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :captcha_challenge, as: 'captchaChallenge' - property :captcha_response, as: 'captchaResponse' - property :email, as: 'email' - property :password, as: 'password' - property :pending_id_token, as: 'pendingIdToken' - end - end - - # @private - class Relyingparty - class Representation < Google::Apis::Core::JsonRepresentation - property :captcha_resp, as: 'captchaResp' - property :challenge, as: 'challenge' - property :email, as: 'email' - property :id_token, as: 'idToken' - property :kind, as: 'kind' - property :new_email, as: 'newEmail' - property :request_type, as: 'requestType' - property :user_ip, as: 'userIp' - end - end - - # @private - class ResetPasswordResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :email, as: 'email' - property :kind, as: 'kind' - end - end - - # @private - class SetAccountInfoResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :email, as: 'email' - property :id_token, as: 'idToken' - property :kind, as: 'kind' - collection :provider_user_info, as: 'providerUserInfo', class: Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::ProviderUserInfo, decorator: Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::ProviderUserInfo::Representation - - end - - # @private - class ProviderUserInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :photo_url, as: 'photoUrl' - property :provider_id, as: 'providerId' - end - end - end - - # @private - class UploadAccountResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :error, as: 'error', class: Google::Apis::IdentitytoolkitV3::UploadAccountResponse::Error, decorator: Google::Apis::IdentitytoolkitV3::UploadAccountResponse::Error::Representation - - property :kind, as: 'kind' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - property :index, as: 'index' - property :message, as: 'message' - end - end - end - - # @private - class UserInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :disabled, as: 'disabled' - property :display_name, as: 'displayName' - property :email, as: 'email' - property :email_verified, as: 'emailVerified' - property :local_id, as: 'localId' - property :password_hash, :base64 => true, as: 'passwordHash' - property :password_updated_at, as: 'passwordUpdatedAt' - property :photo_url, as: 'photoUrl' - collection :provider_user_info, as: 'providerUserInfo', class: Google::Apis::IdentitytoolkitV3::UserInfo::ProviderUserInfo, decorator: Google::Apis::IdentitytoolkitV3::UserInfo::ProviderUserInfo::Representation - - property :salt, :base64 => true, as: 'salt' - property :valid_since, as: 'validSince' - property :version, as: 'version' - end - - # @private - class ProviderUserInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :federated_id, as: 'federatedId' - property :photo_url, as: 'photoUrl' - property :provider_id, as: 'providerId' - end - end - end - - # @private - class VerifyAssertionResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :action, as: 'action' - property :app_installation_url, as: 'appInstallationUrl' - property :app_scheme, as: 'appScheme' - property :context, as: 'context' - property :date_of_birth, as: 'dateOfBirth' - property :display_name, as: 'displayName' - property :email, as: 'email' - property :email_recycled, as: 'emailRecycled' - property :email_verified, as: 'emailVerified' - property :federated_id, as: 'federatedId' - property :first_name, as: 'firstName' - property :full_name, as: 'fullName' - property :id_token, as: 'idToken' - property :input_email, as: 'inputEmail' - property :kind, as: 'kind' - property :language, as: 'language' - property :last_name, as: 'lastName' - property :local_id, as: 'localId' - property :need_confirmation, as: 'needConfirmation' - property :nick_name, as: 'nickName' - property :oauth_access_token, as: 'oauthAccessToken' - property :oauth_authorization_code, as: 'oauthAuthorizationCode' - property :oauth_expire_in, as: 'oauthExpireIn' - property :oauth_request_token, as: 'oauthRequestToken' - property :oauth_scope, as: 'oauthScope' - property :original_email, as: 'originalEmail' - property :photo_url, as: 'photoUrl' - property :provider_id, as: 'providerId' - property :time_zone, as: 'timeZone' - collection :verified_provider, as: 'verifiedProvider' - end - end - - # @private - class VerifyPasswordResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :email, as: 'email' - property :id_token, as: 'idToken' - property :kind, as: 'kind' - property :local_id, as: 'localId' - property :photo_url, as: 'photoUrl' - property :registered, as: 'registered' - end - end - end - end -end diff --git a/generated/google/apis/identitytoolkit_v3/service.rb b/generated/google/apis/identitytoolkit_v3/service.rb deleted file mode 100644 index c10b136ee..000000000 --- a/generated/google/apis/identitytoolkit_v3/service.rb +++ /dev/null @@ -1,491 +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 IdentitytoolkitV3 - # Google Identity Toolkit API - # - # Help the third party sites to implement federated login. - # - # @example - # require 'google/apis/identitytoolkit_v3' - # - # Identitytoolkit = Google::Apis::IdentitytoolkitV3 # Alias the module - # service = Identitytoolkit::IdentityToolkitService.new - # - # @see https://developers.google.com/identity-toolkit/v3/ - class IdentityToolkitService < 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/', 'identitytoolkit/v3/relyingparty/') - end - - # Creates the URI used by the IdP to authenticate the user. - # @param [Google::Apis::IdentitytoolkitV3::CreateAuthUriRequest] create_auth_uri_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::IdentitytoolkitV3::CreateAuthUriResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::CreateAuthUriResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_auth_uri(create_auth_uri_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'createAuthUri' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::CreateAuthUriRequest::Representation - command.request_object = create_auth_uri_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::CreateAuthUriResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::CreateAuthUriResponse - 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 user account. - # @param [Google::Apis::IdentitytoolkitV3::DeleteAccountRequest] delete_account_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::IdentitytoolkitV3::DeleteAccountResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::DeleteAccountResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_account(delete_account_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'deleteAccount' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::DeleteAccountRequest::Representation - command.request_object = delete_account_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::DeleteAccountResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::DeleteAccountResponse - 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 - - # Batch download user accounts. - # @param [Google::Apis::IdentitytoolkitV3::DownloadAccountRequest] download_account_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::IdentitytoolkitV3::DownloadAccountResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::DownloadAccountResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def download_account(download_account_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'downloadAccount' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::DownloadAccountRequest::Representation - command.request_object = download_account_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::DownloadAccountResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::DownloadAccountResponse - 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 account info. - # @param [Google::Apis::IdentitytoolkitV3::GetAccountInfoRequest] get_account_info_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::IdentitytoolkitV3::GetAccountInfoResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::GetAccountInfoResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_info(get_account_info_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'getAccountInfo' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::GetAccountInfoRequest::Representation - command.request_object = get_account_info_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::GetAccountInfoResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::GetAccountInfoResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a code for user action confirmation. - # @param [Google::Apis::IdentitytoolkitV3::Relyingparty] relyingparty_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::IdentitytoolkitV3::GetOobConfirmationCodeResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::GetOobConfirmationCodeResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_oob_confirmation_code(relyingparty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'getOobConfirmationCode' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::Relyingparty::Representation - command.request_object = relyingparty_object - command.response_representation = Google::Apis::IdentitytoolkitV3::GetOobConfirmationCodeResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::GetOobConfirmationCodeResponse - 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 token signing public key. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Hash] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Hash] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_public_keys(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'publicKeys' - command = make_simple_command(:get, path, options) - command.response_representation = Hash::Representation - command.response_class = Hash - 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 recaptcha secure param. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::IdentitytoolkitV3::GetRecaptchaParamResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::GetRecaptchaParamResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_recaptcha_param(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'getRecaptchaParam' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::IdentitytoolkitV3::GetRecaptchaParamResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::GetRecaptchaParamResponse - 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 - - # Reset password for a user. - # @param [Google::Apis::IdentitytoolkitV3::ResetPasswordRequest] reset_password_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::IdentitytoolkitV3::ResetPasswordResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::ResetPasswordResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reset_password(reset_password_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'resetPassword' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::ResetPasswordRequest::Representation - command.request_object = reset_password_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::ResetPasswordResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::ResetPasswordResponse - 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 - - # Set account info for a user. - # @param [Google::Apis::IdentitytoolkitV3::SetAccountInfoRequest] set_account_info_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::IdentitytoolkitV3::SetAccountInfoResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_account_info(set_account_info_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'setAccountInfo' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::SetAccountInfoRequest::Representation - command.request_object = set_account_info_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse - 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 - - # Batch upload existing user accounts. - # @param [Google::Apis::IdentitytoolkitV3::UploadAccountRequest] upload_account_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::IdentitytoolkitV3::UploadAccountResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::UploadAccountResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_account(upload_account_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'uploadAccount' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::UploadAccountRequest::Representation - command.request_object = upload_account_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::UploadAccountResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::UploadAccountResponse - 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 - - # Verifies the assertion returned by the IdP. - # @param [Google::Apis::IdentitytoolkitV3::VerifyAssertionRequest] verify_assertion_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::IdentitytoolkitV3::VerifyAssertionResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::VerifyAssertionResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def verify_assertion(verify_assertion_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'verifyAssertion' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::VerifyAssertionRequest::Representation - command.request_object = verify_assertion_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::VerifyAssertionResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::VerifyAssertionResponse - 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 - - # Verifies the user entered password. - # @param [Google::Apis::IdentitytoolkitV3::VerifyPasswordRequest] verify_password_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::IdentitytoolkitV3::VerifyPasswordResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IdentitytoolkitV3::VerifyPasswordResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def verify_password(verify_password_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'verifyPassword' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::IdentitytoolkitV3::VerifyPasswordRequest::Representation - command.request_object = verify_password_request_object - command.response_representation = Google::Apis::IdentitytoolkitV3::VerifyPasswordResponse::Representation - command.response_class = Google::Apis::IdentitytoolkitV3::VerifyPasswordResponse - 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 diff --git a/generated/google/apis/licensing_v1.rb b/generated/google/apis/licensing_v1.rb deleted file mode 100644 index 89d980207..000000000 --- a/generated/google/apis/licensing_v1.rb +++ /dev/null @@ -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/licensing_v1/service.rb' -require 'google/apis/licensing_v1/classes.rb' -require 'google/apis/licensing_v1/representations.rb' - -module Google - module Apis - # Enterprise License Manager API - # - # Licensing API to view and manage license for your domain. - # - # @see https://developers.google.com/google-apps/licensing/ - module LicensingV1 - VERSION = 'V1' - REVISION = '20150525' - - # View and manage Google Apps licenses for your domain - AUTH_APPS_LICENSING = 'https://www.googleapis.com/auth/apps.licensing' - end - end -end diff --git a/generated/google/apis/licensing_v1/classes.rb b/generated/google/apis/licensing_v1/classes.rb deleted file mode 100644 index d69eac35f..000000000 --- a/generated/google/apis/licensing_v1/classes.rb +++ /dev/null @@ -1,132 +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 LicensingV1 - - # Template for LiscenseAssignment Resource - class LicenseAssignment - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etags` - # @return [String] - attr_accessor :etags - - # Identifies the resource as a LicenseAssignment. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the product. - # Corresponds to the JSON property `productId` - # @return [String] - attr_accessor :product_id - - # Link to this page. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Name of the sku of the product. - # Corresponds to the JSON property `skuId` - # @return [String] - attr_accessor :sku_id - - # Email id of the user. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etags = args[:etags] unless args[:etags].nil? - @kind = args[:kind] unless args[:kind].nil? - @product_id = args[:product_id] unless args[:product_id].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @sku_id = args[:sku_id] unless args[:sku_id].nil? - @user_id = args[:user_id] unless args[:user_id].nil? - end - end - - # Template for LicenseAssignment Insert request - class LicenseAssignmentInsert - include Google::Apis::Core::Hashable - - # Email id of the user - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @user_id = args[:user_id] unless args[:user_id].nil? - end - end - - # LicesnseAssignment List for a given product/sku for a customer. - class LicenseAssignmentList - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The LicenseAssignments in this page of results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies the resource as a collection of LicenseAssignments. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return 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) - @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 diff --git a/generated/google/apis/licensing_v1/representations.rb b/generated/google/apis/licensing_v1/representations.rb deleted file mode 100644 index a07eb6205..000000000 --- a/generated/google/apis/licensing_v1/representations.rb +++ /dev/null @@ -1,68 +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 LicensingV1 - - class LicenseAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LicenseAssignmentInsert - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LicenseAssignmentList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class LicenseAssignment - class Representation < Google::Apis::Core::JsonRepresentation - property :etags, as: 'etags' - property :kind, as: 'kind' - property :product_id, as: 'productId' - property :self_link, as: 'selfLink' - property :sku_id, as: 'skuId' - property :user_id, as: 'userId' - end - end - - # @private - class LicenseAssignmentInsert - class Representation < Google::Apis::Core::JsonRepresentation - property :user_id, as: 'userId' - end - end - - # @private - class LicenseAssignmentList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::LicensingV1::LicenseAssignment, decorator: Google::Apis::LicensingV1::LicenseAssignment::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - end - end -end diff --git a/generated/google/apis/licensing_v1/service.rb b/generated/google/apis/licensing_v1/service.rb deleted file mode 100644 index 46207cc57..000000000 --- a/generated/google/apis/licensing_v1/service.rb +++ /dev/null @@ -1,376 +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 LicensingV1 - # Enterprise License Manager API - # - # Licensing API to view and manage license for your domain. - # - # @example - # require 'google/apis/licensing_v1' - # - # Licensing = Google::Apis::LicensingV1 # Alias the module - # service = Licensing::LicensingService.new - # - # @see https://developers.google.com/google-apps/licensing/ - class LicensingService < 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/', 'apps/licensing/v1/product/') - end - - # Revoke License. - # @param [String] product_id - # Name for product - # @param [String] sku_id - # Name for sku - # @param [String] user_id - # email id or unique Id of the 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 [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_license_assignment(product_id, sku_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{productId}/sku/{skuId}/user/{userId}' - command = make_simple_command(:delete, path, options) - command.params['productId'] = product_id unless product_id.nil? - command.params['skuId'] = sku_id unless sku_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get license assignment of a particular product and sku for a user - # @param [String] product_id - # Name for product - # @param [String] sku_id - # Name for sku - # @param [String] user_id - # email id or unique Id of the 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::LicensingV1::LicenseAssignment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LicensingV1::LicenseAssignment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_license_assignment(product_id, sku_id, user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{productId}/sku/{skuId}/user/{userId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LicensingV1::LicenseAssignment::Representation - command.response_class = Google::Apis::LicensingV1::LicenseAssignment - command.params['productId'] = product_id unless product_id.nil? - command.params['skuId'] = sku_id unless sku_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Assign License. - # @param [String] product_id - # Name for product - # @param [String] sku_id - # Name for sku - # @param [Google::Apis::LicensingV1::LicenseAssignmentInsert] license_assignment_insert_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::LicensingV1::LicenseAssignment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LicensingV1::LicenseAssignment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_license_assignment(product_id, sku_id, license_assignment_insert_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{productId}/sku/{skuId}/user' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::LicensingV1::LicenseAssignmentInsert::Representation - command.request_object = license_assignment_insert_object - command.response_representation = Google::Apis::LicensingV1::LicenseAssignment::Representation - command.response_class = Google::Apis::LicensingV1::LicenseAssignment - command.params['productId'] = product_id unless product_id.nil? - command.params['skuId'] = sku_id unless sku_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 license assignments for given product of the customer. - # @param [String] product_id - # Name for product - # @param [String] customer_id - # CustomerId represents the customer for whom licenseassignments are queried - # @param [Fixnum] max_results - # Maximum number of campaigns to return at one time. Must be positive. Optional. - # Default value is 100. - # @param [String] page_token - # Token to fetch the next page.Optional. By default server will return first - # page - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::LicensingV1::LicenseAssignmentList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LicensingV1::LicenseAssignmentList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_license_assignment_for_product(product_id, customer_id: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{productId}/users' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LicensingV1::LicenseAssignmentList::Representation - command.response_class = Google::Apis::LicensingV1::LicenseAssignmentList - command.params['productId'] = product_id unless product_id.nil? - command.query['customerId'] = customer_id unless customer_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 license assignments for given product and sku of the customer. - # @param [String] product_id - # Name for product - # @param [String] sku_id - # Name for sku - # @param [String] customer_id - # CustomerId represents the customer for whom licenseassignments are queried - # @param [Fixnum] max_results - # Maximum number of campaigns to return at one time. Must be positive. Optional. - # Default value is 100. - # @param [String] page_token - # Token to fetch the next page.Optional. By default server will return first - # page - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::LicensingV1::LicenseAssignmentList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LicensingV1::LicenseAssignmentList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_license_assignment_for_product_and_sku(product_id, sku_id, customer_id: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{productId}/sku/{skuId}/users' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LicensingV1::LicenseAssignmentList::Representation - command.response_class = Google::Apis::LicensingV1::LicenseAssignmentList - command.params['productId'] = product_id unless product_id.nil? - command.params['skuId'] = sku_id unless sku_id.nil? - command.query['customerId'] = customer_id unless customer_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 - - # Assign License. This method supports patch semantics. - # @param [String] product_id - # Name for product - # @param [String] sku_id - # Name for sku for which license would be revoked - # @param [String] user_id - # email id or unique Id of the user - # @param [Google::Apis::LicensingV1::LicenseAssignment] license_assignment_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::LicensingV1::LicenseAssignment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LicensingV1::LicenseAssignment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_license_assignment(product_id, sku_id, user_id, license_assignment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{productId}/sku/{skuId}/user/{userId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::LicensingV1::LicenseAssignment::Representation - command.request_object = license_assignment_object - command.response_representation = Google::Apis::LicensingV1::LicenseAssignment::Representation - command.response_class = Google::Apis::LicensingV1::LicenseAssignment - command.params['productId'] = product_id unless product_id.nil? - command.params['skuId'] = sku_id unless sku_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Assign License. - # @param [String] product_id - # Name for product - # @param [String] sku_id - # Name for sku for which license would be revoked - # @param [String] user_id - # email id or unique Id of the user - # @param [Google::Apis::LicensingV1::LicenseAssignment] license_assignment_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::LicensingV1::LicenseAssignment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LicensingV1::LicenseAssignment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_license_assignment(product_id, sku_id, user_id, license_assignment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{productId}/sku/{skuId}/user/{userId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::LicensingV1::LicenseAssignment::Representation - command.request_object = license_assignment_object - command.response_representation = Google::Apis::LicensingV1::LicenseAssignment::Representation - command.response_class = Google::Apis::LicensingV1::LicenseAssignment - command.params['productId'] = product_id unless product_id.nil? - command.params['skuId'] = sku_id unless sku_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['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 diff --git a/generated/google/apis/logging_v1beta3.rb b/generated/google/apis/logging_v1beta3.rb deleted file mode 100644 index 2b6d0a8aa..000000000 --- a/generated/google/apis/logging_v1beta3.rb +++ /dev/null @@ -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/logging_v1beta3/service.rb' -require 'google/apis/logging_v1beta3/classes.rb' -require 'google/apis/logging_v1beta3/representations.rb' - -module Google - module Apis - # Google Cloud Logging API - # - # Google Cloud Logging API lets you create logs, ingest log entries, and manage - # log sinks. - # - # @see - module LoggingV1beta3 - VERSION = 'V1beta3' - 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 diff --git a/generated/google/apis/logging_v1beta3/classes.rb b/generated/google/apis/logging_v1beta3/classes.rb deleted file mode 100644 index fc8943824..000000000 --- a/generated/google/apis/logging_v1beta3/classes.rb +++ /dev/null @@ -1,505 +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 LoggingV1beta3 - - # Result returned from ListLogs. - class ListLogsResponse - include Google::Apis::Core::Hashable - - # A list of log resources. - # Corresponds to the JSON property `logs` - # @return [Array] - attr_accessor :logs - - # If there are more results, then `nextPageToken` is returned in the response. - # To get the next batch of logs, use the value of `nextPageToken` as `pageToken` - # in the next call of `ListLogs`. If `nextPageToken` is empty, then there are no - # more 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) - @logs = args[:logs] unless args[:logs].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # A log object. - class Log - include Google::Apis::Core::Hashable - - # REQUIRED: The log's name name. Example: `"compute.googleapis.com/activity_log"` - # . - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Name used when displaying the log to the user (for example, in a UI). Example: - # `"activity_log"` - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Type URL describing the expected payload type for the log. - # Corresponds to the JSON property `payloadType` - # @return [String] - attr_accessor :payload_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @payload_type = args[:payload_type] unless args[:payload_type].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 - - # The parameters to WriteLogEntries. - class WriteLogEntriesRequest - include Google::Apis::Core::Hashable - - # Metadata labels that apply to all entries in this request. If one of the log - # entries contains a (key, value) with the same key that is in `commonLabels`, - # then the entry's (key, value) overrides the one in `commonLabels`. - # Corresponds to the JSON property `commonLabels` - # @return [Hash] - attr_accessor :common_labels - - # Log entries to insert. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @common_labels = args[:common_labels] unless args[:common_labels].nil? - @entries = args[:entries] unless args[:entries].nil? - end - end - - # An individual entry in a log. - class LogEntry - include Google::Apis::Core::Hashable - - # Additional data that is associated with a log entry, set by the service - # creating the log entry. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::LoggingV1beta3::LogEntryMetadata] - attr_accessor :metadata - - # The log entry payload, represented as a protocol buffer that is expressed as a - # JSON object. You can only pass `protoPayload` values that belong to a set of - # approved types. - # Corresponds to the JSON property `protoPayload` - # @return [Hash] - attr_accessor :proto_payload - - # The log entry payload, represented as a text string. - # Corresponds to the JSON property `textPayload` - # @return [String] - attr_accessor :text_payload - - # The log entry payload, represented as a structure that is expressed as a JSON - # object. - # Corresponds to the JSON property `structPayload` - # @return [Hash] - attr_accessor :struct_payload - - # A unique ID for the log entry. If you provide this field, the logging service - # considers other log entries in the same log with the same ID as duplicates - # which can be removed. - # Corresponds to the JSON property `insertId` - # @return [String] - attr_accessor :insert_id - - # The log to which this entry belongs. When a log entry is ingested, the value - # of this field is set by the logging system. - # Corresponds to the JSON property `log` - # @return [String] - attr_accessor :log - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] unless args[:metadata].nil? - @proto_payload = args[:proto_payload] unless args[:proto_payload].nil? - @text_payload = args[:text_payload] unless args[:text_payload].nil? - @struct_payload = args[:struct_payload] unless args[:struct_payload].nil? - @insert_id = args[:insert_id] unless args[:insert_id].nil? - @log = args[:log] unless args[:log].nil? - end - end - - # Additional data that is associated with a log entry, set by the service - # creating the log entry. - class LogEntryMetadata - include Google::Apis::Core::Hashable - - # The time the event described by the log entry occurred. Timestamps must be - # later than January 1, 1970. - # Corresponds to the JSON property `timestamp` - # @return [String] - attr_accessor :timestamp - - # The severity of the log entry. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # The project ID of the Google Cloud Platform service that created the log entry. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The API name of the Google Cloud Platform service that created the log entry. - # For example, `"compute.googleapis.com"`. - # Corresponds to the JSON property `serviceName` - # @return [String] - attr_accessor :service_name - - # The region name of the Google Cloud Platform service that created the log - # entry. For example, `"us-central1"`. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # The zone of the Google Cloud Platform service that created the log entry. For - # example, `"us-central1-a"`. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - # The fully-qualified email address of the authenticated user that performed or - # requested the action represented by the log entry. If the log entry does not - # apply to an action taken by an authenticated user, then the field should be - # empty. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - # A set of (key, value) data that provides additional information about the log - # entry. If the log entry is from one of the Google Cloud Platform sources - # listed below, the indicated (key, value) information must be provided: Google - # App Engine, service_name `appengine.googleapis.com`: "appengine.googleapis.com/ - # module_id", "appengine.googleapis.com/version_id", and one of: "appengine. - # googleapis.com/replica_index", "appengine.googleapis.com/clone_id", or else - # provide the following Compute Engine labels: Google Compute Engine, - # service_name `compute.googleapis.com`: "compute.googleapis.com/resource_type", - # "instance" "compute.googleapis.com/resource_id", - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @timestamp = args[:timestamp] unless args[:timestamp].nil? - @severity = args[:severity] unless args[:severity].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @service_name = args[:service_name] unless args[:service_name].nil? - @region = args[:region] unless args[:region].nil? - @zone = args[:zone] unless args[:zone].nil? - @user_id = args[:user_id] unless args[:user_id].nil? - @labels = args[:labels] unless args[:labels].nil? - end - end - - # Result returned from WriteLogEntries. empty - class WriteLogEntriesResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Result returned from `ListLogServicesRequest`. - class ListLogServicesResponse - include Google::Apis::Core::Hashable - - # A list of log services. - # Corresponds to the JSON property `logServices` - # @return [Array] - attr_accessor :log_services - - # If there are more results, then `nextPageToken` is returned in the response. - # To get the next batch of services, use the value of `nextPageToken` as ` - # pageToken` in the next call of `ListLogServices`. If `nextPageToken` is empty, - # then there are no more 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) - @log_services = args[:log_services] unless args[:log_services].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # A log service object. - class LogService - include Google::Apis::Core::Hashable - - # The service's name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Label keys used when labeling log entries for this service. The order of the - # keys is significant, with higher priority keys coming earlier in the list. - # Corresponds to the JSON property `indexKeys` - # @return [Array] - attr_accessor :index_keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @index_keys = args[:index_keys] unless args[:index_keys].nil? - end - end - - # Result returned from ListLogServiceIndexesRequest. - class ListLogServiceIndexesResponse - include Google::Apis::Core::Hashable - - # A list of log service index prefixes. - # Corresponds to the JSON property `serviceIndexPrefixes` - # @return [Array] - attr_accessor :service_index_prefixes - - # If there are more results, then `nextPageToken` is returned in the response. - # To get the next batch of indexes, use the value of `nextPageToken` as ` - # pageToken` in the next call of `ListLogServiceIndexess`. If `nextPageToken` is - # empty, then there are no more 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) - @service_index_prefixes = args[:service_index_prefixes] unless args[:service_index_prefixes].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Result returned from `ListLogSinks`. - class ListLogSinksResponse - include Google::Apis::Core::Hashable - - # The requested log sinks. If any of the returned `LogSink` objects have an - # empty `destination` field, then call `logServices.sinks.get` to retrieve the - # complete `LogSink` object. - # Corresponds to the JSON property `sinks` - # @return [Array] - attr_accessor :sinks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sinks = args[:sinks] unless args[:sinks].nil? - end - end - - # An object that describes where a log may be written. - class LogSink - include Google::Apis::Core::Hashable - - # The name of this sink. This is a client-assigned identifier for the resource. - # This is ignored by UpdateLogSink and UpdateLogServicesSink. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The resource to send log entries to. The supported sink resource types are: + - # Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage. - # googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/ - # datasets/DATASET` Currently the Cloud Logging API supports at most one sink - # for each resource type per log or log service resource. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # _Output only._ All active errors found for this sink. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @destination = args[:destination] unless args[:destination].nil? - @errors = args[:errors] unless args[:errors].nil? - end - end - - # A problem in a sink or the sink's configuration. - class LogError - include Google::Apis::Core::Hashable - - # The resource associated with the error. It may be different from the sink - # destination. For example, the sink may point to a BigQuery dataset, but the - # error may refer to a table resource inside the dataset. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - # Represents the RPC error status for Google APIs. See http://go/errormodel for - # details. - # Corresponds to the JSON property `status` - # @return [Google::Apis::LoggingV1beta3::Status] - attr_accessor :status - - # The last time the error was observed, in nanoseconds since the Unix epoch. - # Corresponds to the JSON property `timeNanos` - # @return [String] - attr_accessor :time_nanos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource = args[:resource] unless args[:resource].nil? - @status = args[:status] unless args[:status].nil? - @time_nanos = args[:time_nanos] unless args[:time_nanos].nil? - end - end - - # Represents the RPC error status for Google APIs. See http://go/errormodel for - # details. - class Status - include Google::Apis::Core::Hashable - - # The status code, which should be an enum value of [google.rpc.Code][]. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. The user-facing - # error message should be localized and stored in the [google.rpc.Status.details] - # [google.rpc.Status.details] field. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a common set of - # message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] unless args[:code].nil? - @message = args[:message] unless args[:message].nil? - @details = args[:details] unless args[:details].nil? - end - end - - # Result returned from `ListLogServiceSinks`. - class ListLogServiceSinksResponse - include Google::Apis::Core::Hashable - - # The requested log service sinks. If any of the returned `LogSink` objects have - # an empty `destination` field, then call `logServices.sinks.get` to retrieve - # the complete `LogSink` object. - # Corresponds to the JSON property `sinks` - # @return [Array] - attr_accessor :sinks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sinks = args[:sinks] unless args[:sinks].nil? - end - end - end - end -end diff --git a/generated/google/apis/logging_v1beta3/representations.rb b/generated/google/apis/logging_v1beta3/representations.rb deleted file mode 100644 index dad7ca762..000000000 --- a/generated/google/apis/logging_v1beta3/representations.rb +++ /dev/null @@ -1,222 +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 LoggingV1beta3 - - class ListLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Log - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WriteLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LogEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LogEntryMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WriteLogEntriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLogServicesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LogService - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLogServiceIndexesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLogSinksResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LogSink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LogError - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLogServiceSinksResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class ListLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :logs, as: 'logs', class: Google::Apis::LoggingV1beta3::Log, decorator: Google::Apis::LoggingV1beta3::Log::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Log - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :display_name, as: 'displayName' - property :payload_type, as: 'payloadType' - end - end - - # @private - class Empty - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class WriteLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation - hash :common_labels, as: 'commonLabels' - collection :entries, as: 'entries', class: Google::Apis::LoggingV1beta3::LogEntry, decorator: Google::Apis::LoggingV1beta3::LogEntry::Representation - - end - end - - # @private - class LogEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::LoggingV1beta3::LogEntryMetadata, decorator: Google::Apis::LoggingV1beta3::LogEntryMetadata::Representation - - hash :proto_payload, as: 'protoPayload' - property :text_payload, as: 'textPayload' - hash :struct_payload, as: 'structPayload' - property :insert_id, as: 'insertId' - property :log, as: 'log' - end - end - - # @private - class LogEntryMetadata - class Representation < Google::Apis::Core::JsonRepresentation - property :timestamp, as: 'timestamp' - property :severity, as: 'severity' - property :project_id, as: 'projectId' - property :service_name, as: 'serviceName' - property :region, as: 'region' - property :zone, as: 'zone' - property :user_id, as: 'userId' - hash :labels, as: 'labels' - end - end - - # @private - class WriteLogEntriesResponse - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class ListLogServicesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :log_services, as: 'logServices', class: Google::Apis::LoggingV1beta3::LogService, decorator: Google::Apis::LoggingV1beta3::LogService::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class LogService - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - collection :index_keys, as: 'indexKeys' - end - end - - # @private - class ListLogServiceIndexesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :service_index_prefixes, as: 'serviceIndexPrefixes' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListLogSinksResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :sinks, as: 'sinks', class: Google::Apis::LoggingV1beta3::LogSink, decorator: Google::Apis::LoggingV1beta3::LogSink::Representation - - end - end - - # @private - class LogSink - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :destination, as: 'destination' - collection :errors, as: 'errors', class: Google::Apis::LoggingV1beta3::LogError, decorator: Google::Apis::LoggingV1beta3::LogError::Representation - - end - end - - # @private - class LogError - class Representation < Google::Apis::Core::JsonRepresentation - property :resource, as: 'resource' - property :status, as: 'status', class: Google::Apis::LoggingV1beta3::Status, decorator: Google::Apis::LoggingV1beta3::Status::Representation - - property :time_nanos, as: 'timeNanos' - end - end - - # @private - class Status - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - collection :details, as: 'details' - end - end - - # @private - class ListLogServiceSinksResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :sinks, as: 'sinks', class: Google::Apis::LoggingV1beta3::LogSink, decorator: Google::Apis::LoggingV1beta3::LogSink::Representation - - end - end - end - end -end diff --git a/generated/google/apis/logging_v1beta3/service.rb b/generated/google/apis/logging_v1beta3/service.rb deleted file mode 100644 index 289c46789..000000000 --- a/generated/google/apis/logging_v1beta3/service.rb +++ /dev/null @@ -1,670 +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 LoggingV1beta3 - # Google Cloud Logging API - # - # Google Cloud Logging API lets you create logs, ingest log entries, and manage - # log sinks. - # - # @example - # require 'google/apis/logging_v1beta3' - # - # Logging = Google::Apis::LoggingV1beta3 # Alias the module - # service = Logging::LoggingService.new - # - # @see - class LoggingService < 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://logging.googleapis.com/', '') - end - - # Lists log resources belonging to the specified project. - # @param [String] projects_id - # Part of `projectName`. The project name for which to list the log resources. - # @param [String] service_name - # A service name for which to list logs. Only logs containing entries whose - # metadata includes this service name are returned. If `serviceName` and ` - # serviceIndexPrefix` are both empty, then all log names are returned. To list - # all log names, regardless of service, leave both the `serviceName` and ` - # serviceIndexPrefix` empty. To list log names containing entries with a - # particular service name (or explicitly empty service name) set `serviceName` - # to the desired value and `serviceIndexPrefix` to `"/"`. - # @param [String] service_index_prefix - # A log service index prefix for which to list logs. Only logs containing - # entries whose metadata that includes these label values (associated with index - # keys) are returned. The prefix is a slash separated list of values, and need - # not specify all index labels. An empty index (or a single slash) matches all - # log service indexes. - # @param [Fixnum] page_size - # The maximum number of results to return. - # @param [String] page_token - # An opaque token, returned as `nextPageToken` by a prior `ListLogs` operation. - # If `pageToken` is supplied, then the other fields of this request are ignored, - # and instead the previous `ListLogs` operation is continued. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::ListLogsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::ListLogsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_logs(projects_id, service_name: nil, service_index_prefix: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::ListLogsResponse::Representation - command.response_class = Google::Apis::LoggingV1beta3::ListLogsResponse - command.params['projectsId'] = projects_id unless projects_id.nil? - command.query['serviceName'] = service_name unless service_name.nil? - command.query['serviceIndexPrefix'] = service_index_prefix unless service_index_prefix.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the specified log resource and all log entries contained in it. - # @param [String] projects_id - # Part of `logName`. The log resource to delete. - # @param [String] logs_id - # Part of `logName`. See documentation of `projectsId`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_log(projects_id, logs_id, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs/{logsId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation - command.response_class = Google::Apis::LoggingV1beta3::Empty - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logsId'] = logs_id unless logs_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates one or more log entries in a log. You must supply a list of `LogEntry` - # objects, named `entries`. Each `LogEntry` object must contain a payload object - # and a `LogEntryMetadata` object that describes the entry. You must fill in all - # the fields of the entry, metadata, and payload. You can also supply a map, ` - # commonLabels`, that supplies default (key, value) data for the `entries[]. - # metadata.labels` maps, saving you the trouble of creating identical copies for - # each entry. - # @param [String] projects_id - # Part of `logName`. The name of the log resource into which to insert the log - # entries. - # @param [String] logs_id - # Part of `logName`. See documentation of `projectsId`. - # @param [Google::Apis::LoggingV1beta3::WriteLogEntriesRequest] write_log_entries_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::WriteLogEntriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::WriteLogEntriesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def write_log_entries(projects_id, logs_id, write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs/{logsId}/entries:write' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::LoggingV1beta3::WriteLogEntriesRequest::Representation - command.request_object = write_log_entries_request_object - command.response_representation = Google::Apis::LoggingV1beta3::WriteLogEntriesResponse::Representation - command.response_class = Google::Apis::LoggingV1beta3::WriteLogEntriesResponse - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logsId'] = logs_id unless logs_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists log sinks associated with the specified log. - # @param [String] projects_id - # Part of `logName`. The log for which to list sinks. - # @param [String] logs_id - # Part of `logName`. See documentation of `projectsId`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::ListLogSinksResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::ListLogSinksResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_log_sinks(projects_id, logs_id, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::ListLogSinksResponse::Representation - command.response_class = Google::Apis::LoggingV1beta3::ListLogSinksResponse - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logsId'] = logs_id unless logs_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified log sink resource. - # @param [String] projects_id - # Part of `sinkName`. The name of the sink resource to return. - # @param [String] logs_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] sinks_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.response_class = Google::Apis::LoggingV1beta3::LogSink - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logsId'] = logs_id unless logs_id.nil? - command.params['sinksId'] = sinks_id unless sinks_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates the specified log sink resource. - # @param [String] projects_id - # Part of `logName`. The log in which to create a sink resource. - # @param [String] logs_id - # Part of `logName`. See documentation of `projectsId`. - # @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_log_sink(projects_id, logs_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.request_object = log_sink_object - command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.response_class = Google::Apis::LoggingV1beta3::LogSink - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logsId'] = logs_id unless logs_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates or updates the specified log sink resource. - # @param [String] projects_id - # Part of `sinkName`. The name of the sink to update. - # @param [String] logs_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] sinks_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_log_sink(projects_id, logs_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.request_object = log_sink_object - command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.response_class = Google::Apis::LoggingV1beta3::LogSink - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logsId'] = logs_id unless logs_id.nil? - command.params['sinksId'] = sinks_id unless sinks_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the specified log sink resource. - # @param [String] projects_id - # Part of `sinkName`. The name of the sink to delete. - # @param [String] logs_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] sinks_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation - command.response_class = Google::Apis::LoggingV1beta3::Empty - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logsId'] = logs_id unless logs_id.nil? - command.params['sinksId'] = sinks_id unless sinks_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists log services associated with log entries ingested for a project. - # @param [String] projects_id - # Part of `projectName`. The project resource whose services are to be listed. - # @param [String] log - # The name of the log resource whose services are to be listed. log for which to - # list services. When empty, all services are listed. - # @param [Fixnum] page_size - # The maximum number of `LogService` objects to return in one operation. - # @param [String] page_token - # An opaque token, returned as `nextPageToken` by a prior `ListLogServices` - # operation. If `pageToken` is supplied, then the other fields of this request - # are ignored, and instead the previous `ListLogServices` operation is continued. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::ListLogServicesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::ListLogServicesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_log_services(projects_id, log: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logServices' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::ListLogServicesResponse::Representation - command.response_class = Google::Apis::LoggingV1beta3::ListLogServicesResponse - command.params['projectsId'] = projects_id unless projects_id.nil? - command.query['log'] = log unless log.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists log service indexes associated with a log service. - # @param [String] projects_id - # Part of `serviceName`. A log service resource of the form `/projects/*/ - # logServices/*`. The service indexes of the log service are returned. Example: ` - # "/projects/myProj/logServices/appengine.googleapis.com"`. - # @param [String] log_services_id - # Part of `serviceName`. See documentation of `projectsId`. - # @param [String] index_prefix - # Restricts the indexes returned to be those with a specified prefix. The prefix - # has the form `"/label_value/label_value/..."`, in order corresponding to the [` - # LogService indexKeys`][google.logging.v1.LogService.index_keys]. Non-empty - # prefixes must begin with `/` . Example prefixes: + `"/myModule/"` retrieves - # App Engine versions associated with `myModule`. The trailing slash terminates - # the value. + `"/myModule"` retrieves App Engine modules with names beginning - # with `myModule`. + `""` retrieves all indexes. - # @param [Fixnum] depth - # A limit to the number of levels of the index hierarchy that are expanded. If ` - # depth` is 0, it defaults to the level specified by the prefix field (the - # number of slash separators). The default empty prefix implies a `depth` of 1. - # It is an error for `depth` to be any non-zero value less than the number of - # components in `indexPrefix`. - # @param [String] log - # A log resource like `/projects/project_id/logs/log_name`, identifying the log - # for which to list service indexes. - # @param [Fixnum] page_size - # The maximum number of log service index resources to return in one operation. - # @param [String] page_token - # An opaque token, returned as `nextPageToken` by a prior `ListLogServiceIndexes` - # operation. If `pageToken` is supplied, then the other fields of this request - # are ignored, and instead the previous `ListLogServiceIndexes` operation is - # continued. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_log_service_indexes(projects_id, log_services_id, index_prefix: nil, depth: nil, log: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/indexes' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse::Representation - command.response_class = Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logServicesId'] = log_services_id unless log_services_id.nil? - command.query['indexPrefix'] = index_prefix unless index_prefix.nil? - command.query['depth'] = depth unless depth.nil? - command.query['log'] = log unless log.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists log service sinks associated with the specified service. - # @param [String] projects_id - # Part of `serviceName`. The name of the service for which to list sinks. - # @param [String] log_services_id - # Part of `serviceName`. See documentation of `projectsId`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_log_service_sinks(projects_id, log_services_id, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse::Representation - command.response_class = Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logServicesId'] = log_services_id unless log_services_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified log service sink resource. - # @param [String] projects_id - # Part of `sinkName`. The name of the sink to return. - # @param [String] log_services_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] sinks_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.response_class = Google::Apis::LoggingV1beta3::LogSink - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logServicesId'] = log_services_id unless log_services_id.nil? - command.params['sinksId'] = sinks_id unless sinks_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates the specified log service sink resource. - # @param [String] projects_id - # Part of `serviceName`. The name of the service in which to create a sink. - # @param [String] log_services_id - # Part of `serviceName`. See documentation of `projectsId`. - # @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_log_service_sink(projects_id, log_services_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.request_object = log_sink_object - command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.response_class = Google::Apis::LoggingV1beta3::LogSink - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logServicesId'] = log_services_id unless log_services_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates or update the specified log service sink resource. - # @param [String] projects_id - # Part of `sinkName`. The name of the sink to update. - # @param [String] log_services_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] sinks_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [Google::Apis::LoggingV1beta3::LogSink] log_sink_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::LoggingV1beta3::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_log_service_sink(projects_id, log_services_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.request_object = log_sink_object - command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation - command.response_class = Google::Apis::LoggingV1beta3::LogSink - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logServicesId'] = log_services_id unless log_services_id.nil? - command.params['sinksId'] = sinks_id unless sinks_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the specified log service sink. - # @param [String] projects_id - # Part of `sinkName`. The name of the sink to delete. - # @param [String] log_services_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] sinks_id - # Part of `sinkName`. See documentation of `projectsId`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV1beta3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV1beta3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation - command.response_class = Google::Apis::LoggingV1beta3::Empty - command.params['projectsId'] = projects_id unless projects_id.nil? - command.params['logServicesId'] = log_services_id unless log_services_id.nil? - command.params['sinksId'] = sinks_id unless sinks_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 diff --git a/generated/google/apis/manager_v1beta2.rb b/generated/google/apis/manager_v1beta2.rb deleted file mode 100644 index d6ad78d46..000000000 --- a/generated/google/apis/manager_v1beta2.rb +++ /dev/null @@ -1,50 +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/manager_v1beta2/service.rb' -require 'google/apis/manager_v1beta2/classes.rb' -require 'google/apis/manager_v1beta2/representations.rb' - -module Google - module Apis - # Deployment Manager API - # - # The Deployment Manager API allows users to declaratively configure, deploy and - # run complex solutions on the Google Cloud Platform. - # - # @see https://developers.google.com/deployment-manager/ - module ManagerV1beta2 - VERSION = 'V1beta2' - REVISION = '20140915' - - # View and manage your applications deployed on Google App Engine - AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # View and manage your Google Compute Engine resources - AUTH_COMPUTE = 'https://www.googleapis.com/auth/compute' - - # Manage your data in Google Cloud Storage - AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write' - - # View and manage your Google Cloud Platform management resources and deployment status information - AUTH_NDEV_CLOUDMAN = 'https://www.googleapis.com/auth/ndev.cloudman' - - # View your Google Cloud Platform management resources and deployment status information - AUTH_NDEV_CLOUDMAN_READONLY = 'https://www.googleapis.com/auth/ndev.cloudman.readonly' - end - end -end diff --git a/generated/google/apis/manager_v1beta2/classes.rb b/generated/google/apis/manager_v1beta2/classes.rb deleted file mode 100644 index 88ada984f..000000000 --- a/generated/google/apis/manager_v1beta2/classes.rb +++ /dev/null @@ -1,1287 +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 ManagerV1beta2 - - # A Compute Engine network accessConfig. Identical to the accessConfig on - # corresponding Compute Engine resource. - class AccessConfig - include Google::Apis::Core::Hashable - - # Name of this access configuration. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # An external IP address associated with this instance. - # Corresponds to the JSON property `natIp` - # @return [String] - attr_accessor :nat_ip - - # Type of this access configuration file. (Currently only ONE_TO_ONE_NAT is - # legal.) - # 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? - @nat_ip = args[:nat_ip] unless args[:nat_ip].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # An Action encapsulates a set of commands as a single runnable module with - # additional information needed during run-time. - class Action - include Google::Apis::Core::Hashable - - # A list of commands to run sequentially for this action. - # Corresponds to the JSON property `commands` - # @return [Array] - attr_accessor :commands - - # The timeout in milliseconds for this action to run. - # Corresponds to the JSON property `timeoutMs` - # @return [Fixnum] - attr_accessor :timeout_ms - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @commands = args[:commands] unless args[:commands].nil? - @timeout_ms = args[:timeout_ms] unless args[:timeout_ms].nil? - end - end - - # An allowed port resource. - class AllowedRule - include Google::Apis::Core::Hashable - - # ?tcp?, ?udp? or ?icmp? - # Corresponds to the JSON property `IPProtocol` - # @return [String] - attr_accessor :ip_protocol - - # List of ports or port ranges (Example inputs include: ["22"], [?33?, "12345- - # 12349"]. - # Corresponds to the JSON property `ports` - # @return [Array] - attr_accessor :ports - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ip_protocol = args[:ip_protocol] unless args[:ip_protocol].nil? - @ports = args[:ports] unless args[:ports].nil? - end - end - - # - class AutoscalingModule - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `coolDownPeriodSec` - # @return [Fixnum] - attr_accessor :cool_down_period_sec - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # Corresponds to the JSON property `maxNumReplicas` - # @return [Fixnum] - attr_accessor :max_num_replicas - - # - # Corresponds to the JSON property `minNumReplicas` - # @return [Fixnum] - attr_accessor :min_num_replicas - - # - # Corresponds to the JSON property `signalType` - # @return [String] - attr_accessor :signal_type - - # - # Corresponds to the JSON property `targetModule` - # @return [String] - attr_accessor :target_module - - # target_utilization should be in range [0,1]. - # Corresponds to the JSON property `targetUtilization` - # @return [Float] - attr_accessor :target_utilization - - 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? - @description = args[:description] unless args[:description].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? - @signal_type = args[:signal_type] unless args[:signal_type].nil? - @target_module = args[:target_module] unless args[:target_module].nil? - @target_utilization = args[:target_utilization] unless args[:target_utilization].nil? - end - end - - # - class AutoscalingModuleStatus - include Google::Apis::Core::Hashable - - # [Output Only] The URL of the corresponding Autoscaling configuration. - # Corresponds to the JSON property `autoscalingConfigUrl` - # @return [String] - attr_accessor :autoscaling_config_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @autoscaling_config_url = args[:autoscaling_config_url] unless args[:autoscaling_config_url].nil? - end - end - - # [Output Only] The current state of a replica or module. - class DeployState - include Google::Apis::Core::Hashable - - # [Output Only] Human readable details about the current state. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - # [Output Only] The status of the deployment. Possible values include: - # - UNKNOWN - # - DEPLOYING - # - DEPLOYED - # - DEPLOYMENT_FAILED - # - DELETING - # - DELETED - # - DELETE_FAILED - # 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) - @details = args[:details] unless args[:details].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # A deployment represents a physical instantiation of a Template. - class Deployment - include Google::Apis::Core::Hashable - - # [Output Only] The time when this deployment was created. - # Corresponds to the JSON property `creationDate` - # @return [String] - attr_accessor :creation_date - - # A user-supplied description of this Deployment. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] List of status for the modules in this deployment. - # Corresponds to the JSON property `modules` - # @return [Hash] - attr_accessor :modules - - # Name of this deployment. The name must conform to the following regular - # expression: [a-zA-Z0-9-_]`1,64` - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The set of parameter overrides to apply to the corresponding Template before - # deploying. - # Corresponds to the JSON property `overrides` - # @return [Array] - attr_accessor :overrides - - # [Output Only] The current state of a replica or module. - # Corresponds to the JSON property `state` - # @return [Google::Apis::ManagerV1beta2::DeployState] - attr_accessor :state - - # The name of the Template on which this deployment is based. - # Corresponds to the JSON property `templateName` - # @return [String] - attr_accessor :template_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_date = args[:creation_date] unless args[:creation_date].nil? - @description = args[:description] unless args[:description].nil? - @modules = args[:modules] unless args[:modules].nil? - @name = args[:name] unless args[:name].nil? - @overrides = args[:overrides] unless args[:overrides].nil? - @state = args[:state] unless args[:state].nil? - @template_name = args[:template_name] unless args[:template_name].nil? - end - end - - # - class ListDeploymentsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @resources = args[:resources] unless args[:resources].nil? - end - end - - # How to attach a disk to a Replica. - class DiskAttachment - include Google::Apis::Core::Hashable - - # The device name of this disk. - # Corresponds to the JSON property `deviceName` - # @return [String] - attr_accessor :device_name - - # A zero-based index to assign to this disk, where 0 is reserved for the boot - # disk. If not specified, this is assigned by the server. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @device_name = args[:device_name] unless args[:device_name].nil? - @index = args[:index] unless args[:index].nil? - end - end - - # An environment variable. - class EnvVariable - include Google::Apis::Core::Hashable - - # Whether this variable is hidden or visible. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # Value of the environment variable. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hidden = args[:hidden] unless args[:hidden].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # A pre-existing persistent disk that will be attached to every Replica in the - # Pool. - class ExistingDisk - include Google::Apis::Core::Hashable - - # How to attach a disk to a Replica. - # Corresponds to the JSON property `attachment` - # @return [Google::Apis::ManagerV1beta2::DiskAttachment] - attr_accessor :attachment - - # The fully-qualified URL of the Persistent Disk resource. It must be in the - # same zone as the Pool. - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attachment = args[:attachment] unless args[:attachment].nil? - @source = args[:source] unless args[:source].nil? - end - end - - # A Firewall resource - class FirewallModule - include Google::Apis::Core::Hashable - - # The allowed ports or port ranges. - # Corresponds to the JSON property `allowed` - # @return [Array] - attr_accessor :allowed - - # The description of the firewall (optional) - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The NetworkModule to which this firewall should apply. If not specified, or if - # specified as 'default', this firewall will be applied to the 'default' network. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # Source IP ranges to apply this firewall to, see the GCE Spec for details on - # syntax - # Corresponds to the JSON property `sourceRanges` - # @return [Array] - attr_accessor :source_ranges - - # Source Tags to apply this firewall to, see the GCE Spec for details on syntax - # Corresponds to the JSON property `sourceTags` - # @return [Array] - attr_accessor :source_tags - - # Target Tags to apply this firewall to, see the GCE Spec for details on syntax - # Corresponds to the JSON property `targetTags` - # @return [Array] - attr_accessor :target_tags - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allowed = args[:allowed] unless args[:allowed].nil? - @description = args[:description] unless args[:description].nil? - @network = args[:network] unless args[:network].nil? - @source_ranges = args[:source_ranges] unless args[:source_ranges].nil? - @source_tags = args[:source_tags] unless args[:source_tags].nil? - @target_tags = args[:target_tags] unless args[:target_tags].nil? - end - end - - # - class FirewallModuleStatus - include Google::Apis::Core::Hashable - - # [Output Only] The URL of the corresponding Firewall resource. - # Corresponds to the JSON property `firewallUrl` - # @return [String] - attr_accessor :firewall_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @firewall_url = args[:firewall_url] unless args[:firewall_url].nil? - end - end - - # - class HealthCheckModule - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `checkIntervalSec` - # @return [Fixnum] - attr_accessor :check_interval_sec - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # Corresponds to the JSON property `healthyThreshold` - # @return [Fixnum] - attr_accessor :healthy_threshold - - # - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - # - # Corresponds to the JSON property `port` - # @return [Fixnum] - attr_accessor :port - - # - # Corresponds to the JSON property `timeoutSec` - # @return [Fixnum] - attr_accessor :timeout_sec - - # - # Corresponds to the JSON property `unhealthyThreshold` - # @return [Fixnum] - attr_accessor :unhealthy_threshold - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @check_interval_sec = args[:check_interval_sec] unless args[:check_interval_sec].nil? - @description = args[:description] unless args[:description].nil? - @healthy_threshold = args[:healthy_threshold] unless args[:healthy_threshold].nil? - @host = args[:host] unless args[:host].nil? - @path = args[:path] unless args[:path].nil? - @port = args[:port] unless args[:port].nil? - @timeout_sec = args[:timeout_sec] unless args[:timeout_sec].nil? - @unhealthy_threshold = args[:unhealthy_threshold] unless args[:unhealthy_threshold].nil? - end - end - - # - class HealthCheckModuleStatus - include Google::Apis::Core::Hashable - - # [Output Only] The HealthCheck URL. - # Corresponds to the JSON property `healthCheckUrl` - # @return [String] - attr_accessor :health_check_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @health_check_url = args[:health_check_url] unless args[:health_check_url].nil? - end - end - - # - class LbModule - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # Corresponds to the JSON property `healthChecks` - # @return [Array] - attr_accessor :health_checks - - # - # Corresponds to the JSON property `ipAddress` - # @return [String] - attr_accessor :ip_address - - # - # Corresponds to the JSON property `ipProtocol` - # @return [String] - attr_accessor :ip_protocol - - # - # Corresponds to the JSON property `portRange` - # @return [String] - attr_accessor :port_range - - # - # Corresponds to the JSON property `sessionAffinity` - # @return [String] - attr_accessor :session_affinity - - # - # Corresponds to the JSON property `targetModules` - # @return [Array] - attr_accessor :target_modules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @health_checks = args[:health_checks] unless args[:health_checks].nil? - @ip_address = args[:ip_address] unless args[:ip_address].nil? - @ip_protocol = args[:ip_protocol] unless args[:ip_protocol].nil? - @port_range = args[:port_range] unless args[:port_range].nil? - @session_affinity = args[:session_affinity] unless args[:session_affinity].nil? - @target_modules = args[:target_modules] unless args[:target_modules].nil? - end - end - - # - class LbModuleStatus - include Google::Apis::Core::Hashable - - # [Output Only] The URL of the corresponding ForwardingRule in GCE. - # Corresponds to the JSON property `forwardingRuleUrl` - # @return [String] - attr_accessor :forwarding_rule_url - - # [Output Only] The URL of the corresponding TargetPool resource in GCE. - # Corresponds to the JSON property `targetPoolUrl` - # @return [String] - attr_accessor :target_pool_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @forwarding_rule_url = args[:forwarding_rule_url] unless args[:forwarding_rule_url].nil? - @target_pool_url = args[:target_pool_url] unless args[:target_pool_url].nil? - end - end - - # A Compute Engine metadata entry. Identical to the metadata on the - # corresponding Compute Engine resource. - class Metadata - include Google::Apis::Core::Hashable - - # The fingerprint of the metadata. - # Corresponds to the JSON property `fingerPrint` - # @return [String] - attr_accessor :finger_print - - # A list of metadata items. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @finger_print = args[:finger_print] unless args[:finger_print].nil? - @items = args[:items] unless args[:items].nil? - end - end - - # A Compute Engine metadata item, defined as a key:value pair. Identical to the - # metadata on the corresponding Compute Engine resource. - class MetadataItem - include Google::Apis::Core::Hashable - - # A metadata key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # A metadata 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 - - # A module in a configuration. A module represents a single homogeneous, - # possibly replicated task. - class Module - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `autoscalingModule` - # @return [Google::Apis::ManagerV1beta2::AutoscalingModule] - attr_accessor :autoscaling_module - - # A Firewall resource - # Corresponds to the JSON property `firewallModule` - # @return [Google::Apis::ManagerV1beta2::FirewallModule] - attr_accessor :firewall_module - - # - # Corresponds to the JSON property `healthCheckModule` - # @return [Google::Apis::ManagerV1beta2::HealthCheckModule] - attr_accessor :health_check_module - - # - # Corresponds to the JSON property `lbModule` - # @return [Google::Apis::ManagerV1beta2::LbModule] - attr_accessor :lb_module - - # - # Corresponds to the JSON property `networkModule` - # @return [Google::Apis::ManagerV1beta2::NetworkModule] - attr_accessor :network_module - - # - # Corresponds to the JSON property `replicaPoolModule` - # @return [Google::Apis::ManagerV1beta2::ReplicaPoolModule] - attr_accessor :replica_pool_module - - # The type of this module. Valid values ("AUTOSCALING", "FIREWALL", " - # HEALTH_CHECK", "LOAD_BALANCING", "NETWORK", "REPLICA_POOL") - # 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) - @autoscaling_module = args[:autoscaling_module] unless args[:autoscaling_module].nil? - @firewall_module = args[:firewall_module] unless args[:firewall_module].nil? - @health_check_module = args[:health_check_module] unless args[:health_check_module].nil? - @lb_module = args[:lb_module] unless args[:lb_module].nil? - @network_module = args[:network_module] unless args[:network_module].nil? - @replica_pool_module = args[:replica_pool_module] unless args[:replica_pool_module].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # [Output Only] Aggregate status for a module. - class ModuleStatus - include Google::Apis::Core::Hashable - - # [Output Only] The status of the AutoscalingModule, set for type AUTOSCALING. - # Corresponds to the JSON property `autoscalingModuleStatus` - # @return [Google::Apis::ManagerV1beta2::AutoscalingModuleStatus] - attr_accessor :autoscaling_module_status - - # [Output Only] The status of the FirewallModule, set for type FIREWALL. - # Corresponds to the JSON property `firewallModuleStatus` - # @return [Google::Apis::ManagerV1beta2::FirewallModuleStatus] - attr_accessor :firewall_module_status - - # [Output Only] The status of the HealthCheckModule, set for type HEALTH_CHECK. - # Corresponds to the JSON property `healthCheckModuleStatus` - # @return [Google::Apis::ManagerV1beta2::HealthCheckModuleStatus] - attr_accessor :health_check_module_status - - # [Output Only] The status of the LbModule, set for type LOAD_BALANCING. - # Corresponds to the JSON property `lbModuleStatus` - # @return [Google::Apis::ManagerV1beta2::LbModuleStatus] - attr_accessor :lb_module_status - - # [Output Only] The status of the NetworkModule, set for type NETWORK. - # Corresponds to the JSON property `networkModuleStatus` - # @return [Google::Apis::ManagerV1beta2::NetworkModuleStatus] - attr_accessor :network_module_status - - # [Output Only] The status of the ReplicaPoolModule, set for type VM. - # Corresponds to the JSON property `replicaPoolModuleStatus` - # @return [Google::Apis::ManagerV1beta2::ReplicaPoolModuleStatus] - attr_accessor :replica_pool_module_status - - # [Output Only] The current state of a replica or module. - # Corresponds to the JSON property `state` - # @return [Google::Apis::ManagerV1beta2::DeployState] - attr_accessor :state - - # [Output Only] The type of the module. - # 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) - @autoscaling_module_status = args[:autoscaling_module_status] unless args[:autoscaling_module_status].nil? - @firewall_module_status = args[:firewall_module_status] unless args[:firewall_module_status].nil? - @health_check_module_status = args[:health_check_module_status] unless args[:health_check_module_status].nil? - @lb_module_status = args[:lb_module_status] unless args[:lb_module_status].nil? - @network_module_status = args[:network_module_status] unless args[:network_module_status].nil? - @replica_pool_module_status = args[:replica_pool_module_status] unless args[:replica_pool_module_status].nil? - @state = args[:state] unless args[:state].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A Compute Engine NetworkInterface resource. Identical to the NetworkInterface - # on the corresponding Compute Engine resource. - class NetworkInterface - include Google::Apis::Core::Hashable - - # An array of configurations for this interface. This specifies how this - # interface is configured to interact with other network services - # Corresponds to the JSON property `accessConfigs` - # @return [Array] - attr_accessor :access_configs - - # Name of the interface. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The name of the NetworkModule to which this interface applies. If not - # specified, or specified as 'default', this will use the 'default' network. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # An optional IPV4 internal network address to assign to the instance for this - # network interface. - # Corresponds to the JSON property `networkIp` - # @return [String] - attr_accessor :network_ip - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_configs = args[:access_configs] unless args[:access_configs].nil? - @name = args[:name] unless args[:name].nil? - @network = args[:network] unless args[:network].nil? - @network_ip = args[:network_ip] unless args[:network_ip].nil? - end - end - - # - class NetworkModule - include Google::Apis::Core::Hashable - - # Required; The range of internal addresses that are legal on this network. This - # range is a CIDR specification, for example: 192.168.0.0/16. - # Corresponds to the JSON property `IPv4Range` - # @return [String] - attr_accessor :i_pv4_range - - # The description of the network. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # An optional address that is used for default routing to other networks. This - # must be within the range specified by IPv4Range, and is typicall the first - # usable address in that range. If not specified, the default value is the first - # usable address in IPv4Range. - # Corresponds to the JSON property `gatewayIPv4` - # @return [String] - attr_accessor :gateway_i_pv4 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @i_pv4_range = args[:i_pv4_range] unless args[:i_pv4_range].nil? - @description = args[:description] unless args[:description].nil? - @gateway_i_pv4 = args[:gateway_i_pv4] unless args[:gateway_i_pv4].nil? - end - end - - # - class NetworkModuleStatus - include Google::Apis::Core::Hashable - - # [Output Only] The URL of the corresponding Network resource. - # Corresponds to the JSON property `networkUrl` - # @return [String] - attr_accessor :network_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @network_url = args[:network_url] unless args[:network_url].nil? - end - end - - # A Persistent Disk resource that will be created and attached to each Replica - # in the Pool. Each Replica will have a unique persistent disk that is created - # and attached to that Replica. - class NewDisk - include Google::Apis::Core::Hashable - - # How to attach a disk to a Replica. - # Corresponds to the JSON property `attachment` - # @return [Google::Apis::ManagerV1beta2::DiskAttachment] - attr_accessor :attachment - - # If true, then this disk will be deleted when the instance is deleted. - # Corresponds to the JSON property `autoDelete` - # @return [Boolean] - attr_accessor :auto_delete - alias_method :auto_delete?, :auto_delete - - # If true, indicates that this is the root persistent disk. - # Corresponds to the JSON property `boot` - # @return [Boolean] - attr_accessor :boot - alias_method :boot?, :boot - - # Initialization parameters for creating a new disk. - # Corresponds to the JSON property `initializeParams` - # @return [Google::Apis::ManagerV1beta2::NewDiskInitializeParams] - attr_accessor :initialize_params - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attachment = args[:attachment] unless args[:attachment].nil? - @auto_delete = args[:auto_delete] unless args[:auto_delete].nil? - @boot = args[:boot] unless args[:boot].nil? - @initialize_params = args[:initialize_params] unless args[:initialize_params].nil? - end - end - - # Initialization parameters for creating a new disk. - class NewDiskInitializeParams - include Google::Apis::Core::Hashable - - # The size of the created disk in gigabytes. - # Corresponds to the JSON property `diskSizeGb` - # @return [String] - attr_accessor :disk_size_gb - - # Name of the disk type resource describing which disk type to use to create the - # disk. For example 'pd-ssd' or 'pd-standard'. Default is 'pd-standard' - # Corresponds to the JSON property `diskType` - # @return [String] - attr_accessor :disk_type - - # The fully-qualified URL of a source image to use to create this disk. - # 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) - @disk_size_gb = args[:disk_size_gb] unless args[:disk_size_gb].nil? - @disk_type = args[:disk_type] unless args[:disk_type].nil? - @source_image = args[:source_image] unless args[:source_image].nil? - end - end - - # A specification for overriding parameters in a Template that corresponds to - # the Deployment. - class ParamOverride - include Google::Apis::Core::Hashable - - # A JSON Path expression that specifies which parameter should be overridden. - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - # The new value to assign to the overridden 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) - @path = args[:path] unless args[:path].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class ReplicaPoolModule - include Google::Apis::Core::Hashable - - # A list of environment variables. - # Corresponds to the JSON property `envVariables` - # @return [Hash] - attr_accessor :env_variables - - # The Health Checks to configure for the ReplicaPoolModule - # Corresponds to the JSON property `healthChecks` - # @return [Array] - attr_accessor :health_checks - - # Number of replicas in this module. - # Corresponds to the JSON property `numReplicas` - # @return [Fixnum] - attr_accessor :num_replicas - - # Configuration information for a ReplicaPools resource. Specifying an item - # within will determine the ReplicaPools API version used for a - # ReplicaPoolModule. Only one may be specified. - # Corresponds to the JSON property `replicaPoolParams` - # @return [Google::Apis::ManagerV1beta2::ReplicaPoolParams] - attr_accessor :replica_pool_params - - # [Output Only] The name of the Resource View associated with a - # ReplicaPoolModule. This field will be generated by the service. - # Corresponds to the JSON property `resourceView` - # @return [String] - attr_accessor :resource_view - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @env_variables = args[:env_variables] unless args[:env_variables].nil? - @health_checks = args[:health_checks] unless args[:health_checks].nil? - @num_replicas = args[:num_replicas] unless args[:num_replicas].nil? - @replica_pool_params = args[:replica_pool_params] unless args[:replica_pool_params].nil? - @resource_view = args[:resource_view] unless args[:resource_view].nil? - end - end - - # - class ReplicaPoolModuleStatus - include Google::Apis::Core::Hashable - - # [Output Only] The URL of the associated ReplicaPool resource. - # Corresponds to the JSON property `replicaPoolUrl` - # @return [String] - attr_accessor :replica_pool_url - - # [Output Only] The URL of the Resource Group associated with this ReplicaPool. - # Corresponds to the JSON property `resourceViewUrl` - # @return [String] - attr_accessor :resource_view_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @replica_pool_url = args[:replica_pool_url] unless args[:replica_pool_url].nil? - @resource_view_url = args[:resource_view_url] unless args[:resource_view_url].nil? - end - end - - # Configuration information for a ReplicaPools resource. Specifying an item - # within will determine the ReplicaPools API version used for a - # ReplicaPoolModule. Only one may be specified. - class ReplicaPoolParams - include Google::Apis::Core::Hashable - - # Configuration information for a ReplicaPools v1beta1 API resource. Directly - # maps to ReplicaPool InitTemplate. - # Corresponds to the JSON property `v1beta1` - # @return [Google::Apis::ManagerV1beta2::ReplicaPoolParamsV1Beta1] - attr_accessor :v1beta1 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @v1beta1 = args[:v1beta1] unless args[:v1beta1].nil? - end - end - - # Configuration information for a ReplicaPools v1beta1 API resource. Directly - # maps to ReplicaPool InitTemplate. - class ReplicaPoolParamsV1Beta1 - include Google::Apis::Core::Hashable - - # Whether these replicas should be restarted if they experience a failure. The - # default value is true. - # Corresponds to the JSON property `autoRestart` - # @return [Boolean] - attr_accessor :auto_restart - alias_method :auto_restart?, :auto_restart - - # The base name for instances within this ReplicaPool. - # Corresponds to the JSON property `baseInstanceName` - # @return [String] - attr_accessor :base_instance_name - - # Enables IP Forwarding - # Corresponds to the JSON property `canIpForward` - # @return [Boolean] - attr_accessor :can_ip_forward - alias_method :can_ip_forward?, :can_ip_forward - - # An optional textual description of the resource. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A list of existing Persistent Disk resources to attach to each replica in the - # pool. Each disk will be attached in read-only mode to every replica. - # Corresponds to the JSON property `disksToAttach` - # @return [Array] - attr_accessor :disks_to_attach - - # A list of Disk resources to create and attach to each Replica in the Pool. - # Currently, you can only define one disk and it must be a root persistent disk. - # Note that Replica Pool will create a root persistent disk for each replica. - # Corresponds to the JSON property `disksToCreate` - # @return [Array] - attr_accessor :disks_to_create - - # Name of the Action to be run during initialization of a ReplicaPoolModule. - # Corresponds to the JSON property `initAction` - # @return [String] - attr_accessor :init_action - - # The machine type for this instance. Either a complete URL, or the resource - # name (e.g. n1-standard-1). - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # A Compute Engine metadata entry. Identical to the metadata on the - # corresponding Compute Engine resource. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::ManagerV1beta2::Metadata] - attr_accessor :metadata - - # A list of network interfaces for the instance. Currently only one interface is - # supported by Google Compute Engine. - # Corresponds to the JSON property `networkInterfaces` - # @return [Array] - attr_accessor :network_interfaces - - # - # Corresponds to the JSON property `onHostMaintenance` - # @return [String] - attr_accessor :on_host_maintenance - - # A list of Service Accounts to enable for this instance. - # Corresponds to the JSON property `serviceAccounts` - # @return [Array] - attr_accessor :service_accounts - - # A Compute Engine Instance tag, identical to the tags on the corresponding - # Compute Engine Instance resource. - # Corresponds to the JSON property `tags` - # @return [Google::Apis::ManagerV1beta2::Tag] - attr_accessor :tags - - # The zone for this ReplicaPool. - # 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) - @auto_restart = args[:auto_restart] unless args[:auto_restart].nil? - @base_instance_name = args[:base_instance_name] unless args[:base_instance_name].nil? - @can_ip_forward = args[:can_ip_forward] unless args[:can_ip_forward].nil? - @description = args[:description] unless args[:description].nil? - @disks_to_attach = args[:disks_to_attach] unless args[:disks_to_attach].nil? - @disks_to_create = args[:disks_to_create] unless args[:disks_to_create].nil? - @init_action = args[:init_action] unless args[:init_action].nil? - @machine_type = args[:machine_type] unless args[:machine_type].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @network_interfaces = args[:network_interfaces] unless args[:network_interfaces].nil? - @on_host_maintenance = args[:on_host_maintenance] unless args[:on_host_maintenance].nil? - @service_accounts = args[:service_accounts] unless args[:service_accounts].nil? - @tags = args[:tags] unless args[:tags].nil? - @zone = args[:zone] unless args[:zone].nil? - end - end - - # A Compute Engine service account, identical to the Compute Engine resource. - class ServiceAccount - include Google::Apis::Core::Hashable - - # Service account email address. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # List of OAuth2 scopes to obtain for the service account. - # Corresponds to the JSON property `scopes` - # @return [Array] - 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 - - # A Compute Engine Instance tag, identical to the tags on the corresponding - # Compute Engine Instance resource. - class Tag - include Google::Apis::Core::Hashable - - # The fingerprint of the tag. - # Corresponds to the JSON property `fingerPrint` - # @return [String] - attr_accessor :finger_print - - # Items contained in this tag. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @finger_print = args[:finger_print] unless args[:finger_print].nil? - @items = args[:items] unless args[:items].nil? - end - end - - # A Template represents a complete configuration for a Deployment. - class Template - include Google::Apis::Core::Hashable - - # Action definitions for use in Module intents in this Template. - # Corresponds to the JSON property `actions` - # @return [Hash] - attr_accessor :actions - - # A user-supplied description of this Template. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A list of modules for this Template. - # Corresponds to the JSON property `modules` - # @return [Hash] - attr_accessor :modules - - # Name of this Template. The name must conform to the expression: [a-zA-Z0-9-_]` - # 1,64` - # 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) - @actions = args[:actions] unless args[:actions].nil? - @description = args[:description] unless args[:description].nil? - @modules = args[:modules] unless args[:modules].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # - class ListTemplatesResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @resources = args[:resources] unless args[:resources].nil? - end - end - end - end -end diff --git a/generated/google/apis/manager_v1beta2/representations.rb b/generated/google/apis/manager_v1beta2/representations.rb deleted file mode 100644 index 7f0bc3c32..000000000 --- a/generated/google/apis/manager_v1beta2/representations.rb +++ /dev/null @@ -1,536 +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 ManagerV1beta2 - - class AccessConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Action - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AllowedRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AutoscalingModule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AutoscalingModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeployState - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Deployment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDeploymentsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DiskAttachment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class EnvVariable - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExistingDisk - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FirewallModule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FirewallModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HealthCheckModule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class HealthCheckModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LbModule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LbModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MetadataItem - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Module - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NetworkInterface - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NetworkModule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NetworkModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NewDisk - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NewDiskInitializeParams - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ParamOverride - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReplicaPoolModule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReplicaPoolModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReplicaPoolParams - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReplicaPoolParamsV1Beta1 - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ServiceAccount - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Tag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Template - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTemplatesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AccessConfig - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :nat_ip, as: 'natIp' - property :type, as: 'type' - end - end - - # @private - class Action - class Representation < Google::Apis::Core::JsonRepresentation - collection :commands, as: 'commands' - property :timeout_ms, as: 'timeoutMs' - end - end - - # @private - class AllowedRule - class Representation < Google::Apis::Core::JsonRepresentation - property :ip_protocol, as: 'IPProtocol' - collection :ports, as: 'ports' - end - end - - # @private - class AutoscalingModule - class Representation < Google::Apis::Core::JsonRepresentation - property :cool_down_period_sec, as: 'coolDownPeriodSec' - property :description, as: 'description' - property :max_num_replicas, as: 'maxNumReplicas' - property :min_num_replicas, as: 'minNumReplicas' - property :signal_type, as: 'signalType' - property :target_module, as: 'targetModule' - property :target_utilization, as: 'targetUtilization' - end - end - - # @private - class AutoscalingModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :autoscaling_config_url, as: 'autoscalingConfigUrl' - end - end - - # @private - class DeployState - class Representation < Google::Apis::Core::JsonRepresentation - property :details, as: 'details' - property :status, as: 'status' - end - end - - # @private - class Deployment - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_date, as: 'creationDate' - property :description, as: 'description' - hash :modules, as: 'modules', class: Google::Apis::ManagerV1beta2::ModuleStatus, decorator: Google::Apis::ManagerV1beta2::ModuleStatus::Representation - - property :name, as: 'name' - collection :overrides, as: 'overrides', class: Google::Apis::ManagerV1beta2::ParamOverride, decorator: Google::Apis::ManagerV1beta2::ParamOverride::Representation - - property :state, as: 'state', class: Google::Apis::ManagerV1beta2::DeployState, decorator: Google::Apis::ManagerV1beta2::DeployState::Representation - - property :template_name, as: 'templateName' - end - end - - # @private - class ListDeploymentsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ManagerV1beta2::Deployment, decorator: Google::Apis::ManagerV1beta2::Deployment::Representation - - end - end - - # @private - class DiskAttachment - class Representation < Google::Apis::Core::JsonRepresentation - property :device_name, as: 'deviceName' - property :index, as: 'index' - end - end - - # @private - class EnvVariable - class Representation < Google::Apis::Core::JsonRepresentation - property :hidden, as: 'hidden' - property :value, as: 'value' - end - end - - # @private - class ExistingDisk - class Representation < Google::Apis::Core::JsonRepresentation - property :attachment, as: 'attachment', class: Google::Apis::ManagerV1beta2::DiskAttachment, decorator: Google::Apis::ManagerV1beta2::DiskAttachment::Representation - - property :source, as: 'source' - end - end - - # @private - class FirewallModule - class Representation < Google::Apis::Core::JsonRepresentation - collection :allowed, as: 'allowed', class: Google::Apis::ManagerV1beta2::AllowedRule, decorator: Google::Apis::ManagerV1beta2::AllowedRule::Representation - - property :description, as: 'description' - property :network, as: 'network' - collection :source_ranges, as: 'sourceRanges' - collection :source_tags, as: 'sourceTags' - collection :target_tags, as: 'targetTags' - end - end - - # @private - class FirewallModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :firewall_url, as: 'firewallUrl' - end - end - - # @private - class HealthCheckModule - class Representation < Google::Apis::Core::JsonRepresentation - property :check_interval_sec, as: 'checkIntervalSec' - property :description, as: 'description' - property :healthy_threshold, as: 'healthyThreshold' - property :host, as: 'host' - property :path, as: 'path' - property :port, as: 'port' - property :timeout_sec, as: 'timeoutSec' - property :unhealthy_threshold, as: 'unhealthyThreshold' - end - end - - # @private - class HealthCheckModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :health_check_url, as: 'healthCheckUrl' - end - end - - # @private - class LbModule - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - collection :health_checks, as: 'healthChecks' - property :ip_address, as: 'ipAddress' - property :ip_protocol, as: 'ipProtocol' - property :port_range, as: 'portRange' - property :session_affinity, as: 'sessionAffinity' - collection :target_modules, as: 'targetModules' - end - end - - # @private - class LbModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :forwarding_rule_url, as: 'forwardingRuleUrl' - property :target_pool_url, as: 'targetPoolUrl' - end - end - - # @private - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation - property :finger_print, as: 'fingerPrint' - collection :items, as: 'items', class: Google::Apis::ManagerV1beta2::MetadataItem, decorator: Google::Apis::ManagerV1beta2::MetadataItem::Representation - - end - end - - # @private - class MetadataItem - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :value, as: 'value' - end - end - - # @private - class Module - class Representation < Google::Apis::Core::JsonRepresentation - property :autoscaling_module, as: 'autoscalingModule', class: Google::Apis::ManagerV1beta2::AutoscalingModule, decorator: Google::Apis::ManagerV1beta2::AutoscalingModule::Representation - - property :firewall_module, as: 'firewallModule', class: Google::Apis::ManagerV1beta2::FirewallModule, decorator: Google::Apis::ManagerV1beta2::FirewallModule::Representation - - property :health_check_module, as: 'healthCheckModule', class: Google::Apis::ManagerV1beta2::HealthCheckModule, decorator: Google::Apis::ManagerV1beta2::HealthCheckModule::Representation - - property :lb_module, as: 'lbModule', class: Google::Apis::ManagerV1beta2::LbModule, decorator: Google::Apis::ManagerV1beta2::LbModule::Representation - - property :network_module, as: 'networkModule', class: Google::Apis::ManagerV1beta2::NetworkModule, decorator: Google::Apis::ManagerV1beta2::NetworkModule::Representation - - property :replica_pool_module, as: 'replicaPoolModule', class: Google::Apis::ManagerV1beta2::ReplicaPoolModule, decorator: Google::Apis::ManagerV1beta2::ReplicaPoolModule::Representation - - property :type, as: 'type' - end - end - - # @private - class ModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :autoscaling_module_status, as: 'autoscalingModuleStatus', class: Google::Apis::ManagerV1beta2::AutoscalingModuleStatus, decorator: Google::Apis::ManagerV1beta2::AutoscalingModuleStatus::Representation - - property :firewall_module_status, as: 'firewallModuleStatus', class: Google::Apis::ManagerV1beta2::FirewallModuleStatus, decorator: Google::Apis::ManagerV1beta2::FirewallModuleStatus::Representation - - property :health_check_module_status, as: 'healthCheckModuleStatus', class: Google::Apis::ManagerV1beta2::HealthCheckModuleStatus, decorator: Google::Apis::ManagerV1beta2::HealthCheckModuleStatus::Representation - - property :lb_module_status, as: 'lbModuleStatus', class: Google::Apis::ManagerV1beta2::LbModuleStatus, decorator: Google::Apis::ManagerV1beta2::LbModuleStatus::Representation - - property :network_module_status, as: 'networkModuleStatus', class: Google::Apis::ManagerV1beta2::NetworkModuleStatus, decorator: Google::Apis::ManagerV1beta2::NetworkModuleStatus::Representation - - property :replica_pool_module_status, as: 'replicaPoolModuleStatus', class: Google::Apis::ManagerV1beta2::ReplicaPoolModuleStatus, decorator: Google::Apis::ManagerV1beta2::ReplicaPoolModuleStatus::Representation - - property :state, as: 'state', class: Google::Apis::ManagerV1beta2::DeployState, decorator: Google::Apis::ManagerV1beta2::DeployState::Representation - - property :type, as: 'type' - end - end - - # @private - class NetworkInterface - class Representation < Google::Apis::Core::JsonRepresentation - collection :access_configs, as: 'accessConfigs', class: Google::Apis::ManagerV1beta2::AccessConfig, decorator: Google::Apis::ManagerV1beta2::AccessConfig::Representation - - property :name, as: 'name' - property :network, as: 'network' - property :network_ip, as: 'networkIp' - end - end - - # @private - class NetworkModule - class Representation < Google::Apis::Core::JsonRepresentation - property :i_pv4_range, as: 'IPv4Range' - property :description, as: 'description' - property :gateway_i_pv4, as: 'gatewayIPv4' - end - end - - # @private - class NetworkModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :network_url, as: 'networkUrl' - end - end - - # @private - class NewDisk - class Representation < Google::Apis::Core::JsonRepresentation - property :attachment, as: 'attachment', class: Google::Apis::ManagerV1beta2::DiskAttachment, decorator: Google::Apis::ManagerV1beta2::DiskAttachment::Representation - - property :auto_delete, as: 'autoDelete' - property :boot, as: 'boot' - property :initialize_params, as: 'initializeParams', class: Google::Apis::ManagerV1beta2::NewDiskInitializeParams, decorator: Google::Apis::ManagerV1beta2::NewDiskInitializeParams::Representation - - end - end - - # @private - class NewDiskInitializeParams - class Representation < Google::Apis::Core::JsonRepresentation - property :disk_size_gb, as: 'diskSizeGb' - property :disk_type, as: 'diskType' - property :source_image, as: 'sourceImage' - end - end - - # @private - class ParamOverride - class Representation < Google::Apis::Core::JsonRepresentation - property :path, as: 'path' - property :value, as: 'value' - end - end - - # @private - class ReplicaPoolModule - class Representation < Google::Apis::Core::JsonRepresentation - hash :env_variables, as: 'envVariables', class: Google::Apis::ManagerV1beta2::EnvVariable, decorator: Google::Apis::ManagerV1beta2::EnvVariable::Representation - - collection :health_checks, as: 'healthChecks' - property :num_replicas, as: 'numReplicas' - property :replica_pool_params, as: 'replicaPoolParams', class: Google::Apis::ManagerV1beta2::ReplicaPoolParams, decorator: Google::Apis::ManagerV1beta2::ReplicaPoolParams::Representation - - property :resource_view, as: 'resourceView' - end - end - - # @private - class ReplicaPoolModuleStatus - class Representation < Google::Apis::Core::JsonRepresentation - property :replica_pool_url, as: 'replicaPoolUrl' - property :resource_view_url, as: 'resourceViewUrl' - end - end - - # @private - class ReplicaPoolParams - class Representation < Google::Apis::Core::JsonRepresentation - property :v1beta1, as: 'v1beta1', class: Google::Apis::ManagerV1beta2::ReplicaPoolParamsV1Beta1, decorator: Google::Apis::ManagerV1beta2::ReplicaPoolParamsV1Beta1::Representation - - end - end - - # @private - class ReplicaPoolParamsV1Beta1 - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_restart, as: 'autoRestart' - property :base_instance_name, as: 'baseInstanceName' - property :can_ip_forward, as: 'canIpForward' - property :description, as: 'description' - collection :disks_to_attach, as: 'disksToAttach', class: Google::Apis::ManagerV1beta2::ExistingDisk, decorator: Google::Apis::ManagerV1beta2::ExistingDisk::Representation - - collection :disks_to_create, as: 'disksToCreate', class: Google::Apis::ManagerV1beta2::NewDisk, decorator: Google::Apis::ManagerV1beta2::NewDisk::Representation - - property :init_action, as: 'initAction' - property :machine_type, as: 'machineType' - property :metadata, as: 'metadata', class: Google::Apis::ManagerV1beta2::Metadata, decorator: Google::Apis::ManagerV1beta2::Metadata::Representation - - collection :network_interfaces, as: 'networkInterfaces', class: Google::Apis::ManagerV1beta2::NetworkInterface, decorator: Google::Apis::ManagerV1beta2::NetworkInterface::Representation - - property :on_host_maintenance, as: 'onHostMaintenance' - collection :service_accounts, as: 'serviceAccounts', class: Google::Apis::ManagerV1beta2::ServiceAccount, decorator: Google::Apis::ManagerV1beta2::ServiceAccount::Representation - - property :tags, as: 'tags', class: Google::Apis::ManagerV1beta2::Tag, decorator: Google::Apis::ManagerV1beta2::Tag::Representation - - 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 - - # @private - class Tag - class Representation < Google::Apis::Core::JsonRepresentation - property :finger_print, as: 'fingerPrint' - collection :items, as: 'items' - end - end - - # @private - class Template - class Representation < Google::Apis::Core::JsonRepresentation - hash :actions, as: 'actions', class: Google::Apis::ManagerV1beta2::Action, decorator: Google::Apis::ManagerV1beta2::Action::Representation - - property :description, as: 'description' - hash :modules, as: 'modules', class: Google::Apis::ManagerV1beta2::Module, decorator: Google::Apis::ManagerV1beta2::Module::Representation - - property :name, as: 'name' - end - end - - # @private - class ListTemplatesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :resources, as: 'resources', class: Google::Apis::ManagerV1beta2::Template, decorator: Google::Apis::ManagerV1beta2::Template::Representation - - end - end - end - end -end diff --git a/generated/google/apis/manager_v1beta2/service.rb b/generated/google/apis/manager_v1beta2/service.rb deleted file mode 100644 index 0e0b220fe..000000000 --- a/generated/google/apis/manager_v1beta2/service.rb +++ /dev/null @@ -1,380 +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 ManagerV1beta2 - # Deployment Manager API - # - # The Deployment Manager API allows users to declaratively configure, deploy and - # run complex solutions on the Google Cloud Platform. - # - # @example - # require 'google/apis/manager_v1beta2' - # - # Manager = Google::Apis::ManagerV1beta2 # Alias the module - # service = Manager::ManagerService.new - # - # @see https://developers.google.com/deployment-manager/ - class ManagerService < 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/', 'manager/v1beta2/projects/') - end - - # - # @param [String] project_id - # @param [String] region - # @param [String] deployment_name - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_deployment(project_id, region, deployment_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/regions/{region}/deployments/{deploymentName}' - command = make_simple_command(:delete, path, options) - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['deploymentName'] = deployment_name unless deployment_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # - # @param [String] project_id - # @param [String] region - # @param [String] deployment_name - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ManagerV1beta2::Deployment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ManagerV1beta2::Deployment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_deployment(project_id, region, deployment_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/regions/{region}/deployments/{deploymentName}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ManagerV1beta2::Deployment::Representation - command.response_class = Google::Apis::ManagerV1beta2::Deployment - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['deploymentName'] = deployment_name unless deployment_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # - # @param [String] project_id - # @param [String] region - # @param [Google::Apis::ManagerV1beta2::Deployment] deployment_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::ManagerV1beta2::Deployment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ManagerV1beta2::Deployment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_deployment(project_id, region, deployment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/regions/{region}/deployments' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ManagerV1beta2::Deployment::Representation - command.request_object = deployment_object - command.response_representation = Google::Apis::ManagerV1beta2::Deployment::Representation - command.response_class = Google::Apis::ManagerV1beta2::Deployment - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # - # @param [String] project_id - # @param [String] region - # @param [Fixnum] max_results - # Maximum count of results to be returned. Acceptable values are 0 to 100, - # inclusive. (Default: 50) - # @param [String] page_token - # Specifies a nextPageToken returned by a previous list request. This token can - # be used to request the next page of results from a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ManagerV1beta2::ListDeploymentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ManagerV1beta2::ListDeploymentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_deployments(project_id, region, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/regions/{region}/deployments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ManagerV1beta2::ListDeploymentsResponse::Representation - command.response_class = Google::Apis::ManagerV1beta2::ListDeploymentsResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.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_id - # @param [String] template_name - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_template(project_id, template_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/templates/{templateName}' - command = make_simple_command(:delete, path, options) - command.params['projectId'] = project_id unless project_id.nil? - command.params['templateName'] = template_name unless template_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # - # @param [String] project_id - # @param [String] template_name - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ManagerV1beta2::Template] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ManagerV1beta2::Template] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_template(project_id, template_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/templates/{templateName}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ManagerV1beta2::Template::Representation - command.response_class = Google::Apis::ManagerV1beta2::Template - command.params['projectId'] = project_id unless project_id.nil? - command.params['templateName'] = template_name unless template_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # - # @param [String] project_id - # @param [Google::Apis::ManagerV1beta2::Template] template_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::ManagerV1beta2::Template] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ManagerV1beta2::Template] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_template(project_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/templates' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ManagerV1beta2::Template::Representation - command.request_object = template_object - command.response_representation = Google::Apis::ManagerV1beta2::Template::Representation - command.response_class = Google::Apis::ManagerV1beta2::Template - 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 - - # - # @param [String] project_id - # @param [Fixnum] max_results - # Maximum count of results to be returned. Acceptable values are 0 to 100, - # inclusive. (Default: 50) - # @param [String] page_token - # Specifies a nextPageToken returned by a previous list request. This token can - # be used to request the next page of results from a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ManagerV1beta2::ListTemplatesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ManagerV1beta2::ListTemplatesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_templates(project_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{projectId}/templates' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ManagerV1beta2::ListTemplatesResponse::Representation - command.response_class = Google::Apis::ManagerV1beta2::ListTemplatesResponse - command.params['projectId'] = project_id unless project_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 diff --git a/generated/google/apis/mapsengine_v1.rb b/generated/google/apis/mapsengine_v1.rb deleted file mode 100644 index 556a0c2ed..000000000 --- a/generated/google/apis/mapsengine_v1.rb +++ /dev/null @@ -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/mapsengine_v1/service.rb' -require 'google/apis/mapsengine_v1/classes.rb' -require 'google/apis/mapsengine_v1/representations.rb' - -module Google - module Apis - # Google Maps Engine API - # - # The Google Maps Engine API allows developers to store and query geospatial - # vector and raster data. - # - # @see https://developers.google.com/maps-engine/ - module MapsengineV1 - VERSION = 'V1' - REVISION = '20150611' - - # View and manage your Google My Maps data - AUTH_MAPSENGINE = 'https://www.googleapis.com/auth/mapsengine' - - # View your Google My Maps data - AUTH_MAPSENGINE_READONLY = 'https://www.googleapis.com/auth/mapsengine.readonly' - end - end -end diff --git a/generated/google/apis/mapsengine_v1/classes.rb b/generated/google/apis/mapsengine_v1/classes.rb deleted file mode 100644 index 48199a5f0..000000000 --- a/generated/google/apis/mapsengine_v1/classes.rb +++ /dev/null @@ -1,2873 +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 MapsengineV1 - - # - class GeoJsonGeometry - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # - class MapItem - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Acquisition time represents acquired time of a raster. - class AcquisitionTime - include Google::Apis::Core::Hashable - - # The end time if acquisition time is a range. The value is an RFC 3339 - # formatted date-time value (1970-01-01T00:00:00Z). - # Corresponds to the JSON property `end` - # @return [DateTime] - attr_accessor :end - - # The precision of acquisition time. - # Corresponds to the JSON property `precision` - # @return [String] - attr_accessor :precision - - # The acquisition time, or start time if acquisition time is a range. The value - # is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). - # Corresponds to the JSON property `start` - # @return [DateTime] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] unless args[:end].nil? - @precision = args[:precision] unless args[:precision].nil? - @start = args[:start] unless args[:start].nil? - end - end - - # An asset is any Google Maps Engine resource that has a globally unique ID. - # Assets include maps, layers, vector tables, raster collections, and rasters. - # Projects and features are not considered assets. - # More detailed information about an asset can be obtained by querying the asset' - # s particular endpoint. - class Asset - include Google::Apis::Core::Hashable - - # A rectangular bounding box which contains all of the data in this asset. The - # box is expressed as \"west, south, east, north\". The numbers represent - # latitude and longitude in decimal degrees. - # Corresponds to the JSON property `bbox` - # @return [Array] - attr_accessor :bbox - - # The creation time of this asset. The value is an RFC 3339-formatted date-time - # value (for example, 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # The email address of the creator of this asset. This is only returned on GET - # requests and not LIST requests. - # Corresponds to the JSON property `creatorEmail` - # @return [String] - attr_accessor :creator_email - - # The asset's description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The ETag, used to refer to the current version of the asset. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The asset's globally unique ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The last modified time of this asset. The value is an RFC 3339-formatted date- - # time value (for example, 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `lastModifiedTime` - # @return [DateTime] - attr_accessor :last_modified_time - - # The email address of the last modifier of this asset. This is only returned on - # GET requests and not LIST requests. - # Corresponds to the JSON property `lastModifierEmail` - # @return [String] - attr_accessor :last_modifier_email - - # The asset's name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the project to which the asset belongs. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The URL to query to retrieve the asset's complete object. The assets endpoint - # only returns high-level information about a resource. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - # An array of text strings, with each string representing a tag. More - # information about tags can be found in the Tagging data article of the Maps - # Engine help center. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # The type of asset. One of raster, rasterCollection, table, map, or layer. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # If true, WRITERs of the asset are able to edit the asset permissions. - # Corresponds to the JSON property `writersCanEditPermissions` - # @return [Boolean] - attr_accessor :writers_can_edit_permissions - alias_method :writers_can_edit_permissions?, :writers_can_edit_permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bbox = args[:bbox] unless args[:bbox].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @creator_email = args[:creator_email] unless args[:creator_email].nil? - @description = args[:description] unless args[:description].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @last_modifier_email = args[:last_modifier_email] unless args[:last_modifier_email].nil? - @name = args[:name] unless args[:name].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @resource = args[:resource] unless args[:resource].nil? - @tags = args[:tags] unless args[:tags].nil? - @type = args[:type] unless args[:type].nil? - @writers_can_edit_permissions = args[:writers_can_edit_permissions] unless args[:writers_can_edit_permissions].nil? - end - end - - # The response returned by a call to resources.List. - class ListAssetsResponse - include Google::Apis::Core::Hashable - - # Assets returned. - # Corresponds to the JSON property `assets` - # @return [Array] - attr_accessor :assets - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @assets = args[:assets] unless args[:assets].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Border in line style. Both color and width are required. - class Border - include Google::Apis::Core::Hashable - - # Color of the border. - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # Opacity of the border. - # Corresponds to the JSON property `opacity` - # @return [Float] - attr_accessor :opacity - - # Width of the border, in pixels. - # Corresponds to the JSON property `width` - # @return [Float] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] unless args[:color].nil? - @opacity = args[:opacity] unless args[:opacity].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # Basic color used in styling. - class Color - include Google::Apis::Core::Hashable - - # The CSS style color, can be in format of "red" or "#7733EE". - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # Opacity ranges from 0 to 1, inclusive. If not provided, default to 1. - # Corresponds to the JSON property `opacity` - # @return [Float] - attr_accessor :opacity - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] unless args[:color].nil? - @opacity = args[:opacity] unless args[:opacity].nil? - end - end - - # - class Datasource - include Google::Apis::Core::Hashable - - # The ID of a datasource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - - # A display rule of the vector style. - class DisplayRule - include Google::Apis::Core::Hashable - - # This display rule will only be applied to features that match all of the - # filters here. If filters is empty, then the rule applies to all features. - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - # Style for lines. - # Corresponds to the JSON property `lineOptions` - # @return [Google::Apis::MapsengineV1::LineStyle] - attr_accessor :line_options - - # Display rule name. Name is not unique and cannot be used for identification - # purpose. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Style for points. - # Corresponds to the JSON property `pointOptions` - # @return [Google::Apis::MapsengineV1::PointStyle] - attr_accessor :point_options - - # Style for polygons. - # Corresponds to the JSON property `polygonOptions` - # @return [Google::Apis::MapsengineV1::PolygonStyle] - attr_accessor :polygon_options - - # Zoom level range. Zoom levels are restricted between 0 and 24, inclusive. - # Corresponds to the JSON property `zoomLevels` - # @return [Google::Apis::MapsengineV1::ZoomLevels] - attr_accessor :zoom_levels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filters = args[:filters] unless args[:filters].nil? - @line_options = args[:line_options] unless args[:line_options].nil? - @name = args[:name] unless args[:name].nil? - @point_options = args[:point_options] unless args[:point_options].nil? - @polygon_options = args[:polygon_options] unless args[:polygon_options].nil? - @zoom_levels = args[:zoom_levels] unless args[:zoom_levels].nil? - end - end - - # A feature within a table. - class Feature - include Google::Apis::Core::Hashable - - # The geometry member of this Feature. - # Corresponds to the JSON property `geometry` - # @return [Google::Apis::MapsengineV1::GeoJsonGeometry] - attr_accessor :geometry - - # The properties associated with a feature. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - # Identifies this object as a feature. - # 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) - @geometry = args[:geometry] unless args[:geometry].nil? - @properties = args[:properties] unless args[:properties].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A feature info contains information about individual feature. - class FeatureInfo - include Google::Apis::Core::Hashable - - # HTML template of the info window. If not provided, a default template with all - # attributes will be generated. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content = args[:content] unless args[:content].nil? - end - end - - # The request sent to features.BatchDelete. - class BatchDeleteFeaturesRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `gx_ids` - # @return [Array] - attr_accessor :gx_ids - - # - # Corresponds to the JSON property `primaryKeys` - # @return [Array] - attr_accessor :primary_keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gx_ids = args[:gx_ids] unless args[:gx_ids].nil? - @primary_keys = args[:primary_keys] unless args[:primary_keys].nil? - end - end - - # The request sent to features.Insert. - class BatchInsertFeaturesRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # If true, the server will normalize feature geometries. It is assumed that the - # South Pole is exterior to any polygons given. See here for a list of - # normalizations. If false, all feature geometries must be given already - # normalized. The points in all LinearRings must be listed in counter-clockwise - # order, and LinearRings may not intersect. - # Corresponds to the JSON property `normalizeGeometries` - # @return [Boolean] - attr_accessor :normalize_geometries - alias_method :normalize_geometries?, :normalize_geometries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @features = args[:features] unless args[:features].nil? - @normalize_geometries = args[:normalize_geometries] unless args[:normalize_geometries].nil? - end - end - - # The request sent to features.BatchPatch. - class BatchPatchFeaturesRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # If true, the server will normalize feature geometries. It is assumed that the - # South Pole is exterior to any polygons given. See here for a list of - # normalizations. If false, all feature geometries must be given already - # normalized. The points in all LinearRings must be listed in counter-clockwise - # order, and LinearRings may not intersect. - # Corresponds to the JSON property `normalizeGeometries` - # @return [Boolean] - attr_accessor :normalize_geometries - alias_method :normalize_geometries?, :normalize_geometries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @features = args[:features] unless args[:features].nil? - @normalize_geometries = args[:normalize_geometries] unless args[:normalize_geometries].nil? - end - end - - # The response returned by a call to features.List. - class ListFeaturesResponse - include Google::Apis::Core::Hashable - - # An indicator of the maximum rate at which queries may be made, if all queries - # were as expensive as this query. - # Corresponds to the JSON property `allowedQueriesPerSecond` - # @return [Float] - attr_accessor :allowed_queries_per_second - - # Resources returned. - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A schema indicating the properties which may be associated with features - # within a Table, and the types of those properties. - # Corresponds to the JSON property `schema` - # @return [Google::Apis::MapsengineV1::Schema] - attr_accessor :schema - - # - # 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) - @allowed_queries_per_second = args[:allowed_queries_per_second] unless args[:allowed_queries_per_second].nil? - @features = args[:features] unless args[:features].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @schema = args[:schema] unless args[:schema].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A single File, which is a component of an Asset. - class File - include Google::Apis::Core::Hashable - - # The name of the file. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - - # The size of the file in bytes. - # Corresponds to the JSON property `size` - # @return [String] - attr_accessor :size - - # The upload status of the file. - # Corresponds to the JSON property `uploadStatus` - # @return [String] - attr_accessor :upload_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filename = args[:filename] unless args[:filename].nil? - @size = args[:size] unless args[:size].nil? - @upload_status = args[:upload_status] unless args[:upload_status].nil? - end - end - - # Conditions for filtering features. - class Filter - include Google::Apis::Core::Hashable - - # The column name to filter on. - # Corresponds to the JSON property `column` - # @return [String] - attr_accessor :column - - # Operation used to evaluate the filter. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # Value to be evaluated against attribute. - # Corresponds to the JSON property `value` - # @return [Object] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column = args[:column] unless args[:column].nil? - @operator = args[:operator] unless args[:operator].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # A heterogenous collection of GeoJsonGeometry objects. - class GeoJsonGeometryCollection < Google::Apis::MapsengineV1::GeoJsonGeometry - include Google::Apis::Core::Hashable - - # An array of geometry objects. There must be at least 2 different types of - # geometries in the array. - # Corresponds to the JSON property `geometries` - # @return [Array] - attr_accessor :geometries - - # Identifies this object as a GeoJsonGeometryCollection. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - @type = 'GeometryCollection' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @geometries = args[:geometries] unless args[:geometries].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class GeoJsonLineString < Google::Apis::MapsengineV1::GeoJsonGeometry - include Google::Apis::Core::Hashable - - # An array of two or more positions, representing a line. - # Corresponds to the JSON property `coordinates` - # @return [Array>] - attr_accessor :coordinates - - # Identifies this object as a GeoJsonLineString. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - @type = 'LineString' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Multi Line String - class GeoJsonMultiLineString < Google::Apis::MapsengineV1::GeoJsonGeometry - include Google::Apis::Core::Hashable - - # An array of at least two GeoJsonLineString coordinate arrays. - # Corresponds to the JSON property `coordinates` - # @return [Array>>] - attr_accessor :coordinates - - # Identifies this object as a GeoJsonMultiLineString. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - @type = 'MultiLineString' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class GeoJsonMultiPoint < Google::Apis::MapsengineV1::GeoJsonGeometry - include Google::Apis::Core::Hashable - - # An array of at least two GeoJsonPoint coordinate arrays. - # Corresponds to the JSON property `coordinates` - # @return [Array>] - attr_accessor :coordinates - - # Identifies this object as a GeoJsonMultiPoint. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - @type = 'MultiPoint' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class GeoJsonMultiPolygon < Google::Apis::MapsengineV1::GeoJsonGeometry - include Google::Apis::Core::Hashable - - # An array of at least two GeoJsonPolygon coordinate arrays. - # Corresponds to the JSON property `coordinates` - # @return [Array>>>] - attr_accessor :coordinates - - # Identifies this object as a GeoJsonMultiPolygon. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - @type = 'MultiPolygon' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class GeoJsonPoint < Google::Apis::MapsengineV1::GeoJsonGeometry - include Google::Apis::Core::Hashable - - # A position represents a geographical position as an array containing a - # longitude and a latitude, and optionally an altitude, in that order. All - # Geometry objects make use of positions to represent geometries as nested - # arrays. The structure of the array is governed by the type of the geometry. - # Corresponds to the JSON property `coordinates` - # @return [Array] - attr_accessor :coordinates - - # Identifies this object as a GeoJsonPoint. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - @type = 'Point' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class GeoJsonPolygon < Google::Apis::MapsengineV1::GeoJsonGeometry - include Google::Apis::Core::Hashable - - # An array of LinearRings. A LinearRing is a GeoJsonLineString which is closed ( - # that is, the first and last GeoJsonPositions are equal), and which contains at - # least four GeoJsonPositions. For polygons with multiple rings, the first - # LinearRing is the exterior ring, and any subsequent rings are interior rings ( - # that is, holes). - # Corresponds to the JSON property `coordinates` - # @return [Array>>] - attr_accessor :coordinates - - # Identifies this object as a GeoJsonPolygon. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - @type = 'Polygon' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @coordinates = args[:coordinates] unless args[:coordinates].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # An icon is a user-uploaded image that can be used to style point geometries. - class Icon - include Google::Apis::Core::Hashable - - # The description of this Icon, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # An ID used to refer to this Icon. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of this Icon, supplied by the author. - # 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) - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Style for icon, this is part of point style. - class IconStyle - include Google::Apis::Core::Hashable - - # Custom icon id. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Stock icon name. To use a stock icon, prefix it with 'gx_'. See Stock icon - # names for valid icon names. For example, to specify small_red, set name to ' - # gx_small_red'. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Parameters for styling points as scaled shapes. - # Corresponds to the JSON property `scaledShape` - # @return [Google::Apis::MapsengineV1::ScaledShape] - attr_accessor :scaled_shape - - # Parameters for scaling scaled shapes. - # Corresponds to the JSON property `scalingFunction` - # @return [Google::Apis::MapsengineV1::ScalingFunction] - attr_accessor :scaling_function - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - @scaled_shape = args[:scaled_shape] unless args[:scaled_shape].nil? - @scaling_function = args[:scaling_function] unless args[:scaling_function].nil? - end - end - - # The response returned by a call to icons.List. - class ListIconsResponse - include Google::Apis::Core::Hashable - - # Resources returned. - # Corresponds to the JSON property `icons` - # @return [Array] - attr_accessor :icons - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @icons = args[:icons] unless args[:icons].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Text label style. - class LabelStyle - include Google::Apis::Core::Hashable - - # Color of the text. If not provided, default to black. - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # The column value of the feature to be displayed. - # Corresponds to the JSON property `column` - # @return [String] - attr_accessor :column - - # Font style of the label, defaults to 'normal'. - # Corresponds to the JSON property `fontStyle` - # @return [String] - attr_accessor :font_style - - # Font weight of the label, defaults to 'normal'. - # Corresponds to the JSON property `fontWeight` - # @return [String] - attr_accessor :font_weight - - # Opacity of the text. - # Corresponds to the JSON property `opacity` - # @return [Float] - attr_accessor :opacity - - # Basic color used in styling. - # Corresponds to the JSON property `outline` - # @return [Google::Apis::MapsengineV1::Color] - attr_accessor :outline - - # Font size of the label, in pixels. 8 <= size <= 15. If not provided, a default - # size will be provided. - # Corresponds to the JSON property `size` - # @return [Float] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] unless args[:color].nil? - @column = args[:column] unless args[:column].nil? - @font_style = args[:font_style] unless args[:font_style].nil? - @font_weight = args[:font_weight] unless args[:font_weight].nil? - @opacity = args[:opacity] unless args[:opacity].nil? - @outline = args[:outline] unless args[:outline].nil? - @size = args[:size] unless args[:size].nil? - end - end - - # A Layer combines multiple datasources, with styling information, for - # presentation on a map. - class Layer - include Google::Apis::Core::Hashable - - # A rectangular bounding box which contains all of the data in this Layer. The - # box is expressed as \"west, south, east, north\". The numbers represent - # latitude and longitude in decimal degrees. - # Corresponds to the JSON property `bbox` - # @return [Array] - attr_accessor :bbox - - # The creation time of this layer. The value is an RFC 3339 formatted date-time - # value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # The email address of the creator of this layer. This is only returned on GET - # requests and not LIST requests. - # Corresponds to the JSON property `creatorEmail` - # @return [String] - attr_accessor :creator_email - - # Deprecated: The type of the datasources used to build this Layer. Note: This - # has been replaced by layerType, but is still available for now to maintain - # backward compatibility. - # Corresponds to the JSON property `datasourceType` - # @return [String] - attr_accessor :datasource_type - - # An array of datasources used to build this layer. If layerType is "image", or - # layerType is not specified and datasourceType is "image", then each element in - # this array is a reference to an Image or RasterCollection. If layerType is " - # vector", or layerType is not specified and datasourceType is "table" then each - # element in this array is a reference to a Vector Table. - # Corresponds to the JSON property `datasources` - # @return [Array] - attr_accessor :datasources - - # The description of this Layer, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Deprecated: The name of an access list of the Map Editor type. The user on - # whose behalf the request is being sent must be an editor on that access list. - # Note: Google Maps Engine no longer uses access lists. Instead, each asset has - # its own list of permissions. For backward compatibility, the API still accepts - # access lists for projects that are already using access lists. If you created - # a GME account/project after July 14th, 2014, you will not be able to send API - # requests that include access lists. Note: This is an input field only. It is - # not returned in response to a list or get request. - # Corresponds to the JSON property `draftAccessList` - # @return [String] - attr_accessor :draft_access_list - - # The ETag, used to refer to the current version of the asset. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # A globally unique ID, used to refer to this Layer. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The last modified time of this layer. The value is an RFC 3339 formatted date- - # time value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `lastModifiedTime` - # @return [DateTime] - attr_accessor :last_modified_time - - # The email address of the last modifier of this layer. This is only returned on - # GET requests and not LIST requests. - # Corresponds to the JSON property `lastModifierEmail` - # @return [String] - attr_accessor :last_modifier_email - - # The type of the datasources used to build this Layer. This should be used - # instead of datasourceType. At least one of layerType and datasourceType and - # must be specified, but layerType takes precedence. - # Corresponds to the JSON property `layerType` - # @return [String] - attr_accessor :layer_type - - # The name of this Layer, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The processing status of this layer. - # Corresponds to the JSON property `processingStatus` - # @return [String] - attr_accessor :processing_status - - # The ID of the project that this Layer is in. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Deprecated: The access list to whom view permissions are granted. The value - # must be the name of a Maps Engine access list of the Map Viewer type, and the - # user must be a viewer on that list. Note: Google Maps Engine no longer uses - # access lists. Instead, each asset has its own list of permissions. For - # backward compatibility, the API still accepts access lists for projects that - # are already using access lists. If you created a GME account/project after - # July 14th, 2014, you will not be able to send API requests that include access - # lists. Note: This is an input field only. It is not returned in response to a - # list or get request. - # Corresponds to the JSON property `publishedAccessList` - # @return [String] - attr_accessor :published_access_list - - # The publishing status of this layer. - # Corresponds to the JSON property `publishingStatus` - # @return [String] - attr_accessor :publishing_status - - # A vector style contains styling information for vector layer. - # Corresponds to the JSON property `style` - # @return [Google::Apis::MapsengineV1::VectorStyle] - attr_accessor :style - - # Tags of this Layer. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # If true, WRITERs of the asset are able to edit the asset permissions. - # Corresponds to the JSON property `writersCanEditPermissions` - # @return [Boolean] - attr_accessor :writers_can_edit_permissions - alias_method :writers_can_edit_permissions?, :writers_can_edit_permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bbox = args[:bbox] unless args[:bbox].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @creator_email = args[:creator_email] unless args[:creator_email].nil? - @datasource_type = args[:datasource_type] unless args[:datasource_type].nil? - @datasources = args[:datasources] unless args[:datasources].nil? - @description = args[:description] unless args[:description].nil? - @draft_access_list = args[:draft_access_list] unless args[:draft_access_list].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @last_modifier_email = args[:last_modifier_email] unless args[:last_modifier_email].nil? - @layer_type = args[:layer_type] unless args[:layer_type].nil? - @name = args[:name] unless args[:name].nil? - @processing_status = args[:processing_status] unless args[:processing_status].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @published_access_list = args[:published_access_list] unless args[:published_access_list].nil? - @publishing_status = args[:publishing_status] unless args[:publishing_status].nil? - @style = args[:style] unless args[:style].nil? - @tags = args[:tags] unless args[:tags].nil? - @writers_can_edit_permissions = args[:writers_can_edit_permissions] unless args[:writers_can_edit_permissions].nil? - end - end - - # The response returned by a call to layers.List. Note: The list response does - # not include all the fields available in a layer. Refer to the layer resource - # description for details of the fields that are not included. You'll need to - # send a get request to retrieve the additional fields for each layer. - class ListLayersResponse - include Google::Apis::Core::Hashable - - # Resources returned. - # Corresponds to the JSON property `layers` - # @return [Array] - attr_accessor :layers - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @layers = args[:layers] unless args[:layers].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Style for lines. - class LineStyle - include Google::Apis::Core::Hashable - - # Border in line style. Both color and width are required. - # Corresponds to the JSON property `border` - # @return [Google::Apis::MapsengineV1::Border] - attr_accessor :border - - # Dash defines the pattern of the line, the values are pixel lengths of - # alternating dash and gap. If dash is not provided, then it means a solid line. - # Dash can contain up to 10 values and must contain even number of values. - # Corresponds to the JSON property `dash` - # @return [Array] - attr_accessor :dash - - # Text label style. - # Corresponds to the JSON property `label` - # @return [Google::Apis::MapsengineV1::LabelStyle] - attr_accessor :label - - # Stroke of the line. - # Corresponds to the JSON property `stroke` - # @return [Google::Apis::MapsengineV1::LineStyle::Stroke] - attr_accessor :stroke - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @border = args[:border] unless args[:border].nil? - @dash = args[:dash] unless args[:dash].nil? - @label = args[:label] unless args[:label].nil? - @stroke = args[:stroke] unless args[:stroke].nil? - end - - # Stroke of the line. - class Stroke - include Google::Apis::Core::Hashable - - # Color of the line. - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # Opacity of the line. - # Corresponds to the JSON property `opacity` - # @return [Float] - attr_accessor :opacity - - # Width of the line, in pixels. 0 <= width <= 10. If width is set to 0, the line - # will be invisible. - # Corresponds to the JSON property `width` - # @return [Float] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] unless args[:color].nil? - @opacity = args[:opacity] unless args[:opacity].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - - # A Map is a collection of Layers, optionally contained within folders. - class Map - include Google::Apis::Core::Hashable - - # A rectangular bounding box which contains all of the data in this Map. The box - # is expressed as \"west, south, east, north\". The numbers represent latitude - # and longitude in decimal degrees. - # Corresponds to the JSON property `bbox` - # @return [Array] - attr_accessor :bbox - - # The contents of this Map. - # Corresponds to the JSON property `contents` - # @return [Array] - attr_accessor :contents - - # The creation time of this map. The value is an RFC 3339 formatted date-time - # value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # The email address of the creator of this map. This is only returned on GET - # requests and not LIST requests. - # Corresponds to the JSON property `creatorEmail` - # @return [String] - attr_accessor :creator_email - - # A rectangular geographic bounds. - # Corresponds to the JSON property `defaultViewport` - # @return [Array] - attr_accessor :default_viewport - - # The description of this Map, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Deprecated: The name of an access list of the Map Editor type. The user on - # whose behalf the request is being sent must be an editor on that access list. - # Note: Google Maps Engine no longer uses access lists. Instead, each asset has - # its own list of permissions. For backward compatibility, the API still accepts - # access lists for projects that are already using access lists. If you created - # a GME account/project after July 14th, 2014, you will not be able to send API - # requests that include access lists. Note: This is an input field only. It is - # not returned in response to a list or get request. - # Corresponds to the JSON property `draftAccessList` - # @return [String] - attr_accessor :draft_access_list - - # The ETag, used to refer to the current version of the asset. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # A globally unique ID, used to refer to this Map. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The last modified time of this map. The value is an RFC 3339 formatted date- - # time value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `lastModifiedTime` - # @return [DateTime] - attr_accessor :last_modified_time - - # The email address of the last modifier of this map. This is only returned on - # GET requests and not LIST requests. - # Corresponds to the JSON property `lastModifierEmail` - # @return [String] - attr_accessor :last_modifier_email - - # The name of this Map, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The processing status of this map. Map processing is automatically started - # once a map becomes ready for processing. - # Corresponds to the JSON property `processingStatus` - # @return [String] - attr_accessor :processing_status - - # The ID of the project that this Map is in. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Deprecated: The access list to whom view permissions are granted. The value - # must be the name of a Maps Engine access list of the Map Viewer type, and the - # user must be a viewer on that list. Note: Google Maps Engine no longer uses - # access lists. Instead, each asset has its own list of permissions. For - # backward compatibility, the API still accepts access lists for projects that - # are already using access lists. If you created a GME account/project after - # July 14th, 2014, you will not be able to send API requests that include access - # lists. This is an input field only. It is not returned in response to a list - # or get request. - # Corresponds to the JSON property `publishedAccessList` - # @return [String] - attr_accessor :published_access_list - - # The publishing status of this map. - # Corresponds to the JSON property `publishingStatus` - # @return [String] - attr_accessor :publishing_status - - # Tags of this Map. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # Deprecated: An array containing the available versions of this Map. Currently - # may only contain "published". The publishingStatus field should be used - # instead. - # Corresponds to the JSON property `versions` - # @return [Array] - attr_accessor :versions - - # If true, WRITERs of the asset are able to edit the asset permissions. - # Corresponds to the JSON property `writersCanEditPermissions` - # @return [Boolean] - attr_accessor :writers_can_edit_permissions - alias_method :writers_can_edit_permissions?, :writers_can_edit_permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bbox = args[:bbox] unless args[:bbox].nil? - @contents = args[:contents] unless args[:contents].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @creator_email = args[:creator_email] unless args[:creator_email].nil? - @default_viewport = args[:default_viewport] unless args[:default_viewport].nil? - @description = args[:description] unless args[:description].nil? - @draft_access_list = args[:draft_access_list] unless args[:draft_access_list].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @last_modifier_email = args[:last_modifier_email] unless args[:last_modifier_email].nil? - @name = args[:name] unless args[:name].nil? - @processing_status = args[:processing_status] unless args[:processing_status].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @published_access_list = args[:published_access_list] unless args[:published_access_list].nil? - @publishing_status = args[:publishing_status] unless args[:publishing_status].nil? - @tags = args[:tags] unless args[:tags].nil? - @versions = args[:versions] unless args[:versions].nil? - @writers_can_edit_permissions = args[:writers_can_edit_permissions] unless args[:writers_can_edit_permissions].nil? - end - end - - # - class MapFolder < Google::Apis::MapsengineV1::MapItem - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `contents` - # @return [Array] - attr_accessor :contents - - # An array of four numbers (west, south, east, north) which defines the - # rectangular bounding box of the default viewport. The numbers represent - # latitude and longitude in decimal degrees. - # Corresponds to the JSON property `defaultViewport` - # @return [Array] - attr_accessor :default_viewport - - # The expandability setting of this MapFolder. If true, the folder can be - # expanded. - # Corresponds to the JSON property `expandable` - # @return [Boolean] - attr_accessor :expandable - alias_method :expandable?, :expandable - - # A user defined alias for this MapFolder, specific to this Map. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The name of this MapFolder. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Identifies this object as a MapFolder. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The visibility setting of this MapFolder. One of "defaultOn" or "defaultOff". - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - @type = 'folder' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contents = args[:contents] unless args[:contents].nil? - @default_viewport = args[:default_viewport] unless args[:default_viewport].nil? - @expandable = args[:expandable] unless args[:expandable].nil? - @key = args[:key] unless args[:key].nil? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # - class MapKmlLink < Google::Apis::MapsengineV1::MapItem - include Google::Apis::Core::Hashable - - # An array of four numbers (west, south, east, north) which defines the - # rectangular bounding box of the default viewport. The numbers represent - # latitude and longitude in decimal degrees. - # Corresponds to the JSON property `defaultViewport` - # @return [Array] - attr_accessor :default_viewport - - # The URL to the KML file represented by this MapKmlLink. - # Corresponds to the JSON property `kmlUrl` - # @return [String] - attr_accessor :kml_url - - # The name of this MapKmlLink. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Identifies this object as a MapKmlLink. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The visibility setting of this MapKmlLink. One of "defaultOn" or "defaultOff". - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - @type = 'kmlLink' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default_viewport = args[:default_viewport] unless args[:default_viewport].nil? - @kml_url = args[:kml_url] unless args[:kml_url].nil? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # - class MapLayer < Google::Apis::MapsengineV1::MapItem - include Google::Apis::Core::Hashable - - # An array of four numbers (west, south, east, north) which defines the - # rectangular bounding box of the default viewport. The numbers represent - # latitude and longitude in decimal degrees. - # Corresponds to the JSON property `defaultViewport` - # @return [Array] - attr_accessor :default_viewport - - # The ID of this MapLayer. This ID can be used to request more details about the - # layer. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A user defined alias for this MapLayer, specific to this Map. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The name of this MapLayer. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Identifies this object as a MapLayer. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The visibility setting of this MapLayer. One of "defaultOn" or "defaultOff". - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - @type = 'layer' - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default_viewport = args[:default_viewport] unless args[:default_viewport].nil? - @id = args[:id] unless args[:id].nil? - @key = args[:key] unless args[:key].nil? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # The response returned by a call to maps.List. - class ListMapsResponse - include Google::Apis::Core::Hashable - - # Resources returned. - # Corresponds to the JSON property `maps` - # @return [Array] - attr_accessor :maps - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @maps = args[:maps] unless args[:maps].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # A list of the parents of an asset. - class Parent - include Google::Apis::Core::Hashable - - # The ID of this parent. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - end - end - - # The response returned by a call to parents.List. - class ListParentsResponse - include Google::Apis::Core::Hashable - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The parent assets. - # Corresponds to the JSON property `parents` - # @return [Array] - attr_accessor :parents - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @parents = args[:parents] unless args[:parents].nil? - end - end - - # A permission defines the user or group that has access to an asset, and the - # type of access they have. - class Permission - include Google::Apis::Core::Hashable - - # Indicates whether a public asset is listed and can be found via a web search ( - # value true), or is visible only to people who have a link to the asset (value - # false). - # Corresponds to the JSON property `discoverable` - # @return [Boolean] - attr_accessor :discoverable - alias_method :discoverable?, :discoverable - - # The unique identifier of the permission. This could be the email address of - # the user or group this permission refers to, or the string "anyone" for public - # permissions. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of access granted to this user or group. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # The account 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) - @discoverable = args[:discoverable] unless args[:discoverable].nil? - @id = args[:id] unless args[:id].nil? - @role = args[:role] unless args[:role].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # The request sent to mapsengine.permissions.batchDelete. - class BatchDeletePermissionsRequest - include Google::Apis::Core::Hashable - - # An array of permission ids to be removed. This could be the email address of - # the user or group this permission refers to, or the string "anyone" for public - # permissions. - # Corresponds to the JSON property `ids` - # @return [Array] - attr_accessor :ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ids = args[:ids] unless args[:ids].nil? - end - end - - # The response returned by a call to mapsengine.permissions.batchDelete. - class BatchDeletePermissionsResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The request sent to mapsengine.permissions.batchUpdate. - class BatchUpdatePermissionsRequest - include Google::Apis::Core::Hashable - - # The permissions to be inserted or updated. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] unless args[:permissions].nil? - end - end - - # The response returned by a call to mapsengine.permissions.batchUpdate. - class BatchUpdatePermissionsResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # - class ListPermissionsResponse - include Google::Apis::Core::Hashable - - # The set of permissions associated with this asset. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] unless args[:permissions].nil? - end - end - - # Style for points. - class PointStyle - include Google::Apis::Core::Hashable - - # Style for icon, this is part of point style. - # Corresponds to the JSON property `icon` - # @return [Google::Apis::MapsengineV1::IconStyle] - attr_accessor :icon - - # Text label style. - # Corresponds to the JSON property `label` - # @return [Google::Apis::MapsengineV1::LabelStyle] - attr_accessor :label - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @icon = args[:icon] unless args[:icon].nil? - @label = args[:label] unless args[:label].nil? - end - end - - # Style for polygons. - class PolygonStyle - include Google::Apis::Core::Hashable - - # Basic color used in styling. - # Corresponds to the JSON property `fill` - # @return [Google::Apis::MapsengineV1::Color] - attr_accessor :fill - - # Text label style. - # Corresponds to the JSON property `label` - # @return [Google::Apis::MapsengineV1::LabelStyle] - attr_accessor :label - - # Border in line style. Both color and width are required. - # Corresponds to the JSON property `stroke` - # @return [Google::Apis::MapsengineV1::Border] - attr_accessor :stroke - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fill = args[:fill] unless args[:fill].nil? - @label = args[:label] unless args[:label].nil? - @stroke = args[:stroke] unless args[:stroke].nil? - end - end - - # The response returned by a call to any asset's Process method. - class ProcessResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A Maps Engine project groups a collection of resources. - class Project - include Google::Apis::Core::Hashable - - # An ID used to refer to this Maps Engine project. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A user provided name for this Maps Engine project. - # 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? - @name = args[:name] unless args[:name].nil? - end - end - - # The response returned by a call to projects.List. - class ListProjectsResponse - include Google::Apis::Core::Hashable - - # Projects returned. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @projects = args[:projects] unless args[:projects].nil? - end - end - - # The response returned by a call to any asset's Publish method. - class PublishResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The published version of a layer. - class PublishedLayer - include Google::Apis::Core::Hashable - - # The description of this Layer, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A globally unique ID, used to refer to this Layer. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of the datasources used to build this Layer. This should be used - # instead of datasourceType. At least one of layerType and datasourceType and - # must be specified, but layerType takes precedence. - # Corresponds to the JSON property `layerType` - # @return [String] - attr_accessor :layer_type - - # The name of this Layer, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the project that this Layer is in. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @layer_type = args[:layer_type] unless args[:layer_type].nil? - @name = args[:name] unless args[:name].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - end - end - - # The response returned by a call to layers.List.published. - class ListPublishedLayersResponse - include Google::Apis::Core::Hashable - - # Resources returned. - # Corresponds to the JSON property `layers` - # @return [Array] - attr_accessor :layers - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @layers = args[:layers] unless args[:layers].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # The published version of a map asset. - class PublishedMap - include Google::Apis::Core::Hashable - - # The contents of this Map. - # Corresponds to the JSON property `contents` - # @return [Array] - attr_accessor :contents - - # A rectangular geographic bounds. - # Corresponds to the JSON property `defaultViewport` - # @return [Array] - attr_accessor :default_viewport - - # The description of this Map, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A globally unique ID, used to refer to this Map. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of this Map, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the project that this Map is in. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contents = args[:contents] unless args[:contents].nil? - @default_viewport = args[:default_viewport] unless args[:default_viewport].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @name = args[:name] unless args[:name].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - end - end - - # The response returned by a call to maps.List.published. - class ListPublishedMapsResponse - include Google::Apis::Core::Hashable - - # Resources returned. - # Corresponds to the JSON property `maps` - # @return [Array] - attr_accessor :maps - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @maps = args[:maps] unless args[:maps].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # A geo-referenced raster. - class Raster - include Google::Apis::Core::Hashable - - # Acquisition time represents acquired time of a raster. - # Corresponds to the JSON property `acquisitionTime` - # @return [Google::Apis::MapsengineV1::AcquisitionTime] - attr_accessor :acquisition_time - - # The name of the attribution to be used for this Raster. - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # A rectangular bounding box which contains all of the data in this Raster. The - # box is expressed as \"west, south, east, north\". The numbers represent - # latitudes and longitudes in decimal degrees. - # Corresponds to the JSON property `bbox` - # @return [Array] - attr_accessor :bbox - - # The creation time of this raster. The value is an RFC 3339 formatted date-time - # value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # The email address of the creator of this raster. This is only returned on GET - # requests and not LIST requests. - # Corresponds to the JSON property `creatorEmail` - # @return [String] - attr_accessor :creator_email - - # The description of this Raster, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Deprecated: The name of an access list of the Map Editor type. The user on - # whose behalf the request is being sent must be an editor on that access list. - # Note: Google Maps Engine no longer uses access lists. Instead, each asset has - # its own list of permissions. For backward compatibility, the API still accepts - # access lists for projects that are already using access lists. If you created - # a GME account/project after July 14th, 2014, you will not be able to send API - # requests that include access lists. Note: This is an input field only. It is - # not returned in response to a list or get request. - # Corresponds to the JSON property `draftAccessList` - # @return [String] - attr_accessor :draft_access_list - - # The ETag, used to refer to the current version of the asset. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The files associated with this Raster. - # Corresponds to the JSON property `files` - # @return [Array] - attr_accessor :files - - # A globally unique ID, used to refer to this Raster. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The last modified time of this raster. The value is an RFC 3339 formatted date- - # time value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `lastModifiedTime` - # @return [DateTime] - attr_accessor :last_modified_time - - # The email address of the last modifier of this raster. This is only returned - # on GET requests and not LIST requests. - # Corresponds to the JSON property `lastModifierEmail` - # @return [String] - attr_accessor :last_modifier_email - - # The mask processing type of this Raster. - # Corresponds to the JSON property `maskType` - # @return [String] - attr_accessor :mask_type - - # The name of this Raster, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The processing status of this Raster. - # Corresponds to the JSON property `processingStatus` - # @return [String] - attr_accessor :processing_status - - # The ID of the project that this Raster is in. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The type of this Raster. Always "image" today. - # Corresponds to the JSON property `rasterType` - # @return [String] - attr_accessor :raster_type - - # Tags of this Raster. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # If true, WRITERs of the asset are able to edit the asset permissions. - # Corresponds to the JSON property `writersCanEditPermissions` - # @return [Boolean] - attr_accessor :writers_can_edit_permissions - alias_method :writers_can_edit_permissions?, :writers_can_edit_permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acquisition_time = args[:acquisition_time] unless args[:acquisition_time].nil? - @attribution = args[:attribution] unless args[:attribution].nil? - @bbox = args[:bbox] unless args[:bbox].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @creator_email = args[:creator_email] unless args[:creator_email].nil? - @description = args[:description] unless args[:description].nil? - @draft_access_list = args[:draft_access_list] unless args[:draft_access_list].nil? - @etag = args[:etag] unless args[:etag].nil? - @files = args[:files] unless args[:files].nil? - @id = args[:id] unless args[:id].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @last_modifier_email = args[:last_modifier_email] unless args[:last_modifier_email].nil? - @mask_type = args[:mask_type] unless args[:mask_type].nil? - @name = args[:name] unless args[:name].nil? - @processing_status = args[:processing_status] unless args[:processing_status].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @raster_type = args[:raster_type] unless args[:raster_type].nil? - @tags = args[:tags] unless args[:tags].nil? - @writers_can_edit_permissions = args[:writers_can_edit_permissions] unless args[:writers_can_edit_permissions].nil? - end - end - - # A raster collection groups multiple Raster resources for inclusion in a Layer. - class RasterCollection - include Google::Apis::Core::Hashable - - # The name of the attribution to be used for this RasterCollection. Note: - # Attribution is returned in response to a get request but not a list request. - # After requesting a list of raster collections, you'll need to send a get - # request to retrieve the attribution for each raster collection. - # Corresponds to the JSON property `attribution` - # @return [String] - attr_accessor :attribution - - # A rectangular bounding box which contains all of the data in this - # RasterCollection. The box is expressed as \"west, south, east, north\". The - # numbers represent latitude and longitude in decimal degrees. - # Corresponds to the JSON property `bbox` - # @return [Array] - attr_accessor :bbox - - # The creation time of this RasterCollection. The value is an RFC 3339 formatted - # date-time value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # The email address of the creator of this raster collection. This is only - # returned on GET requests and not LIST requests. - # Corresponds to the JSON property `creatorEmail` - # @return [String] - attr_accessor :creator_email - - # The description of this RasterCollection, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Deprecated: The name of an access list of the Map Editor type. The user on - # whose behalf the request is being sent must be an editor on that access list. - # Note: Google Maps Engine no longer uses access lists. Instead, each asset has - # its own list of permissions. For backward compatibility, the API still accepts - # access lists for projects that are already using access lists. If you created - # a GME account/project after July 14th, 2014, you will not be able to send API - # requests that include access lists. Note: This is an input field only. It is - # not returned in response to a list or get request. - # Corresponds to the JSON property `draftAccessList` - # @return [String] - attr_accessor :draft_access_list - - # The ETag, used to refer to the current version of the asset. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # A globally unique ID, used to refer to this RasterCollection. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The last modified time of this RasterCollection. The value is an RFC 3339 - # formatted date-time value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `lastModifiedTime` - # @return [DateTime] - attr_accessor :last_modified_time - - # The email address of the last modifier of this raster collection. This is only - # returned on GET requests and not LIST requests. - # Corresponds to the JSON property `lastModifierEmail` - # @return [String] - attr_accessor :last_modifier_email - - # True if this RasterCollection is a mosaic. - # Corresponds to the JSON property `mosaic` - # @return [Boolean] - attr_accessor :mosaic - alias_method :mosaic?, :mosaic - - # The name of this RasterCollection, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The processing status of this RasterCollection. - # Corresponds to the JSON property `processingStatus` - # @return [String] - attr_accessor :processing_status - - # The ID of the project that this RasterCollection is in. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The type of rasters contained within this RasterCollection. - # Corresponds to the JSON property `rasterType` - # @return [String] - attr_accessor :raster_type - - # Tags of this RasterCollection. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # If true, WRITERs of the asset are able to edit the asset permissions. - # Corresponds to the JSON property `writersCanEditPermissions` - # @return [Boolean] - attr_accessor :writers_can_edit_permissions - alias_method :writers_can_edit_permissions?, :writers_can_edit_permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attribution = args[:attribution] unless args[:attribution].nil? - @bbox = args[:bbox] unless args[:bbox].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @creator_email = args[:creator_email] unless args[:creator_email].nil? - @description = args[:description] unless args[:description].nil? - @draft_access_list = args[:draft_access_list] unless args[:draft_access_list].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @last_modifier_email = args[:last_modifier_email] unless args[:last_modifier_email].nil? - @mosaic = args[:mosaic] unless args[:mosaic].nil? - @name = args[:name] unless args[:name].nil? - @processing_status = args[:processing_status] unless args[:processing_status].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @raster_type = args[:raster_type] unless args[:raster_type].nil? - @tags = args[:tags] unless args[:tags].nil? - @writers_can_edit_permissions = args[:writers_can_edit_permissions] unless args[:writers_can_edit_permissions].nil? - end - end - - # The response returned by a call to raster_collections.List. Note: The list - # response does not include all the fields available in a raster collection. - # Refer to the RasterCollection resource description for details of the fields - # that are not included. You'll need to send a get request to retrieve the - # additional fields for each raster collection. - class ListRasterCollectionsResponse - include Google::Apis::Core::Hashable - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Resources returned. - # Corresponds to the JSON property `rasterCollections` - # @return [Array] - attr_accessor :raster_collections - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @raster_collections = args[:raster_collections] unless args[:raster_collections].nil? - end - end - - # A raster resource. - class RasterCollectionsRaster - include Google::Apis::Core::Hashable - - # A rectangular bounding box which contains all of the data in this Raster. The - # box is expressed as \"west, south, east, north\". The numbers represent - # latitudes and longitudes in decimal degrees. - # Corresponds to the JSON property `bbox` - # @return [Array] - attr_accessor :bbox - - # The creation time of this raster. The value is an RFC 3339 formatted date-time - # value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # The description of this Raster, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A globally unique ID, used to refer to this Raster. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The last modified time of this raster. The value is an RFC 3339 formatted date- - # time value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `lastModifiedTime` - # @return [DateTime] - attr_accessor :last_modified_time - - # The name of this Raster, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the project that this Raster is in. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The type of this Raster. Always "image" today. - # Corresponds to the JSON property `rasterType` - # @return [String] - attr_accessor :raster_type - - # Tags of this Raster. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bbox = args[:bbox] unless args[:bbox].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @description = args[:description] unless args[:description].nil? - @id = args[:id] unless args[:id].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @name = args[:name] unless args[:name].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @raster_type = args[:raster_type] unless args[:raster_type].nil? - @tags = args[:tags] unless args[:tags].nil? - end - end - - # The request sent to rasterCollections.Rasters.BatchDelete. - class BatchDeleteRasterCollectionsRasterRequest - include Google::Apis::Core::Hashable - - # An array of Raster asset IDs to be removed from this RasterCollection. - # Corresponds to the JSON property `ids` - # @return [Array] - attr_accessor :ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ids = args[:ids] unless args[:ids].nil? - end - end - - # The response returned by a call to rasterCollections.rasters.batchDelete. - class BatchDeleteRasterCollectionsRastersResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The request sent to rasterCollections.Rasters.BatchInsert. - class BatchInsertRasterCollectionsRastersRequest - include Google::Apis::Core::Hashable - - # An array of Raster asset IDs to be added to this RasterCollection. - # Corresponds to the JSON property `ids` - # @return [Array] - attr_accessor :ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ids = args[:ids] unless args[:ids].nil? - end - end - - # The response returned by a call to rasterCollections.rasters.batchInsert. - class BatchInsertRasterCollectionsRastersResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The response returned by a call to rasterCollections.rasters.List. - class ListRasterCollectionsRastersResponse - include Google::Apis::Core::Hashable - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Resources returned. - # Corresponds to the JSON property `rasters` - # @return [Array] - attr_accessor :rasters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @rasters = args[:rasters] unless args[:rasters].nil? - end - end - - # The response returned by a call to rasters.List. - class ListRastersResponse - include Google::Apis::Core::Hashable - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Resources returned. - # Corresponds to the JSON property `rasters` - # @return [Array] - attr_accessor :rasters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @rasters = args[:rasters] unless args[:rasters].nil? - end - end - - # Parameters for styling points as scaled shapes. - class ScaledShape - include Google::Apis::Core::Hashable - - # Border in line style. Both color and width are required. - # Corresponds to the JSON property `border` - # @return [Google::Apis::MapsengineV1::Border] - attr_accessor :border - - # Basic color used in styling. - # Corresponds to the JSON property `fill` - # @return [Google::Apis::MapsengineV1::Color] - attr_accessor :fill - - # Name of the shape. - # Corresponds to the JSON property `shape` - # @return [String] - attr_accessor :shape - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @border = args[:border] unless args[:border].nil? - @fill = args[:fill] unless args[:fill].nil? - @shape = args[:shape] unless args[:shape].nil? - end - end - - # Parameters for scaling scaled shapes. - class ScalingFunction - include Google::Apis::Core::Hashable - - # Name of the numeric column used to scale a shape. - # Corresponds to the JSON property `column` - # @return [String] - attr_accessor :column - - # The type of scaling function to use. Defaults to SQRT. Currently only linear - # and square root scaling are supported. - # Corresponds to the JSON property `scalingType` - # @return [String] - attr_accessor :scaling_type - - # Scaled shape size range in pixels. For circles, size corresponds to diameter. - # Corresponds to the JSON property `sizeRange` - # @return [Google::Apis::MapsengineV1::SizeRange] - attr_accessor :size_range - - # Range of values used for scaling shapes. The min/max values will be drawn as - # shapes with the min/max size. - # Corresponds to the JSON property `valueRange` - # @return [Google::Apis::MapsengineV1::ValueRange] - attr_accessor :value_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column = args[:column] unless args[:column].nil? - @scaling_type = args[:scaling_type] unless args[:scaling_type].nil? - @size_range = args[:size_range] unless args[:size_range].nil? - @value_range = args[:value_range] unless args[:value_range].nil? - end - end - - # A schema indicating the properties which may be associated with features - # within a Table, and the types of those properties. - class Schema - include Google::Apis::Core::Hashable - - # An array of TableColumn objects. The first object in the array must be named - # geometry and be of type points, lineStrings, polygons, or mixedGeometry. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # The name of the column that contains a feature's geometry. This field can be - # omitted during table create; Google Maps Engine supports only a single - # geometry column, which must be named geometry and be the first object in the - # columns array. - # Corresponds to the JSON property `primaryGeometry` - # @return [String] - attr_accessor :primary_geometry - - # The name of the column that contains the unique identifier of a Feature. - # Corresponds to the JSON property `primaryKey` - # @return [String] - attr_accessor :primary_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @columns = args[:columns] unless args[:columns].nil? - @primary_geometry = args[:primary_geometry] unless args[:primary_geometry].nil? - @primary_key = args[:primary_key] unless args[:primary_key].nil? - end - end - - # Scaled shape size range in pixels. For circles, size corresponds to diameter. - class SizeRange - include Google::Apis::Core::Hashable - - # Maximum size, in pixels. - # Corresponds to the JSON property `max` - # @return [Float] - attr_accessor :max - - # Minimum size, in pixels. - # Corresponds to the JSON property `min` - # @return [Float] - attr_accessor :min - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max = args[:max] unless args[:max].nil? - @min = args[:min] unless args[:min].nil? - end - end - - # A collection of geographic features, and associated metadata. - class Table - include Google::Apis::Core::Hashable - - # A rectangular bounding box which contains all of the data in this Table. The - # box is expressed as \"west, south, east, north\". The numbers represent - # latitude and longitude in decimal degrees. - # Corresponds to the JSON property `bbox` - # @return [Array] - attr_accessor :bbox - - # The creation time of this table. The value is an RFC 3339 formatted date-time - # value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `creationTime` - # @return [DateTime] - attr_accessor :creation_time - - # The email address of the creator of this table. This is only returned on GET - # requests and not LIST requests. - # Corresponds to the JSON property `creatorEmail` - # @return [String] - attr_accessor :creator_email - - # The description of this table, supplied by the author. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Deprecated: The name of an access list of the Map Editor type. The user on - # whose behalf the request is being sent must be an editor on that access list. - # Note: Google Maps Engine no longer uses access lists. Instead, each asset has - # its own list of permissions. For backward compatibility, the API still accepts - # access lists for projects that are already using access lists. If you created - # a GME account/project after July 14th, 2014, you will not be able to send API - # requests that include access lists. Note: This is an input field only. It is - # not returned in response to a list or get request. - # Corresponds to the JSON property `draftAccessList` - # @return [String] - attr_accessor :draft_access_list - - # The ETag, used to refer to the current version of the asset. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The files associated with this table. - # Corresponds to the JSON property `files` - # @return [Array] - attr_accessor :files - - # A globally unique ID, used to refer to this table. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The last modified time of this table. The value is an RFC 3339 formatted date- - # time value (e.g. 1970-01-01T00:00:00Z). - # Corresponds to the JSON property `lastModifiedTime` - # @return [DateTime] - attr_accessor :last_modified_time - - # The email address of the last modifier of this table. This is only returned on - # GET requests and not LIST requests. - # Corresponds to the JSON property `lastModifierEmail` - # @return [String] - attr_accessor :last_modifier_email - - # The name of this table, supplied by the author. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The processing status of this table. - # Corresponds to the JSON property `processingStatus` - # @return [String] - attr_accessor :processing_status - - # The ID of the project to which the table belongs. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Deprecated: The access list to whom view permissions are granted. The value - # must be the name of a Maps Engine access list of the Map Viewer type, and the - # user must be a viewer on that list. Note: Google Maps Engine no longer uses - # access lists. Instead, each asset has its own list of permissions. For - # backward compatibility, the API still accepts access lists for projects that - # are already using access lists. If you created a GME account/project after - # July 14th, 2014, you will not be able to send API requests that include access - # lists. Note: This is an input field only. It is not returned in response to a - # list or get request. - # Corresponds to the JSON property `publishedAccessList` - # @return [String] - attr_accessor :published_access_list - - # A schema indicating the properties which may be associated with features - # within a Table, and the types of those properties. - # Corresponds to the JSON property `schema` - # @return [Google::Apis::MapsengineV1::Schema] - attr_accessor :schema - - # Encoding of the uploaded files. Valid values include UTF-8, CP1251, ISO 8859-1, - # and Shift_JIS. - # Corresponds to the JSON property `sourceEncoding` - # @return [String] - attr_accessor :source_encoding - - # An array of text strings, with each string representing a tag. More - # information about tags can be found in the Tagging data article of the Maps - # Engine help center. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # If true, WRITERs of the asset are able to edit the asset permissions. - # Corresponds to the JSON property `writersCanEditPermissions` - # @return [Boolean] - attr_accessor :writers_can_edit_permissions - alias_method :writers_can_edit_permissions?, :writers_can_edit_permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bbox = args[:bbox] unless args[:bbox].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @creator_email = args[:creator_email] unless args[:creator_email].nil? - @description = args[:description] unless args[:description].nil? - @draft_access_list = args[:draft_access_list] unless args[:draft_access_list].nil? - @etag = args[:etag] unless args[:etag].nil? - @files = args[:files] unless args[:files].nil? - @id = args[:id] unless args[:id].nil? - @last_modified_time = args[:last_modified_time] unless args[:last_modified_time].nil? - @last_modifier_email = args[:last_modifier_email] unless args[:last_modifier_email].nil? - @name = args[:name] unless args[:name].nil? - @processing_status = args[:processing_status] unless args[:processing_status].nil? - @project_id = args[:project_id] unless args[:project_id].nil? - @published_access_list = args[:published_access_list] unless args[:published_access_list].nil? - @schema = args[:schema] unless args[:schema].nil? - @source_encoding = args[:source_encoding] unless args[:source_encoding].nil? - @tags = args[:tags] unless args[:tags].nil? - @writers_can_edit_permissions = args[:writers_can_edit_permissions] unless args[:writers_can_edit_permissions].nil? - end - end - - # - class TableColumn - include Google::Apis::Core::Hashable - - # The column name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of data stored in this column. - # 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? - @type = args[:type] unless args[:type].nil? - end - end - - # The response returned by a call to tables.List. Note: The list response does - # not include all the fields available in a table. Refer to the table resource - # description for details of the fields that are not included. You'll need to - # send a get request to retrieve the additional fields for each table. - class ListTablesResponse - include Google::Apis::Core::Hashable - - # Next page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Resources returned. - # Corresponds to the JSON property `tables` - # @return [Array] - attr_accessor :tables - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @tables = args[:tables] unless args[:tables].nil? - end - end - - # Range of values used for scaling shapes. The min/max values will be drawn as - # shapes with the min/max size. - class ValueRange - include Google::Apis::Core::Hashable - - # Maximum value. - # Corresponds to the JSON property `max` - # @return [Float] - attr_accessor :max - - # Minimum value. - # Corresponds to the JSON property `min` - # @return [Float] - attr_accessor :min - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max = args[:max] unless args[:max].nil? - @min = args[:min] unless args[:min].nil? - end - end - - # A vector style contains styling information for vector layer. - class VectorStyle - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `displayRules` - # @return [Array] - attr_accessor :display_rules - - # A feature info contains information about individual feature. - # Corresponds to the JSON property `featureInfo` - # @return [Google::Apis::MapsengineV1::FeatureInfo] - attr_accessor :feature_info - - # The type of the vector style. Currently, only displayRule is supported. - # 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) - @display_rules = args[:display_rules] unless args[:display_rules].nil? - @feature_info = args[:feature_info] unless args[:feature_info].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Zoom level range. Zoom levels are restricted between 0 and 24, inclusive. - class ZoomLevels - include Google::Apis::Core::Hashable - - # Maximum zoom level. - # Corresponds to the JSON property `max` - # @return [Fixnum] - attr_accessor :max - - # Minimum zoom level. - # Corresponds to the JSON property `min` - # @return [Fixnum] - attr_accessor :min - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max = args[:max] unless args[:max].nil? - @min = args[:min] unless args[:min].nil? - end - end - end - end -end diff --git a/generated/google/apis/mapsengine_v1/representations.rb b/generated/google/apis/mapsengine_v1/representations.rb deleted file mode 100644 index c03c7716f..000000000 --- a/generated/google/apis/mapsengine_v1/representations.rb +++ /dev/null @@ -1,1235 +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 MapsengineV1 - - class GeoJsonGeometry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MapItem - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AcquisitionTime - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Asset - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAssetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Border - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Color - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Datasource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DisplayRule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Feature - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FeatureInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDeleteFeaturesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchInsertFeaturesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchPatchFeaturesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListFeaturesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class File - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Filter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoJsonGeometryCollection - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoJsonLineString - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoJsonMultiLineString - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoJsonMultiPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoJsonMultiPolygon - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoJsonPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GeoJsonPolygon - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Icon - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class IconStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListIconsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LabelStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Layer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLayersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LineStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Stroke - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Map - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MapFolder - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MapKmlLink - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MapLayer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListMapsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Parent - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListParentsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Permission - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDeletePermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDeletePermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchUpdatePermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchUpdatePermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PointStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PolygonStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ProcessResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Project - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListProjectsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PublishResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PublishedLayer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPublishedLayersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PublishedMap - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListPublishedMapsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Raster - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RasterCollection - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListRasterCollectionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RasterCollectionsRaster - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDeleteRasterCollectionsRasterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchDeleteRasterCollectionsRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchInsertRasterCollectionsRastersRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchInsertRasterCollectionsRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListRasterCollectionsRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ScaledShape - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ScalingFunction - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Schema - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SizeRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Table - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TableColumn - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTablesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ValueRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class VectorStyle - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ZoomLevels - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class GeoJsonGeometry - class Representation < Google::Apis::Core::JsonRepresentation - def from_hash(hash, *args) - case hash['type'] - - when 'GeometryCollection' - Google::Apis::MapsengineV1::GeoJsonGeometryCollection::Representation.new(Google::Apis::MapsengineV1::GeoJsonGeometryCollection.new).from_hash(hash, *args) - - when 'LineString' - Google::Apis::MapsengineV1::GeoJsonLineString::Representation.new(Google::Apis::MapsengineV1::GeoJsonLineString.new).from_hash(hash, *args) - - when 'MultiLineString' - Google::Apis::MapsengineV1::GeoJsonMultiLineString::Representation.new(Google::Apis::MapsengineV1::GeoJsonMultiLineString.new).from_hash(hash, *args) - - when 'MultiPoint' - Google::Apis::MapsengineV1::GeoJsonMultiPoint::Representation.new(Google::Apis::MapsengineV1::GeoJsonMultiPoint.new).from_hash(hash, *args) - - when 'MultiPolygon' - Google::Apis::MapsengineV1::GeoJsonMultiPolygon::Representation.new(Google::Apis::MapsengineV1::GeoJsonMultiPolygon.new).from_hash(hash, *args) - - when 'Point' - Google::Apis::MapsengineV1::GeoJsonPoint::Representation.new(Google::Apis::MapsengineV1::GeoJsonPoint.new).from_hash(hash, *args) - - when 'Polygon' - Google::Apis::MapsengineV1::GeoJsonPolygon::Representation.new(Google::Apis::MapsengineV1::GeoJsonPolygon.new).from_hash(hash, *args) - end - end - - def to_hash(*args) - case represented - - when Google::Apis::MapsengineV1::GeoJsonGeometryCollection - Google::Apis::MapsengineV1::GeoJsonGeometryCollection::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::GeoJsonLineString - Google::Apis::MapsengineV1::GeoJsonLineString::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::GeoJsonMultiLineString - Google::Apis::MapsengineV1::GeoJsonMultiLineString::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::GeoJsonMultiPoint - Google::Apis::MapsengineV1::GeoJsonMultiPoint::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::GeoJsonMultiPolygon - Google::Apis::MapsengineV1::GeoJsonMultiPolygon::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::GeoJsonPoint - Google::Apis::MapsengineV1::GeoJsonPoint::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::GeoJsonPolygon - Google::Apis::MapsengineV1::GeoJsonPolygon::Representation.new(represented).to_hash(*args) - end - end - end - end - - # @private - class MapItem - class Representation < Google::Apis::Core::JsonRepresentation - def from_hash(hash, *args) - case hash['type'] - - when 'folder' - Google::Apis::MapsengineV1::MapFolder::Representation.new(Google::Apis::MapsengineV1::MapFolder.new).from_hash(hash, *args) - - when 'kmlLink' - Google::Apis::MapsengineV1::MapKmlLink::Representation.new(Google::Apis::MapsengineV1::MapKmlLink.new).from_hash(hash, *args) - - when 'layer' - Google::Apis::MapsengineV1::MapLayer::Representation.new(Google::Apis::MapsengineV1::MapLayer.new).from_hash(hash, *args) - end - end - - def to_hash(*args) - case represented - - when Google::Apis::MapsengineV1::MapFolder - Google::Apis::MapsengineV1::MapFolder::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::MapKmlLink - Google::Apis::MapsengineV1::MapKmlLink::Representation.new(represented).to_hash(*args) - - when Google::Apis::MapsengineV1::MapLayer - Google::Apis::MapsengineV1::MapLayer::Representation.new(represented).to_hash(*args) - end - end - end - end - - # @private - class AcquisitionTime - class Representation < Google::Apis::Core::JsonRepresentation - property :end, as: 'end', type: DateTime - - property :precision, as: 'precision' - property :start, as: 'start', type: DateTime - - end - end - - # @private - class Asset - class Representation < Google::Apis::Core::JsonRepresentation - collection :bbox, as: 'bbox' - property :creation_time, as: 'creationTime', type: DateTime - - property :creator_email, as: 'creatorEmail' - property :description, as: 'description' - property :etag, as: 'etag' - property :id, as: 'id' - property :last_modified_time, as: 'lastModifiedTime', type: DateTime - - property :last_modifier_email, as: 'lastModifierEmail' - property :name, as: 'name' - property :project_id, as: 'projectId' - property :resource, as: 'resource' - collection :tags, as: 'tags' - property :type, as: 'type' - property :writers_can_edit_permissions, as: 'writersCanEditPermissions' - end - end - - # @private - class ListAssetsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :assets, as: 'assets', class: Google::Apis::MapsengineV1::Asset, decorator: Google::Apis::MapsengineV1::Asset::Representation - - property :next_page_token, :base64 => true, as: 'nextPageToken' - end - end - - # @private - class Border - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color' - property :opacity, as: 'opacity' - property :width, as: 'width' - end - end - - # @private - class Color - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color' - property :opacity, as: 'opacity' - end - end - - # @private - class Datasource - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - end - end - - # @private - class DisplayRule - class Representation < Google::Apis::Core::JsonRepresentation - collection :filters, as: 'filters', class: Google::Apis::MapsengineV1::Filter, decorator: Google::Apis::MapsengineV1::Filter::Representation - - property :line_options, as: 'lineOptions', class: Google::Apis::MapsengineV1::LineStyle, decorator: Google::Apis::MapsengineV1::LineStyle::Representation - - property :name, as: 'name' - property :point_options, as: 'pointOptions', class: Google::Apis::MapsengineV1::PointStyle, decorator: Google::Apis::MapsengineV1::PointStyle::Representation - - property :polygon_options, as: 'polygonOptions', class: Google::Apis::MapsengineV1::PolygonStyle, decorator: Google::Apis::MapsengineV1::PolygonStyle::Representation - - property :zoom_levels, as: 'zoomLevels', class: Google::Apis::MapsengineV1::ZoomLevels, decorator: Google::Apis::MapsengineV1::ZoomLevels::Representation - - end - end - - # @private - class Feature - class Representation < Google::Apis::Core::JsonRepresentation - property :geometry, as: 'geometry', class: Google::Apis::MapsengineV1::GeoJsonGeometry, decorator: Google::Apis::MapsengineV1::GeoJsonGeometry::Representation - - hash :properties, as: 'properties' - property :type, as: 'type' - end - end - - # @private - class FeatureInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :content, as: 'content' - end - end - - # @private - class BatchDeleteFeaturesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :gx_ids, as: 'gx_ids' - collection :primary_keys, as: 'primaryKeys' - end - end - - # @private - class BatchInsertFeaturesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :features, as: 'features', class: Google::Apis::MapsengineV1::Feature, decorator: Google::Apis::MapsengineV1::Feature::Representation - - property :normalize_geometries, as: 'normalizeGeometries' - end - end - - # @private - class BatchPatchFeaturesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :features, as: 'features', class: Google::Apis::MapsengineV1::Feature, decorator: Google::Apis::MapsengineV1::Feature::Representation - - property :normalize_geometries, as: 'normalizeGeometries' - end - end - - # @private - class ListFeaturesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :allowed_queries_per_second, as: 'allowedQueriesPerSecond' - collection :features, as: 'features', class: Google::Apis::MapsengineV1::Feature, decorator: Google::Apis::MapsengineV1::Feature::Representation - - property :next_page_token, as: 'nextPageToken' - property :schema, as: 'schema', class: Google::Apis::MapsengineV1::Schema, decorator: Google::Apis::MapsengineV1::Schema::Representation - - property :type, as: 'type' - end - end - - # @private - class File - class Representation < Google::Apis::Core::JsonRepresentation - property :filename, as: 'filename' - property :size, as: 'size' - property :upload_status, as: 'uploadStatus' - end - end - - # @private - class Filter - class Representation < Google::Apis::Core::JsonRepresentation - property :column, as: 'column' - property :operator, as: 'operator' - property :value, as: 'value' - end - end - - # @private - class GeoJsonGeometryCollection - class Representation < Google::Apis::Core::JsonRepresentation - collection :geometries, as: 'geometries', class: Google::Apis::MapsengineV1::GeoJsonGeometry, decorator: Google::Apis::MapsengineV1::GeoJsonGeometry::Representation - - property :type, as: 'type' - end - end - - # @private - class GeoJsonLineString - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates', :class => Array do - include Representable::JSON::Collection - items - end - - property :type, as: 'type' - end - end - - # @private - class GeoJsonMultiLineString - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates', :class => Array do - include Representable::JSON::Collection - items :class => Array do - include Representable::JSON::Collection - items - end - - end - - property :type, as: 'type' - end - end - - # @private - class GeoJsonMultiPoint - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates', :class => Array do - include Representable::JSON::Collection - items - end - - property :type, as: 'type' - end - end - - # @private - class GeoJsonMultiPolygon - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates', :class => Array do - include Representable::JSON::Collection - items :class => Array do - include Representable::JSON::Collection - items :class => Array do - include Representable::JSON::Collection - items - end - - end - - end - - property :type, as: 'type' - end - end - - # @private - class GeoJsonPoint - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates' - property :type, as: 'type' - end - end - - # @private - class GeoJsonPolygon - class Representation < Google::Apis::Core::JsonRepresentation - collection :coordinates, as: 'coordinates', :class => Array do - include Representable::JSON::Collection - items :class => Array do - include Representable::JSON::Collection - items - end - - end - - property :type, as: 'type' - end - end - - # @private - class Icon - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :id, as: 'id' - property :name, as: 'name' - end - end - - # @private - class IconStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :name, as: 'name' - property :scaled_shape, as: 'scaledShape', class: Google::Apis::MapsengineV1::ScaledShape, decorator: Google::Apis::MapsengineV1::ScaledShape::Representation - - property :scaling_function, as: 'scalingFunction', class: Google::Apis::MapsengineV1::ScalingFunction, decorator: Google::Apis::MapsengineV1::ScalingFunction::Representation - - end - end - - # @private - class ListIconsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :icons, as: 'icons', class: Google::Apis::MapsengineV1::Icon, decorator: Google::Apis::MapsengineV1::Icon::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class LabelStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color' - property :column, as: 'column' - property :font_style, as: 'fontStyle' - property :font_weight, as: 'fontWeight' - property :opacity, as: 'opacity' - property :outline, as: 'outline', class: Google::Apis::MapsengineV1::Color, decorator: Google::Apis::MapsengineV1::Color::Representation - - property :size, as: 'size' - end - end - - # @private - class Layer - class Representation < Google::Apis::Core::JsonRepresentation - collection :bbox, as: 'bbox' - property :creation_time, as: 'creationTime', type: DateTime - - property :creator_email, as: 'creatorEmail' - property :datasource_type, as: 'datasourceType' - collection :datasources, as: 'datasources', class: Google::Apis::MapsengineV1::Datasource, decorator: Google::Apis::MapsengineV1::Datasource::Representation - - property :description, as: 'description' - property :draft_access_list, as: 'draftAccessList' - property :etag, as: 'etag' - property :id, as: 'id' - property :last_modified_time, as: 'lastModifiedTime', type: DateTime - - property :last_modifier_email, as: 'lastModifierEmail' - property :layer_type, as: 'layerType' - property :name, as: 'name' - property :processing_status, as: 'processingStatus' - property :project_id, as: 'projectId' - property :published_access_list, as: 'publishedAccessList' - property :publishing_status, as: 'publishingStatus' - property :style, as: 'style', class: Google::Apis::MapsengineV1::VectorStyle, decorator: Google::Apis::MapsengineV1::VectorStyle::Representation - - collection :tags, as: 'tags' - property :writers_can_edit_permissions, as: 'writersCanEditPermissions' - end - end - - # @private - class ListLayersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :layers, as: 'layers', class: Google::Apis::MapsengineV1::Layer, decorator: Google::Apis::MapsengineV1::Layer::Representation - - property :next_page_token, :base64 => true, as: 'nextPageToken' - end - end - - # @private - class LineStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :border, as: 'border', class: Google::Apis::MapsengineV1::Border, decorator: Google::Apis::MapsengineV1::Border::Representation - - collection :dash, as: 'dash' - property :label, as: 'label', class: Google::Apis::MapsengineV1::LabelStyle, decorator: Google::Apis::MapsengineV1::LabelStyle::Representation - - property :stroke, as: 'stroke', class: Google::Apis::MapsengineV1::LineStyle::Stroke, decorator: Google::Apis::MapsengineV1::LineStyle::Stroke::Representation - - end - - # @private - class Stroke - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color' - property :opacity, as: 'opacity' - property :width, as: 'width' - end - end - end - - # @private - class Map - class Representation < Google::Apis::Core::JsonRepresentation - collection :bbox, as: 'bbox' - collection :contents, as: 'contents', class: Google::Apis::MapsengineV1::MapItem, decorator: Google::Apis::MapsengineV1::MapItem::Representation - - property :creation_time, as: 'creationTime', type: DateTime - - property :creator_email, as: 'creatorEmail' - collection :default_viewport, as: 'defaultViewport' - property :description, as: 'description' - property :draft_access_list, as: 'draftAccessList' - property :etag, as: 'etag' - property :id, as: 'id' - property :last_modified_time, as: 'lastModifiedTime', type: DateTime - - property :last_modifier_email, as: 'lastModifierEmail' - property :name, as: 'name' - property :processing_status, as: 'processingStatus' - property :project_id, as: 'projectId' - property :published_access_list, as: 'publishedAccessList' - property :publishing_status, as: 'publishingStatus' - collection :tags, as: 'tags' - collection :versions, as: 'versions' - property :writers_can_edit_permissions, as: 'writersCanEditPermissions' - end - end - - # @private - class MapFolder - class Representation < Google::Apis::Core::JsonRepresentation - collection :contents, as: 'contents', class: Google::Apis::MapsengineV1::MapItem, decorator: Google::Apis::MapsengineV1::MapItem::Representation - - collection :default_viewport, as: 'defaultViewport' - property :expandable, as: 'expandable' - property :key, as: 'key' - property :name, as: 'name' - property :type, as: 'type' - property :visibility, as: 'visibility' - end - end - - # @private - class MapKmlLink - class Representation < Google::Apis::Core::JsonRepresentation - collection :default_viewport, as: 'defaultViewport' - property :kml_url, as: 'kmlUrl' - property :name, as: 'name' - property :type, as: 'type' - property :visibility, as: 'visibility' - end - end - - # @private - class MapLayer - class Representation < Google::Apis::Core::JsonRepresentation - collection :default_viewport, as: 'defaultViewport' - property :id, as: 'id' - property :key, as: 'key' - property :name, as: 'name' - property :type, as: 'type' - property :visibility, as: 'visibility' - end - end - - # @private - class ListMapsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :maps, as: 'maps', class: Google::Apis::MapsengineV1::Map, decorator: Google::Apis::MapsengineV1::Map::Representation - - property :next_page_token, :base64 => true, as: 'nextPageToken' - end - end - - # @private - class Parent - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - end - end - - # @private - class ListParentsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :parents, as: 'parents', class: Google::Apis::MapsengineV1::Parent, decorator: Google::Apis::MapsengineV1::Parent::Representation - - end - end - - # @private - class Permission - class Representation < Google::Apis::Core::JsonRepresentation - property :discoverable, as: 'discoverable' - property :id, as: 'id' - property :role, as: 'role' - property :type, as: 'type' - end - end - - # @private - class BatchDeletePermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :ids, as: 'ids' - end - end - - # @private - class BatchDeletePermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class BatchUpdatePermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions', class: Google::Apis::MapsengineV1::Permission, decorator: Google::Apis::MapsengineV1::Permission::Representation - - end - end - - # @private - class BatchUpdatePermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class ListPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions', class: Google::Apis::MapsengineV1::Permission, decorator: Google::Apis::MapsengineV1::Permission::Representation - - end - end - - # @private - class PointStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :icon, as: 'icon', class: Google::Apis::MapsengineV1::IconStyle, decorator: Google::Apis::MapsengineV1::IconStyle::Representation - - property :label, as: 'label', class: Google::Apis::MapsengineV1::LabelStyle, decorator: Google::Apis::MapsengineV1::LabelStyle::Representation - - end - end - - # @private - class PolygonStyle - class Representation < Google::Apis::Core::JsonRepresentation - property :fill, as: 'fill', class: Google::Apis::MapsengineV1::Color, decorator: Google::Apis::MapsengineV1::Color::Representation - - property :label, as: 'label', class: Google::Apis::MapsengineV1::LabelStyle, decorator: Google::Apis::MapsengineV1::LabelStyle::Representation - - property :stroke, as: 'stroke', class: Google::Apis::MapsengineV1::Border, decorator: Google::Apis::MapsengineV1::Border::Representation - - end - end - - # @private - class ProcessResponse - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class Project - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :name, as: 'name' - end - end - - # @private - class ListProjectsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :projects, as: 'projects', class: Google::Apis::MapsengineV1::Project, decorator: Google::Apis::MapsengineV1::Project::Representation - - end - end - - # @private - class PublishResponse - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class PublishedLayer - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :id, as: 'id' - property :layer_type, as: 'layerType' - property :name, as: 'name' - property :project_id, as: 'projectId' - end - end - - # @private - class ListPublishedLayersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :layers, as: 'layers', class: Google::Apis::MapsengineV1::PublishedLayer, decorator: Google::Apis::MapsengineV1::PublishedLayer::Representation - - property :next_page_token, :base64 => true, as: 'nextPageToken' - end - end - - # @private - class PublishedMap - class Representation < Google::Apis::Core::JsonRepresentation - collection :contents, as: 'contents', class: Google::Apis::MapsengineV1::MapItem, decorator: Google::Apis::MapsengineV1::MapItem::Representation - - collection :default_viewport, as: 'defaultViewport' - property :description, as: 'description' - property :id, as: 'id' - property :name, as: 'name' - property :project_id, as: 'projectId' - end - end - - # @private - class ListPublishedMapsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :maps, as: 'maps', class: Google::Apis::MapsengineV1::PublishedMap, decorator: Google::Apis::MapsengineV1::PublishedMap::Representation - - property :next_page_token, :base64 => true, as: 'nextPageToken' - end - end - - # @private - class Raster - class Representation < Google::Apis::Core::JsonRepresentation - property :acquisition_time, as: 'acquisitionTime', class: Google::Apis::MapsengineV1::AcquisitionTime, decorator: Google::Apis::MapsengineV1::AcquisitionTime::Representation - - property :attribution, as: 'attribution' - collection :bbox, as: 'bbox' - property :creation_time, as: 'creationTime', type: DateTime - - property :creator_email, as: 'creatorEmail' - property :description, as: 'description' - property :draft_access_list, as: 'draftAccessList' - property :etag, as: 'etag' - collection :files, as: 'files', class: Google::Apis::MapsengineV1::File, decorator: Google::Apis::MapsengineV1::File::Representation - - property :id, as: 'id' - property :last_modified_time, as: 'lastModifiedTime', type: DateTime - - property :last_modifier_email, as: 'lastModifierEmail' - property :mask_type, as: 'maskType' - property :name, as: 'name' - property :processing_status, as: 'processingStatus' - property :project_id, as: 'projectId' - property :raster_type, as: 'rasterType' - collection :tags, as: 'tags' - property :writers_can_edit_permissions, as: 'writersCanEditPermissions' - end - end - - # @private - class RasterCollection - class Representation < Google::Apis::Core::JsonRepresentation - property :attribution, as: 'attribution' - collection :bbox, as: 'bbox' - property :creation_time, as: 'creationTime', type: DateTime - - property :creator_email, as: 'creatorEmail' - property :description, as: 'description' - property :draft_access_list, as: 'draftAccessList' - property :etag, as: 'etag' - property :id, as: 'id' - property :last_modified_time, as: 'lastModifiedTime', type: DateTime - - property :last_modifier_email, as: 'lastModifierEmail' - property :mosaic, as: 'mosaic' - property :name, as: 'name' - property :processing_status, as: 'processingStatus' - property :project_id, as: 'projectId' - property :raster_type, as: 'rasterType' - collection :tags, as: 'tags' - property :writers_can_edit_permissions, as: 'writersCanEditPermissions' - end - end - - # @private - class ListRasterCollectionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, :base64 => true, as: 'nextPageToken' - collection :raster_collections, as: 'rasterCollections', class: Google::Apis::MapsengineV1::RasterCollection, decorator: Google::Apis::MapsengineV1::RasterCollection::Representation - - end - end - - # @private - class RasterCollectionsRaster - class Representation < Google::Apis::Core::JsonRepresentation - collection :bbox, as: 'bbox' - property :creation_time, as: 'creationTime', type: DateTime - - property :description, as: 'description' - property :id, as: 'id' - property :last_modified_time, as: 'lastModifiedTime', type: DateTime - - property :name, as: 'name' - property :project_id, as: 'projectId' - property :raster_type, as: 'rasterType' - collection :tags, as: 'tags' - end - end - - # @private - class BatchDeleteRasterCollectionsRasterRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :ids, as: 'ids' - end - end - - # @private - class BatchDeleteRasterCollectionsRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class BatchInsertRasterCollectionsRastersRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :ids, as: 'ids' - end - end - - # @private - class BatchInsertRasterCollectionsRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class ListRasterCollectionsRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :rasters, as: 'rasters', class: Google::Apis::MapsengineV1::RasterCollectionsRaster, decorator: Google::Apis::MapsengineV1::RasterCollectionsRaster::Representation - - end - end - - # @private - class ListRastersResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :rasters, as: 'rasters', class: Google::Apis::MapsengineV1::Raster, decorator: Google::Apis::MapsengineV1::Raster::Representation - - end - end - - # @private - class ScaledShape - class Representation < Google::Apis::Core::JsonRepresentation - property :border, as: 'border', class: Google::Apis::MapsengineV1::Border, decorator: Google::Apis::MapsengineV1::Border::Representation - - property :fill, as: 'fill', class: Google::Apis::MapsengineV1::Color, decorator: Google::Apis::MapsengineV1::Color::Representation - - property :shape, as: 'shape' - end - end - - # @private - class ScalingFunction - class Representation < Google::Apis::Core::JsonRepresentation - property :column, as: 'column' - property :scaling_type, as: 'scalingType' - property :size_range, as: 'sizeRange', class: Google::Apis::MapsengineV1::SizeRange, decorator: Google::Apis::MapsengineV1::SizeRange::Representation - - property :value_range, as: 'valueRange', class: Google::Apis::MapsengineV1::ValueRange, decorator: Google::Apis::MapsengineV1::ValueRange::Representation - - end - end - - # @private - class Schema - class Representation < Google::Apis::Core::JsonRepresentation - collection :columns, as: 'columns', class: Google::Apis::MapsengineV1::TableColumn, decorator: Google::Apis::MapsengineV1::TableColumn::Representation - - property :primary_geometry, as: 'primaryGeometry' - property :primary_key, as: 'primaryKey' - end - end - - # @private - class SizeRange - class Representation < Google::Apis::Core::JsonRepresentation - property :max, as: 'max' - property :min, as: 'min' - end - end - - # @private - class Table - class Representation < Google::Apis::Core::JsonRepresentation - collection :bbox, as: 'bbox' - property :creation_time, as: 'creationTime', type: DateTime - - property :creator_email, as: 'creatorEmail' - property :description, as: 'description' - property :draft_access_list, as: 'draftAccessList' - property :etag, as: 'etag' - collection :files, as: 'files', class: Google::Apis::MapsengineV1::File, decorator: Google::Apis::MapsengineV1::File::Representation - - property :id, as: 'id' - property :last_modified_time, as: 'lastModifiedTime', type: DateTime - - property :last_modifier_email, as: 'lastModifierEmail' - property :name, as: 'name' - property :processing_status, as: 'processingStatus' - property :project_id, as: 'projectId' - property :published_access_list, as: 'publishedAccessList' - property :schema, as: 'schema', class: Google::Apis::MapsengineV1::Schema, decorator: Google::Apis::MapsengineV1::Schema::Representation - - property :source_encoding, as: 'sourceEncoding' - collection :tags, as: 'tags' - property :writers_can_edit_permissions, as: 'writersCanEditPermissions' - end - end - - # @private - class TableColumn - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :type, as: 'type' - end - end - - # @private - class ListTablesResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, :base64 => true, as: 'nextPageToken' - collection :tables, as: 'tables', class: Google::Apis::MapsengineV1::Table, decorator: Google::Apis::MapsengineV1::Table::Representation - - end - end - - # @private - class ValueRange - class Representation < Google::Apis::Core::JsonRepresentation - property :max, as: 'max' - property :min, as: 'min' - end - end - - # @private - class VectorStyle - class Representation < Google::Apis::Core::JsonRepresentation - collection :display_rules, as: 'displayRules', class: Google::Apis::MapsengineV1::DisplayRule, decorator: Google::Apis::MapsengineV1::DisplayRule::Representation - - property :feature_info, as: 'featureInfo', class: Google::Apis::MapsengineV1::FeatureInfo, decorator: Google::Apis::MapsengineV1::FeatureInfo::Representation - - property :type, as: 'type' - end - end - - # @private - class ZoomLevels - class Representation < Google::Apis::Core::JsonRepresentation - property :max, as: 'max' - property :min, as: 'min' - end - end - end - end -end diff --git a/generated/google/apis/mapsengine_v1/service.rb b/generated/google/apis/mapsengine_v1/service.rb deleted file mode 100644 index 3bbcdc03a..000000000 --- a/generated/google/apis/mapsengine_v1/service.rb +++ /dev/null @@ -1,3465 +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 MapsengineV1 - # Google Maps Engine API - # - # The Google Maps Engine API allows developers to store and query geospatial - # vector and raster data. - # - # @example - # require 'google/apis/mapsengine_v1' - # - # Mapsengine = Google::Apis::MapsengineV1 # Alias the module - # service = Mapsengine::MapsEngineService.new - # - # @see https://developers.google.com/maps-engine/ - class MapsEngineService < 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/', 'mapsengine/v1/') - end - - # Return metadata for a particular asset. - # @param [String] id - # The ID of the asset. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::Asset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Asset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_asset(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'assets/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::Asset::Representation - command.response_class = Google::Apis::MapsengineV1::Asset - 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 - - # Return all assets readable by the current user. - # @param [String] bbox - # A bounding box, expressed as "west,south,east,north". If set, only assets - # which intersect this bounding box will be returned. - # @param [DateTime] created_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or after this time. - # @param [DateTime] created_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or before this time. - # @param [String] creator_email - # An email address representing a user. Returned assets that have been created - # by the user associated with the provided email address. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [DateTime] modified_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or after this time. - # @param [DateTime] modified_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or before this time. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] role - # The role parameter indicates that the response should only contain assets - # where the current user has the specified level of access. - # @param [String] search - # An unstructured search string used to filter the set of results based on asset - # metadata. - # @param [String] tags - # A comma separated list of tags. Returned assets will contain all the tags from - # the list. - # @param [String] type - # A comma separated list of asset types. Returned assets will have one of the - # types from the provided list. Supported values are 'map', 'layer', ' - # rasterCollection' and 'table'. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListAssetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListAssetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_assets(bbox: nil, created_after: nil, created_before: nil, creator_email: nil, max_results: nil, modified_after: nil, modified_before: nil, page_token: nil, project_id: nil, role: nil, search: nil, tags: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'assets' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListAssetsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListAssetsResponse - command.query['bbox'] = bbox unless bbox.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['createdBefore'] = created_before unless created_before.nil? - command.query['creatorEmail'] = creator_email unless creator_email.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['modifiedAfter'] = modified_after unless modified_after.nil? - command.query['modifiedBefore'] = modified_before unless modified_before.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['role'] = role unless role.nil? - command.query['search'] = search unless search.nil? - command.query['tags'] = tags unless tags.nil? - command.query['type'] = type unless type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Return all parent ids of the specified asset. - # @param [String] id - # The ID of the asset whose parents will be listed. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 50. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, 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::MapsengineV1::ListParentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListParentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_asset_parents(id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'assets/{id}/parents' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListParentsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListParentsResponse - command.params['id'] = id unless 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 - - # Return all of the permissions for the specified asset. - # @param [String] id - # The ID of the asset whose permissions will be listed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_asset_permissions(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'assets/{id}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPermissionsResponse - 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 - - # Cancel processing on a layer asset. - # @param [String] id - # The ID of the layer. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ProcessResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ProcessResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_processing_layer(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/cancelProcessing' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::ProcessResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ProcessResponse - 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 - - # Create a layer asset. - # @param [Google::Apis::MapsengineV1::Layer] layer_object - # @param [Boolean] process - # Whether to queue the created layer for processing. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::Layer] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Layer] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer(layer_object = nil, process: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::Layer::Representation - command.request_object = layer_object - command.response_representation = Google::Apis::MapsengineV1::Layer::Representation - command.response_class = Google::Apis::MapsengineV1::Layer - command.query['process'] = process unless process.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 a layer. - # @param [String] id - # The ID of the layer. Only the layer creator or project owner are permitted to - # delete. If the layer is published, or included in a map, the request will fail. - # Unpublish the layer, and remove it from all maps prior to deleting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_layer(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Return metadata for a particular layer. - # @param [String] id - # The ID of the layer. - # @param [String] version - # Deprecated: The version parameter indicates which version of the layer should - # be returned. When version is set to published, the published version of the - # layer will be returned. Please use the layers.getPublished endpoint instead. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::MapsengineV1::Layer] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Layer] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer(id, version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::Layer::Representation - command.response_class = Google::Apis::MapsengineV1::Layer - command.params['id'] = id unless id.nil? - command.query['version'] = version unless 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 - - # Return the published metadata for a particular layer. - # @param [String] id - # The ID of the layer. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::PublishedLayer] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::PublishedLayer] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_published_layer(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/published' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::PublishedLayer::Representation - command.response_class = Google::Apis::MapsengineV1::PublishedLayer - 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 - - # Return all layers readable by the current user. - # @param [String] bbox - # A bounding box, expressed as "west,south,east,north". If set, only assets - # which intersect this bounding box will be returned. - # @param [DateTime] created_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or after this time. - # @param [DateTime] created_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or before this time. - # @param [String] creator_email - # An email address representing a user. Returned assets that have been created - # by the user associated with the provided email address. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [DateTime] modified_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or after this time. - # @param [DateTime] modified_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or before this time. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] processing_status - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] role - # The role parameter indicates that the response should only contain assets - # where the current user has the specified level of access. - # @param [String] search - # An unstructured search string used to filter the set of results based on asset - # metadata. - # @param [String] tags - # A comma separated list of tags. Returned assets will contain all the tags from - # the list. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListLayersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListLayersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layers(bbox: nil, created_after: nil, created_before: nil, creator_email: nil, max_results: nil, modified_after: nil, modified_before: nil, page_token: nil, processing_status: nil, project_id: nil, role: nil, search: nil, tags: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListLayersResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListLayersResponse - command.query['bbox'] = bbox unless bbox.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['createdBefore'] = created_before unless created_before.nil? - command.query['creatorEmail'] = creator_email unless creator_email.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['modifiedAfter'] = modified_after unless modified_after.nil? - command.query['modifiedBefore'] = modified_before unless modified_before.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['processingStatus'] = processing_status unless processing_status.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['role'] = role unless role.nil? - command.query['search'] = search unless search.nil? - command.query['tags'] = tags unless tags.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 - - # Return all published layers readable by the current user. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPublishedLayersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPublishedLayersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_published_layer(max_results: nil, page_token: nil, project_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/published' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPublishedLayersResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPublishedLayersResponse - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Mutate a layer asset. - # @param [String] id - # The ID of the layer. - # @param [Google::Apis::MapsengineV1::Layer] layer_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 patch_layer(id, layer_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::MapsengineV1::Layer::Representation - command.request_object = layer_object - 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 - - # Process a layer asset. - # @param [String] id - # The ID of the layer. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ProcessResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ProcessResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def process_layer(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/process' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::ProcessResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ProcessResponse - 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 - - # Publish a layer asset. - # @param [String] id - # The ID of the layer. - # @param [Boolean] force - # If set to true, the API will allow publication of the layer even if it's out - # of date. If not true, you'll need to reprocess any out-of-date layer before - # publishing. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::PublishResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::PublishResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish_layer(id, force: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/publish' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::PublishResponse::Representation - command.response_class = Google::Apis::MapsengineV1::PublishResponse - command.params['id'] = id unless id.nil? - command.query['force'] = force unless force.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 - - # Unpublish a layer asset. - # @param [String] id - # The ID of the layer. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::PublishResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::PublishResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def unpublish_layer(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/unpublish' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::PublishResponse::Representation - command.response_class = Google::Apis::MapsengineV1::PublishResponse - 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 - - # Return all parent ids of the specified layer. - # @param [String] id - # The ID of the layer whose parents will be listed. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 50. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, 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::MapsengineV1::ListParentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListParentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer_parents(id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/parents' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListParentsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListParentsResponse - command.params['id'] = id unless 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 - - # Remove permission entries from an already existing asset. - # @param [String] id - # The ID of the asset from which permissions will be removed. - # @param [Google::Apis::MapsengineV1::BatchDeletePermissionsRequest] batch_delete_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_delete_layer_permission(id, batch_delete_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/permissions/batchDelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsRequest::Representation - command.request_object = batch_delete_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse - 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 - - # Add or update permission entries to an already existing asset. - # An asset can hold up to 20 different permission entries. Each batchInsert - # request is atomic. - # @param [String] id - # The ID of the asset to which permissions will be added. - # @param [Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest] batch_update_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_layer_permission(id, batch_update_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/permissions/batchUpdate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest::Representation - command.request_object = batch_update_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse - 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 - - # Return all of the permissions for the specified asset. - # @param [String] id - # The ID of the asset whose permissions will be listed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_layer_permissions(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'layers/{id}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPermissionsResponse - 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 - - # Create a map asset. - # @param [Google::Apis::MapsengineV1::Map] map_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::MapsengineV1::Map] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Map] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_map(map_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::Map::Representation - command.request_object = map_object - command.response_representation = Google::Apis::MapsengineV1::Map::Representation - command.response_class = Google::Apis::MapsengineV1::Map - 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 a map. - # @param [String] id - # The ID of the map. Only the map creator or project owner are permitted to - # delete. If the map is published the request will fail. Unpublish the map prior - # to deleting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_map(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Return metadata for a particular map. - # @param [String] id - # The ID of the map. - # @param [String] version - # Deprecated: The version parameter indicates which version of the map should be - # returned. When version is set to published, the published version of the map - # will be returned. Please use the maps.getPublished endpoint instead. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::MapsengineV1::Map] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Map] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_map(id, version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::Map::Representation - command.response_class = Google::Apis::MapsengineV1::Map - command.params['id'] = id unless id.nil? - command.query['version'] = version unless 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 - - # Return the published metadata for a particular map. - # @param [String] id - # The ID of the map. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::PublishedMap] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::PublishedMap] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_published_map(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}/published' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::PublishedMap::Representation - command.response_class = Google::Apis::MapsengineV1::PublishedMap - 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 - - # Return all maps readable by the current user. - # @param [String] bbox - # A bounding box, expressed as "west,south,east,north". If set, only assets - # which intersect this bounding box will be returned. - # @param [DateTime] created_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or after this time. - # @param [DateTime] created_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or before this time. - # @param [String] creator_email - # An email address representing a user. Returned assets that have been created - # by the user associated with the provided email address. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [DateTime] modified_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or after this time. - # @param [DateTime] modified_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or before this time. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] processing_status - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] role - # The role parameter indicates that the response should only contain assets - # where the current user has the specified level of access. - # @param [String] search - # An unstructured search string used to filter the set of results based on asset - # metadata. - # @param [String] tags - # A comma separated list of tags. Returned assets will contain all the tags from - # the list. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListMapsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListMapsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_maps(bbox: nil, created_after: nil, created_before: nil, creator_email: nil, max_results: nil, modified_after: nil, modified_before: nil, page_token: nil, processing_status: nil, project_id: nil, role: nil, search: nil, tags: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListMapsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListMapsResponse - command.query['bbox'] = bbox unless bbox.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['createdBefore'] = created_before unless created_before.nil? - command.query['creatorEmail'] = creator_email unless creator_email.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['modifiedAfter'] = modified_after unless modified_after.nil? - command.query['modifiedBefore'] = modified_before unless modified_before.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['processingStatus'] = processing_status unless processing_status.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['role'] = role unless role.nil? - command.query['search'] = search unless search.nil? - command.query['tags'] = tags unless tags.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 - - # Return all published maps readable by the current user. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPublishedMapsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPublishedMapsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_published_map(max_results: nil, page_token: nil, project_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/published' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPublishedMapsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPublishedMapsResponse - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Mutate a map asset. - # @param [String] id - # The ID of the map. - # @param [Google::Apis::MapsengineV1::Map] map_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 patch_map(id, map_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::MapsengineV1::Map::Representation - command.request_object = map_object - 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 - - # Publish a map asset. - # @param [String] id - # The ID of the map. - # @param [Boolean] force - # If set to true, the API will allow publication of the map even if it's out of - # date. If false, the map must have a processingStatus of complete before - # publishing. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::PublishResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::PublishResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish_map(id, force: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}/publish' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::PublishResponse::Representation - command.response_class = Google::Apis::MapsengineV1::PublishResponse - command.params['id'] = id unless id.nil? - command.query['force'] = force unless force.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 - - # Unpublish a map asset. - # @param [String] id - # The ID of the map. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::PublishResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::PublishResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def unpublish_map(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}/unpublish' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::PublishResponse::Representation - command.response_class = Google::Apis::MapsengineV1::PublishResponse - 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 - - # Remove permission entries from an already existing asset. - # @param [String] id - # The ID of the asset from which permissions will be removed. - # @param [Google::Apis::MapsengineV1::BatchDeletePermissionsRequest] batch_delete_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_delete_map_permission(id, batch_delete_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}/permissions/batchDelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsRequest::Representation - command.request_object = batch_delete_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse - 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 - - # Add or update permission entries to an already existing asset. - # An asset can hold up to 20 different permission entries. Each batchInsert - # request is atomic. - # @param [String] id - # The ID of the asset to which permissions will be added. - # @param [Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest] batch_update_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_map_permission(id, batch_update_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}/permissions/batchUpdate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest::Representation - command.request_object = batch_update_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse - 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 - - # Return all of the permissions for the specified asset. - # @param [String] id - # The ID of the asset whose permissions will be listed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_map_permissions(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'maps/{id}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPermissionsResponse - 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 - - # Return all projects readable by the current 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::MapsengineV1::ListProjectsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::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(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListProjectsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListProjectsResponse - 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 - - # Create an icon. - # @param [String] project_id - # The ID of the project. - # @param [Google::Apis::MapsengineV1::Icon] icon_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::Icon] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Icon] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_icon(project_id, icon_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'projects/{projectId}/icons' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::MapsengineV1::Icon::Representation - command.request_object = icon_object - command.response_representation = Google::Apis::MapsengineV1::Icon::Representation - command.response_class = Google::Apis::MapsengineV1::Icon - 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 - - # Return an icon or its associated metadata - # @param [String] project_id - # The ID of the project. - # @param [String] id - # The ID of the icon. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::Icon] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Icon] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_icon(project_id, id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'projects/{projectId}/icons/{id}' - 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::MapsengineV1::Icon::Representation - command.response_class = Google::Apis::MapsengineV1::Icon - command.params['projectId'] = project_id unless project_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Return all icons in the current project - # @param [String] project_id - # The ID of the project. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 50. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, 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::MapsengineV1::ListIconsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListIconsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_icons(project_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{projectId}/icons' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListIconsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListIconsResponse - command.params['projectId'] = project_id unless project_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 - - # Cancel processing on a raster collection asset. - # @param [String] id - # The ID of the raster collection. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ProcessResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ProcessResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_processing_raster_collection(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/cancelProcessing' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::ProcessResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ProcessResponse - 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 - - # Create a raster collection asset. - # @param [Google::Apis::MapsengineV1::RasterCollection] raster_collection_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::MapsengineV1::RasterCollection] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::RasterCollection] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_collection(raster_collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::RasterCollection::Representation - command.request_object = raster_collection_object - command.response_representation = Google::Apis::MapsengineV1::RasterCollection::Representation - command.response_class = Google::Apis::MapsengineV1::RasterCollection - 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 a raster collection. - # @param [String] id - # The ID of the raster collection. Only the raster collection creator or project - # owner are permitted to delete. If the rastor collection is included in a layer, - # the request will fail. Remove the raster collection from all layers prior to - # deleting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_raster_collection(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Return metadata for a particular raster collection. - # @param [String] id - # The ID of the raster collection. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::RasterCollection] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::RasterCollection] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_collection(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::RasterCollection::Representation - command.response_class = Google::Apis::MapsengineV1::RasterCollection - 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 - - # Return all raster collections readable by the current user. - # @param [String] bbox - # A bounding box, expressed as "west,south,east,north". If set, only assets - # which intersect this bounding box will be returned. - # @param [DateTime] created_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or after this time. - # @param [DateTime] created_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or before this time. - # @param [String] creator_email - # An email address representing a user. Returned assets that have been created - # by the user associated with the provided email address. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [DateTime] modified_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or after this time. - # @param [DateTime] modified_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or before this time. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] processing_status - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] role - # The role parameter indicates that the response should only contain assets - # where the current user has the specified level of access. - # @param [String] search - # An unstructured search string used to filter the set of results based on asset - # metadata. - # @param [String] tags - # A comma separated list of tags. Returned assets will contain all the tags from - # the list. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListRasterCollectionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListRasterCollectionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_collections(bbox: nil, created_after: nil, created_before: nil, creator_email: nil, max_results: nil, modified_after: nil, modified_before: nil, page_token: nil, processing_status: nil, project_id: nil, role: nil, search: nil, tags: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListRasterCollectionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListRasterCollectionsResponse - command.query['bbox'] = bbox unless bbox.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['createdBefore'] = created_before unless created_before.nil? - command.query['creatorEmail'] = creator_email unless creator_email.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['modifiedAfter'] = modified_after unless modified_after.nil? - command.query['modifiedBefore'] = modified_before unless modified_before.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['processingStatus'] = processing_status unless processing_status.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['role'] = role unless role.nil? - command.query['search'] = search unless search.nil? - command.query['tags'] = tags unless tags.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 - - # Mutate a raster collection asset. - # @param [String] id - # The ID of the raster collection. - # @param [Google::Apis::MapsengineV1::RasterCollection] raster_collection_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 patch_raster_collection(id, raster_collection_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::MapsengineV1::RasterCollection::Representation - command.request_object = raster_collection_object - 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 - - # Process a raster collection asset. - # @param [String] id - # The ID of the raster collection. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ProcessResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ProcessResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def process_raster_collection(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/process' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::ProcessResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ProcessResponse - 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 - - # Return all parent ids of the specified raster collection. - # @param [String] id - # The ID of the raster collection whose parents will be listed. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 50. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, 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::MapsengineV1::ListParentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListParentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_collection_parents(id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/parents' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListParentsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListParentsResponse - command.params['id'] = id unless 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 - - # Remove permission entries from an already existing asset. - # @param [String] id - # The ID of the asset from which permissions will be removed. - # @param [Google::Apis::MapsengineV1::BatchDeletePermissionsRequest] batch_delete_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_delete_raster_collection_permission(id, batch_delete_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/permissions/batchDelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsRequest::Representation - command.request_object = batch_delete_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse - 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 - - # Add or update permission entries to an already existing asset. - # An asset can hold up to 20 different permission entries. Each batchInsert - # request is atomic. - # @param [String] id - # The ID of the asset to which permissions will be added. - # @param [Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest] batch_update_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_raster_collection_permission(id, batch_update_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/permissions/batchUpdate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest::Representation - command.request_object = batch_update_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse - 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 - - # Return all of the permissions for the specified asset. - # @param [String] id - # The ID of the asset whose permissions will be listed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_collection_permissions(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPermissionsResponse - 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 - - # Remove rasters from an existing raster collection. - # Up to 50 rasters can be included in a single batchDelete request. Each - # batchDelete request is atomic. - # @param [String] id - # The ID of the raster collection to which these rasters belong. - # @param [Google::Apis::MapsengineV1::BatchDeleteRasterCollectionsRasterRequest] batch_delete_raster_collections_raster_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::MapsengineV1::BatchDeleteRasterCollectionsRastersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchDeleteRasterCollectionsRastersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_delete_raster_collection_raster(id, batch_delete_raster_collections_raster_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/rasters/batchDelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchDeleteRasterCollectionsRasterRequest::Representation - command.request_object = batch_delete_raster_collections_raster_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchDeleteRasterCollectionsRastersResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchDeleteRasterCollectionsRastersResponse - 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 - - # Add rasters to an existing raster collection. Rasters must be successfully - # processed in order to be added to a raster collection. - # Up to 50 rasters can be included in a single batchInsert request. Each - # batchInsert request is atomic. - # @param [String] id - # The ID of the raster collection to which these rasters belong. - # @param [Google::Apis::MapsengineV1::BatchInsertRasterCollectionsRastersRequest] batch_insert_raster_collections_rasters_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::MapsengineV1::BatchInsertRasterCollectionsRastersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchInsertRasterCollectionsRastersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_insert_raster_collection_raster(id, batch_insert_raster_collections_rasters_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/rasters/batchInsert' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchInsertRasterCollectionsRastersRequest::Representation - command.request_object = batch_insert_raster_collections_rasters_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchInsertRasterCollectionsRastersResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchInsertRasterCollectionsRastersResponse - 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 - - # Return all rasters within a raster collection. - # @param [String] id - # The ID of the raster collection to which these rasters belong. - # @param [String] bbox - # A bounding box, expressed as "west,south,east,north". If set, only assets - # which intersect this bounding box will be returned. - # @param [DateTime] created_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or after this time. - # @param [DateTime] created_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or before this time. - # @param [String] creator_email - # An email address representing a user. Returned assets that have been created - # by the user associated with the provided email address. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [DateTime] modified_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or after this time. - # @param [DateTime] modified_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or before this time. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] role - # The role parameter indicates that the response should only contain assets - # where the current user has the specified level of access. - # @param [String] search - # An unstructured search string used to filter the set of results based on asset - # metadata. - # @param [String] tags - # A comma separated list of tags. Returned assets will contain all the tags from - # the list. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListRasterCollectionsRastersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListRasterCollectionsRastersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_collection_rasters(id, bbox: nil, created_after: nil, created_before: nil, creator_email: nil, max_results: nil, modified_after: nil, modified_before: nil, page_token: nil, role: nil, search: nil, tags: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasterCollections/{id}/rasters' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListRasterCollectionsRastersResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListRasterCollectionsRastersResponse - command.params['id'] = id unless id.nil? - command.query['bbox'] = bbox unless bbox.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['createdBefore'] = created_before unless created_before.nil? - command.query['creatorEmail'] = creator_email unless creator_email.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['modifiedAfter'] = modified_after unless modified_after.nil? - command.query['modifiedBefore'] = modified_before unless modified_before.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['role'] = role unless role.nil? - command.query['search'] = search unless search.nil? - command.query['tags'] = tags unless tags.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 a raster. - # @param [String] id - # The ID of the raster. Only the raster creator or project owner are permitted - # to delete. If the raster is included in a layer or mosaic, the request will - # fail. Remove it from all parents prior to deleting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_raster(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Return metadata for a single raster. - # @param [String] id - # The ID of the raster. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::Raster] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Raster] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::Raster::Representation - command.response_class = Google::Apis::MapsengineV1::Raster - 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 - - # Return all rasters readable by the current user. - # @param [String] bbox - # A bounding box, expressed as "west,south,east,north". If set, only assets - # which intersect this bounding box will be returned. - # @param [DateTime] created_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or after this time. - # @param [DateTime] created_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or before this time. - # @param [String] creator_email - # An email address representing a user. Returned assets that have been created - # by the user associated with the provided email address. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [DateTime] modified_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or after this time. - # @param [DateTime] modified_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or before this time. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] processing_status - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] role - # The role parameter indicates that the response should only contain assets - # where the current user has the specified level of access. - # @param [String] search - # An unstructured search string used to filter the set of results based on asset - # metadata. - # @param [String] tags - # A comma separated list of tags. Returned assets will contain all the tags from - # the list. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListRastersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListRastersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rasters(bbox: nil, created_after: nil, created_before: nil, creator_email: nil, max_results: nil, modified_after: nil, modified_before: nil, page_token: nil, processing_status: nil, project_id: nil, role: nil, search: nil, tags: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListRastersResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListRastersResponse - command.query['bbox'] = bbox unless bbox.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['createdBefore'] = created_before unless created_before.nil? - command.query['creatorEmail'] = creator_email unless creator_email.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['modifiedAfter'] = modified_after unless modified_after.nil? - command.query['modifiedBefore'] = modified_before unless modified_before.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['processingStatus'] = processing_status unless processing_status.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['role'] = role unless role.nil? - command.query['search'] = search unless search.nil? - command.query['tags'] = tags unless tags.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 - - # Mutate a raster asset. - # @param [String] id - # The ID of the raster. - # @param [Google::Apis::MapsengineV1::Raster] raster_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 patch_raster(id, raster_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::MapsengineV1::Raster::Representation - command.request_object = raster_object - 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 - - # Process a raster asset. - # @param [String] id - # The ID of the raster. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ProcessResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ProcessResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def process_raster(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}/process' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::ProcessResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ProcessResponse - 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 - - # Create a skeleton raster asset for upload. - # @param [Google::Apis::MapsengineV1::Raster] raster_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::MapsengineV1::Raster] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Raster] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_raster(raster_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/upload' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::Raster::Representation - command.request_object = raster_object - command.response_representation = Google::Apis::MapsengineV1::Raster::Representation - command.response_class = Google::Apis::MapsengineV1::Raster - 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 - - # Upload a file to a raster asset. - # @param [String] id - # The ID of the raster asset. - # @param [String] filename - # The file name of this uploaded file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @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 insert_raster_file(id, filename: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'rasters/{id}/files' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.params['id'] = id unless id.nil? - command.query['filename'] = filename unless filename.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 - - # Return all parent ids of the specified rasters. - # @param [String] id - # The ID of the rasters whose parents will be listed. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 50. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, 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::MapsengineV1::ListParentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListParentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_parents(id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}/parents' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListParentsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListParentsResponse - command.params['id'] = id unless 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 - - # Remove permission entries from an already existing asset. - # @param [String] id - # The ID of the asset from which permissions will be removed. - # @param [Google::Apis::MapsengineV1::BatchDeletePermissionsRequest] batch_delete_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_delete_raster_permission(id, batch_delete_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}/permissions/batchDelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsRequest::Representation - command.request_object = batch_delete_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse - 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 - - # Add or update permission entries to an already existing asset. - # An asset can hold up to 20 different permission entries. Each batchInsert - # request is atomic. - # @param [String] id - # The ID of the asset to which permissions will be added. - # @param [Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest] batch_update_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_raster_permission(id, batch_update_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}/permissions/batchUpdate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest::Representation - command.request_object = batch_update_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse - 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 - - # Return all of the permissions for the specified asset. - # @param [String] id - # The ID of the asset whose permissions will be listed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_raster_permissions(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'rasters/{id}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPermissionsResponse - 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 - - # Create a table asset. - # @param [Google::Apis::MapsengineV1::Table] table_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::MapsengineV1::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::MapsengineV1::Table::Representation - command.response_class = Google::Apis::MapsengineV1::Table - 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 a table. - # @param [String] id - # The ID of the table. Only the table creator or project owner are permitted to - # delete. If the table is included in a layer, the request will fail. Remove it - # from all layers prior to deleting. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_table(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Return metadata for a particular table, including the schema. - # @param [String] id - # The ID of the table. - # @param [String] version - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table(id, version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::Table::Representation - command.response_class = Google::Apis::MapsengineV1::Table - command.params['id'] = id unless id.nil? - command.query['version'] = version unless 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 - - # Return all tables readable by the current user. - # @param [String] bbox - # A bounding box, expressed as "west,south,east,north". If set, only assets - # which intersect this bounding box will be returned. - # @param [DateTime] created_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or after this time. - # @param [DateTime] created_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been created at or before this time. - # @param [String] creator_email - # An email address representing a user. Returned assets that have been created - # by the user associated with the provided email address. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 100. - # @param [DateTime] modified_after - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or after this time. - # @param [DateTime] modified_before - # An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). Returned - # assets will have been modified at or before this time. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] processing_status - # @param [String] project_id - # The ID of a Maps Engine project, used to filter the response. To list all - # available projects with their IDs, send a Projects: list request. You can also - # find your project ID as the value of the DashboardPlace:cid URL parameter when - # signed in to mapsengine.google.com. - # @param [String] role - # The role parameter indicates that the response should only contain assets - # where the current user has the specified level of access. - # @param [String] search - # An unstructured search string used to filter the set of results based on asset - # metadata. - # @param [String] tags - # A comma separated list of tags. Returned assets will contain all the tags from - # the list. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListTablesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListTablesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tables(bbox: nil, created_after: nil, created_before: nil, creator_email: nil, max_results: nil, modified_after: nil, modified_before: nil, page_token: nil, processing_status: nil, project_id: nil, role: nil, search: nil, tags: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListTablesResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListTablesResponse - command.query['bbox'] = bbox unless bbox.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['createdBefore'] = created_before unless created_before.nil? - command.query['creatorEmail'] = creator_email unless creator_email.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['modifiedAfter'] = modified_after unless modified_after.nil? - command.query['modifiedBefore'] = modified_before unless modified_before.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['processingStatus'] = processing_status unless processing_status.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['role'] = role unless role.nil? - command.query['search'] = search unless search.nil? - command.query['tags'] = tags unless tags.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 - - # Mutate a table asset. - # @param [String] id - # The ID of the table. - # @param [Google::Apis::MapsengineV1::Table] table_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 patch_table(id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::MapsengineV1::Table::Representation - command.request_object = table_object - 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 - - # Process a table asset. - # @param [String] id - # The ID of the table. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ProcessResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ProcessResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def process_table(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/process' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::MapsengineV1::ProcessResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ProcessResponse - 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 - - # Create a placeholder table asset to which table files can be uploaded. - # Once the placeholder has been created, files are uploaded to the https://www. - # googleapis.com/upload/mapsengine/v1/tables/table_id/files endpoint. - # See Table Upload in the Developer's Guide or Table.files: insert in the - # reference documentation for more information. - # @param [Google::Apis::MapsengineV1::Table] table_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::MapsengineV1::Table] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Table] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def upload_table(table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/upload' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::Table::Representation - command.request_object = table_object - command.response_representation = Google::Apis::MapsengineV1::Table::Representation - command.response_class = Google::Apis::MapsengineV1::Table - 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 all features matching the given IDs. - # @param [String] id - # The ID of the table that contains the features to be deleted. - # @param [Google::Apis::MapsengineV1::BatchDeleteFeaturesRequest] batch_delete_features_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 [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 batch_delete_table_feature(id, batch_delete_features_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/features/batchDelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchDeleteFeaturesRequest::Representation - command.request_object = batch_delete_features_request_object - 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 - - # Append features to an existing table. - # A single batchInsert request can create: - # - Up to 50 features. - # - A combined total of 10 000 vertices. - # Feature limits are documented in the Supported data formats and limits article - # of the Google Maps Engine help center. Note that free and paid accounts have - # different limits. - # For more information about inserting features, read Creating features in the - # Google Maps Engine developer's guide. - # @param [String] id - # The ID of the table to append the features to. - # @param [Google::Apis::MapsengineV1::BatchInsertFeaturesRequest] batch_insert_features_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 [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 batch_insert_table_feature(id, batch_insert_features_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/features/batchInsert' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchInsertFeaturesRequest::Representation - command.request_object = batch_insert_features_request_object - 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 - - # Update the supplied features. - # A single batchPatch request can update: - # - Up to 50 features. - # - A combined total of 10 000 vertices. - # Feature limits are documented in the Supported data formats and limits article - # of the Google Maps Engine help center. Note that free and paid accounts have - # different limits. - # Feature updates use HTTP PATCH semantics: - # - A supplied value replaces an existing value (if any) in that field. - # - Omitted fields remain unchanged. - # - Complex values in geometries and properties must be replaced as atomic units. - # For example, providing just the coordinates of a geometry is not allowed; the - # complete geometry, including type, must be supplied. - # - Setting a property's value to null deletes that property. - # For more information about updating features, read Updating features in the - # Google Maps Engine developer's guide. - # @param [String] id - # The ID of the table containing the features to be patched. - # @param [Google::Apis::MapsengineV1::BatchPatchFeaturesRequest] batch_patch_features_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 [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 batch_patch_table_feature(id, batch_patch_features_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/features/batchPatch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchPatchFeaturesRequest::Representation - command.request_object = batch_patch_features_request_object - 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 - - # Return a single feature, given its ID. - # @param [String] table_id - # The ID of the table. - # @param [String] id - # The ID of the feature to get. - # @param [String] select - # A SQL-like projection clause used to specify returned properties. If this - # parameter is not included, all properties are returned. - # @param [String] version - # The table version to access. See Accessing Public Data for information. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::Feature] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::Feature] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table_feature(table_id, id, select: nil, version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{tableId}/features/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::Feature::Representation - command.response_class = Google::Apis::MapsengineV1::Feature - command.params['tableId'] = table_id unless table_id.nil? - command.params['id'] = id unless id.nil? - command.query['select'] = select unless select.nil? - command.query['version'] = version unless 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 - - # Return all features readable by the current user. - # @param [String] id - # The ID of the table to which these features belong. - # @param [String] include - # A comma separated list of optional data to include. Optional data available: - # schema. - # @param [String] intersects - # A geometry literal that specifies the spatial restriction of the query. - # @param [Fixnum] limit - # The total number of features to return from the query, irrespective of the - # number of pages. - # @param [Fixnum] max_results - # The maximum number of items to include in the response, used for paging. The - # maximum supported value is 1000. - # @param [String] order_by - # An SQL-like order by clause used to sort results. If this parameter is not - # included, the order of features is undefined. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, set this parameter to the value of nextPageToken from - # the previous response. - # @param [String] select - # A SQL-like projection clause used to specify returned properties. If this - # parameter is not included, all properties are returned. - # @param [String] version - # The table version to access. See Accessing Public Data for information. - # @param [String] where - # An SQL-like predicate used to filter results. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::ListFeaturesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListFeaturesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table_features(id, include: nil, intersects: nil, limit: nil, max_results: nil, order_by: nil, page_token: nil, select: nil, version: nil, where: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/features' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListFeaturesResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListFeaturesResponse - command.params['id'] = id unless id.nil? - command.query['include'] = include unless include.nil? - command.query['intersects'] = intersects unless intersects.nil? - command.query['limit'] = limit unless limit.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['select'] = select unless select.nil? - command.query['version'] = version unless version.nil? - command.query['where'] = where unless where.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 - - # Upload a file to a placeholder table asset. See Table Upload in the Developer' - # s Guide for more information. - # Supported file types are listed in the Supported data formats and limits - # article of the Google Maps Engine help center. - # @param [String] id - # The ID of the table asset. - # @param [String] filename - # The file name of this uploaded file. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @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 insert_table_file(id, filename: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'tables/{id}/files' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.params['id'] = id unless id.nil? - command.query['filename'] = filename unless filename.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 - - # Return all parent ids of the specified table. - # @param [String] id - # The ID of the table whose parents will be listed. - # @param [Fixnum] max_results - # The maximum number of items to include in a single response page. The maximum - # supported value is 50. - # @param [String] page_token - # The continuation token, used to page through large result sets. To get the - # next page of results, 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::MapsengineV1::ListParentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListParentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table_parents(id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/parents' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListParentsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListParentsResponse - command.params['id'] = id unless 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 - - # Remove permission entries from an already existing asset. - # @param [String] id - # The ID of the asset from which permissions will be removed. - # @param [Google::Apis::MapsengineV1::BatchDeletePermissionsRequest] batch_delete_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchDeletePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_delete_table_permission(id, batch_delete_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/permissions/batchDelete' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsRequest::Representation - command.request_object = batch_delete_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchDeletePermissionsResponse - 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 - - # Add or update permission entries to an already existing asset. - # An asset can hold up to 20 different permission entries. Each batchInsert - # request is atomic. - # @param [String] id - # The ID of the asset to which permissions will be added. - # @param [Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest] batch_update_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_table_permission(id, batch_update_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/permissions/batchUpdate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsRequest::Representation - command.request_object = batch_update_permissions_request_object - command.response_representation = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::BatchUpdatePermissionsResponse - 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 - - # Return all of the permissions for the specified asset. - # @param [String] id - # The ID of the asset whose permissions will be listed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MapsengineV1::ListPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MapsengineV1::ListPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_table_permissions(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'tables/{id}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MapsengineV1::ListPermissionsResponse::Representation - command.response_class = Google::Apis::MapsengineV1::ListPermissionsResponse - 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 - - 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 diff --git a/generated/google/apis/mirror_v1.rb b/generated/google/apis/mirror_v1.rb deleted file mode 100644 index 1997b0d81..000000000 --- a/generated/google/apis/mirror_v1.rb +++ /dev/null @@ -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/mirror_v1/service.rb' -require 'google/apis/mirror_v1/classes.rb' -require 'google/apis/mirror_v1/representations.rb' - -module Google - module Apis - # Google Mirror API - # - # API for interacting with Glass users via the timeline. - # - # @see https://developers.google.com/glass - module MirrorV1 - VERSION = 'V1' - REVISION = '20150326' - - # View your location - AUTH_GLASS_LOCATION = 'https://www.googleapis.com/auth/glass.location' - - # View and manage your Glass timeline - AUTH_GLASS_TIMELINE = 'https://www.googleapis.com/auth/glass.timeline' - end - end -end diff --git a/generated/google/apis/mirror_v1/classes.rb b/generated/google/apis/mirror_v1/classes.rb deleted file mode 100644 index d7da43c60..000000000 --- a/generated/google/apis/mirror_v1/classes.rb +++ /dev/null @@ -1,1072 +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 MirrorV1 - - # Represents an account passed into the Account Manager on Glass. - class Account - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `authTokens` - # @return [Array] - attr_accessor :auth_tokens - - # - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # - # Corresponds to the JSON property `userData` - # @return [Array] - attr_accessor :user_data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auth_tokens = args[:auth_tokens] unless args[:auth_tokens].nil? - @features = args[:features] unless args[:features].nil? - @password = args[:password] unless args[:password].nil? - @user_data = args[:user_data] unless args[:user_data].nil? - end - end - - # Represents media content, such as a photo, that can be attached to a timeline - # item. - class Attachment - include Google::Apis::Core::Hashable - - # The MIME type of the attachment. - # Corresponds to the JSON property `contentType` - # @return [String] - attr_accessor :content_type - - # The URL for the content. - # Corresponds to the JSON property `contentUrl` - # @return [String] - attr_accessor :content_url - - # The ID of the attachment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Indicates that the contentUrl is not available because the attachment content - # is still being processed. If the caller wishes to retrieve the content, it - # should try again later. - # Corresponds to the JSON property `isProcessingContent` - # @return [Boolean] - attr_accessor :is_processing_content - alias_method :is_processing_content?, :is_processing_content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_type = args[:content_type] unless args[:content_type].nil? - @content_url = args[:content_url] unless args[:content_url].nil? - @id = args[:id] unless args[:id].nil? - @is_processing_content = args[:is_processing_content] unless args[:is_processing_content].nil? - end - end - - # A list of Attachments. This is the response from the server to GET requests on - # the attachments collection. - class ListAttachmentsResponse - include Google::Apis::Core::Hashable - - # The list of attachments. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of resource. This is always mirror#attachmentsList. - # 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 AuthToken - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `authToken` - # @return [String] - attr_accessor :auth_token - - # - # 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) - @auth_token = args[:auth_token] unless args[:auth_token].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A single menu command that is part of a Contact. - class Command - include Google::Apis::Core::Hashable - - # The type of operation this command corresponds to. Allowed values are: - # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech - # from the "Take a note" voice menu command. - # - POST_AN_UPDATE - Shares a timeline item with the transcription of user - # speech from the "Post an update" voice menu command. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - end - end - - # A person or group that can be used as a creator or a contact. - class Contact - include Google::Apis::Core::Hashable - - # A list of voice menu commands that a contact can handle. Glass shows up to - # three contacts for each voice menu command. If there are more than that, the - # three contacts with the highest priority are shown for that particular command. - # Corresponds to the JSON property `acceptCommands` - # @return [Array] - attr_accessor :accept_commands - - # A list of MIME types that a contact supports. The contact will be shown to the - # user if any of its acceptTypes matches any of the types of the attachments on - # the item. If no acceptTypes are given, the contact will be shown for all items. - # Corresponds to the JSON property `acceptTypes` - # @return [Array] - attr_accessor :accept_types - - # The name to display for this contact. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # An ID for this contact. This is generated by the application and is treated as - # an opaque token. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Set of image URLs to display for a contact. Most contacts will have a single - # image, but a "group" contact may include up to 8 image URLs and they will be - # resized and cropped into a mosaic on the client. - # Corresponds to the JSON property `imageUrls` - # @return [Array] - attr_accessor :image_urls - - # The type of resource. This is always mirror#contact. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Primary phone number for the contact. This can be a fully-qualified number, - # with country calling code and area code, or a local number. - # Corresponds to the JSON property `phoneNumber` - # @return [String] - attr_accessor :phone_number - - # Priority for the contact to determine ordering in a list of contacts. Contacts - # with higher priorities will be shown before ones with lower priorities. - # Corresponds to the JSON property `priority` - # @return [Fixnum] - attr_accessor :priority - - # A list of sharing features that a contact can handle. Allowed values are: - # - ADD_CAPTION - # Corresponds to the JSON property `sharingFeatures` - # @return [Array] - attr_accessor :sharing_features - - # The ID of the application that created this contact. This is populated by the - # API - # Corresponds to the JSON property `source` - # @return [String] - attr_accessor :source - - # Name of this contact as it should be pronounced. If this contact's name must - # be spoken as part of a voice disambiguation menu, this name is used as the - # expected pronunciation. This is useful for contact names with unpronounceable - # characters or whose display spelling is otherwise not phonetic. - # Corresponds to the JSON property `speakableName` - # @return [String] - attr_accessor :speakable_name - - # The type for this contact. This is used for sorting in UIs. Allowed values are: - # - # - INDIVIDUAL - Represents a single person. This is the default. - # - GROUP - Represents more than a single person. - # 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) - @accept_commands = args[:accept_commands] unless args[:accept_commands].nil? - @accept_types = args[:accept_types] unless args[:accept_types].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image_urls = args[:image_urls] unless args[:image_urls].nil? - @kind = args[:kind] unless args[:kind].nil? - @phone_number = args[:phone_number] unless args[:phone_number].nil? - @priority = args[:priority] unless args[:priority].nil? - @sharing_features = args[:sharing_features] unless args[:sharing_features].nil? - @source = args[:source] unless args[:source].nil? - @speakable_name = args[:speakable_name] unless args[:speakable_name].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A list of Contacts representing contacts. This is the response from the server - # to GET requests on the contacts collection. - class ListContactsResponse - include Google::Apis::Core::Hashable - - # Contact list. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of resource. This is always mirror#contacts. - # 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 - - # A geographic location that can be associated with a timeline item. - class Location - include Google::Apis::Core::Hashable - - # The accuracy of the location fix in meters. - # Corresponds to the JSON property `accuracy` - # @return [Float] - attr_accessor :accuracy - - # The full address of the location. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # The name to be displayed. This may be a business name or a user-defined place, - # such as "Home". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the location. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of resource. This is always mirror#location. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The latitude, in degrees. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude, in degrees. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - # The time at which this location was captured, formatted according to RFC 3339. - # Corresponds to the JSON property `timestamp` - # @return [DateTime] - attr_accessor :timestamp - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @accuracy = args[:accuracy] unless args[:accuracy].nil? - @address = args[:address] unless args[:address].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - @timestamp = args[:timestamp] unless args[:timestamp].nil? - end - end - - # A list of Locations. This is the response from the server to GET requests on - # the locations collection. - class ListLocationsResponse - include Google::Apis::Core::Hashable - - # The list of locations. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of resource. This is always mirror#locationsList. - # 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 - - # A custom menu item that can be presented to the user by a timeline item. - class MenuItem - include Google::Apis::Core::Hashable - - # Controls the behavior when the user picks the menu option. Allowed values are: - # - # - CUSTOM - Custom action set by the service. When the user selects this - # menuItem, the API triggers a notification to your callbackUrl with the - # userActions.type set to CUSTOM and the userActions.payload set to the ID of - # this menu item. This is the default value. - # - Built-in actions: - # - REPLY - Initiate a reply to the timeline item using the voice recording UI. - # The creator attribute must be set in the timeline item for this menu to be - # available. - # - REPLY_ALL - Same behavior as REPLY. The original timeline item's recipients - # will be added to the reply item. - # - DELETE - Delete the timeline item. - # - SHARE - Share the timeline item with the available contacts. - # - READ_ALOUD - Read the timeline item's speakableText aloud; if this field is - # not set, read the text field; if none of those fields are set, this menu item - # is ignored. - # - GET_MEDIA_INPUT - Allow users to provide media payloads to Glassware from a - # menu item (currently, only transcribed text from voice input is supported). - # Subscribe to notifications when users invoke this menu item to receive the - # timeline item ID. Retrieve the media from the timeline item in the payload - # property. - # - VOICE_CALL - Initiate a phone call using the timeline item's creator. - # phoneNumber attribute as recipient. - # - NAVIGATE - Navigate to the timeline item's location. - # - TOGGLE_PINNED - Toggle the isPinned state of the timeline item. - # - OPEN_URI - Open the payload of the menu item in the browser. - # - PLAY_VIDEO - Open the payload of the menu item in the Glass video player. - # - SEND_MESSAGE - Initiate sending a message to the timeline item's creator: - # - If the creator.phoneNumber is set and Glass is connected to an Android phone, - # the message is an SMS. - # - Otherwise, if the creator.email is set, the message is an email. - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - # The ContextualMenus.Command associated with this MenuItem (e.g. READ_ALOUD). - # The voice label for this command will be displayed in the voice menu and the - # touch label will be displayed in the touch menu. Note that the default menu - # value's display name will be overriden if you specify this property. Values - # that do not correspond to a ContextualMenus.Command name will be ignored. - # Corresponds to the JSON property `contextual_command` - # @return [String] - attr_accessor :contextual_command - - # The ID for this menu item. This is generated by the application and is treated - # as an opaque token. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A generic payload whose meaning changes depending on this MenuItem's action. - # - When the action is OPEN_URI, the payload is the URL of the website to view. - # - When the action is PLAY_VIDEO, the payload is the streaming URL of the video - # - When the action is GET_MEDIA_INPUT, the payload is the text transcription of - # a user's speech input - # Corresponds to the JSON property `payload` - # @return [String] - attr_accessor :payload - - # If set to true on a CUSTOM menu item, that item will be removed from the menu - # after it is selected. - # Corresponds to the JSON property `removeWhenSelected` - # @return [Boolean] - attr_accessor :remove_when_selected - alias_method :remove_when_selected?, :remove_when_selected - - # For CUSTOM items, a list of values controlling the appearance of the menu item - # in each of its states. A value for the DEFAULT state must be provided. If the - # PENDING or CONFIRMED states are missing, they will not be shown. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @action = args[:action] unless args[:action].nil? - @contextual_command = args[:contextual_command] unless args[:contextual_command].nil? - @id = args[:id] unless args[:id].nil? - @payload = args[:payload] unless args[:payload].nil? - @remove_when_selected = args[:remove_when_selected] unless args[:remove_when_selected].nil? - @values = args[:values] unless args[:values].nil? - end - end - - # A single value that is part of a MenuItem. - class MenuValue - include Google::Apis::Core::Hashable - - # The name to display for the menu item. If you specify this property for a - # built-in menu item, the default contextual voice command for that menu item is - # not shown. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # URL of an icon to display with the menu item. - # Corresponds to the JSON property `iconUrl` - # @return [String] - attr_accessor :icon_url - - # The state that this value applies to. Allowed values are: - # - DEFAULT - Default value shown when displayed in the menuItems list. - # - PENDING - Value shown when the menuItem has been selected by the user but - # can still be cancelled. - # - CONFIRMED - Value shown when the menuItem has been selected by the user and - # can no longer be cancelled. - # 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) - @display_name = args[:display_name] unless args[:display_name].nil? - @icon_url = args[:icon_url] unless args[:icon_url].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # A notification delivered by the API. - class Notification - include Google::Apis::Core::Hashable - - # The collection that generated the notification. - # Corresponds to the JSON property `collection` - # @return [String] - attr_accessor :collection - - # The ID of the item that generated the notification. - # Corresponds to the JSON property `itemId` - # @return [String] - attr_accessor :item_id - - # The type of operation that generated the notification. - # Corresponds to the JSON property `operation` - # @return [String] - attr_accessor :operation - - # A list of actions taken by the user that triggered the notification. - # Corresponds to the JSON property `userActions` - # @return [Array] - attr_accessor :user_actions - - # The user token provided by the service when it subscribed for notifications. - # Corresponds to the JSON property `userToken` - # @return [String] - attr_accessor :user_token - - # The secret verify token provided by the service when it subscribed for - # notifications. - # Corresponds to the JSON property `verifyToken` - # @return [String] - attr_accessor :verify_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @collection = args[:collection] unless args[:collection].nil? - @item_id = args[:item_id] unless args[:item_id].nil? - @operation = args[:operation] unless args[:operation].nil? - @user_actions = args[:user_actions] unless args[:user_actions].nil? - @user_token = args[:user_token] unless args[:user_token].nil? - @verify_token = args[:verify_token] unless args[:verify_token].nil? - end - end - - # Controls how notifications for a timeline item are presented to the user. - class NotificationConfig - include Google::Apis::Core::Hashable - - # The time at which the notification should be delivered. - # Corresponds to the JSON property `deliveryTime` - # @return [DateTime] - attr_accessor :delivery_time - - # Describes how important the notification is. Allowed values are: - # - DEFAULT - Notifications of default importance. A chime will be played to - # alert users. - # Corresponds to the JSON property `level` - # @return [String] - attr_accessor :level - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @delivery_time = args[:delivery_time] unless args[:delivery_time].nil? - @level = args[:level] unless args[:level].nil? - end - end - - # A setting for Glass. - class Setting - include Google::Apis::Core::Hashable - - # The setting's ID. The following IDs are valid: - # - locale - The key to the user’s language/locale (BCP 47 identifier) that - # Glassware should use to render localized content. - # - timezone - The key to the user’s current time zone region as defined in the - # tz database. Example: America/Los_Angeles. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of resource. This is always mirror#setting. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The setting value, as a string. - # 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) - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # A subscription to events on a collection. - class Subscription - include Google::Apis::Core::Hashable - - # The URL where notifications should be delivered (must start with https://). - # Corresponds to the JSON property `callbackUrl` - # @return [String] - attr_accessor :callback_url - - # The collection to subscribe to. Allowed values are: - # - timeline - Changes in the timeline including insertion, deletion, and - # updates. - # - locations - Location updates. - # - settings - Settings updates. - # Corresponds to the JSON property `collection` - # @return [String] - attr_accessor :collection - - # The ID of the subscription. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of resource. This is always mirror#subscription. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A notification delivered by the API. - # Corresponds to the JSON property `notification` - # @return [Google::Apis::MirrorV1::Notification] - attr_accessor :notification - - # A list of operations that should be subscribed to. An empty list indicates - # that all operations on the collection should be subscribed to. Allowed values - # are: - # - UPDATE - The item has been updated. - # - INSERT - A new item has been inserted. - # - DELETE - The item has been deleted. - # - MENU_ACTION - A custom menu item has been triggered by the user. - # Corresponds to the JSON property `operation` - # @return [Array] - attr_accessor :operation - - # The time at which this subscription was last modified, formatted according to - # RFC 3339. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # An opaque token sent to the subscriber in notifications so that it can - # determine the ID of the user. - # Corresponds to the JSON property `userToken` - # @return [String] - attr_accessor :user_token - - # A secret token sent to the subscriber in notifications so that it can verify - # that the notification was generated by Google. - # Corresponds to the JSON property `verifyToken` - # @return [String] - attr_accessor :verify_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @callback_url = args[:callback_url] unless args[:callback_url].nil? - @collection = args[:collection] unless args[:collection].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @notification = args[:notification] unless args[:notification].nil? - @operation = args[:operation] unless args[:operation].nil? - @updated = args[:updated] unless args[:updated].nil? - @user_token = args[:user_token] unless args[:user_token].nil? - @verify_token = args[:verify_token] unless args[:verify_token].nil? - end - end - - # A list of Subscriptions. This is the response from the server to GET requests - # on the subscription collection. - class ListSubscriptionsResponse - include Google::Apis::Core::Hashable - - # The list of subscriptions. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of resource. This is always mirror#subscriptionsList. - # 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 - - # Each item in the user's timeline is represented as a TimelineItem JSON - # structure, described below. - class TimelineItem - include Google::Apis::Core::Hashable - - # A list of media attachments associated with this item. As a convenience, you - # can refer to attachments in your HTML payloads with the attachment or cid - # scheme. For example: - # - attachment: where attachment_index - # is the 0-based index of this array. - # - cid: where attachment_id is the ID of the - # attachment. - # Corresponds to the JSON property `attachments` - # @return [Array] - attr_accessor :attachments - - # The bundle ID for this item. Services can specify a bundleId to group many - # items together. They appear under a single top-level item on the device. - # Corresponds to the JSON property `bundleId` - # @return [String] - attr_accessor :bundle_id - - # A canonical URL pointing to the canonical/high quality version of the data - # represented by the timeline item. - # Corresponds to the JSON property `canonicalUrl` - # @return [String] - attr_accessor :canonical_url - - # The time at which this item was created, formatted according to RFC 3339. - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # A person or group that can be used as a creator or a contact. - # Corresponds to the JSON property `creator` - # @return [Google::Apis::MirrorV1::Contact] - attr_accessor :creator - - # The time that should be displayed when this item is viewed in the timeline, - # formatted according to RFC 3339. This user's timeline is sorted - # chronologically on display time, so this will also determine where the item is - # displayed in the timeline. If not set by the service, the display time - # defaults to the updated time. - # Corresponds to the JSON property `displayTime` - # @return [DateTime] - attr_accessor :display_time - - # ETag for this item. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # HTML content for this item. If both text and html are provided for an item, - # the html will be rendered in the timeline. - # Allowed HTML elements - You can use these elements in your timeline cards. - # - # - Headers: h1, h2, h3, h4, h5, h6 - # - Images: img - # - Lists: li, ol, ul - # - HTML5 semantics: article, aside, details, figure, figcaption, footer, header, - # nav, section, summary, time - # - Structural: blockquote, br, div, hr, p, span - # - Style: b, big, center, em, i, u, s, small, strike, strong, style, sub, sup - # - Tables: table, tbody, td, tfoot, th, thead, tr - # Blocked HTML elements: These elements and their contents are removed from HTML - # payloads. - # - # - Document headers: head, title - # - Embeds: audio, embed, object, source, video - # - Frames: frame, frameset - # - Scripting: applet, script - # Other elements: Any elements that aren't listed are removed, but their - # contents are preserved. - # Corresponds to the JSON property `html` - # @return [String] - attr_accessor :html - - # The ID of the timeline item. This is unique within a user's timeline. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # If this item was generated as a reply to another item, this field will be set - # to the ID of the item being replied to. This can be used to attach a reply to - # the appropriate conversation or post. - # Corresponds to the JSON property `inReplyTo` - # @return [String] - attr_accessor :in_reply_to - - # Whether this item is a bundle cover. - # If an item is marked as a bundle cover, it will be the entry point to the - # bundle of items that have the same bundleId as that item. It will be shown - # only on the main timeline — not within the opened bundle. - # On the main timeline, items that are shown are: - # - Items that have isBundleCover set to true - # - Items that do not have a bundleId In a bundle sub-timeline, items that are - # shown are: - # - Items that have the bundleId in question AND isBundleCover set to false - # Corresponds to the JSON property `isBundleCover` - # @return [Boolean] - attr_accessor :is_bundle_cover - alias_method :is_bundle_cover?, :is_bundle_cover - - # When true, indicates this item is deleted, and only the ID property is set. - # Corresponds to the JSON property `isDeleted` - # @return [Boolean] - attr_accessor :is_deleted - alias_method :is_deleted?, :is_deleted - - # When true, indicates this item is pinned, which means it's grouped alongside " - # active" items like navigation and hangouts, on the opposite side of the home - # screen from historical (non-pinned) timeline items. You can allow the user to - # toggle the value of this property with the TOGGLE_PINNED built-in menu item. - # Corresponds to the JSON property `isPinned` - # @return [Boolean] - attr_accessor :is_pinned - alias_method :is_pinned?, :is_pinned - - # The type of resource. This is always mirror#timelineItem. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A geographic location that can be associated with a timeline item. - # Corresponds to the JSON property `location` - # @return [Google::Apis::MirrorV1::Location] - attr_accessor :location - - # A list of menu items that will be presented to the user when this item is - # selected in the timeline. - # Corresponds to the JSON property `menuItems` - # @return [Array] - attr_accessor :menu_items - - # Controls how notifications for a timeline item are presented to the user. - # Corresponds to the JSON property `notification` - # @return [Google::Apis::MirrorV1::NotificationConfig] - attr_accessor :notification - - # For pinned items, this determines the order in which the item is displayed in - # the timeline, with a higher score appearing closer to the clock. Note: setting - # this field is currently not supported. - # Corresponds to the JSON property `pinScore` - # @return [Fixnum] - attr_accessor :pin_score - - # A list of users or groups that this item has been shared with. - # Corresponds to the JSON property `recipients` - # @return [Array] - attr_accessor :recipients - - # A URL that can be used to retrieve this item. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Opaque string you can use to map a timeline item to data in your own service. - # Corresponds to the JSON property `sourceItemId` - # @return [String] - attr_accessor :source_item_id - - # The speakable version of the content of this item. Along with the READ_ALOUD - # menu item, use this field to provide text that would be clearer when read - # aloud, or to provide extended information to what is displayed visually on - # Glass. - # Glassware should also specify the speakableType field, which will be spoken - # before this text in cases where the additional context is useful, for example - # when the user requests that the item be read aloud following a notification. - # Corresponds to the JSON property `speakableText` - # @return [String] - attr_accessor :speakable_text - - # A speakable description of the type of this item. This will be announced to - # the user prior to reading the content of the item in cases where the - # additional context is useful, for example when the user requests that the item - # be read aloud following a notification. - # This should be a short, simple noun phrase such as "Email", "Text message", or - # "Daily Planet News Update". - # Glassware are encouraged to populate this field for every timeline item, even - # if the item does not contain speakableText or text so that the user can learn - # the type of the item without looking at the screen. - # Corresponds to the JSON property `speakableType` - # @return [String] - attr_accessor :speakable_type - - # Text content of this item. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - # The title of this item. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time at which this item was last modified, formatted according to RFC 3339. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attachments = args[:attachments] unless args[:attachments].nil? - @bundle_id = args[:bundle_id] unless args[:bundle_id].nil? - @canonical_url = args[:canonical_url] unless args[:canonical_url].nil? - @created = args[:created] unless args[:created].nil? - @creator = args[:creator] unless args[:creator].nil? - @display_time = args[:display_time] unless args[:display_time].nil? - @etag = args[:etag] unless args[:etag].nil? - @html = args[:html] unless args[:html].nil? - @id = args[:id] unless args[:id].nil? - @in_reply_to = args[:in_reply_to] unless args[:in_reply_to].nil? - @is_bundle_cover = args[:is_bundle_cover] unless args[:is_bundle_cover].nil? - @is_deleted = args[:is_deleted] unless args[:is_deleted].nil? - @is_pinned = args[:is_pinned] unless args[:is_pinned].nil? - @kind = args[:kind] unless args[:kind].nil? - @location = args[:location] unless args[:location].nil? - @menu_items = args[:menu_items] unless args[:menu_items].nil? - @notification = args[:notification] unless args[:notification].nil? - @pin_score = args[:pin_score] unless args[:pin_score].nil? - @recipients = args[:recipients] unless args[:recipients].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @source_item_id = args[:source_item_id] unless args[:source_item_id].nil? - @speakable_text = args[:speakable_text] unless args[:speakable_text].nil? - @speakable_type = args[:speakable_type] unless args[:speakable_type].nil? - @text = args[:text] unless args[:text].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # A list of timeline items. This is the response from the server to GET requests - # on the timeline collection. - class ListTimelineResponse - include Google::Apis::Core::Hashable - - # Items in the timeline. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The type of resource. This is always mirror#timeline. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The next page token. Provide this as the pageToken parameter in the request to - # retrieve the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - 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 - - # Represents an action taken by the user that triggered a notification. - class UserAction - include Google::Apis::Core::Hashable - - # An optional payload for the action. - # For actions of type CUSTOM, this is the ID of the custom menu item that was - # selected. - # Corresponds to the JSON property `payload` - # @return [String] - attr_accessor :payload - - # The type of action. The value of this can be: - # - SHARE - the user shared an item. - # - REPLY - the user replied to an item. - # - REPLY_ALL - the user replied to all recipients of an item. - # - CUSTOM - the user selected a custom menu item on the timeline item. - # - DELETE - the user deleted the item. - # - PIN - the user pinned the item. - # - UNPIN - the user unpinned the item. - # - LAUNCH - the user initiated a voice command. In the future, additional - # types may be added. UserActions with unrecognized types should be ignored. - # 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) - @payload = args[:payload] unless args[:payload].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class UserData - 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 -end diff --git a/generated/google/apis/mirror_v1/representations.rb b/generated/google/apis/mirror_v1/representations.rb deleted file mode 100644 index ed36bd802..000000000 --- a/generated/google/apis/mirror_v1/representations.rb +++ /dev/null @@ -1,350 +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 MirrorV1 - - class Account - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Attachment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAttachmentsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AuthToken - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Command - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Contact - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListContactsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Location - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLocationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MenuItem - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MenuValue - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Notification - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class NotificationConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Setting - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Subscription - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TimelineItem - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTimelineResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserAction - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Account - class Representation < Google::Apis::Core::JsonRepresentation - collection :auth_tokens, as: 'authTokens', class: Google::Apis::MirrorV1::AuthToken, decorator: Google::Apis::MirrorV1::AuthToken::Representation - - collection :features, as: 'features' - property :password, as: 'password' - collection :user_data, as: 'userData', class: Google::Apis::MirrorV1::UserData, decorator: Google::Apis::MirrorV1::UserData::Representation - - end - end - - # @private - class Attachment - class Representation < Google::Apis::Core::JsonRepresentation - property :content_type, as: 'contentType' - property :content_url, as: 'contentUrl' - property :id, as: 'id' - property :is_processing_content, as: 'isProcessingContent' - end - end - - # @private - class ListAttachmentsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::MirrorV1::Attachment, decorator: Google::Apis::MirrorV1::Attachment::Representation - - property :kind, as: 'kind' - end - end - - # @private - class AuthToken - class Representation < Google::Apis::Core::JsonRepresentation - property :auth_token, as: 'authToken' - property :type, as: 'type' - end - end - - # @private - class Command - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - end - end - - # @private - class Contact - class Representation < Google::Apis::Core::JsonRepresentation - collection :accept_commands, as: 'acceptCommands', class: Google::Apis::MirrorV1::Command, decorator: Google::Apis::MirrorV1::Command::Representation - - collection :accept_types, as: 'acceptTypes' - property :display_name, as: 'displayName' - property :id, as: 'id' - collection :image_urls, as: 'imageUrls' - property :kind, as: 'kind' - property :phone_number, as: 'phoneNumber' - property :priority, as: 'priority' - collection :sharing_features, as: 'sharingFeatures' - property :source, as: 'source' - property :speakable_name, as: 'speakableName' - property :type, as: 'type' - end - end - - # @private - class ListContactsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::MirrorV1::Contact, decorator: Google::Apis::MirrorV1::Contact::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Location - class Representation < Google::Apis::Core::JsonRepresentation - property :accuracy, as: 'accuracy' - property :address, as: 'address' - property :display_name, as: 'displayName' - property :id, as: 'id' - property :kind, as: 'kind' - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - property :timestamp, as: 'timestamp', type: DateTime - - end - end - - # @private - class ListLocationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::MirrorV1::Location, decorator: Google::Apis::MirrorV1::Location::Representation - - property :kind, as: 'kind' - end - end - - # @private - class MenuItem - class Representation < Google::Apis::Core::JsonRepresentation - property :action, as: 'action' - property :contextual_command, as: 'contextual_command' - property :id, as: 'id' - property :payload, as: 'payload' - property :remove_when_selected, as: 'removeWhenSelected' - collection :values, as: 'values', class: Google::Apis::MirrorV1::MenuValue, decorator: Google::Apis::MirrorV1::MenuValue::Representation - - end - end - - # @private - class MenuValue - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :icon_url, as: 'iconUrl' - property :state, as: 'state' - end - end - - # @private - class Notification - class Representation < Google::Apis::Core::JsonRepresentation - property :collection, as: 'collection' - property :item_id, as: 'itemId' - property :operation, as: 'operation' - collection :user_actions, as: 'userActions', class: Google::Apis::MirrorV1::UserAction, decorator: Google::Apis::MirrorV1::UserAction::Representation - - property :user_token, as: 'userToken' - property :verify_token, as: 'verifyToken' - end - end - - # @private - class NotificationConfig - class Representation < Google::Apis::Core::JsonRepresentation - property :delivery_time, as: 'deliveryTime', type: DateTime - - property :level, as: 'level' - end - end - - # @private - class Setting - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :value, as: 'value' - end - end - - # @private - class Subscription - class Representation < Google::Apis::Core::JsonRepresentation - property :callback_url, as: 'callbackUrl' - property :collection, as: 'collection' - property :id, as: 'id' - property :kind, as: 'kind' - property :notification, as: 'notification', class: Google::Apis::MirrorV1::Notification, decorator: Google::Apis::MirrorV1::Notification::Representation - - collection :operation, as: 'operation' - property :updated, as: 'updated', type: DateTime - - property :user_token, as: 'userToken' - property :verify_token, as: 'verifyToken' - end - end - - # @private - class ListSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::MirrorV1::Subscription, decorator: Google::Apis::MirrorV1::Subscription::Representation - - property :kind, as: 'kind' - end - end - - # @private - class TimelineItem - class Representation < Google::Apis::Core::JsonRepresentation - collection :attachments, as: 'attachments', class: Google::Apis::MirrorV1::Attachment, decorator: Google::Apis::MirrorV1::Attachment::Representation - - property :bundle_id, as: 'bundleId' - property :canonical_url, as: 'canonicalUrl' - property :created, as: 'created', type: DateTime - - property :creator, as: 'creator', class: Google::Apis::MirrorV1::Contact, decorator: Google::Apis::MirrorV1::Contact::Representation - - property :display_time, as: 'displayTime', type: DateTime - - property :etag, as: 'etag' - property :html, as: 'html' - property :id, as: 'id' - property :in_reply_to, as: 'inReplyTo' - property :is_bundle_cover, as: 'isBundleCover' - property :is_deleted, as: 'isDeleted' - property :is_pinned, as: 'isPinned' - property :kind, as: 'kind' - property :location, as: 'location', class: Google::Apis::MirrorV1::Location, decorator: Google::Apis::MirrorV1::Location::Representation - - collection :menu_items, as: 'menuItems', class: Google::Apis::MirrorV1::MenuItem, decorator: Google::Apis::MirrorV1::MenuItem::Representation - - property :notification, as: 'notification', class: Google::Apis::MirrorV1::NotificationConfig, decorator: Google::Apis::MirrorV1::NotificationConfig::Representation - - property :pin_score, as: 'pinScore' - collection :recipients, as: 'recipients', class: Google::Apis::MirrorV1::Contact, decorator: Google::Apis::MirrorV1::Contact::Representation - - property :self_link, as: 'selfLink' - property :source_item_id, as: 'sourceItemId' - property :speakable_text, as: 'speakableText' - property :speakable_type, as: 'speakableType' - property :text, as: 'text' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class ListTimelineResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::MirrorV1::TimelineItem, decorator: Google::Apis::MirrorV1::TimelineItem::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class UserAction - class Representation < Google::Apis::Core::JsonRepresentation - property :payload, as: 'payload' - property :type, as: 'type' - end - end - - # @private - class UserData - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :value, as: 'value' - end - end - end - end -end diff --git a/generated/google/apis/mirror_v1/service.rb b/generated/google/apis/mirror_v1/service.rb deleted file mode 100644 index 8eae31c02..000000000 --- a/generated/google/apis/mirror_v1/service.rb +++ /dev/null @@ -1,1001 +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 MirrorV1 - # Google Mirror API - # - # API for interacting with Glass users via the timeline. - # - # @example - # require 'google/apis/mirror_v1' - # - # Mirror = Google::Apis::MirrorV1 # Alias the module - # service = Mirror::MirrorService.new - # - # @see https://developers.google.com/glass - class MirrorService < 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/', 'mirror/v1/') - end - - # Inserts a new account for a user - # @param [String] user_token - # The ID for the user. - # @param [String] account_type - # Account type to be passed to Android Account Manager. - # @param [String] account_name - # The name of the account to be passed to the Android Account Manager. - # @param [Google::Apis::MirrorV1::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::MirrorV1::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::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 insert_account(user_token, account_type, account_name, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{userToken}/{accountType}/{accountName}' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MirrorV1::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::MirrorV1::Account::Representation - command.response_class = Google::Apis::MirrorV1::Account - command.params['userToken'] = user_token unless user_token.nil? - command.params['accountType'] = account_type unless account_type.nil? - command.params['accountName'] = account_name unless account_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a contact. - # @param [String] id - # The ID of the contact. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_contact(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'contacts/{id}' - command = make_simple_command(:delete, path, options) - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single contact by ID. - # @param [String] id - # The ID of the contact. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MirrorV1::Contact] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Contact] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_contact(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'contacts/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::Contact::Representation - command.response_class = Google::Apis::MirrorV1::Contact - 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 - - # Inserts a new contact. - # @param [Google::Apis::MirrorV1::Contact] contact_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::MirrorV1::Contact] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Contact] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_contact(contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'contacts' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MirrorV1::Contact::Representation - command.request_object = contact_object - command.response_representation = Google::Apis::MirrorV1::Contact::Representation - command.response_class = Google::Apis::MirrorV1::Contact - 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 contacts for 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::MirrorV1::ListContactsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::ListContactsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_contacts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'contacts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::ListContactsResponse::Representation - command.response_class = Google::Apis::MirrorV1::ListContactsResponse - 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 contact in place. This method supports patch semantics. - # @param [String] id - # The ID of the contact. - # @param [Google::Apis::MirrorV1::Contact] contact_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::MirrorV1::Contact] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Contact] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_contact(id, contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'contacts/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::MirrorV1::Contact::Representation - command.request_object = contact_object - command.response_representation = Google::Apis::MirrorV1::Contact::Representation - command.response_class = Google::Apis::MirrorV1::Contact - 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 a contact in place. - # @param [String] id - # The ID of the contact. - # @param [Google::Apis::MirrorV1::Contact] contact_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::MirrorV1::Contact] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Contact] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_contact(id, contact_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'contacts/{id}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::MirrorV1::Contact::Representation - command.request_object = contact_object - command.response_representation = Google::Apis::MirrorV1::Contact::Representation - command.response_class = Google::Apis::MirrorV1::Contact - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single location by ID. - # @param [String] id - # The ID of the location or latest for the last known location. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MirrorV1::Location] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Location] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_location(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'locations/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::Location::Representation - command.response_class = Google::Apis::MirrorV1::Location - 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 a list of locations for the 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::MirrorV1::ListLocationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::ListLocationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_locations(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'locations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::ListLocationsResponse::Representation - command.response_class = Google::Apis::MirrorV1::ListLocationsResponse - 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 single setting by ID. - # @param [String] id - # The ID of the setting. The following IDs are valid: - # - locale - The key to the user’s language/locale (BCP 47 identifier) that - # Glassware should use to render localized content. - # - timezone - The key to the user’s current time zone region as defined in the - # tz database. Example: America/Los_Angeles. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MirrorV1::Setting] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Setting] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_setting(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'settings/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::Setting::Representation - command.response_class = Google::Apis::MirrorV1::Setting - 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 - - # Deletes a subscription. - # @param [String] id - # The ID of the subscription. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_subscription(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'subscriptions/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Creates a new subscription. - # @param [Google::Apis::MirrorV1::Subscription] subscription_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::MirrorV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(subscription_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'subscriptions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::MirrorV1::Subscription::Representation - command.request_object = subscription_object - command.response_representation = Google::Apis::MirrorV1::Subscription::Representation - command.response_class = Google::Apis::MirrorV1::Subscription - 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 subscriptions for the authenticated user and service. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::MirrorV1::ListSubscriptionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::ListSubscriptionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscriptions(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'subscriptions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::ListSubscriptionsResponse::Representation - command.response_class = Google::Apis::MirrorV1::ListSubscriptionsResponse - 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 subscription in place. - # @param [String] id - # The ID of the subscription. - # @param [Google::Apis::MirrorV1::Subscription] subscription_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::MirrorV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(id, subscription_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'subscriptions/{id}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::MirrorV1::Subscription::Representation - command.request_object = subscription_object - command.response_representation = Google::Apis::MirrorV1::Subscription::Representation - command.response_class = Google::Apis::MirrorV1::Subscription - 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 - - # Deletes a timeline item. - # @param [String] id - # The ID of the timeline item. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_timeline(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'timeline/{id}' - command = make_simple_command(:delete, path, options) - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single timeline item by ID. - # @param [String] id - # The ID of the timeline item. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MirrorV1::TimelineItem] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::TimelineItem] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeline(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'timeline/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation - command.response_class = Google::Apis::MirrorV1::TimelineItem - 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 - - # Inserts a new item into the timeline. - # @param [Google::Apis::MirrorV1::TimelineItem] timeline_item_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MirrorV1::TimelineItem] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::TimelineItem] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeline(timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'timeline' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::MirrorV1::TimelineItem::Representation - command.request_object = timeline_item_object - command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation - command.response_class = Google::Apis::MirrorV1::TimelineItem - 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 timeline items for the authenticated user. - # @param [String] bundle_id - # If provided, only items with the given bundleId will be returned. - # @param [Boolean] include_deleted - # If true, tombstone records for deleted items will be returned. - # @param [Fixnum] max_results - # The maximum number of items to include in the response, used for paging. - # @param [String] order_by - # Controls the order in which timeline items are returned. - # @param [String] page_token - # Token for the page of results to return. - # @param [Boolean] pinned_only - # If true, only pinned items will be returned. - # @param [String] source_item_id - # If provided, only items with the given sourceItemId 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::MirrorV1::ListTimelineResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::ListTimelineResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timelines(bundle_id: nil, include_deleted: nil, max_results: nil, order_by: nil, page_token: nil, pinned_only: nil, source_item_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'timeline' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::ListTimelineResponse::Representation - command.response_class = Google::Apis::MirrorV1::ListTimelineResponse - command.query['bundleId'] = bundle_id unless bundle_id.nil? - command.query['includeDeleted'] = include_deleted unless include_deleted.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pinnedOnly'] = pinned_only unless pinned_only.nil? - command.query['sourceItemId'] = source_item_id unless source_item_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a timeline item in place. This method supports patch semantics. - # @param [String] id - # The ID of the timeline item. - # @param [Google::Apis::MirrorV1::TimelineItem] timeline_item_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::MirrorV1::TimelineItem] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::TimelineItem] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeline(id, timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'timeline/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::MirrorV1::TimelineItem::Representation - command.request_object = timeline_item_object - command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation - command.response_class = Google::Apis::MirrorV1::TimelineItem - 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 a timeline item in place. - # @param [String] id - # The ID of the timeline item. - # @param [Google::Apis::MirrorV1::TimelineItem] timeline_item_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MirrorV1::TimelineItem] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::TimelineItem] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeline(id, timeline_item_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'timeline/{id}' - if upload_source.nil? - command = make_simple_command(:put, path, options) - else - command = make_upload_command(:put, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::MirrorV1::TimelineItem::Representation - command.request_object = timeline_item_object - command.response_representation = Google::Apis::MirrorV1::TimelineItem::Representation - command.response_class = Google::Apis::MirrorV1::TimelineItem - 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 - - # Deletes an attachment from a timeline item. - # @param [String] item_id - # The ID of the timeline item the attachment belongs to. - # @param [String] attachment_id - # The ID of the attachment. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_timeline_attachment(item_id, attachment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'timeline/{itemId}/attachments/{attachmentId}' - command = make_simple_command(:delete, path, options) - command.params['itemId'] = item_id unless item_id.nil? - command.params['attachmentId'] = attachment_id unless attachment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves an attachment on a timeline item by item ID and attachment ID. - # @param [String] item_id - # The ID of the timeline item the attachment belongs to. - # @param [String] attachment_id - # The ID of the attachment. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MirrorV1::Attachment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Attachment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeline_attachment(item_id, attachment_id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'timeline/{itemId}/attachments/{attachmentId}' - 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::MirrorV1::Attachment::Representation - command.response_class = Google::Apis::MirrorV1::Attachment - command.params['itemId'] = item_id unless item_id.nil? - command.params['attachmentId'] = attachment_id unless attachment_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 - - # Adds a new attachment to a timeline item. - # @param [String] item_id - # The ID of the timeline item the attachment belongs to. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MirrorV1::Attachment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::Attachment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeline_attachment(item_id, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'timeline/{itemId}/attachments' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.response_representation = Google::Apis::MirrorV1::Attachment::Representation - command.response_class = Google::Apis::MirrorV1::Attachment - command.params['itemId'] = item_id unless item_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of attachments for a timeline item. - # @param [String] item_id - # The ID of the timeline item whose attachments should be listed. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::MirrorV1::ListAttachmentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MirrorV1::ListAttachmentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_timeline_attachments(item_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'timeline/{itemId}/attachments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::MirrorV1::ListAttachmentsResponse::Representation - command.response_class = Google::Apis::MirrorV1::ListAttachmentsResponse - command.params['itemId'] = item_id unless item_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 diff --git a/generated/google/apis/oauth2_v2.rb b/generated/google/apis/oauth2_v2.rb deleted file mode 100644 index 9bd217a53..000000000 --- a/generated/google/apis/oauth2_v2.rb +++ /dev/null @@ -1,43 +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/oauth2_v2/service.rb' -require 'google/apis/oauth2_v2/classes.rb' -require 'google/apis/oauth2_v2/representations.rb' - -module Google - module Apis - # Google OAuth2 API - # - # Lets you access OAuth2 protocol related APIs. - # - # @see https://developers.google.com/accounts/docs/OAuth2 - module Oauth2V2 - VERSION = 'V2' - REVISION = '20150526' - - # Know your basic profile info and list of people in your circles. - AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' - - # Know who you are on Google - AUTH_PLUS_ME = 'https://www.googleapis.com/auth/plus.me' - - # View your email address - AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' - - # View your basic profile info - AUTH_USERINFO_PROFILE = 'https://www.googleapis.com/auth/userinfo.profile' - end - end -end diff --git a/generated/google/apis/oauth2_v2/classes.rb b/generated/google/apis/oauth2_v2/classes.rb deleted file mode 100644 index 4d2f3847a..000000000 --- a/generated/google/apis/oauth2_v2/classes.rb +++ /dev/null @@ -1,245 +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 Oauth2V2 - - # - class Jwk - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @keys = args[:keys] unless args[:keys].nil? - end - - # - class Key - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `alg` - # @return [String] - attr_accessor :alg - - # - # Corresponds to the JSON property `e` - # @return [String] - attr_accessor :e - - # - # Corresponds to the JSON property `kid` - # @return [String] - attr_accessor :kid - - # - # Corresponds to the JSON property `kty` - # @return [String] - attr_accessor :kty - - # - # Corresponds to the JSON property `n` - # @return [String] - attr_accessor :n - - # - # Corresponds to the JSON property `use` - # @return [String] - attr_accessor :use - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alg = args[:alg] unless args[:alg].nil? - @e = args[:e] unless args[:e].nil? - @kid = args[:kid] unless args[:kid].nil? - @kty = args[:kty] unless args[:kty].nil? - @n = args[:n] unless args[:n].nil? - @use = args[:use] unless args[:use].nil? - end - end - end - - # - class Tokeninfo - include Google::Apis::Core::Hashable - - # The access type granted with this token. It can be offline or online. - # Corresponds to the JSON property `access_type` - # @return [String] - attr_accessor :access_type - - # Who is the intended audience for this token. In general the same as issued_to. - # Corresponds to the JSON property `audience` - # @return [String] - attr_accessor :audience - - # The email address of the user. Present only if the email scope is present in - # the request. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The expiry time of the token, as number of seconds left until expiry. - # Corresponds to the JSON property `expires_in` - # @return [Fixnum] - attr_accessor :expires_in - - # To whom was the token issued to. In general the same as audience. - # Corresponds to the JSON property `issued_to` - # @return [String] - attr_accessor :issued_to - - # The space separated list of scopes granted to this token. - # Corresponds to the JSON property `scope` - # @return [String] - attr_accessor :scope - - # The token handle associated with this token. - # Corresponds to the JSON property `token_handle` - # @return [String] - attr_accessor :token_handle - - # The obfuscated user id. - # Corresponds to the JSON property `user_id` - # @return [String] - attr_accessor :user_id - - # Boolean flag which is true if the email address is verified. Present only if - # the email scope is present in the request. - # Corresponds to the JSON property `verified_email` - # @return [Boolean] - attr_accessor :verified_email - alias_method :verified_email?, :verified_email - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_type = args[:access_type] unless args[:access_type].nil? - @audience = args[:audience] unless args[:audience].nil? - @email = args[:email] unless args[:email].nil? - @expires_in = args[:expires_in] unless args[:expires_in].nil? - @issued_to = args[:issued_to] unless args[:issued_to].nil? - @scope = args[:scope] unless args[:scope].nil? - @token_handle = args[:token_handle] unless args[:token_handle].nil? - @user_id = args[:user_id] unless args[:user_id].nil? - @verified_email = args[:verified_email] unless args[:verified_email].nil? - end - end - - # - class Userinfoplus - include Google::Apis::Core::Hashable - - # The user's email address. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The user's last name. - # Corresponds to the JSON property `family_name` - # @return [String] - attr_accessor :family_name - - # The user's gender. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # The user's first name. - # Corresponds to the JSON property `given_name` - # @return [String] - attr_accessor :given_name - - # The hosted domain e.g. example.com if the user is Google apps user. - # Corresponds to the JSON property `hd` - # @return [String] - attr_accessor :hd - - # The obfuscated ID of the user. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # URL of the profile page. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # The user's preferred locale. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # The user's full name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # URL of the user's picture image. - # Corresponds to the JSON property `picture` - # @return [String] - attr_accessor :picture - - # Boolean flag which is true if the email address is verified. Always verified - # because we only return the user's primary email address. - # Corresponds to the JSON property `verified_email` - # @return [Boolean] - attr_accessor :verified_email - alias_method :verified_email?, :verified_email - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @email = args[:email] unless args[:email].nil? - @family_name = args[:family_name] unless args[:family_name].nil? - @gender = args[:gender] unless args[:gender].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - @hd = args[:hd] unless args[:hd].nil? - @id = args[:id] unless args[:id].nil? - @link = args[:link] unless args[:link].nil? - @locale = args[:locale] unless args[:locale].nil? - @name = args[:name] unless args[:name].nil? - @picture = args[:picture] unless args[:picture].nil? - @verified_email = args[:verified_email] unless args[:verified_email].nil? - end - end - end - end -end diff --git a/generated/google/apis/oauth2_v2/representations.rb b/generated/google/apis/oauth2_v2/representations.rb deleted file mode 100644 index 7f8eb935d..000000000 --- a/generated/google/apis/oauth2_v2/representations.rb +++ /dev/null @@ -1,94 +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 Oauth2V2 - - class Jwk - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Key - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Tokeninfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Userinfoplus - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Jwk - class Representation < Google::Apis::Core::JsonRepresentation - collection :keys, as: 'keys', class: Google::Apis::Oauth2V2::Jwk::Key, decorator: Google::Apis::Oauth2V2::Jwk::Key::Representation - - end - - # @private - class Key - class Representation < Google::Apis::Core::JsonRepresentation - property :alg, as: 'alg' - property :e, as: 'e' - property :kid, as: 'kid' - property :kty, as: 'kty' - property :n, as: 'n' - property :use, as: 'use' - end - end - end - - # @private - class Tokeninfo - class Representation < Google::Apis::Core::JsonRepresentation - property :access_type, as: 'access_type' - property :audience, as: 'audience' - property :email, as: 'email' - property :expires_in, as: 'expires_in' - property :issued_to, as: 'issued_to' - property :scope, as: 'scope' - property :token_handle, as: 'token_handle' - property :user_id, as: 'user_id' - property :verified_email, as: 'verified_email' - end - end - - # @private - class Userinfoplus - class Representation < Google::Apis::Core::JsonRepresentation - property :email, as: 'email' - property :family_name, as: 'family_name' - property :gender, as: 'gender' - property :given_name, as: 'given_name' - property :hd, as: 'hd' - property :id, as: 'id' - property :link, as: 'link' - property :locale, as: 'locale' - property :name, as: 'name' - property :picture, as: 'picture' - property :verified_email, as: 'verified_email' - end - end - end - end -end diff --git a/generated/google/apis/oauth2_v2/service.rb b/generated/google/apis/oauth2_v2/service.rb deleted file mode 100644 index fa2141c3f..000000000 --- a/generated/google/apis/oauth2_v2/service.rb +++ /dev/null @@ -1,203 +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 Oauth2V2 - # Google OAuth2 API - # - # Lets you access OAuth2 protocol related APIs. - # - # @example - # require 'google/apis/oauth2_v2' - # - # Oauth2 = Google::Apis::Oauth2V2 # Alias the module - # service = Oauth2::Oauth2Service.new - # - # @see https://developers.google.com/accounts/docs/OAuth2 - class Oauth2Service < 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/', '') - end - - # - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::Oauth2V2::Jwk] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Oauth2V2::Jwk] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_cert_for_open_id_connect(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'oauth2/v2/certs' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::Oauth2V2::Jwk::Representation - command.response_class = Google::Apis::Oauth2V2::Jwk - 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] access_token - # @param [String] id_token - # @param [String] token_handle - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::Oauth2V2::Tokeninfo] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Oauth2V2::Tokeninfo] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def tokeninfo(access_token: nil, id_token: nil, token_handle: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'oauth2/v2/tokeninfo' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::Oauth2V2::Tokeninfo::Representation - command.response_class = Google::Apis::Oauth2V2::Tokeninfo - command.query['access_token'] = access_token unless access_token.nil? - command.query['id_token'] = id_token unless id_token.nil? - command.query['token_handle'] = token_handle unless token_handle.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] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::Oauth2V2::Userinfoplus] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Oauth2V2::Userinfoplus] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_userinfo(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'oauth2/v2/userinfo' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::Oauth2V2::Userinfoplus::Representation - command.response_class = Google::Apis::Oauth2V2::Userinfoplus - 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] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::Oauth2V2::Userinfoplus] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Oauth2V2::Userinfoplus] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_userinfo_v2(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'userinfo/v2/me' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::Oauth2V2::Userinfoplus::Representation - command.response_class = Google::Apis::Oauth2V2::Userinfoplus - 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 diff --git a/generated/google/apis/pagespeedonline_v2.rb b/generated/google/apis/pagespeedonline_v2.rb deleted file mode 100644 index a3a041dcc..000000000 --- a/generated/google/apis/pagespeedonline_v2.rb +++ /dev/null @@ -1,32 +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/pagespeedonline_v2/service.rb' -require 'google/apis/pagespeedonline_v2/classes.rb' -require 'google/apis/pagespeedonline_v2/representations.rb' - -module Google - module Apis - # PageSpeed Insights API - # - # Lets you analyze the performance of a web page and get tailored suggestions to - # make that page faster. - # - # @see https://developers.google.com/speed/docs/insights/v2/getting-started - module PagespeedonlineV2 - VERSION = 'V2' - REVISION = '20150317' - end - end -end diff --git a/generated/google/apis/pagespeedonline_v2/classes.rb b/generated/google/apis/pagespeedonline_v2/classes.rb deleted file mode 100644 index 21f5cb81d..000000000 --- a/generated/google/apis/pagespeedonline_v2/classes.rb +++ /dev/null @@ -1,614 +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 PagespeedonlineV2 - - # - class FormatString - include Google::Apis::Core::Hashable - - # List of arguments for the format string. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # A localized format string with ``FOO`` placeholders, where 'FOO' is the key of - # the argument whose value should be substituted. For HYPERLINK arguments, the - # format string will instead contain ``BEGIN_FOO`` and ``END_FOO`` for the - # argument with key 'FOO'. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @args = args[:args] unless args[:args].nil? - @format = args[:format] unless args[:format].nil? - end - - # - class Arg - include Google::Apis::Core::Hashable - - # The placeholder key for this arg, as a string. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The screen rectangles being referred to, with dimensions measured in CSS - # pixels. This is only ever used for SNAPSHOT_RECT arguments. If this is absent - # for a SNAPSHOT_RECT argument, it means that that argument refers to the entire - # snapshot. - # Corresponds to the JSON property `rects` - # @return [Array] - attr_accessor :rects - - # Secondary screen rectangles being referred to, with dimensions measured in CSS - # pixels. This is only ever used for SNAPSHOT_RECT arguments. - # Corresponds to the JSON property `secondary_rects` - # @return [Array] - attr_accessor :secondary_rects - - # Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, DURATION, - # VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Argument value, as a localized string. - # 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? - @rects = args[:rects] unless args[:rects].nil? - @secondary_rects = args[:secondary_rects] unless args[:secondary_rects].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - - # - class Rect - include Google::Apis::Core::Hashable - - # The height of the rect. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The left coordinate of the rect, in page coordinates. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # The top coordinate of the rect, in page coordinates. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - # The width of the rect. - # 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? - @left = args[:left] unless args[:left].nil? - @top = args[:top] unless args[:top].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # - class SecondaryRect - include Google::Apis::Core::Hashable - - # The height of the rect. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The left coordinate of the rect, in page coordinates. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # The top coordinate of the rect, in page coordinates. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - # The width of the rect. - # 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? - @left = args[:left] unless args[:left].nil? - @top = args[:top] unless args[:top].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - end - - # - class Image - include Google::Apis::Core::Hashable - - # Image data base64 encoded. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Height of screenshot in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Unique string key, if any, identifying this image. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # Mime type of image data (e.g. "image/jpeg"). - # Corresponds to the JSON property `mime_type` - # @return [String] - attr_accessor :mime_type - - # The region of the page that is captured by this image, with dimensions - # measured in CSS pixels. - # Corresponds to the JSON property `page_rect` - # @return [Google::Apis::PagespeedonlineV2::Image::PageRect] - attr_accessor :page_rect - - # Width of screenshot in pixels. - # 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) - @data = args[:data] unless args[:data].nil? - @height = args[:height] unless args[:height].nil? - @key = args[:key] unless args[:key].nil? - @mime_type = args[:mime_type] unless args[:mime_type].nil? - @page_rect = args[:page_rect] unless args[:page_rect].nil? - @width = args[:width] unless args[:width].nil? - end - - # The region of the page that is captured by this image, with dimensions - # measured in CSS pixels. - class PageRect - include Google::Apis::Core::Hashable - - # The height of the rect. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The left coordinate of the rect, in page coordinates. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # The top coordinate of the rect, in page coordinates. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - # The width of the rect. - # 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? - @left = args[:left] unless args[:left].nil? - @top = args[:top] unless args[:top].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - - # - class Result - include Google::Apis::Core::Hashable - - # Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed - # rule instantiated and run by the server. - # Corresponds to the JSON property `formattedResults` - # @return [Google::Apis::PagespeedonlineV2::Result::FormattedResults] - attr_accessor :formatted_results - - # Canonicalized and final URL for the document, after following page redirects ( - # if any). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # List of rules that were specified in the request, but which the server did not - # know how to instantiate. - # Corresponds to the JSON property `invalidRules` - # @return [Array] - attr_accessor :invalid_rules - - # Kind of result. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Summary statistics for the page, such as number of JavaScript bytes, number of - # HTML bytes, etc. - # Corresponds to the JSON property `pageStats` - # @return [Google::Apis::PagespeedonlineV2::Result::PageStats] - attr_accessor :page_stats - - # Response code for the document. 200 indicates a normal page load. 4xx/5xx - # indicates an error. - # Corresponds to the JSON property `responseCode` - # @return [Fixnum] - attr_accessor :response_code - - # A map with one entry for each rule group in these results. - # Corresponds to the JSON property `ruleGroups` - # @return [Hash] - attr_accessor :rule_groups - - # Base64-encoded screenshot of the page that was analyzed. - # Corresponds to the JSON property `screenshot` - # @return [Google::Apis::PagespeedonlineV2::Image] - attr_accessor :screenshot - - # Title of the page, as displayed in the browser's title bar. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The version of PageSpeed used to generate these results. - # Corresponds to the JSON property `version` - # @return [Google::Apis::PagespeedonlineV2::Result::Version] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_results = args[:formatted_results] unless args[:formatted_results].nil? - @id = args[:id] unless args[:id].nil? - @invalid_rules = args[:invalid_rules] unless args[:invalid_rules].nil? - @kind = args[:kind] unless args[:kind].nil? - @page_stats = args[:page_stats] unless args[:page_stats].nil? - @response_code = args[:response_code] unless args[:response_code].nil? - @rule_groups = args[:rule_groups] unless args[:rule_groups].nil? - @screenshot = args[:screenshot] unless args[:screenshot].nil? - @title = args[:title] unless args[:title].nil? - @version = args[:version] unless args[:version].nil? - end - - # Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed - # rule instantiated and run by the server. - class FormattedResults - include Google::Apis::Core::Hashable - - # The locale of the formattedResults, e.g. "en_US". - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Dictionary of formatted rule results, with one entry for each PageSpeed rule - # instantiated and run by the server. - # Corresponds to the JSON property `ruleResults` - # @return [Hash] - attr_accessor :rule_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @locale = args[:locale] unless args[:locale].nil? - @rule_results = args[:rule_results] unless args[:rule_results].nil? - end - - # The enum-like identifier for this rule. For instance "EnableKeepAlive" or " - # AvoidCssImport". Not localized. - class RuleResult - include Google::Apis::Core::Hashable - - # List of rule groups that this rule belongs to. Each entry in the list is one - # of "SPEED" or "USABILITY". - # Corresponds to the JSON property `groups` - # @return [Array] - attr_accessor :groups - - # Localized name of the rule, intended for presentation to a user. - # Corresponds to the JSON property `localizedRuleName` - # @return [String] - attr_accessor :localized_rule_name - - # The impact (unbounded floating point value) that implementing the suggestions - # for this rule would have on making the page faster. Impact is comparable - # between rules to determine which rule's suggestions would have a higher or - # lower impact on making a page faster. For instance, if enabling compression - # would save 1MB, while optimizing images would save 500kB, the enable - # compression rule would have 2x the impact of the image optimization rule, all - # other things being equal. - # Corresponds to the JSON property `ruleImpact` - # @return [Float] - attr_accessor :rule_impact - - # A brief summary description for the rule, indicating at a high level what - # should be done to follow the rule and what benefit can be gained by doing so. - # Corresponds to the JSON property `summary` - # @return [Google::Apis::PagespeedonlineV2::FormatString] - attr_accessor :summary - - # List of blocks of URLs. Each block may contain a heading and a list of URLs. - # Each URL may optionally include additional details. - # Corresponds to the JSON property `urlBlocks` - # @return [Array] - attr_accessor :url_blocks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @groups = args[:groups] unless args[:groups].nil? - @localized_rule_name = args[:localized_rule_name] unless args[:localized_rule_name].nil? - @rule_impact = args[:rule_impact] unless args[:rule_impact].nil? - @summary = args[:summary] unless args[:summary].nil? - @url_blocks = args[:url_blocks] unless args[:url_blocks].nil? - end - - # - class UrlBlock - include Google::Apis::Core::Hashable - - # Heading to be displayed with the list of URLs. - # Corresponds to the JSON property `header` - # @return [Google::Apis::PagespeedonlineV2::FormatString] - attr_accessor :header - - # List of entries that provide information about URLs in the url block. Optional. - # Corresponds to the JSON property `urls` - # @return [Array] - attr_accessor :urls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @header = args[:header] unless args[:header].nil? - @urls = args[:urls] unless args[:urls].nil? - end - - # - class Url - include Google::Apis::Core::Hashable - - # List of entries that provide additional details about a single URL. Optional. - # Corresponds to the JSON property `details` - # @return [Array] - attr_accessor :details - - # A format string that gives information about the URL, and a list of arguments - # for that format string. - # Corresponds to the JSON property `result` - # @return [Google::Apis::PagespeedonlineV2::FormatString] - attr_accessor :result - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] unless args[:details].nil? - @result = args[:result] unless args[:result].nil? - end - end - end - end - end - - # Summary statistics for the page, such as number of JavaScript bytes, number of - # HTML bytes, etc. - class PageStats - include Google::Apis::Core::Hashable - - # Number of uncompressed response bytes for CSS resources on the page. - # Corresponds to the JSON property `cssResponseBytes` - # @return [String] - attr_accessor :css_response_bytes - - # Number of response bytes for flash resources on the page. - # Corresponds to the JSON property `flashResponseBytes` - # @return [String] - attr_accessor :flash_response_bytes - - # Number of uncompressed response bytes for the main HTML document and all - # iframes on the page. - # Corresponds to the JSON property `htmlResponseBytes` - # @return [String] - attr_accessor :html_response_bytes - - # Number of response bytes for image resources on the page. - # Corresponds to the JSON property `imageResponseBytes` - # @return [String] - attr_accessor :image_response_bytes - - # Number of uncompressed response bytes for JS resources on the page. - # Corresponds to the JSON property `javascriptResponseBytes` - # @return [String] - attr_accessor :javascript_response_bytes - - # Number of CSS resources referenced by the page. - # Corresponds to the JSON property `numberCssResources` - # @return [Fixnum] - attr_accessor :number_css_resources - - # Number of unique hosts referenced by the page. - # Corresponds to the JSON property `numberHosts` - # @return [Fixnum] - attr_accessor :number_hosts - - # Number of JavaScript resources referenced by the page. - # Corresponds to the JSON property `numberJsResources` - # @return [Fixnum] - attr_accessor :number_js_resources - - # Number of HTTP resources loaded by the page. - # Corresponds to the JSON property `numberResources` - # @return [Fixnum] - attr_accessor :number_resources - - # Number of static (i.e. cacheable) resources on the page. - # Corresponds to the JSON property `numberStaticResources` - # @return [Fixnum] - attr_accessor :number_static_resources - - # Number of response bytes for other resources on the page. - # Corresponds to the JSON property `otherResponseBytes` - # @return [String] - attr_accessor :other_response_bytes - - # Number of uncompressed response bytes for text resources not covered by other - # statistics (i.e non-HTML, non-script, non-CSS resources) on the page. - # Corresponds to the JSON property `textResponseBytes` - # @return [String] - attr_accessor :text_response_bytes - - # Total size of all request bytes sent by the page. - # Corresponds to the JSON property `totalRequestBytes` - # @return [String] - attr_accessor :total_request_bytes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @css_response_bytes = args[:css_response_bytes] unless args[:css_response_bytes].nil? - @flash_response_bytes = args[:flash_response_bytes] unless args[:flash_response_bytes].nil? - @html_response_bytes = args[:html_response_bytes] unless args[:html_response_bytes].nil? - @image_response_bytes = args[:image_response_bytes] unless args[:image_response_bytes].nil? - @javascript_response_bytes = args[:javascript_response_bytes] unless args[:javascript_response_bytes].nil? - @number_css_resources = args[:number_css_resources] unless args[:number_css_resources].nil? - @number_hosts = args[:number_hosts] unless args[:number_hosts].nil? - @number_js_resources = args[:number_js_resources] unless args[:number_js_resources].nil? - @number_resources = args[:number_resources] unless args[:number_resources].nil? - @number_static_resources = args[:number_static_resources] unless args[:number_static_resources].nil? - @other_response_bytes = args[:other_response_bytes] unless args[:other_response_bytes].nil? - @text_response_bytes = args[:text_response_bytes] unless args[:text_response_bytes].nil? - @total_request_bytes = args[:total_request_bytes] unless args[:total_request_bytes].nil? - end - end - - # The name of this rule group: one of "SPEED" or "USABILITY". - class RuleGroup - include Google::Apis::Core::Hashable - - # The score (0-100) for this rule group, which indicates how much better a page - # could be in that category (e.g. how much faster, or how much more usable). A - # high score indicates little room for improvement, while a lower score - # indicates more room for improvement. - # Corresponds to the JSON property `score` - # @return [Fixnum] - attr_accessor :score - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @score = args[:score] unless args[:score].nil? - end - end - - # The version of PageSpeed used to generate these results. - class Version - include Google::Apis::Core::Hashable - - # The major version number of PageSpeed used to generate these results. - # Corresponds to the JSON property `major` - # @return [Fixnum] - attr_accessor :major - - # The minor version number of PageSpeed used to generate these results. - # Corresponds to the JSON property `minor` - # @return [Fixnum] - attr_accessor :minor - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @major = args[:major] unless args[:major].nil? - @minor = args[:minor] unless args[:minor].nil? - end - end - end - end - end -end diff --git a/generated/google/apis/pagespeedonline_v2/representations.rb b/generated/google/apis/pagespeedonline_v2/representations.rb deleted file mode 100644 index 5ef390342..000000000 --- a/generated/google/apis/pagespeedonline_v2/representations.rb +++ /dev/null @@ -1,244 +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 PagespeedonlineV2 - - class FormatString - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Arg - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Rect - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SecondaryRect - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - - class PageRect - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Result - class Representation < Google::Apis::Core::JsonRepresentation; end - - class FormattedResults - class Representation < Google::Apis::Core::JsonRepresentation; end - - class RuleResult - class Representation < Google::Apis::Core::JsonRepresentation; end - - class UrlBlock - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Url - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - end - - class PageStats - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RuleGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Version - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - # @private - class FormatString - class Representation < Google::Apis::Core::JsonRepresentation - collection :args, as: 'args', class: Google::Apis::PagespeedonlineV2::FormatString::Arg, decorator: Google::Apis::PagespeedonlineV2::FormatString::Arg::Representation - - property :format, as: 'format' - end - - # @private - class Arg - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - collection :rects, as: 'rects', class: Google::Apis::PagespeedonlineV2::FormatString::Arg::Rect, decorator: Google::Apis::PagespeedonlineV2::FormatString::Arg::Rect::Representation - - collection :secondary_rects, as: 'secondary_rects', class: Google::Apis::PagespeedonlineV2::FormatString::Arg::SecondaryRect, decorator: Google::Apis::PagespeedonlineV2::FormatString::Arg::SecondaryRect::Representation - - property :type, as: 'type' - property :value, as: 'value' - end - - # @private - class Rect - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :left, as: 'left' - property :top, as: 'top' - property :width, as: 'width' - end - end - - # @private - class SecondaryRect - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :left, as: 'left' - property :top, as: 'top' - property :width, as: 'width' - end - end - end - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' - property :height, as: 'height' - property :key, as: 'key' - property :mime_type, as: 'mime_type' - property :page_rect, as: 'page_rect', class: Google::Apis::PagespeedonlineV2::Image::PageRect, decorator: Google::Apis::PagespeedonlineV2::Image::PageRect::Representation - - property :width, as: 'width' - end - - # @private - class PageRect - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :left, as: 'left' - property :top, as: 'top' - property :width, as: 'width' - end - end - end - - # @private - class Result - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_results, as: 'formattedResults', class: Google::Apis::PagespeedonlineV2::Result::FormattedResults, decorator: Google::Apis::PagespeedonlineV2::Result::FormattedResults::Representation - - property :id, as: 'id' - collection :invalid_rules, as: 'invalidRules' - property :kind, as: 'kind' - property :page_stats, as: 'pageStats', class: Google::Apis::PagespeedonlineV2::Result::PageStats, decorator: Google::Apis::PagespeedonlineV2::Result::PageStats::Representation - - property :response_code, as: 'responseCode' - hash :rule_groups, as: 'ruleGroups', class: Google::Apis::PagespeedonlineV2::Result::RuleGroup, decorator: Google::Apis::PagespeedonlineV2::Result::RuleGroup::Representation - - property :screenshot, as: 'screenshot', class: Google::Apis::PagespeedonlineV2::Image, decorator: Google::Apis::PagespeedonlineV2::Image::Representation - - property :title, as: 'title' - property :version, as: 'version', class: Google::Apis::PagespeedonlineV2::Result::Version, decorator: Google::Apis::PagespeedonlineV2::Result::Version::Representation - - end - - # @private - class FormattedResults - class Representation < Google::Apis::Core::JsonRepresentation - property :locale, as: 'locale' - hash :rule_results, as: 'ruleResults', class: Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult, decorator: Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult::Representation - - end - - # @private - class RuleResult - class Representation < Google::Apis::Core::JsonRepresentation - collection :groups, as: 'groups' - property :localized_rule_name, as: 'localizedRuleName' - property :rule_impact, as: 'ruleImpact' - property :summary, as: 'summary', class: Google::Apis::PagespeedonlineV2::FormatString, decorator: Google::Apis::PagespeedonlineV2::FormatString::Representation - - collection :url_blocks, as: 'urlBlocks', class: Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult::UrlBlock, decorator: Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult::UrlBlock::Representation - - end - - # @private - class UrlBlock - class Representation < Google::Apis::Core::JsonRepresentation - property :header, as: 'header', class: Google::Apis::PagespeedonlineV2::FormatString, decorator: Google::Apis::PagespeedonlineV2::FormatString::Representation - - collection :urls, as: 'urls', class: Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult::UrlBlock::Url, decorator: Google::Apis::PagespeedonlineV2::Result::FormattedResults::RuleResult::UrlBlock::Url::Representation - - end - - # @private - class Url - class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details', class: Google::Apis::PagespeedonlineV2::FormatString, decorator: Google::Apis::PagespeedonlineV2::FormatString::Representation - - property :result, as: 'result', class: Google::Apis::PagespeedonlineV2::FormatString, decorator: Google::Apis::PagespeedonlineV2::FormatString::Representation - - end - end - end - end - end - - # @private - class PageStats - class Representation < Google::Apis::Core::JsonRepresentation - property :css_response_bytes, as: 'cssResponseBytes' - property :flash_response_bytes, as: 'flashResponseBytes' - property :html_response_bytes, as: 'htmlResponseBytes' - property :image_response_bytes, as: 'imageResponseBytes' - property :javascript_response_bytes, as: 'javascriptResponseBytes' - property :number_css_resources, as: 'numberCssResources' - property :number_hosts, as: 'numberHosts' - property :number_js_resources, as: 'numberJsResources' - property :number_resources, as: 'numberResources' - property :number_static_resources, as: 'numberStaticResources' - property :other_response_bytes, as: 'otherResponseBytes' - property :text_response_bytes, as: 'textResponseBytes' - property :total_request_bytes, as: 'totalRequestBytes' - end - end - - # @private - class RuleGroup - class Representation < Google::Apis::Core::JsonRepresentation - property :score, as: 'score' - end - end - - # @private - class Version - class Representation < Google::Apis::Core::JsonRepresentation - property :major, as: 'major' - property :minor, as: 'minor' - end - end - end - end - end -end diff --git a/generated/google/apis/pagespeedonline_v2/service.rb b/generated/google/apis/pagespeedonline_v2/service.rb deleted file mode 100644 index 802370964..000000000 --- a/generated/google/apis/pagespeedonline_v2/service.rb +++ /dev/null @@ -1,120 +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 PagespeedonlineV2 - # PageSpeed Insights API - # - # Lets you analyze the performance of a web page and get tailored suggestions to - # make that page faster. - # - # @example - # require 'google/apis/pagespeedonline_v2' - # - # Pagespeedonline = Google::Apis::PagespeedonlineV2 # Alias the module - # service = Pagespeedonline::PagespeedonlineService.new - # - # @see https://developers.google.com/speed/docs/insights/v2/getting-started - class PagespeedonlineService < 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/', 'pagespeedonline/v2/') - end - - # Runs PageSpeed analysis on the page at the specified URL, and returns - # PageSpeed scores, a list of suggestions to make that page faster, and other - # information. - # @param [Boolean] filter_third_party_resources - # Indicates if third party resources should be filtered out before PageSpeed - # analysis. - # @param [String] locale - # The locale used to localize formatted results - # @param [Array, String] rule - # A PageSpeed rule to run; if none are given, all rules are run - # @param [Boolean] screenshot - # Indicates if binary data containing a screenshot should be included - # @param [String] strategy - # The analysis strategy to use - # @param [String] url - # The URL to fetch and analyze - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PagespeedonlineV2::Result] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PagespeedonlineV2::Result] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def run_pagespeed(filter_third_party_resources: nil, locale: nil, rule: nil, screenshot: nil, strategy: nil, url: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'runPagespeed' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PagespeedonlineV2::Result::Representation - command.response_class = Google::Apis::PagespeedonlineV2::Result - command.query['filter_third_party_resources'] = filter_third_party_resources unless filter_third_party_resources.nil? - command.query['locale'] = locale unless locale.nil? - command.query['rule'] = rule unless rule.nil? - command.query['screenshot'] = screenshot unless screenshot.nil? - command.query['strategy'] = strategy unless strategy.nil? - command.query['url'] = url unless url.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 diff --git a/generated/google/apis/plus_domains_v1.rb b/generated/google/apis/plus_domains_v1.rb deleted file mode 100644 index cba0ccd81..000000000 --- a/generated/google/apis/plus_domains_v1.rb +++ /dev/null @@ -1,61 +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/plus_domains_v1/service.rb' -require 'google/apis/plus_domains_v1/classes.rb' -require 'google/apis/plus_domains_v1/representations.rb' - -module Google - module Apis - # Google+ Domains API - # - # The Google+ API enables developers to build on top of the Google+ platform. - # - # @see https://developers.google.com/+/domains/ - module PlusDomainsV1 - VERSION = 'V1' - REVISION = '20150326' - - # View your circles and the people and pages in them - AUTH_PLUS_CIRCLES_READ = 'https://www.googleapis.com/auth/plus.circles.read' - - # Manage your circles and add people and pages. People and pages you add to your circles will be notified. Others may see this information publicly. People you add to circles can use Hangouts with you. - AUTH_PLUS_CIRCLES_WRITE = 'https://www.googleapis.com/auth/plus.circles.write' - - # Know your basic profile info and list of people in your circles. - AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' - - # Know who you are on Google - AUTH_PLUS_ME = 'https://www.googleapis.com/auth/plus.me' - - # Send your photos and videos to Google+ - AUTH_PLUS_MEDIA_UPLOAD = 'https://www.googleapis.com/auth/plus.media.upload' - - # View your own Google+ profile and profiles visible to you - AUTH_PLUS_PROFILES_READ = 'https://www.googleapis.com/auth/plus.profiles.read' - - # View your Google+ posts, comments, and stream - AUTH_PLUS_STREAM_READ = 'https://www.googleapis.com/auth/plus.stream.read' - - # Manage your Google+ posts, comments, and stream - AUTH_PLUS_STREAM_WRITE = 'https://www.googleapis.com/auth/plus.stream.write' - - # View your email address - AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' - - # View your basic profile info - AUTH_USERINFO_PROFILE = 'https://www.googleapis.com/auth/userinfo.profile' - end - end -end diff --git a/generated/google/apis/plus_domains_v1/classes.rb b/generated/google/apis/plus_domains_v1/classes.rb deleted file mode 100644 index 1f9b6a19a..000000000 --- a/generated/google/apis/plus_domains_v1/classes.rb +++ /dev/null @@ -1,2402 +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 PlusDomainsV1 - - # - class Acl - include Google::Apis::Core::Hashable - - # Description of the access granted, suitable for display. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Whether access is restricted to the domain. - # Corresponds to the JSON property `domainRestricted` - # @return [Boolean] - attr_accessor :domain_restricted - alias_method :domain_restricted?, :domain_restricted - - # The list of access entries. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of access controls. Value: "plus#acl". - # 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) - @description = args[:description] unless args[:description].nil? - @domain_restricted = args[:domain_restricted] unless args[:domain_restricted].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class Activity - include Google::Apis::Core::Hashable - - # Identifies who has access to see this activity. - # Corresponds to the JSON property `access` - # @return [Google::Apis::PlusDomainsV1::Acl] - attr_accessor :access - - # The person who performed this activity. - # Corresponds to the JSON property `actor` - # @return [Google::Apis::PlusDomainsV1::Activity::Actor] - attr_accessor :actor - - # Street address where this activity occurred. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # Additional content added by the person who shared this activity, applicable - # only when resharing an activity. - # Corresponds to the JSON property `annotation` - # @return [String] - attr_accessor :annotation - - # If this activity is a crosspost from another system, this property specifies - # the ID of the original activity. - # Corresponds to the JSON property `crosspostSource` - # @return [String] - attr_accessor :crosspost_source - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Latitude and longitude where this activity occurred. Format is latitude - # followed by longitude, space separated. - # Corresponds to the JSON property `geocode` - # @return [String] - attr_accessor :geocode - - # The ID of this activity. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this resource as an activity. Value: "plus#activity". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The location where this activity occurred. - # Corresponds to the JSON property `location` - # @return [Google::Apis::PlusDomainsV1::Place] - attr_accessor :location - - # The object of this activity. - # Corresponds to the JSON property `object` - # @return [Google::Apis::PlusDomainsV1::Activity::Object] - attr_accessor :object - - # ID of the place where this activity occurred. - # Corresponds to the JSON property `placeId` - # @return [String] - attr_accessor :place_id - - # Name of the place where this activity occurred. - # Corresponds to the JSON property `placeName` - # @return [String] - attr_accessor :place_name - - # The service provider that initially published this activity. - # Corresponds to the JSON property `provider` - # @return [Google::Apis::PlusDomainsV1::Activity::Provider] - attr_accessor :provider - - # The time at which this activity was initially published. Formatted as an RFC - # 3339 timestamp. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # Radius, in meters, of the region where this activity occurred, centered at the - # latitude and longitude identified in geocode. - # Corresponds to the JSON property `radius` - # @return [String] - attr_accessor :radius - - # Title of this activity. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time at which this activity was last updated. Formatted as an RFC 3339 - # timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The link to this activity. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # This activity's verb, which indicates the action that was performed. Possible - # values include, but are not limited to, the following values: - # - "post" - Publish content to the stream. - # - "share" - Reshare an activity. - # Corresponds to the JSON property `verb` - # @return [String] - attr_accessor :verb - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access = args[:access] unless args[:access].nil? - @actor = args[:actor] unless args[:actor].nil? - @address = args[:address] unless args[:address].nil? - @annotation = args[:annotation] unless args[:annotation].nil? - @crosspost_source = args[:crosspost_source] unless args[:crosspost_source].nil? - @etag = args[:etag] unless args[:etag].nil? - @geocode = args[:geocode] unless args[:geocode].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @location = args[:location] unless args[:location].nil? - @object = args[:object] unless args[:object].nil? - @place_id = args[:place_id] unless args[:place_id].nil? - @place_name = args[:place_name] unless args[:place_name].nil? - @provider = args[:provider] unless args[:provider].nil? - @published = args[:published] unless args[:published].nil? - @radius = args[:radius] unless args[:radius].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - @url = args[:url] unless args[:url].nil? - @verb = args[:verb] unless args[:verb].nil? - end - - # The person who performed this activity. - class Actor - include Google::Apis::Core::Hashable - - # The name of the actor, suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the actor's Person resource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The image representation of the actor. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusDomainsV1::Activity::Actor::Image] - attr_accessor :image - - # An object representation of the individual components of name. - # Corresponds to the JSON property `name` - # @return [Google::Apis::PlusDomainsV1::Activity::Actor::Name] - attr_accessor :name - - # The link to the actor's Google profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @name = args[:name] unless args[:name].nil? - @url = args[:url] unless args[:url].nil? - end - - # The image representation of the actor. - class Image - include Google::Apis::Core::Hashable - - # The URL of the actor's profile photo. To resize the image and crop it to a - # square, append the query string ?sz=x, where x is the dimension in pixels of - # each side. - # 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 - - # An object representation of the individual components of name. - class Name - include Google::Apis::Core::Hashable - - # The family name ("last name") of the actor. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The given name ("first name") of the actor. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @family_name = args[:family_name] unless args[:family_name].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - end - end - end - - # The object of this activity. - class Object - include Google::Apis::Core::Hashable - - # If this activity's object is itself another activity, such as when a person - # reshares an activity, this property specifies the original activity's actor. - # Corresponds to the JSON property `actor` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Actor] - attr_accessor :actor - - # The media objects attached to this activity. - # Corresponds to the JSON property `attachments` - # @return [Array] - attr_accessor :attachments - - # The HTML-formatted content, which is suitable for display. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The ID of the object. When resharing an activity, this is the ID of the - # activity that is being reshared. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of the object. Possible values include, but are not limited to, the - # following values: - # - "note" - Textual content. - # - "activity" - A Google+ activity. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # The content (text) as provided by the author, which is stored without any HTML - # formatting. When creating or updating an activity, this value must be supplied - # as plain text in the request. - # Corresponds to the JSON property `originalContent` - # @return [String] - attr_accessor :original_content - - # People who +1'd this activity. - # Corresponds to the JSON property `plusoners` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Plusoners] - attr_accessor :plusoners - - # Comments in reply to this activity. - # Corresponds to the JSON property `replies` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Replies] - attr_accessor :replies - - # People who reshared this activity. - # Corresponds to the JSON property `resharers` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Resharers] - attr_accessor :resharers - - # Status of the activity as seen by the viewer. - # Corresponds to the JSON property `statusForViewer` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::StatusForViewer] - attr_accessor :status_for_viewer - - # The URL that points to the linked resource. - # 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) - @actor = args[:actor] unless args[:actor].nil? - @attachments = args[:attachments] unless args[:attachments].nil? - @content = args[:content] unless args[:content].nil? - @id = args[:id] unless args[:id].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @original_content = args[:original_content] unless args[:original_content].nil? - @plusoners = args[:plusoners] unless args[:plusoners].nil? - @replies = args[:replies] unless args[:replies].nil? - @resharers = args[:resharers] unless args[:resharers].nil? - @status_for_viewer = args[:status_for_viewer] unless args[:status_for_viewer].nil? - @url = args[:url] unless args[:url].nil? - end - - # If this activity's object is itself another activity, such as when a person - # reshares an activity, this property specifies the original activity's actor. - class Actor - include Google::Apis::Core::Hashable - - # The original actor's name, which is suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # ID of the original actor. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The image representation of the original actor. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Actor::Image] - attr_accessor :image - - # A link to the original actor's Google profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The image representation of the original actor. - class Image - include Google::Apis::Core::Hashable - - # A URL that points to a thumbnail photo of the original actor. - # 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 - end - - # - class Attachment - include Google::Apis::Core::Hashable - - # If the attachment is an article, this property contains a snippet of text from - # the article. It can also include descriptions for other types. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The title of the attachment, such as a photo caption or an article title. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # If the attachment is a video, the embeddable link. - # Corresponds to the JSON property `embed` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Embed] - attr_accessor :embed - - # The full image URL for photo attachments. - # Corresponds to the JSON property `fullImage` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Attachment::FullImage] - attr_accessor :full_image - - # The ID of the attachment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The preview image for photos or videos. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Image] - attr_accessor :image - - # The type of media object. Possible values include, but are not limited to, the - # following values: - # - "photo" - A photo. - # - "album" - A photo album. - # - "video" - A video. - # - "article" - An article, specified by a link. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # When previewing, these are the optional thumbnails for the post. When posting - # an article, choose one by setting the attachment.image.url property. If you - # don't choose one, one will be chosen for you. - # Corresponds to the JSON property `previewThumbnails` - # @return [Array] - attr_accessor :preview_thumbnails - - # If the attachment is an album, this property is a list of potential additional - # thumbnails from the album. - # Corresponds to the JSON property `thumbnails` - # @return [Array] - attr_accessor :thumbnails - - # The link to the attachment, which should be of type text/html. - # 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) - @content = args[:content] unless args[:content].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @embed = args[:embed] unless args[:embed].nil? - @full_image = args[:full_image] unless args[:full_image].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @preview_thumbnails = args[:preview_thumbnails] unless args[:preview_thumbnails].nil? - @thumbnails = args[:thumbnails] unless args[:thumbnails].nil? - @url = args[:url] unless args[:url].nil? - end - - # If the attachment is a video, the embeddable link. - class Embed - include Google::Apis::Core::Hashable - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # URL of the link. - # 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) - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # The full image URL for photo attachments. - class FullImage - include Google::Apis::Core::Hashable - - # The height, in pixels, of the linked resource. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # URL of the image. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width, in pixels, of the linked resource. - # 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? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # The preview image for photos or videos. - class Image - include Google::Apis::Core::Hashable - - # The height, in pixels, of the linked resource. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Image URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width, in pixels, of the linked resource. - # 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? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # - class PreviewThumbnail - include Google::Apis::Core::Hashable - - # URL of the thumbnail image. - # 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 - - # - class Thumbnail - include Google::Apis::Core::Hashable - - # Potential name of the thumbnail. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Image resource. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Thumbnail::Image] - attr_accessor :image - - # URL of the webpage containing the image. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # Image resource. - class Image - include Google::Apis::Core::Hashable - - # The height, in pixels, of the linked resource. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Image url. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width, in pixels, of the linked resource. - # 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? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - end - - # People who +1'd this activity. - class Plusoners - include Google::Apis::Core::Hashable - - # The URL for the collection of people who +1'd this activity. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Total number of people who +1'd this activity. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # Comments in reply to this activity. - class Replies - include Google::Apis::Core::Hashable - - # The URL for the collection of comments in reply to this activity. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Total number of comments on this activity. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # People who reshared this activity. - class Resharers - include Google::Apis::Core::Hashable - - # The URL for the collection of resharers. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Total number of people who reshared this activity. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # Status of the activity as seen by the viewer. - class StatusForViewer - include Google::Apis::Core::Hashable - - # Whether the viewer can comment on the activity. - # Corresponds to the JSON property `canComment` - # @return [Boolean] - attr_accessor :can_comment - alias_method :can_comment?, :can_comment - - # Whether the viewer can +1 the activity. - # Corresponds to the JSON property `canPlusone` - # @return [Boolean] - attr_accessor :can_plusone - alias_method :can_plusone?, :can_plusone - - # Whether the viewer can edit or delete the activity. - # Corresponds to the JSON property `canUpdate` - # @return [Boolean] - attr_accessor :can_update - alias_method :can_update?, :can_update - - # Whether the viewer has +1'd the activity. - # Corresponds to the JSON property `isPlusOned` - # @return [Boolean] - attr_accessor :is_plus_oned - alias_method :is_plus_oned?, :is_plus_oned - - # Whether reshares are disabled for the activity. - # Corresponds to the JSON property `resharingDisabled` - # @return [Boolean] - attr_accessor :resharing_disabled - alias_method :resharing_disabled?, :resharing_disabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @can_comment = args[:can_comment] unless args[:can_comment].nil? - @can_plusone = args[:can_plusone] unless args[:can_plusone].nil? - @can_update = args[:can_update] unless args[:can_update].nil? - @is_plus_oned = args[:is_plus_oned] unless args[:is_plus_oned].nil? - @resharing_disabled = args[:resharing_disabled] unless args[:resharing_disabled].nil? - end - end - end - - # The service provider that initially published this activity. - class Provider - include Google::Apis::Core::Hashable - - # Name of the service provider. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] unless args[:title].nil? - end - end - end - - # - class ActivityFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of this collection of activities. Deprecated. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The activities in this page of results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of activities. Value: "plus# - # activityFeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to the next page of activities. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Link to this activity resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The title of this collection of activities, which is a truncated portion of - # the content. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time at which this collection of activities was last updated. Formatted as - # an RFC 3339 timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class Audience - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The access control list entry. - # Corresponds to the JSON property `item` - # @return [Google::Apis::PlusDomainsV1::PlusDomainsAclentryResource] - attr_accessor :item - - # Identifies this resource as an audience. Value: "plus#audience". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of people in this circle. This only applies if entity_type is - # CIRCLE. - # Corresponds to the JSON property `memberCount` - # @return [Fixnum] - attr_accessor :member_count - - # The circle members' visibility as chosen by the owner of the circle. This only - # applies for items with "item.type" equals "circle". Possible values are: - # - "public" - Members are visible to the public. - # - "limited" - Members are visible to a limited audience. - # - "private" - Members are visible to the owner only. - # Corresponds to the JSON property `visibility` - # @return [String] - attr_accessor :visibility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @item = args[:item] unless args[:item].nil? - @kind = args[:kind] unless args[:kind].nil? - @member_count = args[:member_count] unless args[:member_count].nil? - @visibility = args[:visibility] unless args[:visibility].nil? - end - end - - # - class AudiencesFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The audiences in this result. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of audiences. Value: "plus# - # audienceFeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The total number of ACL entries. The number of entries in this response may be - # smaller due to paging. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # - class Circle - include Google::Apis::Core::Hashable - - # The description of this circle. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The circle name. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of the circle. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this resource as a circle. Value: "plus#circle". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The people in this circle. - # Corresponds to the JSON property `people` - # @return [Google::Apis::PlusDomainsV1::Circle::People] - attr_accessor :people - - # Link to this circle resource - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @people = args[:people] unless args[:people].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - - # The people in this circle. - class People - include Google::Apis::Core::Hashable - - # The total number of people in this circle. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - - # - class CircleFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The circles in this page of results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of circles. Value: "plus#circleFeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to the next page of circles. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Link to this page of circles. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The title of this list of resources. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The total number of circles. The number of circles in this response may be - # smaller due to paging. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # - class Comment - include Google::Apis::Core::Hashable - - # The person who posted this comment. - # Corresponds to the JSON property `actor` - # @return [Google::Apis::PlusDomainsV1::Comment::Actor] - attr_accessor :actor - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of this comment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The activity this comment replied to. - # Corresponds to the JSON property `inReplyTo` - # @return [Array] - attr_accessor :in_reply_to - - # Identifies this resource as a comment. Value: "plus#comment". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The object of this comment. - # Corresponds to the JSON property `object` - # @return [Google::Apis::PlusDomainsV1::Comment::Object] - attr_accessor :object - - # People who +1'd this comment. - # Corresponds to the JSON property `plusoners` - # @return [Google::Apis::PlusDomainsV1::Comment::Plusoners] - attr_accessor :plusoners - - # The time at which this comment was initially published. Formatted as an RFC - # 3339 timestamp. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # Link to this comment resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The time at which this comment was last updated. Formatted as an RFC 3339 - # timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # This comment's verb, indicating what action was performed. Possible values are: - # - # - "post" - Publish content to the stream. - # Corresponds to the JSON property `verb` - # @return [String] - attr_accessor :verb - - 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? - @id = args[:id] unless args[:id].nil? - @in_reply_to = args[:in_reply_to] unless args[:in_reply_to].nil? - @kind = args[:kind] unless args[:kind].nil? - @object = args[:object] unless args[:object].nil? - @plusoners = args[:plusoners] unless args[:plusoners].nil? - @published = args[:published] unless args[:published].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @verb = args[:verb] unless args[:verb].nil? - end - - # The person who posted this comment. - class Actor - include Google::Apis::Core::Hashable - - # The name of this actor, suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the actor. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The image representation of this actor. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusDomainsV1::Comment::Actor::Image] - attr_accessor :image - - # A link to the Person resource for this actor. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The image representation of this actor. - class Image - include Google::Apis::Core::Hashable - - # The URL of the actor's profile photo. To resize the image and crop it to a - # square, append the query string ?sz=x, where x is the dimension in pixels of - # each side. - # 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 - end - - # - class InReplyTo - include Google::Apis::Core::Hashable - - # The ID of the activity. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The URL of the activity. - # 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) - @id = args[:id] unless args[:id].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # The object of this comment. - class Object - include Google::Apis::Core::Hashable - - # The HTML-formatted content, suitable for display. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The object type of this comment. Possible values are: - # - "comment" - A comment in reply to an activity. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # The content (text) as provided by the author, stored without any HTML - # formatting. When creating or updating a comment, this value must be supplied - # as plain text in the request. - # Corresponds to the JSON property `originalContent` - # @return [String] - attr_accessor :original_content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content = args[:content] unless args[:content].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @original_content = args[:original_content] unless args[:original_content].nil? - end - end - - # People who +1'd this comment. - class Plusoners - include Google::Apis::Core::Hashable - - # Total number of people who +1'd this comment. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - - # - class CommentFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of this collection of comments. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The comments in this page of results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of comments. Value: "plus#commentFeed" - # . - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to the next page of activities. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The title of this collection of comments. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time at which this collection of comments was last updated. Formatted as - # an RFC 3339 timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class Media - include Google::Apis::Core::Hashable - - # The person who uploaded this media. - # Corresponds to the JSON property `author` - # @return [Google::Apis::PlusDomainsV1::Media::Author] - attr_accessor :author - - # The display name for this media. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Exif information of the media item. - # Corresponds to the JSON property `exif` - # @return [Google::Apis::PlusDomainsV1::Media::Exif] - attr_accessor :exif - - # The height in pixels of the original image. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # ID of this media, which is generated by the API. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The time at which this media was originally created in UTC. Formatted as an - # RFC 3339 timestamp that matches this example: 2010-11-25T14:30:27.655Z - # Corresponds to the JSON property `mediaCreatedTime` - # @return [DateTime] - attr_accessor :media_created_time - - # The URL of this photo or video's still image. - # Corresponds to the JSON property `mediaUrl` - # @return [String] - attr_accessor :media_url - - # The time at which this media was uploaded. Formatted as an RFC 3339 timestamp. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # The size in bytes of this video. - # Corresponds to the JSON property `sizeBytes` - # @return [String] - attr_accessor :size_bytes - - # The list of video streams for this video. There might be several different - # streams available for a single video, either Flash or MPEG, of various sizes - # Corresponds to the JSON property `streams` - # @return [Array] - attr_accessor :streams - - # A description, or caption, for this media. - # Corresponds to the JSON property `summary` - # @return [String] - attr_accessor :summary - - # The time at which this media was last updated. This includes changes to media - # metadata. Formatted as an RFC 3339 timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The URL for the page that hosts this media. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The duration in milliseconds of this video. - # Corresponds to the JSON property `videoDuration` - # @return [String] - attr_accessor :video_duration - - # The encoding status of this video. Possible values are: - # - "UPLOADING" - Not all the video bytes have been received. - # - "PENDING" - Video not yet processed. - # - "FAILED" - Video processing failed. - # - "READY" - A single video stream is playable. - # - "FINAL" - All video streams are playable. - # Corresponds to the JSON property `videoStatus` - # @return [String] - attr_accessor :video_status - - # The width in pixels of the original image. - # 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) - @author = args[:author] unless args[:author].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @etag = args[:etag] unless args[:etag].nil? - @exif = args[:exif] unless args[:exif].nil? - @height = args[:height] unless args[:height].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @media_created_time = args[:media_created_time] unless args[:media_created_time].nil? - @media_url = args[:media_url] unless args[:media_url].nil? - @published = args[:published] unless args[:published].nil? - @size_bytes = args[:size_bytes] unless args[:size_bytes].nil? - @streams = args[:streams] unless args[:streams].nil? - @summary = args[:summary] unless args[:summary].nil? - @updated = args[:updated] unless args[:updated].nil? - @url = args[:url] unless args[:url].nil? - @video_duration = args[:video_duration] unless args[:video_duration].nil? - @video_status = args[:video_status] unless args[:video_status].nil? - @width = args[:width] unless args[:width].nil? - end - - # The person who uploaded this media. - class Author - include Google::Apis::Core::Hashable - - # The author's name. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # ID of the author. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The author's Google profile image. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusDomainsV1::Media::Author::Image] - attr_accessor :image - - # A link to the author's Google profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The author's Google profile image. - class Image - include Google::Apis::Core::Hashable - - # The URL of the author's profile photo. To resize the image and crop it to a - # square, append the query string ?sz=x, where x is the dimension in pixels of - # each side. - # 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 - end - - # Exif information of the media item. - class Exif - include Google::Apis::Core::Hashable - - # The time the media was captured. Formatted as an RFC 3339 timestamp. - # Corresponds to the JSON property `time` - # @return [DateTime] - attr_accessor :time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time = args[:time] unless args[:time].nil? - end - end - end - - # - class PeopleFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The people in this page of results. Each item includes the id, displayName, - # image, and url for the person. To retrieve additional profile data, see the - # people.get method. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of people. Value: "plus#peopleFeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Link to this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The title of this collection of people. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The total number of people available in this list. The number of people in a - # response might be smaller due to paging. This might not be set for all - # collections. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # - class Person - include Google::Apis::Core::Hashable - - # A short biography for this person. - # Corresponds to the JSON property `aboutMe` - # @return [String] - attr_accessor :about_me - - # The person's date of birth, represented as YYYY-MM-DD. - # Corresponds to the JSON property `birthday` - # @return [String] - attr_accessor :birthday - - # The "bragging rights" line of this person. - # Corresponds to the JSON property `braggingRights` - # @return [String] - attr_accessor :bragging_rights - - # For followers who are visible, the number of people who have added this person - # or page to a circle. - # Corresponds to the JSON property `circledByCount` - # @return [Fixnum] - attr_accessor :circled_by_count - - # The cover photo content. - # Corresponds to the JSON property `cover` - # @return [Google::Apis::PlusDomainsV1::Person::Cover] - attr_accessor :cover - - # (this field is not currently used) - # Corresponds to the JSON property `currentLocation` - # @return [String] - attr_accessor :current_location - - # The name of this person, which is suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The hosted domain name for the user's Google Apps account. For instance, - # example.com. The plus.profile.emails.read or email scope is needed to get this - # domain name. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # A list of email addresses that this person has, including their Google account - # email address, and the public verified email addresses on their Google+ - # profile. The plus.profile.emails.read scope is needed to retrieve these email - # addresses, or the email scope can be used to retrieve just the Google account - # email address. - # Corresponds to the JSON property `emails` - # @return [Array] - attr_accessor :emails - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The person's gender. Possible values include, but are not limited to, the - # following values: - # - "male" - Male gender. - # - "female" - Female gender. - # - "other" - Other. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # The ID of this person. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The representation of the person's profile photo. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusDomainsV1::Person::Image] - attr_accessor :image - - # Whether this user has signed up for Google+. - # Corresponds to the JSON property `isPlusUser` - # @return [Boolean] - attr_accessor :is_plus_user - alias_method :is_plus_user?, :is_plus_user - - # Identifies this resource as a person. Value: "plus#person". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An object representation of the individual components of a person's name. - # Corresponds to the JSON property `name` - # @return [Google::Apis::PlusDomainsV1::Person::Name] - attr_accessor :name - - # The nickname of this person. - # Corresponds to the JSON property `nickname` - # @return [String] - attr_accessor :nickname - - # Type of person within Google+. Possible values include, but are not limited to, - # the following values: - # - "person" - represents an actual person. - # - "page" - represents a page. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # The occupation of this person. - # Corresponds to the JSON property `occupation` - # @return [String] - attr_accessor :occupation - - # A list of current or past organizations with which this person is associated. - # Corresponds to the JSON property `organizations` - # @return [Array] - attr_accessor :organizations - - # A list of places where this person has lived. - # Corresponds to the JSON property `placesLived` - # @return [Array] - attr_accessor :places_lived - - # If a Google+ Page, the number of people who have +1'd this page. - # Corresponds to the JSON property `plusOneCount` - # @return [Fixnum] - attr_accessor :plus_one_count - - # The person's relationship status. Possible values include, but are not limited - # to, the following values: - # - "single" - Person is single. - # - "in_a_relationship" - Person is in a relationship. - # - "engaged" - Person is engaged. - # - "married" - Person is married. - # - "its_complicated" - The relationship is complicated. - # - "open_relationship" - Person is in an open relationship. - # - "widowed" - Person is widowed. - # - "in_domestic_partnership" - Person is in a domestic partnership. - # - "in_civil_union" - Person is in a civil union. - # Corresponds to the JSON property `relationshipStatus` - # @return [String] - attr_accessor :relationship_status - - # The person's skills. - # Corresponds to the JSON property `skills` - # @return [String] - attr_accessor :skills - - # The brief description (tagline) of this person. - # Corresponds to the JSON property `tagline` - # @return [String] - attr_accessor :tagline - - # The URL of this person's profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # A list of URLs for this person. - # Corresponds to the JSON property `urls` - # @return [Array] - attr_accessor :urls - - # Whether the person or Google+ Page has been verified. - # Corresponds to the JSON property `verified` - # @return [Boolean] - attr_accessor :verified - alias_method :verified?, :verified - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @about_me = args[:about_me] unless args[:about_me].nil? - @birthday = args[:birthday] unless args[:birthday].nil? - @bragging_rights = args[:bragging_rights] unless args[:bragging_rights].nil? - @circled_by_count = args[:circled_by_count] unless args[:circled_by_count].nil? - @cover = args[:cover] unless args[:cover].nil? - @current_location = args[:current_location] unless args[:current_location].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @domain = args[:domain] unless args[:domain].nil? - @emails = args[:emails] unless args[:emails].nil? - @etag = args[:etag] unless args[:etag].nil? - @gender = args[:gender] unless args[:gender].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @is_plus_user = args[:is_plus_user] unless args[:is_plus_user].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @nickname = args[:nickname] unless args[:nickname].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @occupation = args[:occupation] unless args[:occupation].nil? - @organizations = args[:organizations] unless args[:organizations].nil? - @places_lived = args[:places_lived] unless args[:places_lived].nil? - @plus_one_count = args[:plus_one_count] unless args[:plus_one_count].nil? - @relationship_status = args[:relationship_status] unless args[:relationship_status].nil? - @skills = args[:skills] unless args[:skills].nil? - @tagline = args[:tagline] unless args[:tagline].nil? - @url = args[:url] unless args[:url].nil? - @urls = args[:urls] unless args[:urls].nil? - @verified = args[:verified] unless args[:verified].nil? - end - - # The cover photo content. - class Cover - include Google::Apis::Core::Hashable - - # Extra information about the cover photo. - # Corresponds to the JSON property `coverInfo` - # @return [Google::Apis::PlusDomainsV1::Person::Cover::CoverInfo] - attr_accessor :cover_info - - # The person's primary cover image. - # Corresponds to the JSON property `coverPhoto` - # @return [Google::Apis::PlusDomainsV1::Person::Cover::CoverPhoto] - attr_accessor :cover_photo - - # The layout of the cover art. Possible values include, but are not limited to, - # the following values: - # - "banner" - One large image banner. - # Corresponds to the JSON property `layout` - # @return [String] - attr_accessor :layout - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cover_info = args[:cover_info] unless args[:cover_info].nil? - @cover_photo = args[:cover_photo] unless args[:cover_photo].nil? - @layout = args[:layout] unless args[:layout].nil? - end - - # Extra information about the cover photo. - class CoverInfo - include Google::Apis::Core::Hashable - - # The difference between the left position of the cover image and the actual - # displayed cover image. Only valid for banner layout. - # Corresponds to the JSON property `leftImageOffset` - # @return [Fixnum] - attr_accessor :left_image_offset - - # The difference between the top position of the cover image and the actual - # displayed cover image. Only valid for banner layout. - # Corresponds to the JSON property `topImageOffset` - # @return [Fixnum] - attr_accessor :top_image_offset - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left_image_offset = args[:left_image_offset] unless args[:left_image_offset].nil? - @top_image_offset = args[:top_image_offset] unless args[:top_image_offset].nil? - end - end - - # The person's primary cover image. - class CoverPhoto - include Google::Apis::Core::Hashable - - # The height of the image. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The URL of the image. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width of the image. - # 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? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - - # - class Email - include Google::Apis::Core::Hashable - - # The type of address. Possible values include, but are not limited to, the - # following values: - # - "account" - Google account email address. - # - "home" - Home email address. - # - "work" - Work email address. - # - "other" - Other. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The email address. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # The representation of the person's profile photo. - class Image - include Google::Apis::Core::Hashable - - # Whether the person's profile photo is the default one - # Corresponds to the JSON property `isDefault` - # @return [Boolean] - attr_accessor :is_default - alias_method :is_default?, :is_default - - # The URL of the person's profile photo. To resize the image and crop it to a - # square, append the query string ?sz=x, where x is the dimension in pixels of - # each side. - # 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) - @is_default = args[:is_default] unless args[:is_default].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # An object representation of the individual components of a person's name. - class Name - include Google::Apis::Core::Hashable - - # The family name (last name) of this person. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The full name of this person, including middle names, suffixes, etc. - # Corresponds to the JSON property `formatted` - # @return [String] - attr_accessor :formatted - - # The given name (first name) of this person. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # The honorific prefixes (such as "Dr." or "Mrs.") for this person. - # Corresponds to the JSON property `honorificPrefix` - # @return [String] - attr_accessor :honorific_prefix - - # The honorific suffixes (such as "Jr.") for this person. - # Corresponds to the JSON property `honorificSuffix` - # @return [String] - attr_accessor :honorific_suffix - - # The middle name of this person. - # Corresponds to the JSON property `middleName` - # @return [String] - attr_accessor :middle_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @family_name = args[:family_name] unless args[:family_name].nil? - @formatted = args[:formatted] unless args[:formatted].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - @honorific_prefix = args[:honorific_prefix] unless args[:honorific_prefix].nil? - @honorific_suffix = args[:honorific_suffix] unless args[:honorific_suffix].nil? - @middle_name = args[:middle_name] unless args[:middle_name].nil? - end - end - - # - class Organization - include Google::Apis::Core::Hashable - - # The department within the organization. Deprecated. - # Corresponds to the JSON property `department` - # @return [String] - attr_accessor :department - - # A short description of the person's role in this organization. Deprecated. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The date that the person left this organization. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - # The location of this organization. Deprecated. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # The name of the organization. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # If "true", indicates this organization is the person's primary one, which is - # typically interpreted as the current one. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # The date that the person joined this organization. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - # The person's job title or role within the organization. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The type of organization. Possible values include, but are not limited to, the - # following values: - # - "work" - Work. - # - "school" - School. - # 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) - @department = args[:department] unless args[:department].nil? - @description = args[:description] unless args[:description].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @location = args[:location] unless args[:location].nil? - @name = args[:name] unless args[:name].nil? - @primary = args[:primary] unless args[:primary].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class PlacesLived - include Google::Apis::Core::Hashable - - # If "true", this place of residence is this person's primary residence. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # A place where this person has lived. For example: "Seattle, WA", "Near Toronto" - # . - # 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) - @primary = args[:primary] unless args[:primary].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class Url - include Google::Apis::Core::Hashable - - # The label of the URL. - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - - # The type of URL. Possible values include, but are not limited to, the - # following values: - # - "otherProfile" - URL for another profile. - # - "contributor" - URL to a site for which this person is a contributor. - # - "website" - URL for this Google+ Page's primary website. - # - "other" - Other URL. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The URL 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) - @label = args[:label] unless args[:label].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - - # - class Place - include Google::Apis::Core::Hashable - - # The physical address of the place. - # Corresponds to the JSON property `address` - # @return [Google::Apis::PlusDomainsV1::Place::Address] - attr_accessor :address - - # The display name of the place. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The id of the place. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this resource as a place. Value: "plus#place". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The position of the place. - # Corresponds to the JSON property `position` - # @return [Google::Apis::PlusDomainsV1::Place::Position] - attr_accessor :position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address = args[:address] unless args[:address].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @position = args[:position] unless args[:position].nil? - end - - # The physical address of the place. - class Address - include Google::Apis::Core::Hashable - - # The formatted address for display. - # Corresponds to the JSON property `formatted` - # @return [String] - attr_accessor :formatted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted = args[:formatted] unless args[:formatted].nil? - end - end - - # The position of the place. - class Position - include Google::Apis::Core::Hashable - - # The latitude of this position. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude of this position. - # 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) - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - end - end - end - - # - class PlusDomainsAclentryResource - include Google::Apis::Core::Hashable - - # A descriptive name for this entry. Suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the entry. For entries of type "person" or "circle", this is the ID - # of the resource. For other types, this property is not set. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of entry describing to whom access is granted. Possible values are: - # - "person" - Access to an individual. - # - "circle" - Access to members of a circle. - # - "myCircles" - Access to members of all the person's circles. - # - "extendedCircles" - Access to members of all the person's circles, plus all - # of the people in their circles. - # - "domain" - Access to members of the person's Google Apps domain. - # - "public" - Access to anyone on the web. - # 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) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class Videostream - include Google::Apis::Core::Hashable - - # The height, in pixels, of the video resource. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # MIME type of the video stream. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # URL of the video stream. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width, in pixels, of the video resource. - # 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? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - end -end diff --git a/generated/google/apis/plus_domains_v1/representations.rb b/generated/google/apis/plus_domains_v1/representations.rb deleted file mode 100644 index 6f782e5ad..000000000 --- a/generated/google/apis/plus_domains_v1/representations.rb +++ /dev/null @@ -1,873 +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 PlusDomainsV1 - - class Acl - 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 - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Name - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Object - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Actor - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Attachment - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Embed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FullImage - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PreviewThumbnail - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Thumbnail - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Replies - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Resharers - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class StatusForViewer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Provider - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ActivityFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Audience - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AudiencesFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Circle - class Representation < Google::Apis::Core::JsonRepresentation; end - - class People - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CircleFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Comment - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Actor - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class InReplyTo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Object - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CommentFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Media - 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 Exif - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class PeopleFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Person - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Cover - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CoverInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CoverPhoto - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Email - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Name - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Organization - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlacesLived - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Url - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Place - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Address - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Position - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class PlusDomainsAclentryResource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Videostream - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Acl - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :domain_restricted, as: 'domainRestricted' - collection :items, as: 'items', class: Google::Apis::PlusDomainsV1::PlusDomainsAclentryResource, decorator: Google::Apis::PlusDomainsV1::PlusDomainsAclentryResource::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Activity - class Representation < Google::Apis::Core::JsonRepresentation - property :access, as: 'access', class: Google::Apis::PlusDomainsV1::Acl, decorator: Google::Apis::PlusDomainsV1::Acl::Representation - - property :actor, as: 'actor', class: Google::Apis::PlusDomainsV1::Activity::Actor, decorator: Google::Apis::PlusDomainsV1::Activity::Actor::Representation - - property :address, as: 'address' - property :annotation, as: 'annotation' - property :crosspost_source, as: 'crosspostSource' - property :etag, as: 'etag' - property :geocode, as: 'geocode' - property :id, as: 'id' - property :kind, as: 'kind' - property :location, as: 'location', class: Google::Apis::PlusDomainsV1::Place, decorator: Google::Apis::PlusDomainsV1::Place::Representation - - property :object, as: 'object', class: Google::Apis::PlusDomainsV1::Activity::Object, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Representation - - property :place_id, as: 'placeId' - property :place_name, as: 'placeName' - property :provider, as: 'provider', class: Google::Apis::PlusDomainsV1::Activity::Provider, decorator: Google::Apis::PlusDomainsV1::Activity::Provider::Representation - - property :published, as: 'published', type: DateTime - - property :radius, as: 'radius' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - property :url, as: 'url' - property :verb, as: 'verb' - end - - # @private - class Actor - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusDomainsV1::Activity::Actor::Image, decorator: Google::Apis::PlusDomainsV1::Activity::Actor::Image::Representation - - property :name, as: 'name', class: Google::Apis::PlusDomainsV1::Activity::Actor::Name, decorator: Google::Apis::PlusDomainsV1::Activity::Actor::Name::Representation - - property :url, as: 'url' - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' - end - end - - # @private - class Name - class Representation < Google::Apis::Core::JsonRepresentation - property :family_name, as: 'familyName' - property :given_name, as: 'givenName' - end - end - end - - # @private - class Object - class Representation < Google::Apis::Core::JsonRepresentation - property :actor, as: 'actor', class: Google::Apis::PlusDomainsV1::Activity::Object::Actor, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Actor::Representation - - collection :attachments, as: 'attachments', class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Representation - - property :content, as: 'content' - property :id, as: 'id' - property :object_type, as: 'objectType' - property :original_content, as: 'originalContent' - property :plusoners, as: 'plusoners', class: Google::Apis::PlusDomainsV1::Activity::Object::Plusoners, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Plusoners::Representation - - property :replies, as: 'replies', class: Google::Apis::PlusDomainsV1::Activity::Object::Replies, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Replies::Representation - - property :resharers, as: 'resharers', class: Google::Apis::PlusDomainsV1::Activity::Object::Resharers, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Resharers::Representation - - property :status_for_viewer, as: 'statusForViewer', class: Google::Apis::PlusDomainsV1::Activity::Object::StatusForViewer, decorator: Google::Apis::PlusDomainsV1::Activity::Object::StatusForViewer::Representation - - property :url, as: 'url' - end - - # @private - class Actor - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusDomainsV1::Activity::Object::Actor::Image, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Actor::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 Attachment - class Representation < Google::Apis::Core::JsonRepresentation - property :content, as: 'content' - property :display_name, as: 'displayName' - property :embed, as: 'embed', class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Embed, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Embed::Representation - - property :full_image, as: 'fullImage', class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::FullImage, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::FullImage::Representation - - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Image, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Image::Representation - - property :object_type, as: 'objectType' - collection :preview_thumbnails, as: 'previewThumbnails', class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::PreviewThumbnail, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::PreviewThumbnail::Representation - - collection :thumbnails, as: 'thumbnails', class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Thumbnail, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Thumbnail::Representation - - property :url, as: 'url' - end - - # @private - class Embed - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :url, as: 'url' - end - end - - # @private - class FullImage - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - end - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - end - end - - # @private - class PreviewThumbnail - class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' - end - end - - # @private - class Thumbnail - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :image, as: 'image', class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Thumbnail::Image, decorator: Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Thumbnail::Image::Representation - - property :url, as: 'url' - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - end - end - end - end - - # @private - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation - property :self_link, as: 'selfLink' - property :total_items, as: 'totalItems' - end - end - - # @private - class Replies - class Representation < Google::Apis::Core::JsonRepresentation - property :self_link, as: 'selfLink' - property :total_items, as: 'totalItems' - end - end - - # @private - class Resharers - class Representation < Google::Apis::Core::JsonRepresentation - property :self_link, as: 'selfLink' - property :total_items, as: 'totalItems' - end - end - - # @private - class StatusForViewer - class Representation < Google::Apis::Core::JsonRepresentation - property :can_comment, as: 'canComment' - property :can_plusone, as: 'canPlusone' - property :can_update, as: 'canUpdate' - property :is_plus_oned, as: 'isPlusOned' - property :resharing_disabled, as: 'resharingDisabled' - end - end - end - - # @private - class Provider - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - end - end - end - - # @private - class ActivityFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::PlusDomainsV1::Activity, decorator: Google::Apis::PlusDomainsV1::Activity::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class Audience - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :item, as: 'item', class: Google::Apis::PlusDomainsV1::PlusDomainsAclentryResource, decorator: Google::Apis::PlusDomainsV1::PlusDomainsAclentryResource::Representation - - property :kind, as: 'kind' - property :member_count, as: 'memberCount' - property :visibility, as: 'visibility' - end - end - - # @private - class AudiencesFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::PlusDomainsV1::Audience, decorator: Google::Apis::PlusDomainsV1::Audience::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - - # @private - class Circle - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :display_name, as: 'displayName' - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :people, as: 'people', class: Google::Apis::PlusDomainsV1::Circle::People, decorator: Google::Apis::PlusDomainsV1::Circle::People::Representation - - property :self_link, as: 'selfLink' - end - - # @private - class People - class Representation < Google::Apis::Core::JsonRepresentation - property :total_items, as: 'totalItems' - end - end - end - - # @private - class CircleFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::PlusDomainsV1::Circle, decorator: Google::Apis::PlusDomainsV1::Circle::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :total_items, as: 'totalItems' - end - end - - # @private - class Comment - class Representation < Google::Apis::Core::JsonRepresentation - property :actor, as: 'actor', class: Google::Apis::PlusDomainsV1::Comment::Actor, decorator: Google::Apis::PlusDomainsV1::Comment::Actor::Representation - - property :etag, as: 'etag' - property :id, as: 'id' - collection :in_reply_to, as: 'inReplyTo', class: Google::Apis::PlusDomainsV1::Comment::InReplyTo, decorator: Google::Apis::PlusDomainsV1::Comment::InReplyTo::Representation - - property :kind, as: 'kind' - property :object, as: 'object', class: Google::Apis::PlusDomainsV1::Comment::Object, decorator: Google::Apis::PlusDomainsV1::Comment::Object::Representation - - property :plusoners, as: 'plusoners', class: Google::Apis::PlusDomainsV1::Comment::Plusoners, decorator: Google::Apis::PlusDomainsV1::Comment::Plusoners::Representation - - property :published, as: 'published', type: DateTime - - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :verb, as: 'verb' - end - - # @private - class Actor - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusDomainsV1::Comment::Actor::Image, decorator: Google::Apis::PlusDomainsV1::Comment::Actor::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 InReplyTo - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :url, as: 'url' - end - end - - # @private - class Object - class Representation < Google::Apis::Core::JsonRepresentation - property :content, as: 'content' - property :object_type, as: 'objectType' - property :original_content, as: 'originalContent' - end - end - - # @private - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation - property :total_items, as: 'totalItems' - end - end - end - - # @private - class CommentFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::PlusDomainsV1::Comment, decorator: Google::Apis::PlusDomainsV1::Comment::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class Media - class Representation < Google::Apis::Core::JsonRepresentation - property :author, as: 'author', class: Google::Apis::PlusDomainsV1::Media::Author, decorator: Google::Apis::PlusDomainsV1::Media::Author::Representation - - property :display_name, as: 'displayName' - property :etag, as: 'etag' - property :exif, as: 'exif', class: Google::Apis::PlusDomainsV1::Media::Exif, decorator: Google::Apis::PlusDomainsV1::Media::Exif::Representation - - property :height, as: 'height' - property :id, as: 'id' - property :kind, as: 'kind' - property :media_created_time, as: 'mediaCreatedTime', type: DateTime - - property :media_url, as: 'mediaUrl' - property :published, as: 'published', type: DateTime - - property :size_bytes, as: 'sizeBytes' - collection :streams, as: 'streams', class: Google::Apis::PlusDomainsV1::Videostream, decorator: Google::Apis::PlusDomainsV1::Videostream::Representation - - property :summary, as: 'summary' - property :updated, as: 'updated', type: DateTime - - property :url, as: 'url' - property :video_duration, as: 'videoDuration' - property :video_status, as: 'videoStatus' - property :width, as: 'width' - 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::PlusDomainsV1::Media::Author::Image, decorator: Google::Apis::PlusDomainsV1::Media::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 Exif - class Representation < Google::Apis::Core::JsonRepresentation - property :time, as: 'time', type: DateTime - - end - end - end - - # @private - class PeopleFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::PlusDomainsV1::Person, decorator: Google::Apis::PlusDomainsV1::Person::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :total_items, as: 'totalItems' - end - end - - # @private - class Person - class Representation < Google::Apis::Core::JsonRepresentation - property :about_me, as: 'aboutMe' - property :birthday, as: 'birthday' - property :bragging_rights, as: 'braggingRights' - property :circled_by_count, as: 'circledByCount' - property :cover, as: 'cover', class: Google::Apis::PlusDomainsV1::Person::Cover, decorator: Google::Apis::PlusDomainsV1::Person::Cover::Representation - - property :current_location, as: 'currentLocation' - property :display_name, as: 'displayName' - property :domain, as: 'domain' - collection :emails, as: 'emails', class: Google::Apis::PlusDomainsV1::Person::Email, decorator: Google::Apis::PlusDomainsV1::Person::Email::Representation - - property :etag, as: 'etag' - property :gender, as: 'gender' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusDomainsV1::Person::Image, decorator: Google::Apis::PlusDomainsV1::Person::Image::Representation - - property :is_plus_user, as: 'isPlusUser' - property :kind, as: 'kind' - property :name, as: 'name', class: Google::Apis::PlusDomainsV1::Person::Name, decorator: Google::Apis::PlusDomainsV1::Person::Name::Representation - - property :nickname, as: 'nickname' - property :object_type, as: 'objectType' - property :occupation, as: 'occupation' - collection :organizations, as: 'organizations', class: Google::Apis::PlusDomainsV1::Person::Organization, decorator: Google::Apis::PlusDomainsV1::Person::Organization::Representation - - collection :places_lived, as: 'placesLived', class: Google::Apis::PlusDomainsV1::Person::PlacesLived, decorator: Google::Apis::PlusDomainsV1::Person::PlacesLived::Representation - - property :plus_one_count, as: 'plusOneCount' - property :relationship_status, as: 'relationshipStatus' - property :skills, as: 'skills' - property :tagline, as: 'tagline' - property :url, as: 'url' - collection :urls, as: 'urls', class: Google::Apis::PlusDomainsV1::Person::Url, decorator: Google::Apis::PlusDomainsV1::Person::Url::Representation - - property :verified, as: 'verified' - end - - # @private - class Cover - class Representation < Google::Apis::Core::JsonRepresentation - property :cover_info, as: 'coverInfo', class: Google::Apis::PlusDomainsV1::Person::Cover::CoverInfo, decorator: Google::Apis::PlusDomainsV1::Person::Cover::CoverInfo::Representation - - property :cover_photo, as: 'coverPhoto', class: Google::Apis::PlusDomainsV1::Person::Cover::CoverPhoto, decorator: Google::Apis::PlusDomainsV1::Person::Cover::CoverPhoto::Representation - - property :layout, as: 'layout' - end - - # @private - class CoverInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :left_image_offset, as: 'leftImageOffset' - property :top_image_offset, as: 'topImageOffset' - end - end - - # @private - class CoverPhoto - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :url, as: 'url' - property :width, as: 'width' - end - end - end - - # @private - class Email - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :is_default, as: 'isDefault' - property :url, as: 'url' - end - end - - # @private - class Name - class Representation < Google::Apis::Core::JsonRepresentation - property :family_name, as: 'familyName' - property :formatted, as: 'formatted' - property :given_name, as: 'givenName' - property :honorific_prefix, as: 'honorificPrefix' - property :honorific_suffix, as: 'honorificSuffix' - property :middle_name, as: 'middleName' - end - end - - # @private - class Organization - class Representation < Google::Apis::Core::JsonRepresentation - property :department, as: 'department' - property :description, as: 'description' - property :end_date, as: 'endDate' - property :location, as: 'location' - property :name, as: 'name' - property :primary, as: 'primary' - property :start_date, as: 'startDate' - property :title, as: 'title' - property :type, as: 'type' - end - end - - # @private - class PlacesLived - class Representation < Google::Apis::Core::JsonRepresentation - property :primary, as: 'primary' - property :value, as: 'value' - end - end - - # @private - class Url - class Representation < Google::Apis::Core::JsonRepresentation - property :label, as: 'label' - property :type, as: 'type' - property :value, as: 'value' - end - end - end - - # @private - class Place - class Representation < Google::Apis::Core::JsonRepresentation - property :address, as: 'address', class: Google::Apis::PlusDomainsV1::Place::Address, decorator: Google::Apis::PlusDomainsV1::Place::Address::Representation - - property :display_name, as: 'displayName' - property :id, as: 'id' - property :kind, as: 'kind' - property :position, as: 'position', class: Google::Apis::PlusDomainsV1::Place::Position, decorator: Google::Apis::PlusDomainsV1::Place::Position::Representation - - end - - # @private - class Address - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted, as: 'formatted' - end - end - - # @private - class Position - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - end - - # @private - class PlusDomainsAclentryResource - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :type, as: 'type' - end - end - - # @private - class Videostream - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - end - end - end - end -end diff --git a/generated/google/apis/plus_domains_v1/service.rb b/generated/google/apis/plus_domains_v1/service.rb deleted file mode 100644 index e2c98b461..000000000 --- a/generated/google/apis/plus_domains_v1/service.rb +++ /dev/null @@ -1,924 +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 PlusDomainsV1 - # Google+ Domains API - # - # The Google+ API enables developers to build on top of the Google+ platform. - # - # @example - # require 'google/apis/plus_domains_v1' - # - # PlusDomains = Google::Apis::PlusDomainsV1 # Alias the module - # service = PlusDomains::PlusDomainsService.new - # - # @see https://developers.google.com/+/domains/ - class PlusDomainsService < 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/', 'plusDomains/v1/') - end - - # Get an activity. - # @param [String] activity_id - # The ID of the activity to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PlusDomainsV1::Activity] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Activity] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_activity(activity_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'activities/{activityId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::Activity::Representation - command.response_class = Google::Apis::PlusDomainsV1::Activity - command.params['activityId'] = activity_id unless activity_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 - - # Create a new activity for the authenticated user. - # @param [String] user_id - # The ID of the user to create the activity on behalf of. Its value should be " - # me", to indicate the authenticated user. - # @param [Google::Apis::PlusDomainsV1::Activity] activity_object - # @param [Boolean] preview - # If "true", extract the potential media attachments for a URL. The response - # will include all possible attachments for a URL, including video, photos, and - # articles based on the content of the page. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PlusDomainsV1::Activity] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Activity] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_activity(user_id, activity_object = nil, preview: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/activities' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PlusDomainsV1::Activity::Representation - command.request_object = activity_object - command.response_representation = Google::Apis::PlusDomainsV1::Activity::Representation - command.response_class = Google::Apis::PlusDomainsV1::Activity - command.params['userId'] = user_id unless user_id.nil? - command.query['preview'] = preview unless preview.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the activities in the specified collection for a particular user. - # @param [String] user_id - # The ID of the user to get activities for. The special value "me" can be used - # to indicate the authenticated user. - # @param [String] collection - # The collection of activities to list. - # @param [Fixnum] max_results - # The maximum number of activities to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusDomainsV1::ActivityFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::ActivityFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/activities/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::ActivityFeed::Representation - command.response_class = Google::Apis::PlusDomainsV1::ActivityFeed - command.params['userId'] = user_id unless user_id.nil? - command.params['collection'] = collection unless collection.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 of the audiences to which a user can share. - # @param [String] user_id - # The ID of the user to get audiences for. The special value "me" can be used to - # indicate the authenticated user. - # @param [Fixnum] max_results - # The maximum number of circles to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusDomainsV1::AudiencesFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::AudiencesFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_audiences(user_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/audiences' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::AudiencesFeed::Representation - command.response_class = Google::Apis::PlusDomainsV1::AudiencesFeed - command.params['userId'] = user_id unless user_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 - - # Add a person to a circle. Google+ limits certain circle operations, including - # the number of circle adds. Learn More. - # @param [String] circle_id - # The ID of the circle to add the person to. - # @param [Array, String] email - # Email of the people to add to the circle. Optional, can be repeated. - # @param [Array, String] user_id - # IDs of the people to add to the circle. Optional, can be repeated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PlusDomainsV1::Circle] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Circle] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_people(circle_id, email: nil, user_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'circles/{circleId}/people' - command = make_simple_command(:put, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.response_class = Google::Apis::PlusDomainsV1::Circle - command.params['circleId'] = circle_id unless circle_id.nil? - command.query['email'] = email unless email.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 - - # Get a circle. - # @param [String] circle_id - # The ID of the circle to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PlusDomainsV1::Circle] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Circle] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_circle(circle_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'circles/{circleId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.response_class = Google::Apis::PlusDomainsV1::Circle - command.params['circleId'] = circle_id unless circle_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 - - # Create a new circle for the authenticated user. - # @param [String] user_id - # The ID of the user to create the circle on behalf of. The value "me" can be - # used to indicate the authenticated user. - # @param [Google::Apis::PlusDomainsV1::Circle] circle_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::PlusDomainsV1::Circle] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Circle] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_circle(user_id, circle_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/circles' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.request_object = circle_object - command.response_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.response_class = Google::Apis::PlusDomainsV1::Circle - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the circles for a user. - # @param [String] user_id - # The ID of the user to get circles for. The special value "me" can be used to - # indicate the authenticated user. - # @param [Fixnum] max_results - # The maximum number of circles to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusDomainsV1::CircleFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::CircleFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_circles(user_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/circles' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::CircleFeed::Representation - command.response_class = Google::Apis::PlusDomainsV1::CircleFeed - command.params['userId'] = user_id unless user_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 - - # Update a circle's description. This method supports patch semantics. - # @param [String] circle_id - # The ID of the circle to update. - # @param [Google::Apis::PlusDomainsV1::Circle] circle_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::PlusDomainsV1::Circle] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Circle] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_circle(circle_id, circle_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'circles/{circleId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.request_object = circle_object - command.response_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.response_class = Google::Apis::PlusDomainsV1::Circle - command.params['circleId'] = circle_id unless circle_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 - - # Delete a circle. - # @param [String] circle_id - # The ID of the circle 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 remove_circle(circle_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'circles/{circleId}' - command = make_simple_command(:delete, path, options) - command.params['circleId'] = circle_id unless circle_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 - - # Remove a person from a circle. - # @param [String] circle_id - # The ID of the circle to remove the person from. - # @param [Array, String] email - # Email of the people to add to the circle. Optional, can be repeated. - # @param [Array, String] user_id - # IDs of the people to remove from the circle. Optional, can be repeated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 remove_people(circle_id, email: nil, user_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'circles/{circleId}/people' - command = make_simple_command(:delete, path, options) - command.params['circleId'] = circle_id unless circle_id.nil? - command.query['email'] = email unless email.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 - - # Update a circle's description. - # @param [String] circle_id - # The ID of the circle to update. - # @param [Google::Apis::PlusDomainsV1::Circle] circle_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::PlusDomainsV1::Circle] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Circle] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_circle(circle_id, circle_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'circles/{circleId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.request_object = circle_object - command.response_representation = Google::Apis::PlusDomainsV1::Circle::Representation - command.response_class = Google::Apis::PlusDomainsV1::Circle - command.params['circleId'] = circle_id unless circle_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 a comment. - # @param [String] comment_id - # The ID of the comment to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PlusDomainsV1::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_comment(comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'comments/{commentId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::Comment::Representation - command.response_class = Google::Apis::PlusDomainsV1::Comment - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Create a new comment in reply to an activity. - # @param [String] activity_id - # The ID of the activity to reply to. - # @param [Google::Apis::PlusDomainsV1::Comment] comment_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::PlusDomainsV1::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_comment(activity_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'activities/{activityId}/comments' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PlusDomainsV1::Comment::Representation - command.request_object = comment_object - command.response_representation = Google::Apis::PlusDomainsV1::Comment::Representation - command.response_class = Google::Apis::PlusDomainsV1::Comment - command.params['activityId'] = activity_id unless activity_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the comments for an activity. - # @param [String] activity_id - # The ID of the activity to get comments for. - # @param [Fixnum] max_results - # The maximum number of comments to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of " - # nextPageToken" from the previous response. - # @param [String] sort_order - # The order in which to sort the list of comments. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PlusDomainsV1::CommentFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::CommentFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_comments(activity_id, max_results: nil, page_token: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'activities/{activityId}/comments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::CommentFeed::Representation - command.response_class = Google::Apis::PlusDomainsV1::CommentFeed - command.params['activityId'] = activity_id unless activity_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 - - # Add a new media item to an album. The current upload size limitations are 36MB - # for a photo and 1GB for a video. Uploads do not count against quota if photos - # are less than 2048 pixels on their longest side or videos are less than 15 - # minutes in length. - # @param [String] user_id - # The ID of the user to create the activity on behalf of. - # @param [String] collection - # @param [Google::Apis::PlusDomainsV1::Media] media_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 [IO, String] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PlusDomainsV1::Media] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Media] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_medium(user_id, collection, media_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'people/{userId}/media/{collection}' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::PlusDomainsV1::Media::Representation - command.request_object = media_object - command.response_representation = Google::Apis::PlusDomainsV1::Media::Representation - command.response_class = Google::Apis::PlusDomainsV1::Media - command.params['userId'] = user_id unless user_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a person's profile. - # @param [String] user_id - # The ID of the person to get the profile for. The special value "me" can be - # used to indicate 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::PlusDomainsV1::Person] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::Person] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_person(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::Person::Representation - command.response_class = Google::Apis::PlusDomainsV1::Person - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the people in the specified collection. - # @param [String] user_id - # Get the collection of people for the person identified. Use "me" to indicate - # the authenticated user. - # @param [String] collection - # The collection of people to list. - # @param [Fixnum] max_results - # The maximum number of people to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] order_by - # The order to return people in. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusDomainsV1::PeopleFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::PeopleFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_people(user_id, collection, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/people/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::PeopleFeed::Representation - command.response_class = Google::Apis::PlusDomainsV1::PeopleFeed - command.params['userId'] = user_id unless user_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the people in the specified collection for a particular activity. - # @param [String] activity_id - # The ID of the activity to get the list of people for. - # @param [String] collection - # The collection of people to list. - # @param [Fixnum] max_results - # The maximum number of people to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusDomainsV1::PeopleFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::PeopleFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_people_by_activity(activity_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'activities/{activityId}/people/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::PeopleFeed::Representation - command.response_class = Google::Apis::PlusDomainsV1::PeopleFeed - command.params['activityId'] = activity_id unless activity_id.nil? - command.params['collection'] = collection unless collection.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 of the people who are members of a circle. - # @param [String] circle_id - # The ID of the circle to get the members of. - # @param [Fixnum] max_results - # The maximum number of people to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusDomainsV1::PeopleFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusDomainsV1::PeopleFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_people_by_circle(circle_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'circles/{circleId}/people' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusDomainsV1::PeopleFeed::Representation - command.response_class = Google::Apis::PlusDomainsV1::PeopleFeed - command.params['circleId'] = circle_id unless circle_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 diff --git a/generated/google/apis/plus_v1.rb b/generated/google/apis/plus_v1.rb deleted file mode 100644 index 1159e09d0..000000000 --- a/generated/google/apis/plus_v1.rb +++ /dev/null @@ -1,43 +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/plus_v1/service.rb' -require 'google/apis/plus_v1/classes.rb' -require 'google/apis/plus_v1/representations.rb' - -module Google - module Apis - # Google+ API - # - # The Google+ API enables developers to build on top of the Google+ platform. - # - # @see https://developers.google.com/+/api/ - module PlusV1 - VERSION = 'V1' - REVISION = '20150326' - - # Know your basic profile info and list of people in your circles. - AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' - - # Know who you are on Google - AUTH_PLUS_ME = 'https://www.googleapis.com/auth/plus.me' - - # View your email address - AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' - - # View your basic profile info - AUTH_USERINFO_PROFILE = 'https://www.googleapis.com/auth/userinfo.profile' - end - end -end diff --git a/generated/google/apis/plus_v1/classes.rb b/generated/google/apis/plus_v1/classes.rb deleted file mode 100644 index 7f93bdb5f..000000000 --- a/generated/google/apis/plus_v1/classes.rb +++ /dev/null @@ -1,2384 +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 PlusV1 - - # - class Acl - include Google::Apis::Core::Hashable - - # Description of the access granted, suitable for display. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The list of access entries. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of access controls. Value: "plus#acl". - # 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) - @description = args[:description] unless args[:description].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # - class Activity - include Google::Apis::Core::Hashable - - # Identifies who has access to see this activity. - # Corresponds to the JSON property `access` - # @return [Google::Apis::PlusV1::Acl] - attr_accessor :access - - # The person who performed this activity. - # Corresponds to the JSON property `actor` - # @return [Google::Apis::PlusV1::Activity::Actor] - attr_accessor :actor - - # Street address where this activity occurred. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # Additional content added by the person who shared this activity, applicable - # only when resharing an activity. - # Corresponds to the JSON property `annotation` - # @return [String] - attr_accessor :annotation - - # If this activity is a crosspost from another system, this property specifies - # the ID of the original activity. - # Corresponds to the JSON property `crosspostSource` - # @return [String] - attr_accessor :crosspost_source - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Latitude and longitude where this activity occurred. Format is latitude - # followed by longitude, space separated. - # Corresponds to the JSON property `geocode` - # @return [String] - attr_accessor :geocode - - # The ID of this activity. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this resource as an activity. Value: "plus#activity". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The location where this activity occurred. - # Corresponds to the JSON property `location` - # @return [Google::Apis::PlusV1::Place] - attr_accessor :location - - # The object of this activity. - # Corresponds to the JSON property `object` - # @return [Google::Apis::PlusV1::Activity::Object] - attr_accessor :object - - # ID of the place where this activity occurred. - # Corresponds to the JSON property `placeId` - # @return [String] - attr_accessor :place_id - - # Name of the place where this activity occurred. - # Corresponds to the JSON property `placeName` - # @return [String] - attr_accessor :place_name - - # The service provider that initially published this activity. - # Corresponds to the JSON property `provider` - # @return [Google::Apis::PlusV1::Activity::Provider] - attr_accessor :provider - - # The time at which this activity was initially published. Formatted as an RFC - # 3339 timestamp. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # Radius, in meters, of the region where this activity occurred, centered at the - # latitude and longitude identified in geocode. - # Corresponds to the JSON property `radius` - # @return [String] - attr_accessor :radius - - # Title of this activity. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time at which this activity was last updated. Formatted as an RFC 3339 - # timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # The link to this activity. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # This activity's verb, which indicates the action that was performed. Possible - # values include, but are not limited to, the following values: - # - "post" - Publish content to the stream. - # - "share" - Reshare an activity. - # Corresponds to the JSON property `verb` - # @return [String] - attr_accessor :verb - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access = args[:access] unless args[:access].nil? - @actor = args[:actor] unless args[:actor].nil? - @address = args[:address] unless args[:address].nil? - @annotation = args[:annotation] unless args[:annotation].nil? - @crosspost_source = args[:crosspost_source] unless args[:crosspost_source].nil? - @etag = args[:etag] unless args[:etag].nil? - @geocode = args[:geocode] unless args[:geocode].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @location = args[:location] unless args[:location].nil? - @object = args[:object] unless args[:object].nil? - @place_id = args[:place_id] unless args[:place_id].nil? - @place_name = args[:place_name] unless args[:place_name].nil? - @provider = args[:provider] unless args[:provider].nil? - @published = args[:published] unless args[:published].nil? - @radius = args[:radius] unless args[:radius].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - @url = args[:url] unless args[:url].nil? - @verb = args[:verb] unless args[:verb].nil? - end - - # The person who performed this activity. - class Actor - include Google::Apis::Core::Hashable - - # The name of the actor, suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the actor's Person resource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The image representation of the actor. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusV1::Activity::Actor::Image] - attr_accessor :image - - # An object representation of the individual components of name. - # Corresponds to the JSON property `name` - # @return [Google::Apis::PlusV1::Activity::Actor::Name] - attr_accessor :name - - # The link to the actor's Google profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @name = args[:name] unless args[:name].nil? - @url = args[:url] unless args[:url].nil? - end - - # The image representation of the actor. - class Image - include Google::Apis::Core::Hashable - - # The URL of the actor's profile photo. To resize the image and crop it to a - # square, append the query string ?sz=x, where x is the dimension in pixels of - # each side. - # 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 - - # An object representation of the individual components of name. - class Name - include Google::Apis::Core::Hashable - - # The family name ("last name") of the actor. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The given name ("first name") of the actor. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @family_name = args[:family_name] unless args[:family_name].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - end - end - end - - # The object of this activity. - class Object - include Google::Apis::Core::Hashable - - # If this activity's object is itself another activity, such as when a person - # reshares an activity, this property specifies the original activity's actor. - # Corresponds to the JSON property `actor` - # @return [Google::Apis::PlusV1::Activity::Object::Actor] - attr_accessor :actor - - # The media objects attached to this activity. - # Corresponds to the JSON property `attachments` - # @return [Array] - attr_accessor :attachments - - # The HTML-formatted content, which is suitable for display. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The ID of the object. When resharing an activity, this is the ID of the - # activity that is being reshared. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of the object. Possible values include, but are not limited to, the - # following values: - # - "note" - Textual content. - # - "activity" - A Google+ activity. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # The content (text) as provided by the author, which is stored without any HTML - # formatting. When creating or updating an activity, this value must be supplied - # as plain text in the request. - # Corresponds to the JSON property `originalContent` - # @return [String] - attr_accessor :original_content - - # People who +1'd this activity. - # Corresponds to the JSON property `plusoners` - # @return [Google::Apis::PlusV1::Activity::Object::Plusoners] - attr_accessor :plusoners - - # Comments in reply to this activity. - # Corresponds to the JSON property `replies` - # @return [Google::Apis::PlusV1::Activity::Object::Replies] - attr_accessor :replies - - # People who reshared this activity. - # Corresponds to the JSON property `resharers` - # @return [Google::Apis::PlusV1::Activity::Object::Resharers] - attr_accessor :resharers - - # The URL that points to the linked resource. - # 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) - @actor = args[:actor] unless args[:actor].nil? - @attachments = args[:attachments] unless args[:attachments].nil? - @content = args[:content] unless args[:content].nil? - @id = args[:id] unless args[:id].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @original_content = args[:original_content] unless args[:original_content].nil? - @plusoners = args[:plusoners] unless args[:plusoners].nil? - @replies = args[:replies] unless args[:replies].nil? - @resharers = args[:resharers] unless args[:resharers].nil? - @url = args[:url] unless args[:url].nil? - end - - # If this activity's object is itself another activity, such as when a person - # reshares an activity, this property specifies the original activity's actor. - class Actor - include Google::Apis::Core::Hashable - - # The original actor's name, which is suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # ID of the original actor. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The image representation of the original actor. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusV1::Activity::Object::Actor::Image] - attr_accessor :image - - # A link to the original actor's Google profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The image representation of the original actor. - class Image - include Google::Apis::Core::Hashable - - # A URL that points to a thumbnail photo of the original actor. - # 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 - end - - # - class Attachment - include Google::Apis::Core::Hashable - - # If the attachment is an article, this property contains a snippet of text from - # the article. It can also include descriptions for other types. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The title of the attachment, such as a photo caption or an article title. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # If the attachment is a video, the embeddable link. - # Corresponds to the JSON property `embed` - # @return [Google::Apis::PlusV1::Activity::Object::Attachment::Embed] - attr_accessor :embed - - # The full image URL for photo attachments. - # Corresponds to the JSON property `fullImage` - # @return [Google::Apis::PlusV1::Activity::Object::Attachment::FullImage] - attr_accessor :full_image - - # The ID of the attachment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The preview image for photos or videos. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusV1::Activity::Object::Attachment::Image] - attr_accessor :image - - # The type of media object. Possible values include, but are not limited to, the - # following values: - # - "photo" - A photo. - # - "album" - A photo album. - # - "video" - A video. - # - "article" - An article, specified by a link. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # If the attachment is an album, this property is a list of potential additional - # thumbnails from the album. - # Corresponds to the JSON property `thumbnails` - # @return [Array] - attr_accessor :thumbnails - - # The link to the attachment, which should be of type text/html. - # 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) - @content = args[:content] unless args[:content].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @embed = args[:embed] unless args[:embed].nil? - @full_image = args[:full_image] unless args[:full_image].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @thumbnails = args[:thumbnails] unless args[:thumbnails].nil? - @url = args[:url] unless args[:url].nil? - end - - # If the attachment is a video, the embeddable link. - class Embed - include Google::Apis::Core::Hashable - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # URL of the link. - # 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) - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # The full image URL for photo attachments. - class FullImage - include Google::Apis::Core::Hashable - - # The height, in pixels, of the linked resource. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # URL of the image. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width, in pixels, of the linked resource. - # 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? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # The preview image for photos or videos. - class Image - include Google::Apis::Core::Hashable - - # The height, in pixels, of the linked resource. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Image URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width, in pixels, of the linked resource. - # 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? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - - # - class Thumbnail - include Google::Apis::Core::Hashable - - # Potential name of the thumbnail. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Image resource. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusV1::Activity::Object::Attachment::Thumbnail::Image] - attr_accessor :image - - # URL of the webpage containing the image. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # Image resource. - class Image - include Google::Apis::Core::Hashable - - # The height, in pixels, of the linked resource. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Media type of the link. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Image url. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width, in pixels, of the linked resource. - # 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? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - end - - # People who +1'd this activity. - class Plusoners - include Google::Apis::Core::Hashable - - # The URL for the collection of people who +1'd this activity. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Total number of people who +1'd this activity. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # Comments in reply to this activity. - class Replies - include Google::Apis::Core::Hashable - - # The URL for the collection of comments in reply to this activity. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Total number of comments on this activity. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # People who reshared this activity. - class Resharers - include Google::Apis::Core::Hashable - - # The URL for the collection of resharers. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Total number of people who reshared this activity. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @self_link = args[:self_link] unless args[:self_link].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - - # The service provider that initially published this activity. - class Provider - include Google::Apis::Core::Hashable - - # Name of the service provider. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] unless args[:title].nil? - end - end - end - - # - class ActivityFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of this collection of activities. Deprecated. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The activities in this page of results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of activities. Value: "plus# - # activityFeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to the next page of activities. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Link to this activity resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The title of this collection of activities, which is a truncated portion of - # the content. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time at which this collection of activities was last updated. Formatted as - # an RFC 3339 timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class Comment - include Google::Apis::Core::Hashable - - # The person who posted this comment. - # Corresponds to the JSON property `actor` - # @return [Google::Apis::PlusV1::Comment::Actor] - attr_accessor :actor - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of this comment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The activity this comment replied to. - # Corresponds to the JSON property `inReplyTo` - # @return [Array] - attr_accessor :in_reply_to - - # Identifies this resource as a comment. Value: "plus#comment". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The object of this comment. - # Corresponds to the JSON property `object` - # @return [Google::Apis::PlusV1::Comment::Object] - attr_accessor :object - - # People who +1'd this comment. - # Corresponds to the JSON property `plusoners` - # @return [Google::Apis::PlusV1::Comment::Plusoners] - attr_accessor :plusoners - - # The time at which this comment was initially published. Formatted as an RFC - # 3339 timestamp. - # Corresponds to the JSON property `published` - # @return [DateTime] - attr_accessor :published - - # Link to this comment resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The time at which this comment was last updated. Formatted as an RFC 3339 - # timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - # This comment's verb, indicating what action was performed. Possible values are: - # - # - "post" - Publish content to the stream. - # Corresponds to the JSON property `verb` - # @return [String] - attr_accessor :verb - - 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? - @id = args[:id] unless args[:id].nil? - @in_reply_to = args[:in_reply_to] unless args[:in_reply_to].nil? - @kind = args[:kind] unless args[:kind].nil? - @object = args[:object] unless args[:object].nil? - @plusoners = args[:plusoners] unless args[:plusoners].nil? - @published = args[:published] unless args[:published].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @updated = args[:updated] unless args[:updated].nil? - @verb = args[:verb] unless args[:verb].nil? - end - - # The person who posted this comment. - class Actor - include Google::Apis::Core::Hashable - - # The name of this actor, suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the actor. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The image representation of this actor. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusV1::Comment::Actor::Image] - attr_accessor :image - - # A link to the Person resource for this actor. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @url = args[:url] unless args[:url].nil? - end - - # The image representation of this actor. - class Image - include Google::Apis::Core::Hashable - - # The URL of the actor's profile photo. To resize the image and crop it to a - # square, append the query string ?sz=x, where x is the dimension in pixels of - # each side. - # 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 - end - - # - class InReplyTo - include Google::Apis::Core::Hashable - - # The ID of the activity. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The URL of the activity. - # 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) - @id = args[:id] unless args[:id].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # The object of this comment. - class Object - include Google::Apis::Core::Hashable - - # The HTML-formatted content, suitable for display. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The object type of this comment. Possible values are: - # - "comment" - A comment in reply to an activity. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # The content (text) as provided by the author, stored without any HTML - # formatting. When creating or updating a comment, this value must be supplied - # as plain text in the request. - # Corresponds to the JSON property `originalContent` - # @return [String] - attr_accessor :original_content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content = args[:content] unless args[:content].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @original_content = args[:original_content] unless args[:original_content].nil? - end - end - - # People who +1'd this comment. - class Plusoners - include Google::Apis::Core::Hashable - - # Total number of people who +1'd this comment. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - - # - class CommentFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of this collection of comments. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The comments in this page of results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of comments. Value: "plus#commentFeed" - # . - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to the next page of activities. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The title of this collection of comments. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time at which this collection of comments was last updated. Formatted as - # an RFC 3339 timestamp. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class ItemScope - include Google::Apis::Core::Hashable - - # The subject matter of the content. - # Corresponds to the JSON property `about` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :about - - # An additional name for a Person, can be used for a middle name. - # Corresponds to the JSON property `additionalName` - # @return [Array] - attr_accessor :additional_name - - # Postal address. - # Corresponds to the JSON property `address` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :address - - # Address country. - # Corresponds to the JSON property `addressCountry` - # @return [String] - attr_accessor :address_country - - # Address locality. - # Corresponds to the JSON property `addressLocality` - # @return [String] - attr_accessor :address_locality - - # Address region. - # Corresponds to the JSON property `addressRegion` - # @return [String] - attr_accessor :address_region - - # The encoding. - # Corresponds to the JSON property `associated_media` - # @return [Array] - attr_accessor :associated_media - - # Number of attendees. - # Corresponds to the JSON property `attendeeCount` - # @return [Fixnum] - attr_accessor :attendee_count - - # A person attending the event. - # Corresponds to the JSON property `attendees` - # @return [Array] - attr_accessor :attendees - - # From http://schema.org/MusicRecording, the audio file. - # Corresponds to the JSON property `audio` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :audio - - # The person or persons who created this result. In the example of restaurant - # reviews, this might be the reviewer's name. - # Corresponds to the JSON property `author` - # @return [Array] - attr_accessor :author - - # Best possible rating value that a result might obtain. This property defines - # the upper bound for the ratingValue. For example, you might have a 5 star - # rating scale, you would provide 5 as the value for this property. - # Corresponds to the JSON property `bestRating` - # @return [String] - attr_accessor :best_rating - - # Date of birth. - # Corresponds to the JSON property `birthDate` - # @return [String] - attr_accessor :birth_date - - # From http://schema.org/MusicRecording, the artist that performed this - # recording. - # Corresponds to the JSON property `byArtist` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :by_artist - - # The caption for this object. - # Corresponds to the JSON property `caption` - # @return [String] - attr_accessor :caption - - # File size in (mega/kilo) bytes. - # Corresponds to the JSON property `contentSize` - # @return [String] - attr_accessor :content_size - - # Actual bytes of the media object, for example the image file or video file. - # Corresponds to the JSON property `contentUrl` - # @return [String] - attr_accessor :content_url - - # A list of contributors to this result. - # Corresponds to the JSON property `contributor` - # @return [Array] - attr_accessor :contributor - - # The date the result was created such as the date that a review was first - # created. - # Corresponds to the JSON property `dateCreated` - # @return [String] - attr_accessor :date_created - - # The date the result was last modified such as the date that a review was last - # edited. - # Corresponds to the JSON property `dateModified` - # @return [String] - attr_accessor :date_modified - - # The initial date that the result was published. For example, a user writes a - # comment on a blog, which has a result.dateCreated of when they submit it. If - # the blog users comment moderation, the result.datePublished value would match - # the date when the owner approved the message. - # Corresponds to the JSON property `datePublished` - # @return [String] - attr_accessor :date_published - - # The string that describes the content of the result. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The duration of the item (movie, audio recording, event, etc.) in ISO 8601 - # date format. - # Corresponds to the JSON property `duration` - # @return [String] - attr_accessor :duration - - # A URL pointing to a player for a specific video. In general, this is the - # information in the src element of an embed tag and should not be the same as - # the content of the loc tag. - # Corresponds to the JSON property `embedUrl` - # @return [String] - attr_accessor :embed_url - - # The end date and time of the event (in ISO 8601 date format). - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - # Family name. This property can be used with givenName instead of the name - # property. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # Gender of the person. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # Geo coordinates. - # Corresponds to the JSON property `geo` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :geo - - # Given name. This property can be used with familyName instead of the name - # property. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # The height of the media object. - # Corresponds to the JSON property `height` - # @return [String] - attr_accessor :height - - # An identifier for the object. Your app can choose how to identify objects. The - # object.id is required if you are writing an action that does not have a - # corresponding web page or object.url property. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A URL to the image that represents this result. For example, if a user writes - # a review of a restaurant and attaches a photo of their meal, you might use - # that photo as the result.image. - # Corresponds to the JSON property `image` - # @return [String] - attr_accessor :image - - # From http://schema.org/MusicRecording, which album a song is in. - # Corresponds to the JSON property `inAlbum` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :in_album - - # Identifies this resource as an itemScope. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Latitude. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The location of the event or organization. - # Corresponds to the JSON property `location` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :location - - # Longitude. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - # The name of the result. In the example of a restaurant review, this might be - # the summary the user gave their review such as "Great ambiance, but overpriced. - # " - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Property of http://schema.org/TVEpisode indicating which series the episode - # belongs to. - # Corresponds to the JSON property `partOfTVSeries` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :part_of_tv_series - - # The main performer or performers of the event-for example, a presenter, - # musician, or actor. - # Corresponds to the JSON property `performers` - # @return [Array] - attr_accessor :performers - - # Player type that is required. For example: Flash or Silverlight. - # Corresponds to the JSON property `playerType` - # @return [String] - attr_accessor :player_type - - # Post office box number. - # Corresponds to the JSON property `postOfficeBoxNumber` - # @return [String] - attr_accessor :post_office_box_number - - # Postal code. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # Rating value. - # Corresponds to the JSON property `ratingValue` - # @return [String] - attr_accessor :rating_value - - # Review rating. - # Corresponds to the JSON property `reviewRating` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :review_rating - - # The start date and time of the event (in ISO 8601 date format). - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - # Street address. - # Corresponds to the JSON property `streetAddress` - # @return [String] - attr_accessor :street_address - - # The text that is the result of the app activity. For example, if a user leaves - # a review of a restaurant, this might be the text of the review. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - # Thumbnail image for an image or video. - # Corresponds to the JSON property `thumbnail` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :thumbnail - - # A URL to a thumbnail image that represents this result. - # Corresponds to the JSON property `thumbnailUrl` - # @return [String] - attr_accessor :thumbnail_url - - # The exchange traded instrument associated with a Corporation object. The - # tickerSymbol is expressed as an exchange and an instrument name separated by a - # space character. For the exchange component of the tickerSymbol attribute, we - # recommend using the controlled vocabulary of Market Identifier Codes (MIC) - # specified in ISO15022. - # Corresponds to the JSON property `tickerSymbol` - # @return [String] - attr_accessor :ticker_symbol - - # The schema.org URL that best describes the referenced object and matches the - # type of moment. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The URL that points to the result object. For example, a permalink directly to - # a restaurant reviewer's comment. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width of the media object. - # Corresponds to the JSON property `width` - # @return [String] - attr_accessor :width - - # Worst possible rating value that a result might obtain. This property defines - # the lower bound for the ratingValue. - # Corresponds to the JSON property `worstRating` - # @return [String] - attr_accessor :worst_rating - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @about = args[:about] unless args[:about].nil? - @additional_name = args[:additional_name] unless args[:additional_name].nil? - @address = args[:address] unless args[:address].nil? - @address_country = args[:address_country] unless args[:address_country].nil? - @address_locality = args[:address_locality] unless args[:address_locality].nil? - @address_region = args[:address_region] unless args[:address_region].nil? - @associated_media = args[:associated_media] unless args[:associated_media].nil? - @attendee_count = args[:attendee_count] unless args[:attendee_count].nil? - @attendees = args[:attendees] unless args[:attendees].nil? - @audio = args[:audio] unless args[:audio].nil? - @author = args[:author] unless args[:author].nil? - @best_rating = args[:best_rating] unless args[:best_rating].nil? - @birth_date = args[:birth_date] unless args[:birth_date].nil? - @by_artist = args[:by_artist] unless args[:by_artist].nil? - @caption = args[:caption] unless args[:caption].nil? - @content_size = args[:content_size] unless args[:content_size].nil? - @content_url = args[:content_url] unless args[:content_url].nil? - @contributor = args[:contributor] unless args[:contributor].nil? - @date_created = args[:date_created] unless args[:date_created].nil? - @date_modified = args[:date_modified] unless args[:date_modified].nil? - @date_published = args[:date_published] unless args[:date_published].nil? - @description = args[:description] unless args[:description].nil? - @duration = args[:duration] unless args[:duration].nil? - @embed_url = args[:embed_url] unless args[:embed_url].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @family_name = args[:family_name] unless args[:family_name].nil? - @gender = args[:gender] unless args[:gender].nil? - @geo = args[:geo] unless args[:geo].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - @height = args[:height] unless args[:height].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @in_album = args[:in_album] unless args[:in_album].nil? - @kind = args[:kind] unless args[:kind].nil? - @latitude = args[:latitude] unless args[:latitude].nil? - @location = args[:location] unless args[:location].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - @name = args[:name] unless args[:name].nil? - @part_of_tv_series = args[:part_of_tv_series] unless args[:part_of_tv_series].nil? - @performers = args[:performers] unless args[:performers].nil? - @player_type = args[:player_type] unless args[:player_type].nil? - @post_office_box_number = args[:post_office_box_number] unless args[:post_office_box_number].nil? - @postal_code = args[:postal_code] unless args[:postal_code].nil? - @rating_value = args[:rating_value] unless args[:rating_value].nil? - @review_rating = args[:review_rating] unless args[:review_rating].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @street_address = args[:street_address] unless args[:street_address].nil? - @text = args[:text] unless args[:text].nil? - @thumbnail = args[:thumbnail] unless args[:thumbnail].nil? - @thumbnail_url = args[:thumbnail_url] unless args[:thumbnail_url].nil? - @ticker_symbol = args[:ticker_symbol] unless args[:ticker_symbol].nil? - @type = args[:type] unless args[:type].nil? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - @worst_rating = args[:worst_rating] unless args[:worst_rating].nil? - end - end - - # - class Moment - include Google::Apis::Core::Hashable - - # The moment ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this resource as a moment. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The object on which the action was performed. Specifying this is equivalent - # with specifying "target". Note that responses from the server will use the " - # target" field instead for backward-compatibility with older clients. - # Corresponds to the JSON property `object` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :object - - # The object generated by performing the action on the object. For example, a - # user writes a review of a restaurant, the object is the restaurant and the - # result is the review. - # Corresponds to the JSON property `result` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :result - - # Time stamp of when the action occurred in RFC3339 format. - # Corresponds to the JSON property `startDate` - # @return [DateTime] - attr_accessor :start_date - - # The object on which the action was performed. - # Corresponds to the JSON property `target` - # @return [Google::Apis::PlusV1::ItemScope] - attr_accessor :target - - # The schema.org type for the type of moment to write. For example, http:// - # schema.org/AddAction. Note that responses from the server will use the Google - # schema type instead for backward-compatibility with older clients. For example, - # http://schemas.google.com/AddActivity. - # 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? - @object = args[:object] unless args[:object].nil? - @result = args[:result] unless args[:result].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @target = args[:target] unless args[:target].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class MomentsFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The moments in this page of results. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of moments. Value: "plus#momentsFeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Link to the next page of moments. - # Corresponds to the JSON property `nextLink` - # @return [String] - attr_accessor :next_link - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Link to this page of moments. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The title of this collection of moments. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The RFC 339 timestamp for when this collection of moments was last updated. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_link = args[:next_link] unless args[:next_link].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class PeopleFeed - include Google::Apis::Core::Hashable - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The people in this page of results. Each item includes the id, displayName, - # image, and url for the person. To retrieve additional profile data, see the - # people.get method. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies this resource as a collection of people. Value: "plus#peopleFeed". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Link to this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The title of this collection of people. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The total number of people available in this list. The number of people in a - # response might be smaller due to paging. This might not be set for all - # collections. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - - # - class Person - include Google::Apis::Core::Hashable - - # A short biography for this person. - # Corresponds to the JSON property `aboutMe` - # @return [String] - attr_accessor :about_me - - # The age range of the person. Valid ranges are 17 or younger, 18 to 20, and 21 - # or older. Age is determined from the user's birthday using Western age - # reckoning. - # Corresponds to the JSON property `ageRange` - # @return [Google::Apis::PlusV1::Person::AgeRange] - attr_accessor :age_range - - # The person's date of birth, represented as YYYY-MM-DD. - # Corresponds to the JSON property `birthday` - # @return [String] - attr_accessor :birthday - - # The "bragging rights" line of this person. - # Corresponds to the JSON property `braggingRights` - # @return [String] - attr_accessor :bragging_rights - - # For followers who are visible, the number of people who have added this person - # or page to a circle. - # Corresponds to the JSON property `circledByCount` - # @return [Fixnum] - attr_accessor :circled_by_count - - # The cover photo content. - # Corresponds to the JSON property `cover` - # @return [Google::Apis::PlusV1::Person::Cover] - attr_accessor :cover - - # (this field is not currently used) - # Corresponds to the JSON property `currentLocation` - # @return [String] - attr_accessor :current_location - - # The name of this person, which is suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The hosted domain name for the user's Google Apps account. For instance, - # example.com. The plus.profile.emails.read or email scope is needed to get this - # domain name. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # A list of email addresses that this person has, including their Google account - # email address, and the public verified email addresses on their Google+ - # profile. The plus.profile.emails.read scope is needed to retrieve these email - # addresses, or the email scope can be used to retrieve just the Google account - # email address. - # Corresponds to the JSON property `emails` - # @return [Array] - attr_accessor :emails - - # ETag of this response for caching purposes. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The person's gender. Possible values include, but are not limited to, the - # following values: - # - "male" - Male gender. - # - "female" - Female gender. - # - "other" - Other. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # The ID of this person. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The representation of the person's profile photo. - # Corresponds to the JSON property `image` - # @return [Google::Apis::PlusV1::Person::Image] - attr_accessor :image - - # Whether this user has signed up for Google+. - # Corresponds to the JSON property `isPlusUser` - # @return [Boolean] - attr_accessor :is_plus_user - alias_method :is_plus_user?, :is_plus_user - - # Identifies this resource as a person. Value: "plus#person". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The user's preferred language for rendering. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # An object representation of the individual components of a person's name. - # Corresponds to the JSON property `name` - # @return [Google::Apis::PlusV1::Person::Name] - attr_accessor :name - - # The nickname of this person. - # Corresponds to the JSON property `nickname` - # @return [String] - attr_accessor :nickname - - # Type of person within Google+. Possible values include, but are not limited to, - # the following values: - # - "person" - represents an actual person. - # - "page" - represents a page. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # The occupation of this person. - # Corresponds to the JSON property `occupation` - # @return [String] - attr_accessor :occupation - - # A list of current or past organizations with which this person is associated. - # Corresponds to the JSON property `organizations` - # @return [Array] - attr_accessor :organizations - - # A list of places where this person has lived. - # Corresponds to the JSON property `placesLived` - # @return [Array] - attr_accessor :places_lived - - # If a Google+ Page, the number of people who have +1'd this page. - # Corresponds to the JSON property `plusOneCount` - # @return [Fixnum] - attr_accessor :plus_one_count - - # The person's relationship status. Possible values include, but are not limited - # to, the following values: - # - "single" - Person is single. - # - "in_a_relationship" - Person is in a relationship. - # - "engaged" - Person is engaged. - # - "married" - Person is married. - # - "its_complicated" - The relationship is complicated. - # - "open_relationship" - Person is in an open relationship. - # - "widowed" - Person is widowed. - # - "in_domestic_partnership" - Person is in a domestic partnership. - # - "in_civil_union" - Person is in a civil union. - # Corresponds to the JSON property `relationshipStatus` - # @return [String] - attr_accessor :relationship_status - - # The person's skills. - # Corresponds to the JSON property `skills` - # @return [String] - attr_accessor :skills - - # The brief description (tagline) of this person. - # Corresponds to the JSON property `tagline` - # @return [String] - attr_accessor :tagline - - # The URL of this person's profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # A list of URLs for this person. - # Corresponds to the JSON property `urls` - # @return [Array] - attr_accessor :urls - - # Whether the person or Google+ Page has been verified. - # Corresponds to the JSON property `verified` - # @return [Boolean] - attr_accessor :verified - alias_method :verified?, :verified - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @about_me = args[:about_me] unless args[:about_me].nil? - @age_range = args[:age_range] unless args[:age_range].nil? - @birthday = args[:birthday] unless args[:birthday].nil? - @bragging_rights = args[:bragging_rights] unless args[:bragging_rights].nil? - @circled_by_count = args[:circled_by_count] unless args[:circled_by_count].nil? - @cover = args[:cover] unless args[:cover].nil? - @current_location = args[:current_location] unless args[:current_location].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @domain = args[:domain] unless args[:domain].nil? - @emails = args[:emails] unless args[:emails].nil? - @etag = args[:etag] unless args[:etag].nil? - @gender = args[:gender] unless args[:gender].nil? - @id = args[:id] unless args[:id].nil? - @image = args[:image] unless args[:image].nil? - @is_plus_user = args[:is_plus_user] unless args[:is_plus_user].nil? - @kind = args[:kind] unless args[:kind].nil? - @language = args[:language] unless args[:language].nil? - @name = args[:name] unless args[:name].nil? - @nickname = args[:nickname] unless args[:nickname].nil? - @object_type = args[:object_type] unless args[:object_type].nil? - @occupation = args[:occupation] unless args[:occupation].nil? - @organizations = args[:organizations] unless args[:organizations].nil? - @places_lived = args[:places_lived] unless args[:places_lived].nil? - @plus_one_count = args[:plus_one_count] unless args[:plus_one_count].nil? - @relationship_status = args[:relationship_status] unless args[:relationship_status].nil? - @skills = args[:skills] unless args[:skills].nil? - @tagline = args[:tagline] unless args[:tagline].nil? - @url = args[:url] unless args[:url].nil? - @urls = args[:urls] unless args[:urls].nil? - @verified = args[:verified] unless args[:verified].nil? - end - - # The age range of the person. Valid ranges are 17 or younger, 18 to 20, and 21 - # or older. Age is determined from the user's birthday using Western age - # reckoning. - class AgeRange - include Google::Apis::Core::Hashable - - # The age range's upper bound, if any. Possible values include, but are not - # limited to, the following: - # - "17" - for age 17 - # - "20" - for age 20 - # Corresponds to the JSON property `max` - # @return [Fixnum] - attr_accessor :max - - # The age range's lower bound, if any. Possible values include, but are not - # limited to, the following: - # - "21" - for age 21 - # - "18" - for age 18 - # Corresponds to the JSON property `min` - # @return [Fixnum] - attr_accessor :min - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max = args[:max] unless args[:max].nil? - @min = args[:min] unless args[:min].nil? - end - end - - # The cover photo content. - class Cover - include Google::Apis::Core::Hashable - - # Extra information about the cover photo. - # Corresponds to the JSON property `coverInfo` - # @return [Google::Apis::PlusV1::Person::Cover::CoverInfo] - attr_accessor :cover_info - - # The person's primary cover image. - # Corresponds to the JSON property `coverPhoto` - # @return [Google::Apis::PlusV1::Person::Cover::CoverPhoto] - attr_accessor :cover_photo - - # The layout of the cover art. Possible values include, but are not limited to, - # the following values: - # - "banner" - One large image banner. - # Corresponds to the JSON property `layout` - # @return [String] - attr_accessor :layout - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cover_info = args[:cover_info] unless args[:cover_info].nil? - @cover_photo = args[:cover_photo] unless args[:cover_photo].nil? - @layout = args[:layout] unless args[:layout].nil? - end - - # Extra information about the cover photo. - class CoverInfo - include Google::Apis::Core::Hashable - - # The difference between the left position of the cover image and the actual - # displayed cover image. Only valid for banner layout. - # Corresponds to the JSON property `leftImageOffset` - # @return [Fixnum] - attr_accessor :left_image_offset - - # The difference between the top position of the cover image and the actual - # displayed cover image. Only valid for banner layout. - # Corresponds to the JSON property `topImageOffset` - # @return [Fixnum] - attr_accessor :top_image_offset - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left_image_offset = args[:left_image_offset] unless args[:left_image_offset].nil? - @top_image_offset = args[:top_image_offset] unless args[:top_image_offset].nil? - end - end - - # The person's primary cover image. - class CoverPhoto - include Google::Apis::Core::Hashable - - # The height of the image. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The URL of the image. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The width of the image. - # 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? - @url = args[:url] unless args[:url].nil? - @width = args[:width] unless args[:width].nil? - end - end - end - - # - class Email - include Google::Apis::Core::Hashable - - # The type of address. Possible values include, but are not limited to, the - # following values: - # - "account" - Google account email address. - # - "home" - Home email address. - # - "work" - Work email address. - # - "other" - Other. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The email address. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # The representation of the person's profile photo. - class Image - include Google::Apis::Core::Hashable - - # Whether the person's profile photo is the default one - # Corresponds to the JSON property `isDefault` - # @return [Boolean] - attr_accessor :is_default - alias_method :is_default?, :is_default - - # The URL of the person's profile photo. To resize the image and crop it to a - # square, append the query string ?sz=x, where x is the dimension in pixels of - # each side. - # 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) - @is_default = args[:is_default] unless args[:is_default].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # An object representation of the individual components of a person's name. - class Name - include Google::Apis::Core::Hashable - - # The family name (last name) of this person. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The full name of this person, including middle names, suffixes, etc. - # Corresponds to the JSON property `formatted` - # @return [String] - attr_accessor :formatted - - # The given name (first name) of this person. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # The honorific prefixes (such as "Dr." or "Mrs.") for this person. - # Corresponds to the JSON property `honorificPrefix` - # @return [String] - attr_accessor :honorific_prefix - - # The honorific suffixes (such as "Jr.") for this person. - # Corresponds to the JSON property `honorificSuffix` - # @return [String] - attr_accessor :honorific_suffix - - # The middle name of this person. - # Corresponds to the JSON property `middleName` - # @return [String] - attr_accessor :middle_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @family_name = args[:family_name] unless args[:family_name].nil? - @formatted = args[:formatted] unless args[:formatted].nil? - @given_name = args[:given_name] unless args[:given_name].nil? - @honorific_prefix = args[:honorific_prefix] unless args[:honorific_prefix].nil? - @honorific_suffix = args[:honorific_suffix] unless args[:honorific_suffix].nil? - @middle_name = args[:middle_name] unless args[:middle_name].nil? - end - end - - # - class Organization - include Google::Apis::Core::Hashable - - # The department within the organization. Deprecated. - # Corresponds to the JSON property `department` - # @return [String] - attr_accessor :department - - # A short description of the person's role in this organization. Deprecated. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The date that the person left this organization. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - # The location of this organization. Deprecated. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # The name of the organization. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # If "true", indicates this organization is the person's primary one, which is - # typically interpreted as the current one. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # The date that the person joined this organization. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - # The person's job title or role within the organization. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The type of organization. Possible values include, but are not limited to, the - # following values: - # - "work" - Work. - # - "school" - School. - # 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) - @department = args[:department] unless args[:department].nil? - @description = args[:description] unless args[:description].nil? - @end_date = args[:end_date] unless args[:end_date].nil? - @location = args[:location] unless args[:location].nil? - @name = args[:name] unless args[:name].nil? - @primary = args[:primary] unless args[:primary].nil? - @start_date = args[:start_date] unless args[:start_date].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class PlacesLived - include Google::Apis::Core::Hashable - - # If "true", this place of residence is this person's primary residence. - # Corresponds to the JSON property `primary` - # @return [Boolean] - attr_accessor :primary - alias_method :primary?, :primary - - # A place where this person has lived. For example: "Seattle, WA", "Near Toronto" - # . - # 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) - @primary = args[:primary] unless args[:primary].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # - class Url - include Google::Apis::Core::Hashable - - # The label of the URL. - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - - # The type of URL. Possible values include, but are not limited to, the - # following values: - # - "otherProfile" - URL for another profile. - # - "contributor" - URL to a site for which this person is a contributor. - # - "website" - URL for this Google+ Page's primary website. - # - "other" - Other URL. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The URL 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) - @label = args[:label] unless args[:label].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - - # - class Place - include Google::Apis::Core::Hashable - - # The physical address of the place. - # Corresponds to the JSON property `address` - # @return [Google::Apis::PlusV1::Place::Address] - attr_accessor :address - - # The display name of the place. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The id of the place. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this resource as a place. Value: "plus#place". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The position of the place. - # Corresponds to the JSON property `position` - # @return [Google::Apis::PlusV1::Place::Position] - attr_accessor :position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address = args[:address] unless args[:address].nil? - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @position = args[:position] unless args[:position].nil? - end - - # The physical address of the place. - class Address - include Google::Apis::Core::Hashable - - # The formatted address for display. - # Corresponds to the JSON property `formatted` - # @return [String] - attr_accessor :formatted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted = args[:formatted] unless args[:formatted].nil? - end - end - - # The position of the place. - class Position - include Google::Apis::Core::Hashable - - # The latitude of this position. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude of this position. - # 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) - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - end - end - end - - # - class PlusAclentryResource - include Google::Apis::Core::Hashable - - # A descriptive name for this entry. Suitable for display. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The ID of the entry. For entries of type "person" or "circle", this is the ID - # of the resource. For other types, this property is not set. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of entry describing to whom access is granted. Possible values are: - # - "person" - Access to an individual. - # - "circle" - Access to members of a circle. - # - "myCircles" - Access to members of all the person's circles. - # - "extendedCircles" - Access to members of all the person's circles, plus all - # of the people in their circles. - # - "domain" - Access to members of the person's Google Apps domain. - # - "public" - Access to anyone on the web. - # 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) - @display_name = args[:display_name] unless args[:display_name].nil? - @id = args[:id] unless args[:id].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - end -end diff --git a/generated/google/apis/plus_v1/representations.rb b/generated/google/apis/plus_v1/representations.rb deleted file mode 100644 index 9138fcfdc..000000000 --- a/generated/google/apis/plus_v1/representations.rb +++ /dev/null @@ -1,812 +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 PlusV1 - - class Acl - 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 - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Name - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Object - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Actor - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Attachment - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Embed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FullImage - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Thumbnail - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Replies - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Resharers - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Provider - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ActivityFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Comment - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Actor - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class InReplyTo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Object - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CommentFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ItemScope - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Moment - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MomentsFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PeopleFeed - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Person - class Representation < Google::Apis::Core::JsonRepresentation; end - - class AgeRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Cover - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CoverInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CoverPhoto - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Email - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Name - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Organization - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PlacesLived - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Url - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Place - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Address - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Position - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class PlusAclentryResource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Acl - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - collection :items, as: 'items', class: Google::Apis::PlusV1::PlusAclentryResource, decorator: Google::Apis::PlusV1::PlusAclentryResource::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Activity - class Representation < Google::Apis::Core::JsonRepresentation - property :access, as: 'access', class: Google::Apis::PlusV1::Acl, decorator: Google::Apis::PlusV1::Acl::Representation - - property :actor, as: 'actor', class: Google::Apis::PlusV1::Activity::Actor, decorator: Google::Apis::PlusV1::Activity::Actor::Representation - - property :address, as: 'address' - property :annotation, as: 'annotation' - property :crosspost_source, as: 'crosspostSource' - property :etag, as: 'etag' - property :geocode, as: 'geocode' - property :id, as: 'id' - property :kind, as: 'kind' - property :location, as: 'location', class: Google::Apis::PlusV1::Place, decorator: Google::Apis::PlusV1::Place::Representation - - property :object, as: 'object', class: Google::Apis::PlusV1::Activity::Object, decorator: Google::Apis::PlusV1::Activity::Object::Representation - - property :place_id, as: 'placeId' - property :place_name, as: 'placeName' - property :provider, as: 'provider', class: Google::Apis::PlusV1::Activity::Provider, decorator: Google::Apis::PlusV1::Activity::Provider::Representation - - property :published, as: 'published', type: DateTime - - property :radius, as: 'radius' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - property :url, as: 'url' - property :verb, as: 'verb' - end - - # @private - class Actor - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusV1::Activity::Actor::Image, decorator: Google::Apis::PlusV1::Activity::Actor::Image::Representation - - property :name, as: 'name', class: Google::Apis::PlusV1::Activity::Actor::Name, decorator: Google::Apis::PlusV1::Activity::Actor::Name::Representation - - property :url, as: 'url' - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' - end - end - - # @private - class Name - class Representation < Google::Apis::Core::JsonRepresentation - property :family_name, as: 'familyName' - property :given_name, as: 'givenName' - end - end - end - - # @private - class Object - class Representation < Google::Apis::Core::JsonRepresentation - property :actor, as: 'actor', class: Google::Apis::PlusV1::Activity::Object::Actor, decorator: Google::Apis::PlusV1::Activity::Object::Actor::Representation - - collection :attachments, as: 'attachments', class: Google::Apis::PlusV1::Activity::Object::Attachment, decorator: Google::Apis::PlusV1::Activity::Object::Attachment::Representation - - property :content, as: 'content' - property :id, as: 'id' - property :object_type, as: 'objectType' - property :original_content, as: 'originalContent' - property :plusoners, as: 'plusoners', class: Google::Apis::PlusV1::Activity::Object::Plusoners, decorator: Google::Apis::PlusV1::Activity::Object::Plusoners::Representation - - property :replies, as: 'replies', class: Google::Apis::PlusV1::Activity::Object::Replies, decorator: Google::Apis::PlusV1::Activity::Object::Replies::Representation - - property :resharers, as: 'resharers', class: Google::Apis::PlusV1::Activity::Object::Resharers, decorator: Google::Apis::PlusV1::Activity::Object::Resharers::Representation - - property :url, as: 'url' - end - - # @private - class Actor - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusV1::Activity::Object::Actor::Image, decorator: Google::Apis::PlusV1::Activity::Object::Actor::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 Attachment - class Representation < Google::Apis::Core::JsonRepresentation - property :content, as: 'content' - property :display_name, as: 'displayName' - property :embed, as: 'embed', class: Google::Apis::PlusV1::Activity::Object::Attachment::Embed, decorator: Google::Apis::PlusV1::Activity::Object::Attachment::Embed::Representation - - property :full_image, as: 'fullImage', class: Google::Apis::PlusV1::Activity::Object::Attachment::FullImage, decorator: Google::Apis::PlusV1::Activity::Object::Attachment::FullImage::Representation - - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusV1::Activity::Object::Attachment::Image, decorator: Google::Apis::PlusV1::Activity::Object::Attachment::Image::Representation - - property :object_type, as: 'objectType' - collection :thumbnails, as: 'thumbnails', class: Google::Apis::PlusV1::Activity::Object::Attachment::Thumbnail, decorator: Google::Apis::PlusV1::Activity::Object::Attachment::Thumbnail::Representation - - property :url, as: 'url' - end - - # @private - class Embed - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :url, as: 'url' - end - end - - # @private - class FullImage - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - end - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - end - end - - # @private - class Thumbnail - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :image, as: 'image', class: Google::Apis::PlusV1::Activity::Object::Attachment::Thumbnail::Image, decorator: Google::Apis::PlusV1::Activity::Object::Attachment::Thumbnail::Image::Representation - - property :url, as: 'url' - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - end - end - end - end - - # @private - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation - property :self_link, as: 'selfLink' - property :total_items, as: 'totalItems' - end - end - - # @private - class Replies - class Representation < Google::Apis::Core::JsonRepresentation - property :self_link, as: 'selfLink' - property :total_items, as: 'totalItems' - end - end - - # @private - class Resharers - class Representation < Google::Apis::Core::JsonRepresentation - property :self_link, as: 'selfLink' - property :total_items, as: 'totalItems' - end - end - end - - # @private - class Provider - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - end - end - end - - # @private - class ActivityFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::PlusV1::Activity, decorator: Google::Apis::PlusV1::Activity::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class Comment - class Representation < Google::Apis::Core::JsonRepresentation - property :actor, as: 'actor', class: Google::Apis::PlusV1::Comment::Actor, decorator: Google::Apis::PlusV1::Comment::Actor::Representation - - property :etag, as: 'etag' - property :id, as: 'id' - collection :in_reply_to, as: 'inReplyTo', class: Google::Apis::PlusV1::Comment::InReplyTo, decorator: Google::Apis::PlusV1::Comment::InReplyTo::Representation - - property :kind, as: 'kind' - property :object, as: 'object', class: Google::Apis::PlusV1::Comment::Object, decorator: Google::Apis::PlusV1::Comment::Object::Representation - - property :plusoners, as: 'plusoners', class: Google::Apis::PlusV1::Comment::Plusoners, decorator: Google::Apis::PlusV1::Comment::Plusoners::Representation - - property :published, as: 'published', type: DateTime - - property :self_link, as: 'selfLink' - property :updated, as: 'updated', type: DateTime - - property :verb, as: 'verb' - end - - # @private - class Actor - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusV1::Comment::Actor::Image, decorator: Google::Apis::PlusV1::Comment::Actor::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 InReplyTo - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :url, as: 'url' - end - end - - # @private - class Object - class Representation < Google::Apis::Core::JsonRepresentation - property :content, as: 'content' - property :object_type, as: 'objectType' - property :original_content, as: 'originalContent' - end - end - - # @private - class Plusoners - class Representation < Google::Apis::Core::JsonRepresentation - property :total_items, as: 'totalItems' - end - end - end - - # @private - class CommentFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::PlusV1::Comment, decorator: Google::Apis::PlusV1::Comment::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class ItemScope - class Representation < Google::Apis::Core::JsonRepresentation - property :about, as: 'about', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - collection :additional_name, as: 'additionalName' - property :address, as: 'address', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :address_country, as: 'addressCountry' - property :address_locality, as: 'addressLocality' - property :address_region, as: 'addressRegion' - collection :associated_media, as: 'associated_media', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :attendee_count, as: 'attendeeCount' - collection :attendees, as: 'attendees', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :audio, as: 'audio', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - collection :author, as: 'author', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :best_rating, as: 'bestRating' - property :birth_date, as: 'birthDate' - property :by_artist, as: 'byArtist', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :caption, as: 'caption' - property :content_size, as: 'contentSize' - property :content_url, as: 'contentUrl' - collection :contributor, as: 'contributor', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :date_created, as: 'dateCreated' - property :date_modified, as: 'dateModified' - property :date_published, as: 'datePublished' - property :description, as: 'description' - property :duration, as: 'duration' - property :embed_url, as: 'embedUrl' - property :end_date, as: 'endDate' - property :family_name, as: 'familyName' - property :gender, as: 'gender' - property :geo, as: 'geo', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :given_name, as: 'givenName' - property :height, as: 'height' - property :id, as: 'id' - property :image, as: 'image' - property :in_album, as: 'inAlbum', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :kind, as: 'kind' - property :latitude, as: 'latitude' - property :location, as: 'location', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :longitude, as: 'longitude' - property :name, as: 'name' - property :part_of_tv_series, as: 'partOfTVSeries', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - collection :performers, as: 'performers', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :player_type, as: 'playerType' - property :post_office_box_number, as: 'postOfficeBoxNumber' - property :postal_code, as: 'postalCode' - property :rating_value, as: 'ratingValue' - property :review_rating, as: 'reviewRating', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :start_date, as: 'startDate' - property :street_address, as: 'streetAddress' - property :text, as: 'text' - property :thumbnail, as: 'thumbnail', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :thumbnail_url, as: 'thumbnailUrl' - property :ticker_symbol, as: 'tickerSymbol' - property :type, as: 'type' - property :url, as: 'url' - property :width, as: 'width' - property :worst_rating, as: 'worstRating' - end - end - - # @private - class Moment - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :object, as: 'object', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :result, as: 'result', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :start_date, as: 'startDate', type: DateTime - - property :target, as: 'target', class: Google::Apis::PlusV1::ItemScope, decorator: Google::Apis::PlusV1::ItemScope::Representation - - property :type, as: 'type' - end - end - - # @private - class MomentsFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::PlusV1::Moment, decorator: Google::Apis::PlusV1::Moment::Representation - - property :kind, as: 'kind' - property :next_link, as: 'nextLink' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class PeopleFeed - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::PlusV1::Person, decorator: Google::Apis::PlusV1::Person::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :total_items, as: 'totalItems' - end - end - - # @private - class Person - class Representation < Google::Apis::Core::JsonRepresentation - property :about_me, as: 'aboutMe' - property :age_range, as: 'ageRange', class: Google::Apis::PlusV1::Person::AgeRange, decorator: Google::Apis::PlusV1::Person::AgeRange::Representation - - property :birthday, as: 'birthday' - property :bragging_rights, as: 'braggingRights' - property :circled_by_count, as: 'circledByCount' - property :cover, as: 'cover', class: Google::Apis::PlusV1::Person::Cover, decorator: Google::Apis::PlusV1::Person::Cover::Representation - - property :current_location, as: 'currentLocation' - property :display_name, as: 'displayName' - property :domain, as: 'domain' - collection :emails, as: 'emails', class: Google::Apis::PlusV1::Person::Email, decorator: Google::Apis::PlusV1::Person::Email::Representation - - property :etag, as: 'etag' - property :gender, as: 'gender' - property :id, as: 'id' - property :image, as: 'image', class: Google::Apis::PlusV1::Person::Image, decorator: Google::Apis::PlusV1::Person::Image::Representation - - property :is_plus_user, as: 'isPlusUser' - property :kind, as: 'kind' - property :language, as: 'language' - property :name, as: 'name', class: Google::Apis::PlusV1::Person::Name, decorator: Google::Apis::PlusV1::Person::Name::Representation - - property :nickname, as: 'nickname' - property :object_type, as: 'objectType' - property :occupation, as: 'occupation' - collection :organizations, as: 'organizations', class: Google::Apis::PlusV1::Person::Organization, decorator: Google::Apis::PlusV1::Person::Organization::Representation - - collection :places_lived, as: 'placesLived', class: Google::Apis::PlusV1::Person::PlacesLived, decorator: Google::Apis::PlusV1::Person::PlacesLived::Representation - - property :plus_one_count, as: 'plusOneCount' - property :relationship_status, as: 'relationshipStatus' - property :skills, as: 'skills' - property :tagline, as: 'tagline' - property :url, as: 'url' - collection :urls, as: 'urls', class: Google::Apis::PlusV1::Person::Url, decorator: Google::Apis::PlusV1::Person::Url::Representation - - property :verified, as: 'verified' - end - - # @private - class AgeRange - class Representation < Google::Apis::Core::JsonRepresentation - property :max, as: 'max' - property :min, as: 'min' - end - end - - # @private - class Cover - class Representation < Google::Apis::Core::JsonRepresentation - property :cover_info, as: 'coverInfo', class: Google::Apis::PlusV1::Person::Cover::CoverInfo, decorator: Google::Apis::PlusV1::Person::Cover::CoverInfo::Representation - - property :cover_photo, as: 'coverPhoto', class: Google::Apis::PlusV1::Person::Cover::CoverPhoto, decorator: Google::Apis::PlusV1::Person::Cover::CoverPhoto::Representation - - property :layout, as: 'layout' - end - - # @private - class CoverInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :left_image_offset, as: 'leftImageOffset' - property :top_image_offset, as: 'topImageOffset' - end - end - - # @private - class CoverPhoto - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :url, as: 'url' - property :width, as: 'width' - end - end - end - - # @private - class Email - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - - # @private - class Image - class Representation < Google::Apis::Core::JsonRepresentation - property :is_default, as: 'isDefault' - property :url, as: 'url' - end - end - - # @private - class Name - class Representation < Google::Apis::Core::JsonRepresentation - property :family_name, as: 'familyName' - property :formatted, as: 'formatted' - property :given_name, as: 'givenName' - property :honorific_prefix, as: 'honorificPrefix' - property :honorific_suffix, as: 'honorificSuffix' - property :middle_name, as: 'middleName' - end - end - - # @private - class Organization - class Representation < Google::Apis::Core::JsonRepresentation - property :department, as: 'department' - property :description, as: 'description' - property :end_date, as: 'endDate' - property :location, as: 'location' - property :name, as: 'name' - property :primary, as: 'primary' - property :start_date, as: 'startDate' - property :title, as: 'title' - property :type, as: 'type' - end - end - - # @private - class PlacesLived - class Representation < Google::Apis::Core::JsonRepresentation - property :primary, as: 'primary' - property :value, as: 'value' - end - end - - # @private - class Url - class Representation < Google::Apis::Core::JsonRepresentation - property :label, as: 'label' - property :type, as: 'type' - property :value, as: 'value' - end - end - end - - # @private - class Place - class Representation < Google::Apis::Core::JsonRepresentation - property :address, as: 'address', class: Google::Apis::PlusV1::Place::Address, decorator: Google::Apis::PlusV1::Place::Address::Representation - - property :display_name, as: 'displayName' - property :id, as: 'id' - property :kind, as: 'kind' - property :position, as: 'position', class: Google::Apis::PlusV1::Place::Position, decorator: Google::Apis::PlusV1::Place::Position::Representation - - end - - # @private - class Address - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted, as: 'formatted' - end - end - - # @private - class Position - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - end - - # @private - class PlusAclentryResource - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :id, as: 'id' - property :type, as: 'type' - end - end - end - end -end diff --git a/generated/google/apis/plus_v1/service.rb b/generated/google/apis/plus_v1/service.rb deleted file mode 100644 index cda9e6d19..000000000 --- a/generated/google/apis/plus_v1/service.rb +++ /dev/null @@ -1,616 +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 PlusV1 - # Google+ API - # - # The Google+ API enables developers to build on top of the Google+ platform. - # - # @example - # require 'google/apis/plus_v1' - # - # Plus = Google::Apis::PlusV1 # Alias the module - # service = Plus::PlusService.new - # - # @see https://developers.google.com/+/api/ - class PlusService < 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/', 'plus/v1/') - end - - # Get an activity. - # @param [String] activity_id - # The ID of the activity to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PlusV1::Activity] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::Activity] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_activity(activity_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'activities/{activityId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::Activity::Representation - command.response_class = Google::Apis::PlusV1::Activity - command.params['activityId'] = activity_id unless activity_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the activities in the specified collection for a particular user. - # @param [String] user_id - # The ID of the user to get activities for. The special value "me" can be used - # to indicate the authenticated user. - # @param [String] collection - # The collection of activities to list. - # @param [Fixnum] max_results - # The maximum number of activities to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusV1::ActivityFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::ActivityFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/activities/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::ActivityFeed::Representation - command.response_class = Google::Apis::PlusV1::ActivityFeed - command.params['userId'] = user_id unless user_id.nil? - command.params['collection'] = collection unless collection.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 - - # Search public activities. - # @param [String] language - # Specify the preferred language to search with. See search language codes for - # available values. - # @param [Fixnum] max_results - # The maximum number of activities to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] order_by - # Specifies how to order search results. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of " - # nextPageToken" from the previous response. This token can be of any length. - # @param [String] query - # Full-text search query string. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PlusV1::ActivityFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::ActivityFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_activities(language: nil, max_results: nil, order_by: nil, page_token: nil, query: 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::PlusV1::ActivityFeed::Representation - command.response_class = Google::Apis::PlusV1::ActivityFeed - command.query['language'] = language unless language.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['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 - - # Get a comment. - # @param [String] comment_id - # The ID of the comment to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PlusV1::Comment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::Comment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_comment(comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'comments/{commentId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::Comment::Representation - command.response_class = Google::Apis::PlusV1::Comment - command.params['commentId'] = comment_id unless comment_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the comments for an activity. - # @param [String] activity_id - # The ID of the activity to get comments for. - # @param [Fixnum] max_results - # The maximum number of comments to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of " - # nextPageToken" from the previous response. - # @param [String] sort_order - # The order in which to sort the list of comments. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PlusV1::CommentFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::CommentFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_comments(activity_id, max_results: nil, page_token: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'activities/{activityId}/comments' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::CommentFeed::Representation - command.response_class = Google::Apis::PlusV1::CommentFeed - command.params['activityId'] = activity_id unless activity_id.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['sortOrder'] = sort_order unless sort_order.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 - - # Record a moment representing a user's action such as making a purchase or - # commenting on a blog. - # @param [String] user_id - # The ID of the user to record actions for. The only valid values are "me" and - # the ID of the authenticated user. - # @param [String] collection - # The collection to which to write moments. - # @param [Google::Apis::PlusV1::Moment] moment_object - # @param [Boolean] debug - # Return the moment as written. Should be used only for debugging. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PlusV1::Moment] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::Moment] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_moment(user_id, collection, moment_object = nil, debug: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/moments/{collection}' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PlusV1::Moment::Representation - command.request_object = moment_object - command.response_representation = Google::Apis::PlusV1::Moment::Representation - command.response_class = Google::Apis::PlusV1::Moment - command.params['userId'] = user_id unless user_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['debug'] = debug unless debug.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the moments for a particular user. - # @param [String] user_id - # The ID of the user to get moments for. The special value "me" can be used to - # indicate the authenticated user. - # @param [String] collection - # The collection of moments to list. - # @param [Fixnum] max_results - # The maximum number of moments to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of " - # nextPageToken" from the previous response. - # @param [String] target_url - # Only moments containing this targetUrl will be returned. - # @param [String] type - # Only moments of this type 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::PlusV1::MomentsFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::MomentsFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_moments(user_id, collection, max_results: nil, page_token: nil, target_url: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/moments/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::MomentsFeed::Representation - command.response_class = Google::Apis::PlusV1::MomentsFeed - command.params['userId'] = user_id unless user_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['targetUrl'] = target_url unless target_url.nil? - command.query['type'] = type unless type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete a moment. - # @param [String] id - # The ID of the moment 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 remove_moment(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'moments/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Get a person's profile. If your app uses scope https://www.googleapis.com/auth/ - # plus.login, this method is guaranteed to return ageRange and language. - # @param [String] user_id - # The ID of the person to get the profile for. The special value "me" can be - # used to indicate 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::PlusV1::Person] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::Person] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_person(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::Person::Representation - command.response_class = Google::Apis::PlusV1::Person - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the people in the specified collection. - # @param [String] user_id - # Get the collection of people for the person identified. Use "me" to indicate - # the authenticated user. - # @param [String] collection - # The collection of people to list. - # @param [Fixnum] max_results - # The maximum number of people to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] order_by - # The order to return people in. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusV1::PeopleFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::PeopleFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_people(user_id, collection, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people/{userId}/people/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::PeopleFeed::Representation - command.response_class = Google::Apis::PlusV1::PeopleFeed - command.params['userId'] = user_id unless user_id.nil? - command.params['collection'] = collection unless collection.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all of the people in the specified collection for a particular activity. - # @param [String] activity_id - # The ID of the activity to get the list of people for. - # @param [String] collection - # The collection of people to list. - # @param [Fixnum] max_results - # The maximum number of people to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, 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::PlusV1::PeopleFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::PeopleFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_people_by_activity(activity_id, collection, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'activities/{activityId}/people/{collection}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::PeopleFeed::Representation - command.response_class = Google::Apis::PlusV1::PeopleFeed - command.params['activityId'] = activity_id unless activity_id.nil? - command.params['collection'] = collection unless collection.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 - - # Search all public profiles. - # @param [String] language - # Specify the preferred language to search with. See search language codes for - # available values. - # @param [Fixnum] max_results - # The maximum number of people to include in the response, which is used for - # paging. For any response, the actual number returned might be less than the - # specified maxResults. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of " - # nextPageToken" from the previous response. This token can be of any length. - # @param [String] query - # Specify a query string for full text search of public text in all profiles. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PlusV1::PeopleFeed] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PlusV1::PeopleFeed] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_people(language: nil, max_results: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'people' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PlusV1::PeopleFeed::Representation - command.response_class = Google::Apis::PlusV1::PeopleFeed - command.query['language'] = language unless language.nil? - command.query['maxResults'] = max_results unless max_results.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 - - 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 diff --git a/generated/google/apis/prediction_v1_6.rb b/generated/google/apis/prediction_v1_6.rb deleted file mode 100644 index ab482bc4f..000000000 --- a/generated/google/apis/prediction_v1_6.rb +++ /dev/null @@ -1,44 +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/prediction_v1_6/service.rb' -require 'google/apis/prediction_v1_6/classes.rb' -require 'google/apis/prediction_v1_6/representations.rb' - -module Google - module Apis - # Prediction API - # - # Lets you access a cloud hosted machine learning service that makes it easy to - # build smart apps - # - # @see https://developers.google.com/prediction/docs/developer-guide - module PredictionV1_6 - VERSION = 'V1_6' - REVISION = '20140522' - - # 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' - - # Manage your data in the Google Prediction API - AUTH_PREDICTION = 'https://www.googleapis.com/auth/prediction' - end - end -end diff --git a/generated/google/apis/prediction_v1_6/classes.rb b/generated/google/apis/prediction_v1_6/classes.rb deleted file mode 100644 index 6f8167918..000000000 --- a/generated/google/apis/prediction_v1_6/classes.rb +++ /dev/null @@ -1,751 +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 PredictionV1_6 - - # - class Analyze - include Google::Apis::Core::Hashable - - # Description of the data the model was trained on. - # Corresponds to the JSON property `dataDescription` - # @return [Google::Apis::PredictionV1_6::Analyze::DataDescription] - attr_accessor :data_description - - # List of errors with the data. - # Corresponds to the JSON property `errors` - # @return [Array>] - attr_accessor :errors - - # The unique name for the predictive model. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # What kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Description of the model. - # Corresponds to the JSON property `modelDescription` - # @return [Google::Apis::PredictionV1_6::Analyze::ModelDescription] - attr_accessor :model_description - - # A URL to re-request this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_description = args[:data_description] unless args[:data_description].nil? - @errors = args[:errors] unless args[:errors].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @model_description = args[:model_description] unless args[:model_description].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - - # Description of the data the model was trained on. - class DataDescription - include Google::Apis::Core::Hashable - - # Description of the input features in the data set. - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # Description of the output value or label. - # Corresponds to the JSON property `outputFeature` - # @return [Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature] - attr_accessor :output_feature - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @features = args[:features] unless args[:features].nil? - @output_feature = args[:output_feature] unless args[:output_feature].nil? - end - - # - class Feature - include Google::Apis::Core::Hashable - - # Description of the categorical values of this feature. - # Corresponds to the JSON property `categorical` - # @return [Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Categorical] - attr_accessor :categorical - - # The feature index. - # Corresponds to the JSON property `index` - # @return [String] - attr_accessor :index - - # Description of the numeric values of this feature. - # Corresponds to the JSON property `numeric` - # @return [Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Numeric] - attr_accessor :numeric - - # Description of multiple-word text values of this feature. - # Corresponds to the JSON property `text` - # @return [Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Text] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @categorical = args[:categorical] unless args[:categorical].nil? - @index = args[:index] unless args[:index].nil? - @numeric = args[:numeric] unless args[:numeric].nil? - @text = args[:text] unless args[:text].nil? - end - - # Description of the categorical values of this feature. - class Categorical - include Google::Apis::Core::Hashable - - # Number of categorical values for this feature in the data. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # List of all the categories for this feature in the data set. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @values = args[:values] unless args[:values].nil? - end - - # - class Value - include Google::Apis::Core::Hashable - - # Number of times this feature had this value. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # The category name. - # 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) - @count = args[:count] unless args[:count].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - - # Description of the numeric values of this feature. - class Numeric - include Google::Apis::Core::Hashable - - # Number of numeric values for this feature in the data set. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # Mean of the numeric values of this feature in the data set. - # Corresponds to the JSON property `mean` - # @return [String] - attr_accessor :mean - - # Variance of the numeric values of this feature in the data set. - # Corresponds to the JSON property `variance` - # @return [String] - attr_accessor :variance - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @mean = args[:mean] unless args[:mean].nil? - @variance = args[:variance] unless args[:variance].nil? - end - end - - # Description of multiple-word text values of this feature. - class Text - include Google::Apis::Core::Hashable - - # Number of multiple-word text values for this feature. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - end - end - end - - # Description of the output value or label. - class OutputFeature - include Google::Apis::Core::Hashable - - # Description of the output values in the data set. - # Corresponds to the JSON property `numeric` - # @return [Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature::Numeric] - attr_accessor :numeric - - # Description of the output labels in the data set. - # Corresponds to the JSON property `text` - # @return [Array] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @numeric = args[:numeric] unless args[:numeric].nil? - @text = args[:text] unless args[:text].nil? - end - - # Description of the output values in the data set. - class Numeric - include Google::Apis::Core::Hashable - - # Number of numeric output values in the data set. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # Mean of the output values in the data set. - # Corresponds to the JSON property `mean` - # @return [String] - attr_accessor :mean - - # Variance of the output values in the data set. - # Corresponds to the JSON property `variance` - # @return [String] - attr_accessor :variance - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @mean = args[:mean] unless args[:mean].nil? - @variance = args[:variance] unless args[:variance].nil? - end - end - - # - class Text - include Google::Apis::Core::Hashable - - # Number of times the output label occurred in the data set. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # The output label. - # 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) - @count = args[:count] unless args[:count].nil? - @value = args[:value] unless args[:value].nil? - end - end - end - end - - # Description of the model. - class ModelDescription - include Google::Apis::Core::Hashable - - # An output confusion matrix. This shows an estimate for how this model will do - # in predictions. This is first indexed by the true class label. For each true - # class label, this provides a pair `predicted_label, count`, where count is the - # estimated number of times the model will predict the predicted label given the - # true label. Will not output if more then 100 classes (Categorical models only). - # Corresponds to the JSON property `confusionMatrix` - # @return [Hash>] - attr_accessor :confusion_matrix - - # A list of the confusion matrix row totals. - # Corresponds to the JSON property `confusionMatrixRowTotals` - # @return [Hash] - attr_accessor :confusion_matrix_row_totals - - # Basic information about the model. - # Corresponds to the JSON property `modelinfo` - # @return [Google::Apis::PredictionV1_6::Insert2] - attr_accessor :modelinfo - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @confusion_matrix = args[:confusion_matrix] unless args[:confusion_matrix].nil? - @confusion_matrix_row_totals = args[:confusion_matrix_row_totals] unless args[:confusion_matrix_row_totals].nil? - @modelinfo = args[:modelinfo] unless args[:modelinfo].nil? - end - end - end - - # - class Input - include Google::Apis::Core::Hashable - - # Input to the model for a prediction. - # Corresponds to the JSON property `input` - # @return [Google::Apis::PredictionV1_6::Input::Input] - attr_accessor :input - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @input = args[:input] unless args[:input].nil? - end - - # Input to the model for a prediction. - class Input - include Google::Apis::Core::Hashable - - # A list of input features, these can be strings or doubles. - # Corresponds to the JSON property `csvInstance` - # @return [Array] - attr_accessor :csv_instance - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @csv_instance = args[:csv_instance] unless args[:csv_instance].nil? - end - end - end - - # - class Insert - include Google::Apis::Core::Hashable - - # The unique name for the predictive model. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of predictive model (classification or regression). - # Corresponds to the JSON property `modelType` - # @return [String] - attr_accessor :model_type - - # The Id of the model to be copied over. - # Corresponds to the JSON property `sourceModel` - # @return [String] - attr_accessor :source_model - - # Google storage location of the training data file. - # Corresponds to the JSON property `storageDataLocation` - # @return [String] - attr_accessor :storage_data_location - - # Google storage location of the preprocessing pmml file. - # Corresponds to the JSON property `storagePMMLLocation` - # @return [String] - attr_accessor :storage_pmml_location - - # Google storage location of the pmml model file. - # Corresponds to the JSON property `storagePMMLModelLocation` - # @return [String] - attr_accessor :storage_pmml_model_location - - # Instances to train model on. - # Corresponds to the JSON property `trainingInstances` - # @return [Array] - attr_accessor :training_instances - - # A class weighting function, which allows the importance weights for class - # labels to be specified (Categorical models only). - # Corresponds to the JSON property `utility` - # @return [Array>] - attr_accessor :utility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @model_type = args[:model_type] unless args[:model_type].nil? - @source_model = args[:source_model] unless args[:source_model].nil? - @storage_data_location = args[:storage_data_location] unless args[:storage_data_location].nil? - @storage_pmml_location = args[:storage_pmml_location] unless args[:storage_pmml_location].nil? - @storage_pmml_model_location = args[:storage_pmml_model_location] unless args[:storage_pmml_model_location].nil? - @training_instances = args[:training_instances] unless args[:training_instances].nil? - @utility = args[:utility] unless args[:utility].nil? - end - - # - class TrainingInstance - include Google::Apis::Core::Hashable - - # The input features for this instance. - # Corresponds to the JSON property `csvInstance` - # @return [Array] - attr_accessor :csv_instance - - # The generic output value - could be regression or class label. - # Corresponds to the JSON property `output` - # @return [String] - attr_accessor :output - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @csv_instance = args[:csv_instance] unless args[:csv_instance].nil? - @output = args[:output] unless args[:output].nil? - end - end - end - - # - class Insert2 - include Google::Apis::Core::Hashable - - # Insert time of the model (as a RFC 3339 timestamp). - # Corresponds to the JSON property `created` - # @return [DateTime] - attr_accessor :created - - # The unique name for the predictive model. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # What kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Model metadata. - # Corresponds to the JSON property `modelInfo` - # @return [Google::Apis::PredictionV1_6::Insert2::ModelInfo] - attr_accessor :model_info - - # Type of predictive model (CLASSIFICATION or REGRESSION). - # Corresponds to the JSON property `modelType` - # @return [String] - attr_accessor :model_type - - # A URL to re-request this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Google storage location of the training data file. - # Corresponds to the JSON property `storageDataLocation` - # @return [String] - attr_accessor :storage_data_location - - # Google storage location of the preprocessing pmml file. - # Corresponds to the JSON property `storagePMMLLocation` - # @return [String] - attr_accessor :storage_pmml_location - - # Google storage location of the pmml model file. - # Corresponds to the JSON property `storagePMMLModelLocation` - # @return [String] - attr_accessor :storage_pmml_model_location - - # Training completion time (as a RFC 3339 timestamp). - # Corresponds to the JSON property `trainingComplete` - # @return [DateTime] - attr_accessor :training_complete - - # The current status of the training job. This can be one of following: RUNNING; - # DONE; ERROR; ERROR: TRAINING JOB NOT FOUND - # Corresponds to the JSON property `trainingStatus` - # @return [String] - attr_accessor :training_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @created = args[:created] unless args[:created].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @model_info = args[:model_info] unless args[:model_info].nil? - @model_type = args[:model_type] unless args[:model_type].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @storage_data_location = args[:storage_data_location] unless args[:storage_data_location].nil? - @storage_pmml_location = args[:storage_pmml_location] unless args[:storage_pmml_location].nil? - @storage_pmml_model_location = args[:storage_pmml_model_location] unless args[:storage_pmml_model_location].nil? - @training_complete = args[:training_complete] unless args[:training_complete].nil? - @training_status = args[:training_status] unless args[:training_status].nil? - end - - # Model metadata. - class ModelInfo - include Google::Apis::Core::Hashable - - # Estimated accuracy of model taking utility weights into account (Categorical - # models only). - # Corresponds to the JSON property `classWeightedAccuracy` - # @return [String] - attr_accessor :class_weighted_accuracy - - # A number between 0.0 and 1.0, where 1.0 is 100% accurate. This is an estimate, - # based on the amount and quality of the training data, of the estimated - # prediction accuracy. You can use this is a guide to decide whether the results - # are accurate enough for your needs. This estimate will be more reliable if - # your real input data is similar to your training data (Categorical models only) - # . - # Corresponds to the JSON property `classificationAccuracy` - # @return [String] - attr_accessor :classification_accuracy - - # An estimated mean squared error. The can be used to measure the quality of the - # predicted model (Regression models only). - # Corresponds to the JSON property `meanSquaredError` - # @return [String] - attr_accessor :mean_squared_error - - # Type of predictive model (CLASSIFICATION or REGRESSION). - # Corresponds to the JSON property `modelType` - # @return [String] - attr_accessor :model_type - - # Number of valid data instances used in the trained model. - # Corresponds to the JSON property `numberInstances` - # @return [String] - attr_accessor :number_instances - - # Number of class labels in the trained model (Categorical models only). - # Corresponds to the JSON property `numberLabels` - # @return [String] - attr_accessor :number_labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @class_weighted_accuracy = args[:class_weighted_accuracy] unless args[:class_weighted_accuracy].nil? - @classification_accuracy = args[:classification_accuracy] unless args[:classification_accuracy].nil? - @mean_squared_error = args[:mean_squared_error] unless args[:mean_squared_error].nil? - @model_type = args[:model_type] unless args[:model_type].nil? - @number_instances = args[:number_instances] unless args[:number_instances].nil? - @number_labels = args[:number_labels] unless args[:number_labels].nil? - end - end - end - - # - class List - include Google::Apis::Core::Hashable - - # List of models. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # What kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Pagination token to fetch the next page, if one exists. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A URL to re-request this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 Output - include Google::Apis::Core::Hashable - - # The unique name for the predictive model. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # What kind of resource this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The most likely class label (Categorical models only). - # Corresponds to the JSON property `outputLabel` - # @return [String] - attr_accessor :output_label - - # A list of class labels with their estimated probabilities (Categorical models - # only). - # Corresponds to the JSON property `outputMulti` - # @return [Array] - attr_accessor :output_multi - - # The estimated regression value (Regression models only). - # Corresponds to the JSON property `outputValue` - # @return [Float] - attr_accessor :output_value - - # A URL to re-request this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @output_label = args[:output_label] unless args[:output_label].nil? - @output_multi = args[:output_multi] unless args[:output_multi].nil? - @output_value = args[:output_value] unless args[:output_value].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - - # - class OutputMulti - include Google::Apis::Core::Hashable - - # The class label. - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - - # The probability of the class label. - # Corresponds to the JSON property `score` - # @return [String] - attr_accessor :score - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @label = args[:label] unless args[:label].nil? - @score = args[:score] unless args[:score].nil? - end - end - end - - # - class Update - include Google::Apis::Core::Hashable - - # The input features for this instance. - # Corresponds to the JSON property `csvInstance` - # @return [Array] - attr_accessor :csv_instance - - # The generic output value - could be regression or class label. - # Corresponds to the JSON property `output` - # @return [String] - attr_accessor :output - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @csv_instance = args[:csv_instance] unless args[:csv_instance].nil? - @output = args[:output] unless args[:output].nil? - end - end - end - end -end diff --git a/generated/google/apis/prediction_v1_6/representations.rb b/generated/google/apis/prediction_v1_6/representations.rb deleted file mode 100644 index 92bf7c657..000000000 --- a/generated/google/apis/prediction_v1_6/representations.rb +++ /dev/null @@ -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 PredictionV1_6 - - class Analyze - class Representation < Google::Apis::Core::JsonRepresentation; end - - class DataDescription - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Feature - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Categorical - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Value - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Numeric - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Text - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class OutputFeature - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Numeric - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Text - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class ModelDescription - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Input - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Input - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Insert - class Representation < Google::Apis::Core::JsonRepresentation; end - - class TrainingInstance - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Insert2 - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ModelInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class List - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Output - class Representation < Google::Apis::Core::JsonRepresentation; end - - class OutputMulti - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Update - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Analyze - class Representation < Google::Apis::Core::JsonRepresentation - property :data_description, as: 'dataDescription', class: Google::Apis::PredictionV1_6::Analyze::DataDescription, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::Representation - - collection :errors, as: 'errors' - property :id, as: 'id' - property :kind, as: 'kind' - property :model_description, as: 'modelDescription', class: Google::Apis::PredictionV1_6::Analyze::ModelDescription, decorator: Google::Apis::PredictionV1_6::Analyze::ModelDescription::Representation - - property :self_link, as: 'selfLink' - end - - # @private - class DataDescription - class Representation < Google::Apis::Core::JsonRepresentation - collection :features, as: 'features', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Representation - - property :output_feature, as: 'outputFeature', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature::Representation - - end - - # @private - class Feature - class Representation < Google::Apis::Core::JsonRepresentation - property :categorical, as: 'categorical', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Categorical, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Categorical::Representation - - property :index, as: 'index' - property :numeric, as: 'numeric', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Numeric, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Numeric::Representation - - property :text, as: 'text', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Text, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Text::Representation - - end - - # @private - class Categorical - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - collection :values, as: 'values', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Categorical::Value, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::Feature::Categorical::Value::Representation - - end - - # @private - class Value - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :value, as: 'value' - end - end - end - - # @private - class Numeric - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :mean, as: 'mean' - property :variance, as: 'variance' - end - end - - # @private - class Text - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - end - end - end - - # @private - class OutputFeature - class Representation < Google::Apis::Core::JsonRepresentation - property :numeric, as: 'numeric', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature::Numeric, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature::Numeric::Representation - - collection :text, as: 'text', class: Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature::Text, decorator: Google::Apis::PredictionV1_6::Analyze::DataDescription::OutputFeature::Text::Representation - - end - - # @private - class Numeric - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :mean, as: 'mean' - property :variance, as: 'variance' - end - end - - # @private - class Text - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :value, as: 'value' - end - end - end - end - - # @private - class ModelDescription - class Representation < Google::Apis::Core::JsonRepresentation - hash :confusion_matrix, as: 'confusionMatrix' - hash :confusion_matrix_row_totals, as: 'confusionMatrixRowTotals' - property :modelinfo, as: 'modelinfo', class: Google::Apis::PredictionV1_6::Insert2, decorator: Google::Apis::PredictionV1_6::Insert2::Representation - - end - end - end - - # @private - class Input - class Representation < Google::Apis::Core::JsonRepresentation - property :input, as: 'input', class: Google::Apis::PredictionV1_6::Input::Input, decorator: Google::Apis::PredictionV1_6::Input::Input::Representation - - end - - # @private - class Input - class Representation < Google::Apis::Core::JsonRepresentation - collection :csv_instance, as: 'csvInstance' - end - end - end - - # @private - class Insert - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :model_type, as: 'modelType' - property :source_model, as: 'sourceModel' - property :storage_data_location, as: 'storageDataLocation' - property :storage_pmml_location, as: 'storagePMMLLocation' - property :storage_pmml_model_location, as: 'storagePMMLModelLocation' - collection :training_instances, as: 'trainingInstances', class: Google::Apis::PredictionV1_6::Insert::TrainingInstance, decorator: Google::Apis::PredictionV1_6::Insert::TrainingInstance::Representation - - collection :utility, as: 'utility' - end - - # @private - class TrainingInstance - class Representation < Google::Apis::Core::JsonRepresentation - collection :csv_instance, as: 'csvInstance' - property :output, as: 'output' - end - end - end - - # @private - class Insert2 - class Representation < Google::Apis::Core::JsonRepresentation - property :created, as: 'created', type: DateTime - - property :id, as: 'id' - property :kind, as: 'kind' - property :model_info, as: 'modelInfo', class: Google::Apis::PredictionV1_6::Insert2::ModelInfo, decorator: Google::Apis::PredictionV1_6::Insert2::ModelInfo::Representation - - property :model_type, as: 'modelType' - property :self_link, as: 'selfLink' - property :storage_data_location, as: 'storageDataLocation' - property :storage_pmml_location, as: 'storagePMMLLocation' - property :storage_pmml_model_location, as: 'storagePMMLModelLocation' - property :training_complete, as: 'trainingComplete', type: DateTime - - property :training_status, as: 'trainingStatus' - end - - # @private - class ModelInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :class_weighted_accuracy, as: 'classWeightedAccuracy' - property :classification_accuracy, as: 'classificationAccuracy' - property :mean_squared_error, as: 'meanSquaredError' - property :model_type, as: 'modelType' - property :number_instances, as: 'numberInstances' - property :number_labels, as: 'numberLabels' - end - end - end - - # @private - class List - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::PredictionV1_6::Insert2, decorator: Google::Apis::PredictionV1_6::Insert2::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class Output - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :output_label, as: 'outputLabel' - collection :output_multi, as: 'outputMulti', class: Google::Apis::PredictionV1_6::Output::OutputMulti, decorator: Google::Apis::PredictionV1_6::Output::OutputMulti::Representation - - property :output_value, as: 'outputValue' - property :self_link, as: 'selfLink' - end - - # @private - class OutputMulti - class Representation < Google::Apis::Core::JsonRepresentation - property :label, as: 'label' - property :score, as: 'score' - end - end - end - - # @private - class Update - class Representation < Google::Apis::Core::JsonRepresentation - collection :csv_instance, as: 'csvInstance' - property :output, as: 'output' - end - end - end - end -end diff --git a/generated/google/apis/prediction_v1_6/service.rb b/generated/google/apis/prediction_v1_6/service.rb deleted file mode 100644 index 0069d5b76..000000000 --- a/generated/google/apis/prediction_v1_6/service.rb +++ /dev/null @@ -1,388 +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 PredictionV1_6 - # Prediction API - # - # Lets you access a cloud hosted machine learning service that makes it easy to - # build smart apps - # - # @example - # require 'google/apis/prediction_v1_6' - # - # Prediction = Google::Apis::PredictionV1_6 # Alias the module - # service = Prediction::PredictionService.new - # - # @see https://developers.google.com/prediction/docs/developer-guide - class PredictionService < 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/', 'prediction/v1.6/projects/') - end - - # Submit input and request an output against a hosted model. - # @param [String] project - # The project associated with the model. - # @param [String] hosted_model_name - # The name of a hosted model. - # @param [Google::Apis::PredictionV1_6::Input] input_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::PredictionV1_6::Output] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PredictionV1_6::Output] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def predict_hosted_model(project, hosted_model_name, input_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/hostedmodels/{hostedModelName}/predict' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PredictionV1_6::Input::Representation - command.request_object = input_object - command.response_representation = Google::Apis::PredictionV1_6::Output::Representation - command.response_class = Google::Apis::PredictionV1_6::Output - command.params['project'] = project unless project.nil? - command.params['hostedModelName'] = hosted_model_name unless hosted_model_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get analysis of the model and the data the model was trained on. - # @param [String] project - # The project associated with the model. - # @param [String] id - # The unique name for the predictive model. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PredictionV1_6::Analyze] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PredictionV1_6::Analyze] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def analyze_trained_model(project, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/trainedmodels/{id}/analyze' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PredictionV1_6::Analyze::Representation - command.response_class = Google::Apis::PredictionV1_6::Analyze - command.params['project'] = project unless project.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Delete a trained model. - # @param [String] project - # The project associated with the model. - # @param [String] id - # The unique name for the predictive model. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_trained_model(project, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/trainedmodels/{id}' - command = make_simple_command(:delete, path, options) - command.params['project'] = project unless project.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Check training status of your model. - # @param [String] project - # The project associated with the model. - # @param [String] id - # The unique name for the predictive model. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::PredictionV1_6::Insert2] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PredictionV1_6::Insert2] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trained_model(project, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/trainedmodels/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PredictionV1_6::Insert2::Representation - command.response_class = Google::Apis::PredictionV1_6::Insert2 - command.params['project'] = project unless project.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Train a Prediction API model. - # @param [String] project - # The project associated with the model. - # @param [Google::Apis::PredictionV1_6::Insert] insert_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::PredictionV1_6::Insert2] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PredictionV1_6::Insert2] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trained_model(project, insert_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/trainedmodels' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PredictionV1_6::Insert::Representation - command.request_object = insert_object - command.response_representation = Google::Apis::PredictionV1_6::Insert2::Representation - command.response_class = Google::Apis::PredictionV1_6::Insert2 - 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 available models. - # @param [String] project - # The project associated with the model. - # @param [Fixnum] max_results - # Maximum number of results to return. - # @param [String] page_token - # Pagination 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::PredictionV1_6::List] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PredictionV1_6::List] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trained_models(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/trainedmodels/list' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PredictionV1_6::List::Representation - command.response_class = Google::Apis::PredictionV1_6::List - command.params['project'] = project unless project.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 - - # Submit model id and request a prediction. - # @param [String] project - # The project associated with the model. - # @param [String] id - # The unique name for the predictive model. - # @param [Google::Apis::PredictionV1_6::Input] input_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::PredictionV1_6::Output] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PredictionV1_6::Output] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def predict_trained_model(project, id, input_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/trainedmodels/{id}/predict' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PredictionV1_6::Input::Representation - command.request_object = input_object - command.response_representation = Google::Apis::PredictionV1_6::Output::Representation - command.response_class = Google::Apis::PredictionV1_6::Output - command.params['project'] = project unless project.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Add new data to a trained model. - # @param [String] project - # The project associated with the model. - # @param [String] id - # The unique name for the predictive model. - # @param [Google::Apis::PredictionV1_6::Update] update_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::PredictionV1_6::Insert2] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PredictionV1_6::Insert2] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trained_model(project, id, update_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/trainedmodels/{id}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::PredictionV1_6::Update::Representation - command.request_object = update_object - command.response_representation = Google::Apis::PredictionV1_6::Insert2::Representation - command.response_class = Google::Apis::PredictionV1_6::Insert2 - command.params['project'] = project unless project.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['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 diff --git a/generated/google/apis/pubsub_v1beta2.rb b/generated/google/apis/pubsub_v1beta2.rb deleted file mode 100644 index b3174ec49..000000000 --- a/generated/google/apis/pubsub_v1beta2.rb +++ /dev/null @@ -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/pubsub_v1beta2/service.rb' -require 'google/apis/pubsub_v1beta2/classes.rb' -require 'google/apis/pubsub_v1beta2/representations.rb' - -module Google - module Apis - # Google Cloud Pub/Sub API - # - # Provides reliable, many-to-many, asynchronous messaging between applications. - # - # @see https://cloud.google.com/pubsub/docs - module PubsubV1beta2 - VERSION = 'V1beta2' - REVISION = '20150427' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # View and manage Pub/Sub topics and subscriptions - AUTH_PUBSUB = 'https://www.googleapis.com/auth/pubsub' - end - end -end diff --git a/generated/google/apis/pubsub_v1beta2/classes.rb b/generated/google/apis/pubsub_v1beta2/classes.rb deleted file mode 100644 index ae7b28465..000000000 --- a/generated/google/apis/pubsub_v1beta2/classes.rb +++ /dev/null @@ -1,824 +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 PubsubV1beta2 - - # Request message for `SetIamPolicy` method. - class SetIamPolicyRequest - include Google::Apis::Core::Hashable - - # # Overview The `Policy` defines an access control policy language. It can be - # used to define policies that can be attached to resources like files, folders, - # VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A ` - # Binding` binds a set of members to a role, where the members can include user - # accounts, user groups, user domains, and service accounts. A role is a named - # set of permissions, defined by the IAM system. The definition of a role is - # outside the policy. A permission check involves determining the roles that - # include the specified permission, and then determining if the principal - # specified by the check is a member of a binding to at least one of these roles. - # The membership check is recursive when a group is bound to a role. Policy - # examples: ``` ` "bindings": [ ` "role": "roles/owner", "members": [ "user:mike@ - # example.com", "group::admins@example.com", "domain:google.com", " - # serviceAccount:frontend@example.iam.gserviceaccounts.com"] `, ` "role": "roles/ - # viewer", "members": ["user:sean@example.com"] ` ] ` ``` - # Corresponds to the JSON property `policy` - # @return [Google::Apis::PubsubV1beta2::Policy] - attr_accessor :policy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy = args[:policy] unless args[:policy].nil? - end - end - - # # Overview The `Policy` defines an access control policy language. It can be - # used to define policies that can be attached to resources like files, folders, - # VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A ` - # Binding` binds a set of members to a role, where the members can include user - # accounts, user groups, user domains, and service accounts. A role is a named - # set of permissions, defined by the IAM system. The definition of a role is - # outside the policy. A permission check involves determining the roles that - # include the specified permission, and then determining if the principal - # specified by the check is a member of a binding to at least one of these roles. - # The membership check is recursive when a group is bound to a role. Policy - # examples: ``` ` "bindings": [ ` "role": "roles/owner", "members": [ "user:mike@ - # example.com", "group::admins@example.com", "domain:google.com", " - # serviceAccount:frontend@example.iam.gserviceaccounts.com"] `, ` "role": "roles/ - # viewer", "members": ["user:sean@example.com"] ` ] ` ``` - class Policy - include Google::Apis::Core::Hashable - - # The policy language version. The version of the policy itself is represented - # by the etag. The current version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # It is an error to specify multiple bindings for the same role. It is an error - # to specify a binding with no members. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings - - # - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - # Can be used to perform a read-modify-write. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version = args[:version] unless args[:version].nil? - @bindings = args[:bindings] unless args[:bindings].nil? - @rules = args[:rules] unless args[:rules].nil? - @etag = args[:etag] unless args[:etag].nil? - end - end - - # Associates members of various types with roles. See below for details of the - # various objects that can be included as members. - class Binding - include Google::Apis::Core::Hashable - - # The name of the role to which the members should be bound. Examples: "roles/ - # viewer", "roles/editor", "roles/owner". Required - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # Format of member entries: 1. allUsers Matches any requesting principal (users, - # service accounts or anonymous). 2. allAuthenticatedUsers Matches any - # requesting authenticated principal (users or service accounts). 3. user:` - # emailid` A google user account using an email address. For example alice@gmail. - # com, joe@example.com 4. serviceAccount:`emailid` An service account email. 5. - # group:`emailid` A google group with an email address. For example auth-ti- - # cloud@google.com 6. domain:`domain` A Google Apps domain name. For example - # google.com, example.com - # Corresponds to the JSON property `members` - # @return [Array] - attr_accessor :members - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @role = args[:role] unless args[:role].nil? - @members = args[:members] unless args[:members].nil? - end - end - - # A rule to be applied in a Policy. - class Rule - include Google::Apis::Core::Hashable - - # Human-readable description of the rule. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value - # of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets. - # *') matches all verbs. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - # Required - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries. - # Corresponds to the JSON property `in` - # @return [Array] - attr_accessor :in - - # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of - # entries. The formation for in and not_in entries is the same as members in a - # Binding above. - # Corresponds to the JSON property `notIn` - # @return [Array] - attr_accessor :not_in - - # Additional restrictions that must be met - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - - # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries - # that match the LOG action. - # Corresponds to the JSON property `logConfig` - # @return [Array] - attr_accessor :log_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] unless args[:description].nil? - @permissions = args[:permissions] unless args[:permissions].nil? - @action = args[:action] unless args[:action].nil? - @in = args[:in] unless args[:in].nil? - @not_in = args[:not_in] unless args[:not_in].nil? - @conditions = args[:conditions] unless args[:conditions].nil? - @log_config = args[:log_config] unless args[:log_config].nil? - end - end - - # A condition to be met. - class Condition - include Google::Apis::Core::Hashable - - # Trusted attributes supplied by the IAM system. - # Corresponds to the JSON property `iam` - # @return [String] - attr_accessor :iam - - # Trusted attributes supplied by any service that owns resources and uses the - # IAM system for access control. - # Corresponds to the JSON property `sys` - # @return [String] - attr_accessor :sys - - # Trusted attributes discharged by the service. - # Corresponds to the JSON property `svc` - # @return [String] - attr_accessor :svc - - # An operator to apply the subject with. - # Corresponds to the JSON property `op` - # @return [String] - attr_accessor :op - - # The object of the condition. Exactly one of these must be set. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The objects of the condition. This is mutually exclusive with 'value'. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @iam = args[:iam] unless args[:iam].nil? - @sys = args[:sys] unless args[:sys].nil? - @svc = args[:svc] unless args[:svc].nil? - @op = args[:op] unless args[:op].nil? - @value = args[:value] unless args[:value].nil? - @values = args[:values] unless args[:values].nil? - end - end - - # Specifies what kind of log the caller must write Increment a streamz counter - # with the specified metric and field names. Metric names should start with a '/' - # , generally be lowercase-only, and end in "_count". Field names should not - # contain an initial slash. The actual exported metric names will have "/iam/ - # policy" prepended. Field names correspond to IAM request parameters and field - # values are their respective values. At present only "iam_principal", - # corresponding to IAMContext.principal, is supported. Examples: counter ` - # metric: "/debug_access_count" field: "iam_principal" ` ==> increment counter / - # iam/policy/backend_debug_access_count `iam_principal=[value of IAMContext. - # principal]` At this time we do not support: * multiple field names (though - # this may be supported in the future) * decrementing the counter * incrementing - # it by anything other than 1 - class LogConfig - include Google::Apis::Core::Hashable - - # Options for counters - # Corresponds to the JSON property `counter` - # @return [Google::Apis::PubsubV1beta2::CounterOptions] - attr_accessor :counter - - # Write a Data Access (Gin) log - # Corresponds to the JSON property `dataAccess` - # @return [Google::Apis::PubsubV1beta2::DataAccessOptions] - attr_accessor :data_access - - # Write a Cloud Audit log - # Corresponds to the JSON property `cloudAudit` - # @return [Google::Apis::PubsubV1beta2::CloudAuditOptions] - attr_accessor :cloud_audit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @counter = args[:counter] unless args[:counter].nil? - @data_access = args[:data_access] unless args[:data_access].nil? - @cloud_audit = args[:cloud_audit] unless args[:cloud_audit].nil? - end - end - - # Options for counters - class CounterOptions - include Google::Apis::Core::Hashable - - # The metric to update. - # Corresponds to the JSON property `metric` - # @return [String] - attr_accessor :metric - - # The field value to attribute. - # Corresponds to the JSON property `field` - # @return [String] - attr_accessor :field - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric = args[:metric] unless args[:metric].nil? - @field = args[:field] unless args[:field].nil? - end - end - - # Write a Data Access (Gin) log - class DataAccessOptions - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Write a Cloud Audit log - class CloudAuditOptions - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest - include Google::Apis::Core::Hashable - - # The set of permissions to check for the 'resource'. Permissions with wildcards - # (such as '*' or 'storage.*') are not allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] unless args[:permissions].nil? - end - end - - # Response message for `TestIamPermissions` method. - class TestIamPermissionsResponse - include Google::Apis::Core::Hashable - - # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] unless args[:permissions].nil? - end - end - - # A topic resource. - class Topic - include Google::Apis::Core::Hashable - - # The name of the topic. It must have the format "projects/`project`/topics/` - # topic`" for Google Cloud Pub/Sub API v1beta2. `topic` must start with a letter, - # and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores ( - # _), periods (.), tildes (~), plus (+) or percent signs (%). It must be between - # 3 and 255 characters in length, and it must not start with "goog". - # 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) - @name = args[:name] unless args[:name].nil? - end - end - - # Request for the Publish method. - class PublishRequest - include Google::Apis::Core::Hashable - - # The messages to publish. - # Corresponds to the JSON property `messages` - # @return [Array] - attr_accessor :messages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @messages = args[:messages] unless args[:messages].nil? - end - end - - # A message data and its attributes. - class Message - include Google::Apis::Core::Hashable - - # The message payload. For JSON requests, the value of this field must be base64- - # encoded. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Optional attributes for this message. - # Corresponds to the JSON property `attributes` - # @return [Hash] - attr_accessor :attributes - - # ID of this message assigned by the server at publication time. Guaranteed to - # be unique within the topic. This value may be read by a subscriber that - # receives a PubsubMessage via a Pull call or a push delivery. It must not be - # populated by a publisher in a Publish call. - # Corresponds to the JSON property `messageId` - # @return [String] - attr_accessor :message_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] unless args[:data].nil? - @attributes = args[:attributes] unless args[:attributes].nil? - @message_id = args[:message_id] unless args[:message_id].nil? - end - end - - # Response for the Publish method. - class PublishResponse - include Google::Apis::Core::Hashable - - # The server-assigned ID of each published message, in the same order as the - # messages in the request. IDs are guaranteed to be unique within the topic. - # Corresponds to the JSON property `messageIds` - # @return [Array] - attr_accessor :message_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message_ids = args[:message_ids] unless args[:message_ids].nil? - end - end - - # Response for the ListTopics method. - class ListTopicsResponse - include Google::Apis::Core::Hashable - - # The resulting topics. - # Corresponds to the JSON property `topics` - # @return [Array] - attr_accessor :topics - - # If not empty, indicates that there may be more topics that match the request; - # this value should be passed in a new ListTopicsRequest. - # 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) - @topics = args[:topics] unless args[:topics].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Response for the ListTopicSubscriptions method. - class ListTopicSubscriptionsResponse - include Google::Apis::Core::Hashable - - # The names of the subscriptions that match the request. - # Corresponds to the JSON property `subscriptions` - # @return [Array] - attr_accessor :subscriptions - - # If not empty, indicates that there may be more subscriptions that match the - # request; this value should be passed in a new ListTopicSubscriptionsRequest to - # get more subscriptions. - # 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) - @subscriptions = args[:subscriptions] unless args[:subscriptions].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 - - # A subscription resource. - class Subscription - include Google::Apis::Core::Hashable - - # The name of the subscription. It must have the format "projects/`project`/ - # subscriptions/`subscription`" for Google Cloud Pub/Sub API v1beta2. ` - # subscription` must start with a letter, and contain only letters ([A-Za-z]), - # numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) - # or percent signs (%). It must be between 3 and 255 characters in length, and - # it must not start with "goog". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The name of the topic from which this subscription is receiving messages. This - # will be present if and only if the subscription has not been detached from its - # topic. - # Corresponds to the JSON property `topic` - # @return [String] - attr_accessor :topic - - # Configuration for a push delivery endpoint. - # Corresponds to the JSON property `pushConfig` - # @return [Google::Apis::PubsubV1beta2::PushConfig] - attr_accessor :push_config - - # This value is the maximum time after a subscriber receives a message before - # the subscriber should acknowledge the message. After message delivery but - # before the ack deadline expires and before the message is acknowledged, it is - # an outstanding message and will not be delivered again during that time (on a - # best-effort basis). For pull delivery this value is used as the initial value - # for the ack deadline. It may be overridden for each message using its - # corresponding ack_id by calling ModifyAckDeadline. For push delivery, this - # value is also used to set the request timeout for the call to the push - # endpoint. If the subscriber never acknowledges the message, the Pub/Sub system - # will eventually redeliver the message. If this parameter is not set, the - # default value of 60 seconds is used. - # Corresponds to the JSON property `ackDeadlineSeconds` - # @return [Fixnum] - attr_accessor :ack_deadline_seconds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @topic = args[:topic] unless args[:topic].nil? - @push_config = args[:push_config] unless args[:push_config].nil? - @ack_deadline_seconds = args[:ack_deadline_seconds] unless args[:ack_deadline_seconds].nil? - end - end - - # Configuration for a push delivery endpoint. - class PushConfig - include Google::Apis::Core::Hashable - - # A URL locating the endpoint to which messages should be pushed. For example, a - # Webhook endpoint might use "https://example.com/push". - # Corresponds to the JSON property `pushEndpoint` - # @return [String] - attr_accessor :push_endpoint - - # Endpoint configuration attributes. Every endpoint has a set of API supported - # attributes that can be used to control different aspects of the message - # delivery. The currently supported attribute is `x-goog-version`, which you can - # use to change the format of the push message. This attribute indicates the - # version of the data expected by the endpoint. This controls the shape of the - # envelope (i.e. its fields and metadata). The endpoint version is based on the - # version of the Pub/Sub API. If not present during the CreateSubscription call, - # it will default to the version of the API used to make such call. If not - # present during a ModifyPushConfig call, its value will not be changed. - # GetSubscription calls will always return a valid version, even if the - # subscription was created without this attribute. The possible values for this - # attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/ - # Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub - # API. - # Corresponds to the JSON property `attributes` - # @return [Hash] - attr_accessor :attributes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @push_endpoint = args[:push_endpoint] unless args[:push_endpoint].nil? - @attributes = args[:attributes] unless args[:attributes].nil? - end - end - - # Response for the ListSubscriptions method. - class ListSubscriptionsResponse - include Google::Apis::Core::Hashable - - # The subscriptions that match the request. - # Corresponds to the JSON property `subscriptions` - # @return [Array] - attr_accessor :subscriptions - - # If not empty, indicates that there may be more subscriptions that match the - # request; this value should be passed in a new ListSubscriptionsRequest to get - # more subscriptions. - # 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) - @subscriptions = args[:subscriptions] unless args[:subscriptions].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # Request for the ModifyAckDeadline method. - class ModifyAckDeadlineRequest - include Google::Apis::Core::Hashable - - # The acknowledgment ID. - # Corresponds to the JSON property `ackId` - # @return [String] - attr_accessor :ack_id - - # List of acknowledgment IDs. - # Corresponds to the JSON property `ackIds` - # @return [Array] - attr_accessor :ack_ids - - # The new ack deadline with respect to the time this request was sent to the Pub/ - # Sub system. Must be >= 0. For example, if the value is 10, the new ack - # deadline will expire 10 seconds after the ModifyAckDeadline call was made. - # Specifying zero may immediately make the message available for another pull - # request. - # Corresponds to the JSON property `ackDeadlineSeconds` - # @return [Fixnum] - attr_accessor :ack_deadline_seconds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ack_id = args[:ack_id] unless args[:ack_id].nil? - @ack_ids = args[:ack_ids] unless args[:ack_ids].nil? - @ack_deadline_seconds = args[:ack_deadline_seconds] unless args[:ack_deadline_seconds].nil? - end - end - - # Request for the Acknowledge method. - class AcknowledgeRequest - include Google::Apis::Core::Hashable - - # The acknowledgment ID for the messages being acknowledged that was returned by - # the Pub/Sub system in the Pull response. Must not be empty. - # Corresponds to the JSON property `ackIds` - # @return [Array] - attr_accessor :ack_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ack_ids = args[:ack_ids] unless args[:ack_ids].nil? - end - end - - # Request for the Pull method. - class PullRequest - include Google::Apis::Core::Hashable - - # If this is specified as true the system will respond immediately even if it is - # not able to return a message in the Pull response. Otherwise the system is - # allowed to wait until at least one message is available rather than returning - # no messages. The client may cancel the request if it does not wish to wait any - # longer for the response. - # Corresponds to the JSON property `returnImmediately` - # @return [Boolean] - attr_accessor :return_immediately - alias_method :return_immediately?, :return_immediately - - # The maximum number of messages returned for this request. The Pub/Sub system - # may return fewer than the number specified. - # Corresponds to the JSON property `maxMessages` - # @return [Fixnum] - attr_accessor :max_messages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @return_immediately = args[:return_immediately] unless args[:return_immediately].nil? - @max_messages = args[:max_messages] unless args[:max_messages].nil? - end - end - - # Response for the Pull method. - class PullResponse - include Google::Apis::Core::Hashable - - # Received Pub/Sub messages. The Pub/Sub system will return zero messages if - # there are no more available in the backlog. The Pub/Sub system may return - # fewer than the maxMessages requested even if there are more messages available - # in the backlog. - # Corresponds to the JSON property `receivedMessages` - # @return [Array] - attr_accessor :received_messages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @received_messages = args[:received_messages] unless args[:received_messages].nil? - end - end - - # A message and its corresponding acknowledgment ID. - class ReceivedMessage - include Google::Apis::Core::Hashable - - # This ID can be used to acknowledge the received message. - # Corresponds to the JSON property `ackId` - # @return [String] - attr_accessor :ack_id - - # A message data and its attributes. - # Corresponds to the JSON property `message` - # @return [Google::Apis::PubsubV1beta2::Message] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ack_id = args[:ack_id] unless args[:ack_id].nil? - @message = args[:message] unless args[:message].nil? - end - end - - # Request for the ModifyPushConfig method. - class ModifyPushConfigRequest - include Google::Apis::Core::Hashable - - # Configuration for a push delivery endpoint. - # Corresponds to the JSON property `pushConfig` - # @return [Google::Apis::PubsubV1beta2::PushConfig] - attr_accessor :push_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @push_config = args[:push_config] unless args[:push_config].nil? - end - end - end - end -end diff --git a/generated/google/apis/pubsub_v1beta2/representations.rb b/generated/google/apis/pubsub_v1beta2/representations.rb deleted file mode 100644 index 659b75d4b..000000000 --- a/generated/google/apis/pubsub_v1beta2/representations.rb +++ /dev/null @@ -1,366 +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 PubsubV1beta2 - - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Binding - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Rule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Condition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LogConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CounterOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DataAccessOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CloudAuditOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Topic - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PublishRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Message - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PublishResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTopicsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTopicSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Subscription - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PushConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ModifyAckDeadlineRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AcknowledgeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PullRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PullResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReceivedMessage - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ModifyPushConfigRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::PubsubV1beta2::Policy, decorator: Google::Apis::PubsubV1beta2::Policy::Representation - - end - end - - # @private - class Policy - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - collection :bindings, as: 'bindings', class: Google::Apis::PubsubV1beta2::Binding, decorator: Google::Apis::PubsubV1beta2::Binding::Representation - - collection :rules, as: 'rules', class: Google::Apis::PubsubV1beta2::Rule, decorator: Google::Apis::PubsubV1beta2::Rule::Representation - - property :etag, :base64 => true, as: 'etag' - end - end - - # @private - class Binding - class Representation < Google::Apis::Core::JsonRepresentation - property :role, as: 'role' - collection :members, as: 'members' - end - end - - # @private - class Rule - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - collection :permissions, as: 'permissions' - property :action, as: 'action' - collection :in, as: 'in' - collection :not_in, as: 'notIn' - collection :conditions, as: 'conditions', class: Google::Apis::PubsubV1beta2::Condition, decorator: Google::Apis::PubsubV1beta2::Condition::Representation - - collection :log_config, as: 'logConfig', class: Google::Apis::PubsubV1beta2::LogConfig, decorator: Google::Apis::PubsubV1beta2::LogConfig::Representation - - end - end - - # @private - class Condition - class Representation < Google::Apis::Core::JsonRepresentation - property :iam, as: 'iam' - property :sys, as: 'sys' - property :svc, as: 'svc' - property :op, as: 'op' - property :value, as: 'value' - collection :values, as: 'values' - end - end - - # @private - class LogConfig - class Representation < Google::Apis::Core::JsonRepresentation - property :counter, as: 'counter', class: Google::Apis::PubsubV1beta2::CounterOptions, decorator: Google::Apis::PubsubV1beta2::CounterOptions::Representation - - property :data_access, as: 'dataAccess', class: Google::Apis::PubsubV1beta2::DataAccessOptions, decorator: Google::Apis::PubsubV1beta2::DataAccessOptions::Representation - - property :cloud_audit, as: 'cloudAudit', class: Google::Apis::PubsubV1beta2::CloudAuditOptions, decorator: Google::Apis::PubsubV1beta2::CloudAuditOptions::Representation - - end - end - - # @private - class CounterOptions - class Representation < Google::Apis::Core::JsonRepresentation - property :metric, as: 'metric' - property :field, as: 'field' - end - end - - # @private - class DataAccessOptions - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class CloudAuditOptions - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - # @private - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - # @private - class Topic - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end - end - - # @private - class PublishRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :messages, as: 'messages', class: Google::Apis::PubsubV1beta2::Message, decorator: Google::Apis::PubsubV1beta2::Message::Representation - - end - end - - # @private - class Message - class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' - hash :attributes, as: 'attributes' - property :message_id, as: 'messageId' - end - end - - # @private - class PublishResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :message_ids, as: 'messageIds' - end - end - - # @private - class ListTopicsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :topics, as: 'topics', class: Google::Apis::PubsubV1beta2::Topic, decorator: Google::Apis::PubsubV1beta2::Topic::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ListTopicSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :subscriptions, as: 'subscriptions' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Empty - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - # @private - class Subscription - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :topic, as: 'topic' - property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1beta2::PushConfig, decorator: Google::Apis::PubsubV1beta2::PushConfig::Representation - - property :ack_deadline_seconds, as: 'ackDeadlineSeconds' - end - end - - # @private - class PushConfig - class Representation < Google::Apis::Core::JsonRepresentation - property :push_endpoint, as: 'pushEndpoint' - hash :attributes, as: 'attributes' - end - end - - # @private - class ListSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :subscriptions, as: 'subscriptions', class: Google::Apis::PubsubV1beta2::Subscription, decorator: Google::Apis::PubsubV1beta2::Subscription::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ModifyAckDeadlineRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :ack_id, as: 'ackId' - collection :ack_ids, as: 'ackIds' - property :ack_deadline_seconds, as: 'ackDeadlineSeconds' - end - end - - # @private - class AcknowledgeRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :ack_ids, as: 'ackIds' - end - end - - # @private - class PullRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :return_immediately, as: 'returnImmediately' - property :max_messages, as: 'maxMessages' - end - end - - # @private - class PullResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :received_messages, as: 'receivedMessages', class: Google::Apis::PubsubV1beta2::ReceivedMessage, decorator: Google::Apis::PubsubV1beta2::ReceivedMessage::Representation - - end - end - - # @private - class ReceivedMessage - class Representation < Google::Apis::Core::JsonRepresentation - property :ack_id, as: 'ackId' - property :message, as: 'message', class: Google::Apis::PubsubV1beta2::Message, decorator: Google::Apis::PubsubV1beta2::Message::Representation - - end - end - - # @private - class ModifyPushConfigRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1beta2::PushConfig, decorator: Google::Apis::PubsubV1beta2::PushConfig::Representation - - end - end - end - end -end diff --git a/generated/google/apis/pubsub_v1beta2/service.rb b/generated/google/apis/pubsub_v1beta2/service.rb deleted file mode 100644 index 2b809e92a..000000000 --- a/generated/google/apis/pubsub_v1beta2/service.rb +++ /dev/null @@ -1,778 +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 PubsubV1beta2 - # Google Cloud Pub/Sub API - # - # Provides reliable, many-to-many, asynchronous messaging between applications. - # - # @example - # require 'google/apis/pubsub_v1beta2' - # - # Pubsub = Google::Apis::PubsubV1beta2 # Alias the module - # service = Pubsub::PubsubService.new - # - # @see https://cloud.google.com/pubsub/docs - class PubsubService < 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://pubsub.googleapis.com/', '') - end - - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Usually some path - # like projects/`project`/zones/`zone`/disks/`disk`. - # @param [Google::Apis::PubsubV1beta2::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_topic_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+resource}:setIamPolicy' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation - command.response_class = Google::Apis::PubsubV1beta2::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the access control policy for a resource. May be empty if no such policy - # or resource exists. - # @param [String] resource - # REQUIRED: The resource for which policy is being requested. Usually some path - # like projects/`project`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_iam_policy_project_topic(resource, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+resource}:getIamPolicy' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation - command.response_class = Google::Apis::PubsubV1beta2::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified resource. - # @param [String] resource - # REQUIRED: The resource for which policy detail is being requested. Usually - # some path like projects/`project`. - # @param [Google::Apis::PubsubV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_topic_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+resource}:testIamPermissions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates the given topic with the given name. - # @param [String] name - # The name of the topic. It must have the format "projects/`project`/topics/` - # topic`" for Google Cloud Pub/Sub API v1beta2. `topic` must start with a letter, - # and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores ( - # _), periods (.), tildes (~), plus (+) or percent signs (%). It must be between - # 3 and 255 characters in length, and it must not start with "goog". - # @param [Google::Apis::PubsubV1beta2::Topic] topic_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::PubsubV1beta2::Topic] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Topic] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+name}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::Topic::Representation - command.request_object = topic_object - command.response_representation = Google::Apis::PubsubV1beta2::Topic::Representation - command.response_class = Google::Apis::PubsubV1beta2::Topic - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Adds one or more messages to the topic. Returns NOT_FOUND if the topic does - # not exist. - # @param [String] topic - # The messages in the request will be published on this topic. - # @param [Google::Apis::PubsubV1beta2::PublishRequest] publish_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::PublishResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::PublishResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+topic}:publish' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::PublishRequest::Representation - command.request_object = publish_request_object - command.response_representation = Google::Apis::PubsubV1beta2::PublishResponse::Representation - command.response_class = Google::Apis::PubsubV1beta2::PublishResponse - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the configuration of a topic. - # @param [String] topic - # The name of the topic to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Topic] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Topic] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_topic(topic, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+topic}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::Topic::Representation - command.response_class = Google::Apis::PubsubV1beta2::Topic - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists matching topics. - # @param [String] project - # The name of the cloud project that topics belong to. - # @param [Fixnum] page_size - # Maximum number of topics to return. - # @param [String] page_token - # The value returned by the last ListTopicsResponse; indicates that this is a - # continuation of a prior ListTopics call, and that the system should return the - # next page of data. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::ListTopicsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::ListTopicsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_topics(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+project}/topics' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::ListTopicsResponse::Representation - command.response_class = Google::Apis::PubsubV1beta2::ListTopicsResponse - command.params['project'] = project unless project.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the topic with the given name. Returns NOT_FOUND if the topic does not - # exist. After a topic is deleted, a new topic may be created with the same name; - # this is an entirely new topic with none of the old configuration or - # subscriptions. Existing subscriptions to this topic are not deleted. - # @param [String] topic - # Name of the topic to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::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_topic(topic, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+topic}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation - command.response_class = Google::Apis::PubsubV1beta2::Empty - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists the name of the subscriptions for this topic. - # @param [String] topic - # The name of the topic that subscriptions are attached to. - # @param [Fixnum] page_size - # Maximum number of subscription names to return. - # @param [String] page_token - # The value returned by the last ListTopicSubscriptionsResponse; indicates that - # this is a continuation of a prior ListTopicSubscriptions call, and that the - # system should return the next page of data. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::ListTopicSubscriptionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::ListTopicSubscriptionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_topic_subscriptions(topic, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+topic}/subscriptions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::ListTopicSubscriptionsResponse::Representation - command.response_class = Google::Apis::PubsubV1beta2::ListTopicSubscriptionsResponse - command.params['topic'] = topic unless topic.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Usually some path - # like projects/`project`/zones/`zone`/disks/`disk`. - # @param [Google::Apis::PubsubV1beta2::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_subscription_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+resource}:setIamPolicy' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation - command.response_class = Google::Apis::PubsubV1beta2::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the access control policy for a resource. May be empty if no such policy - # or resource exists. - # @param [String] resource - # REQUIRED: The resource for which policy is being requested. Usually some path - # like projects/`project`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_iam_policy_project_subscription(resource, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+resource}:getIamPolicy' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::Policy::Representation - command.response_class = Google::Apis::PubsubV1beta2::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified resource. - # @param [String] resource - # REQUIRED: The resource for which policy detail is being requested. Usually - # some path like projects/`project`. - # @param [Google::Apis::PubsubV1beta2::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_subscription_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+resource}:testIamPermissions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::PubsubV1beta2::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a subscription to a given topic for a given subscriber. If the - # subscription already exists, returns ALREADY_EXISTS. If the corresponding - # topic doesn't exist, returns NOT_FOUND. If the name is not provided in the - # request, the server will assign a random name for this subscription on the - # same project as the topic. - # @param [String] name - # The name of the subscription. It must have the format "projects/`project`/ - # subscriptions/`subscription`" for Google Cloud Pub/Sub API v1beta2. ` - # subscription` must start with a letter, and contain only letters ([A-Za-z]), - # numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) - # or percent signs (%). It must be between 3 and 255 characters in length, and - # it must not start with "goog". - # @param [Google::Apis::PubsubV1beta2::Subscription] subscription_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::PubsubV1beta2::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(name, subscription_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+name}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::Subscription::Representation - command.request_object = subscription_object - command.response_representation = Google::Apis::PubsubV1beta2::Subscription::Representation - command.response_class = Google::Apis::PubsubV1beta2::Subscription - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the configuration details of a subscription. - # @param [String] subscription - # The name of the subscription to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+subscription}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::Subscription::Representation - command.response_class = Google::Apis::PubsubV1beta2::Subscription - command.params['subscription'] = subscription unless subscription.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists matching subscriptions. - # @param [String] project - # The name of the cloud project that subscriptions belong to. - # @param [Fixnum] page_size - # Maximum number of subscriptions to return. - # @param [String] page_token - # The value returned by the last ListSubscriptionsResponse; indicates that this - # is a continuation of a prior ListSubscriptions call, and that the system - # should return the next page of data. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::ListSubscriptionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::ListSubscriptionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscriptions(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+project}/subscriptions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::ListSubscriptionsResponse::Representation - command.response_class = Google::Apis::PubsubV1beta2::ListSubscriptionsResponse - command.params['project'] = project unless project.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an existing subscription. All pending messages in the subscription are - # immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After - # a subscription is deleted, a new one may be created with the same name, but - # the new one has no association with the old subscription, or its topic unless - # the same topic is specified. - # @param [String] subscription - # The subscription to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::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_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+subscription}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation - command.response_class = Google::Apis::PubsubV1beta2::Empty - command.params['subscription'] = subscription unless subscription.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Modifies the ack deadline for a specific message. This method is useful to - # indicate that more time is needed to process a message by the subscriber, or - # to make the message available for redelivery if the processing was interrupted. - # @param [String] subscription - # The name of the subscription. - # @param [Google::Apis::PubsubV1beta2::ModifyAckDeadlineRequest] modify_ack_deadline_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::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 modify_ack_deadline(subscription, modify_ack_deadline_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+subscription}:modifyAckDeadline' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::ModifyAckDeadlineRequest::Representation - command.request_object = modify_ack_deadline_request_object - command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation - command.response_class = Google::Apis::PubsubV1beta2::Empty - command.params['subscription'] = subscription unless subscription.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Acknowledges the messages associated with the ack tokens in the - # AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from - # the subscription. Acknowledging a message whose ack deadline has expired may - # succeed, but such a message may be redelivered later. Acknowledging a message - # more than once will not result in an error. - # @param [String] subscription - # The subscription whose message is being acknowledged. - # @param [Google::Apis::PubsubV1beta2::AcknowledgeRequest] acknowledge_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def acknowledge(subscription, acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+subscription}:acknowledge' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::AcknowledgeRequest::Representation - command.request_object = acknowledge_request_object - command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation - command.response_class = Google::Apis::PubsubV1beta2::Empty - command.params['subscription'] = subscription unless subscription.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Pulls messages from the server. Returns an empty list if there are no messages - # available in the backlog. The server may return UNAVAILABLE if there are too - # many concurrent pull requests pending for the given subscription. - # @param [String] subscription - # The subscription from which messages should be pulled. - # @param [Google::Apis::PubsubV1beta2::PullRequest] pull_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::PullResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::PullResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def pull(subscription, pull_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+subscription}:pull' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::PullRequest::Representation - command.request_object = pull_request_object - command.response_representation = Google::Apis::PubsubV1beta2::PullResponse::Representation - command.response_class = Google::Apis::PubsubV1beta2::PullResponse - command.params['subscription'] = subscription unless subscription.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Modifies the PushConfig for a specified subscription. This may be used to - # change a push subscription to a pull one (signified by an empty PushConfig) or - # vice versa, or change the endpoint URL and other attributes of a push - # subscription. Messages will accumulate for delivery continuously through the - # call regardless of changes to the PushConfig. - # @param [String] subscription - # The name of the subscription. - # @param [Google::Apis::PubsubV1beta2::ModifyPushConfigRequest] modify_push_config_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1beta2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1beta2::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 modify_push_config(subscription, modify_push_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - path = 'v1beta2/{+subscription}:modifyPushConfig' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::PubsubV1beta2::ModifyPushConfigRequest::Representation - command.request_object = modify_push_config_request_object - command.response_representation = Google::Apis::PubsubV1beta2::Empty::Representation - command.response_class = Google::Apis::PubsubV1beta2::Empty - command.params['subscription'] = subscription unless subscription.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 diff --git a/generated/google/apis/qpx_express_v1.rb b/generated/google/apis/qpx_express_v1.rb deleted file mode 100644 index 5c4be715a..000000000 --- a/generated/google/apis/qpx_express_v1.rb +++ /dev/null @@ -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/qpx_express_v1/service.rb' -require 'google/apis/qpx_express_v1/classes.rb' -require 'google/apis/qpx_express_v1/representations.rb' - -module Google - module Apis - # QPX Express API - # - # Lets you find the least expensive flights between an origin and a destination. - # - # @see http://developers.google.com/qpx-express - module QpxExpressV1 - VERSION = 'V1' - REVISION = '20140321' - end - end -end diff --git a/generated/google/apis/qpx_express_v1/classes.rb b/generated/google/apis/qpx_express_v1/classes.rb deleted file mode 100644 index 18c6531ee..000000000 --- a/generated/google/apis/qpx_express_v1/classes.rb +++ /dev/null @@ -1,1268 +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 QpxExpressV1 - - # The make, model, and type of an aircraft. - class AircraftData - include Google::Apis::Core::Hashable - - # The aircraft code. For example, for a Boeing 777 the code would be 777. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # Identifies this as an aircraftData object. Value: the fixed string qpxexpress# - # aircraftData - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of an aircraft, for example Boeing 777. - # 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? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # An airport. - class AirportData - include Google::Apis::Core::Hashable - - # The city code an airport is located in. For example, for JFK airport, this is - # NYC. - # Corresponds to the JSON property `city` - # @return [String] - attr_accessor :city - - # An airport's code. For example, for Boston Logan airport, this is BOS. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # Identifies this as an airport object. Value: the fixed string qpxexpress# - # airportData. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of an airport. For example, for airport BOS the name is "Boston Logan - # International". - # 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) - @city = args[:city] unless args[:city].nil? - @code = args[:code] unless args[:code].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Information about an item of baggage. - class BagDescriptor - include Google::Apis::Core::Hashable - - # Provides the commercial name for an optional service. - # Corresponds to the JSON property `commercialName` - # @return [String] - attr_accessor :commercial_name - - # How many of this type of bag will be checked on this flight. - # Corresponds to the JSON property `count` - # @return [Fixnum] - attr_accessor :count - - # A description of the baggage. - # Corresponds to the JSON property `description` - # @return [Array] - attr_accessor :description - - # Identifies this as a baggage object. Value: the fixed string qpxexpress# - # bagDescriptor. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The standard IATA subcode used to identify this optional service. - # Corresponds to the JSON property `subcode` - # @return [String] - attr_accessor :subcode - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @commercial_name = args[:commercial_name] unless args[:commercial_name].nil? - @count = args[:count] unless args[:count].nil? - @description = args[:description] unless args[:description].nil? - @kind = args[:kind] unless args[:kind].nil? - @subcode = args[:subcode] unless args[:subcode].nil? - end - end - - # Information about a carrier (ie. an airline, bus line, railroad, etc) that - # might be useful to display to an end-user. - class CarrierData - include Google::Apis::Core::Hashable - - # The IATA designator of a carrier (airline, etc). For example, for American - # Airlines, the code is AA. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # Identifies this as a kind of carrier (ie. an airline, bus line, railroad, etc). - # Value: the fixed string qpxexpress#carrierData. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The long, full name of a carrier. For example: American Airlines. - # 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? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Information about a city that might be useful to an end-user; typically the - # city of an airport. - class CityData - include Google::Apis::Core::Hashable - - # The IATA character ID of a city. For example, for Boston this is BOS. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # The two-character country code of the country the city is located in. For - # example, US for the United States of America. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # Identifies this as a city, typically with one or more airports. Value: the - # fixed string qpxexpress#cityData. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The full name of a city. An example would be: New York. - # 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? - @country = args[:country] unless args[:country].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Detailed information about components found in the solutions of this response, - # including a trip's airport, city, taxes, airline, and aircraft. - class Data - include Google::Apis::Core::Hashable - - # The aircraft that is flying between an origin and destination. - # Corresponds to the JSON property `aircraft` - # @return [Array] - attr_accessor :aircraft - - # The airport of an origin or destination. - # Corresponds to the JSON property `airport` - # @return [Array] - attr_accessor :airport - - # The airline carrier of the aircraft flying between an origin and destination. - # Allowed values are IATA carrier codes. - # Corresponds to the JSON property `carrier` - # @return [Array] - attr_accessor :carrier - - # The city that is either the origin or destination of part of a trip. - # Corresponds to the JSON property `city` - # @return [Array] - attr_accessor :city - - # Identifies this as QPX Express response resource, including a trip's airport, - # city, taxes, airline, and aircraft. Value: the fixed string qpxexpress#data. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The taxes due for flying between an origin and a destination. - # Corresponds to the JSON property `tax` - # @return [Array] - attr_accessor :tax - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aircraft = args[:aircraft] unless args[:aircraft].nil? - @airport = args[:airport] unless args[:airport].nil? - @carrier = args[:carrier] unless args[:carrier].nil? - @city = args[:city] unless args[:city].nil? - @kind = args[:kind] unless args[:kind].nil? - @tax = args[:tax] unless args[:tax].nil? - end - end - - # Complete information about a fare used in the solution to a low-fare search - # query. In the airline industry a fare is a price an airline charges for one- - # way travel between two points. A fare typically contains a carrier code, two - # city codes, a price, and a fare basis. (A fare basis is a one-to-eight - # character alphanumeric code used to identify a fare.) - class FareInfo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `basisCode` - # @return [String] - attr_accessor :basis_code - - # The carrier of the aircraft or other vehicle commuting between two points. - # Corresponds to the JSON property `carrier` - # @return [String] - attr_accessor :carrier - - # The city code of the city the trip ends at. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # A unique identifier of the fare. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this as a fare object. Value: the fixed string qpxexpress#fareInfo. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The city code of the city the trip begins at. - # Corresponds to the JSON property `origin` - # @return [String] - attr_accessor :origin - - # Whether this is a private fare, for example one offered only to select - # customers rather than the general public. - # Corresponds to the JSON property `private` - # @return [Boolean] - attr_accessor :private - alias_method :private?, :private - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @basis_code = args[:basis_code] unless args[:basis_code].nil? - @carrier = args[:carrier] unless args[:carrier].nil? - @destination = args[:destination] unless args[:destination].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @origin = args[:origin] unless args[:origin].nil? - @private = args[:private] unless args[:private].nil? - end - end - - # A flight is a sequence of legs with the same airline carrier and flight number. - # (A leg is the smallest unit of travel, in the case of a flight a takeoff - # immediately followed by a landing at two set points on a particular carrier - # with a particular flight number.) The naive view is that a flight is scheduled - # travel of an aircraft between two points, with possibly intermediate stops, - # but carriers will frequently list flights that require a change of aircraft - # between legs. - class FlightInfo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `carrier` - # @return [String] - attr_accessor :carrier - - # The flight number. - # Corresponds to the JSON property `number` - # @return [String] - attr_accessor :number - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @carrier = args[:carrier] unless args[:carrier].nil? - @number = args[:number] unless args[:number].nil? - end - end - - # Information about free baggage allowed on one segment of a trip. - class FreeBaggageAllowance - include Google::Apis::Core::Hashable - - # A representation of a type of bag, such as an ATPCo subcode, Commercial Name, - # or other description. - # Corresponds to the JSON property `bagDescriptor` - # @return [Array] - attr_accessor :bag_descriptor - - # The maximum number of kilos all the free baggage together may weigh. - # Corresponds to the JSON property `kilos` - # @return [Fixnum] - attr_accessor :kilos - - # The maximum number of kilos any one piece of baggage may weigh. - # Corresponds to the JSON property `kilosPerPiece` - # @return [Fixnum] - attr_accessor :kilos_per_piece - - # Identifies this as free baggage object, allowed on one segment of a trip. - # Value: the fixed string qpxexpress#freeBaggageAllowance. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of free pieces of baggage allowed. - # Corresponds to the JSON property `pieces` - # @return [Fixnum] - attr_accessor :pieces - - # The number of pounds of free baggage allowed. - # Corresponds to the JSON property `pounds` - # @return [Fixnum] - attr_accessor :pounds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bag_descriptor = args[:bag_descriptor] unless args[:bag_descriptor].nil? - @kilos = args[:kilos] unless args[:kilos].nil? - @kilos_per_piece = args[:kilos_per_piece] unless args[:kilos_per_piece].nil? - @kind = args[:kind] unless args[:kind].nil? - @pieces = args[:pieces] unless args[:pieces].nil? - @pounds = args[:pounds] unless args[:pounds].nil? - end - end - - # Information about a leg. (A leg is the smallest unit of travel, in the case of - # a flight a takeoff immediately followed by a landing at two set points on a - # particular carrier with a particular flight number.) - class LegInfo - include Google::Apis::Core::Hashable - - # The aircraft (or bus, ferry, railcar, etc) travelling between the two points - # of this leg. - # Corresponds to the JSON property `aircraft` - # @return [String] - attr_accessor :aircraft - - # The scheduled time of arrival at the destination of the leg, local to the - # point of arrival. - # Corresponds to the JSON property `arrivalTime` - # @return [String] - attr_accessor :arrival_time - - # Whether you have to change planes following this leg. Only applies to the next - # leg. - # Corresponds to the JSON property `changePlane` - # @return [Boolean] - attr_accessor :change_plane - alias_method :change_plane?, :change_plane - - # Duration of a connection following this leg, in minutes. - # Corresponds to the JSON property `connectionDuration` - # @return [Fixnum] - attr_accessor :connection_duration - - # The scheduled departure time of the leg, local to the point of departure. - # Corresponds to the JSON property `departureTime` - # @return [String] - attr_accessor :departure_time - - # The leg destination as a city and airport. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # The terminal the flight is scheduled to arrive at. - # Corresponds to the JSON property `destinationTerminal` - # @return [String] - attr_accessor :destination_terminal - - # The scheduled travelling time from the origin to the destination. - # Corresponds to the JSON property `duration` - # @return [Fixnum] - attr_accessor :duration - - # An identifier that uniquely identifies this leg in the solution. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this as a leg object. A leg is the smallest unit of travel, in the - # case of a flight a takeoff immediately followed by a landing at two set points - # on a particular carrier with a particular flight number. Value: the fixed - # string qpxexpress#legInfo. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A simple, general description of the meal(s) served on the flight, for example: - # "Hot meal". - # Corresponds to the JSON property `meal` - # @return [String] - attr_accessor :meal - - # The number of miles in this leg. - # Corresponds to the JSON property `mileage` - # @return [Fixnum] - attr_accessor :mileage - - # In percent, the published on time performance on this leg. - # Corresponds to the JSON property `onTimePerformance` - # @return [Fixnum] - attr_accessor :on_time_performance - - # Department of Transportation disclosure information on the actual operator of - # a flight in a code share. (A code share refers to a marketing agreement - # between two carriers, where one carrier will list in its schedules (and take - # bookings for) flights that are actually operated by another carrier.) - # Corresponds to the JSON property `operatingDisclosure` - # @return [String] - attr_accessor :operating_disclosure - - # The leg origin as a city and airport. - # Corresponds to the JSON property `origin` - # @return [String] - attr_accessor :origin - - # The terminal the flight is scheduled to depart from. - # Corresponds to the JSON property `originTerminal` - # @return [String] - attr_accessor :origin_terminal - - # Whether passenger information must be furnished to the United States - # Transportation Security Administration (TSA) prior to departure. - # Corresponds to the JSON property `secure` - # @return [Boolean] - attr_accessor :secure - alias_method :secure?, :secure - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aircraft = args[:aircraft] unless args[:aircraft].nil? - @arrival_time = args[:arrival_time] unless args[:arrival_time].nil? - @change_plane = args[:change_plane] unless args[:change_plane].nil? - @connection_duration = args[:connection_duration] unless args[:connection_duration].nil? - @departure_time = args[:departure_time] unless args[:departure_time].nil? - @destination = args[:destination] unless args[:destination].nil? - @destination_terminal = args[:destination_terminal] unless args[:destination_terminal].nil? - @duration = args[:duration] unless args[:duration].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @meal = args[:meal] unless args[:meal].nil? - @mileage = args[:mileage] unless args[:mileage].nil? - @on_time_performance = args[:on_time_performance] unless args[:on_time_performance].nil? - @operating_disclosure = args[:operating_disclosure] unless args[:operating_disclosure].nil? - @origin = args[:origin] unless args[:origin].nil? - @origin_terminal = args[:origin_terminal] unless args[:origin_terminal].nil? - @secure = args[:secure] unless args[:secure].nil? - end - end - - # The number and type of passengers. Unfortunately the definition of an infant, - # child, adult, and senior citizen varies across carriers and reservation - # systems. - class PassengerCounts - include Google::Apis::Core::Hashable - - # The number of passengers that are adults. - # Corresponds to the JSON property `adultCount` - # @return [Fixnum] - attr_accessor :adult_count - - # The number of passengers that are children. - # Corresponds to the JSON property `childCount` - # @return [Fixnum] - attr_accessor :child_count - - # The number of passengers that are infants travelling in the lap of an adult. - # Corresponds to the JSON property `infantInLapCount` - # @return [Fixnum] - attr_accessor :infant_in_lap_count - - # The number of passengers that are infants each assigned a seat. - # Corresponds to the JSON property `infantInSeatCount` - # @return [Fixnum] - attr_accessor :infant_in_seat_count - - # Identifies this as a passenger count object, representing the number of - # passengers. Value: the fixed string qpxexpress#passengerCounts. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of passengers that are senior citizens. - # Corresponds to the JSON property `seniorCount` - # @return [Fixnum] - attr_accessor :senior_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @adult_count = args[:adult_count] unless args[:adult_count].nil? - @child_count = args[:child_count] unless args[:child_count].nil? - @infant_in_lap_count = args[:infant_in_lap_count] unless args[:infant_in_lap_count].nil? - @infant_in_seat_count = args[:infant_in_seat_count] unless args[:infant_in_seat_count].nil? - @kind = args[:kind] unless args[:kind].nil? - @senior_count = args[:senior_count] unless args[:senior_count].nil? - end - end - - # The price of one or more travel segments. The currency used to purchase - # tickets is usually determined by the sale/ticketing city or the sale/ticketing - # country, unless none are specified, in which case it defaults to that of the - # journey origin country. - class PricingInfo - include Google::Apis::Core::Hashable - - # The total fare in the base fare currency (the currency of the country of - # origin). This element is only present when the sales currency and the currency - # of the country of commencement are different. - # Corresponds to the JSON property `baseFareTotal` - # @return [String] - attr_accessor :base_fare_total - - # The fare used to price one or more segments. - # Corresponds to the JSON property `fare` - # @return [Array] - attr_accessor :fare - - # The horizontal fare calculation. This is a field on a ticket that displays all - # of the relevant items that go into the calculation of the fare. - # Corresponds to the JSON property `fareCalculation` - # @return [String] - attr_accessor :fare_calculation - - # Identifies this as a pricing object, representing the price of one or more - # travel segments. Value: the fixed string qpxexpress#pricingInfo. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The latest ticketing time for this pricing assuming the reservation occurs at - # ticketing time and there is no change in fares/rules. The time is local to the - # point of sale (POS). - # Corresponds to the JSON property `latestTicketingTime` - # @return [String] - attr_accessor :latest_ticketing_time - - # The number and type of passengers. Unfortunately the definition of an infant, - # child, adult, and senior citizen varies across carriers and reservation - # systems. - # Corresponds to the JSON property `passengers` - # @return [Google::Apis::QpxExpressV1::PassengerCounts] - attr_accessor :passengers - - # The passenger type code for this pricing. An alphanumeric code used by a - # carrier to restrict fares to certain categories of passenger. For instance, a - # fare might be valid only for senior citizens. - # Corresponds to the JSON property `ptc` - # @return [String] - attr_accessor :ptc - - # Whether the fares on this pricing are refundable. - # Corresponds to the JSON property `refundable` - # @return [Boolean] - attr_accessor :refundable - alias_method :refundable?, :refundable - - # The total fare in the sale or equivalent currency. - # Corresponds to the JSON property `saleFareTotal` - # @return [String] - attr_accessor :sale_fare_total - - # The taxes in the sale or equivalent currency. - # Corresponds to the JSON property `saleTaxTotal` - # @return [String] - attr_accessor :sale_tax_total - - # Total per-passenger price (fare and tax) in the sale or equivalent currency. - # Corresponds to the JSON property `saleTotal` - # @return [String] - attr_accessor :sale_total - - # The per-segment price and baggage information. - # Corresponds to the JSON property `segmentPricing` - # @return [Array] - attr_accessor :segment_pricing - - # The taxes used to calculate the tax total per ticket. - # Corresponds to the JSON property `tax` - # @return [Array] - attr_accessor :tax - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @base_fare_total = args[:base_fare_total] unless args[:base_fare_total].nil? - @fare = args[:fare] unless args[:fare].nil? - @fare_calculation = args[:fare_calculation] unless args[:fare_calculation].nil? - @kind = args[:kind] unless args[:kind].nil? - @latest_ticketing_time = args[:latest_ticketing_time] unless args[:latest_ticketing_time].nil? - @passengers = args[:passengers] unless args[:passengers].nil? - @ptc = args[:ptc] unless args[:ptc].nil? - @refundable = args[:refundable] unless args[:refundable].nil? - @sale_fare_total = args[:sale_fare_total] unless args[:sale_fare_total].nil? - @sale_tax_total = args[:sale_tax_total] unless args[:sale_tax_total].nil? - @sale_total = args[:sale_total] unless args[:sale_total].nil? - @segment_pricing = args[:segment_pricing] unless args[:segment_pricing].nil? - @tax = args[:tax] unless args[:tax].nil? - end - end - - # Details of a segment of a flight; a segment is one or more consecutive legs on - # the same flight. For example a hypothetical flight ZZ001, from DFW to OGG, - # would have one segment with two legs: DFW to HNL (leg 1), HNL to OGG (leg 2), - # and DFW to OGG (legs 1 and 2). - class SegmentInfo - include Google::Apis::Core::Hashable - - # The booking code or class for this segment. - # Corresponds to the JSON property `bookingCode` - # @return [String] - attr_accessor :booking_code - - # The number of seats available in this booking code on this segment. - # Corresponds to the JSON property `bookingCodeCount` - # @return [Fixnum] - attr_accessor :booking_code_count - - # The cabin booked for this segment. - # Corresponds to the JSON property `cabin` - # @return [String] - attr_accessor :cabin - - # In minutes, the duration of the connection following this segment. - # Corresponds to the JSON property `connectionDuration` - # @return [Fixnum] - attr_accessor :connection_duration - - # The duration of the flight segment in minutes. - # Corresponds to the JSON property `duration` - # @return [Fixnum] - attr_accessor :duration - - # A flight is a sequence of legs with the same airline carrier and flight number. - # (A leg is the smallest unit of travel, in the case of a flight a takeoff - # immediately followed by a landing at two set points on a particular carrier - # with a particular flight number.) The naive view is that a flight is scheduled - # travel of an aircraft between two points, with possibly intermediate stops, - # but carriers will frequently list flights that require a change of aircraft - # between legs. - # Corresponds to the JSON property `flight` - # @return [Google::Apis::QpxExpressV1::FlightInfo] - attr_accessor :flight - - # An id uniquely identifying the segment in the solution. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this as a segment object. A segment is one or more consecutive legs - # on the same flight. For example a hypothetical flight ZZ001, from DFW to OGG, - # could have one segment with two legs: DFW to HNL (leg 1), HNL to OGG (leg 2). - # Value: the fixed string qpxexpress#segmentInfo. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The legs composing this segment. - # Corresponds to the JSON property `leg` - # @return [Array] - attr_accessor :leg - - # The solution-based index of a segment in a married segment group. Married - # segments can only be booked together. For example, an airline might report a - # certain booking code as sold out from Boston to Pittsburgh, but as available - # as part of two married segments Boston to Chicago connecting through - # Pittsburgh. For example content of this field, consider the round-trip flight - # ZZ1 PHX-PHL ZZ2 PHL-CLT ZZ3 CLT-PHX. This has three segments, with the two - # outbound ones (ZZ1 ZZ2) married. In this case, the two outbound segments - # belong to married segment group 0, and the return segment belongs to married - # segment group 1. - # Corresponds to the JSON property `marriedSegmentGroup` - # @return [String] - attr_accessor :married_segment_group - - # Whether the operation of this segment remains subject to government approval. - # Corresponds to the JSON property `subjectToGovernmentApproval` - # @return [Boolean] - attr_accessor :subject_to_government_approval - alias_method :subject_to_government_approval?, :subject_to_government_approval - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @booking_code = args[:booking_code] unless args[:booking_code].nil? - @booking_code_count = args[:booking_code_count] unless args[:booking_code_count].nil? - @cabin = args[:cabin] unless args[:cabin].nil? - @connection_duration = args[:connection_duration] unless args[:connection_duration].nil? - @duration = args[:duration] unless args[:duration].nil? - @flight = args[:flight] unless args[:flight].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @leg = args[:leg] unless args[:leg].nil? - @married_segment_group = args[:married_segment_group] unless args[:married_segment_group].nil? - @subject_to_government_approval = args[:subject_to_government_approval] unless args[:subject_to_government_approval].nil? - end - end - - # The price of this segment. - class SegmentPricing - include Google::Apis::Core::Hashable - - # A segment identifier unique within a single solution. It is used to refer to - # different parts of the same solution. - # Corresponds to the JSON property `fareId` - # @return [String] - attr_accessor :fare_id - - # Details of the free baggage allowance on this segment. - # Corresponds to the JSON property `freeBaggageOption` - # @return [Array] - attr_accessor :free_baggage_option - - # Identifies this as a segment pricing object, representing the price of this - # segment. Value: the fixed string qpxexpress#segmentPricing. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Unique identifier in the response of this segment. - # Corresponds to the JSON property `segmentId` - # @return [String] - attr_accessor :segment_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fare_id = args[:fare_id] unless args[:fare_id].nil? - @free_baggage_option = args[:free_baggage_option] unless args[:free_baggage_option].nil? - @kind = args[:kind] unless args[:kind].nil? - @segment_id = args[:segment_id] unless args[:segment_id].nil? - end - end - - # Information about a slice. A slice represents a traveller's intent, the - # portion of a low-fare search corresponding to a traveler's request to get - # between two points. One-way journeys are generally expressed using 1 slice, - # round-trips using 2. For example, if a traveler specifies the following trip - # in a user interface: - # | Origin | Destination | Departure Date | | BOS | LAX | March 10, 2007 | | LAX - # | SYD | March 17, 2007 | | SYD | BOS | March 22, 2007 | - # then this is a three slice trip. - class SliceInfo - include Google::Apis::Core::Hashable - - # The duration of the slice in minutes. - # Corresponds to the JSON property `duration` - # @return [Fixnum] - attr_accessor :duration - - # Identifies this as a slice object. A slice represents a traveller's intent, - # the portion of a low-fare search corresponding to a traveler's request to get - # between two points. One-way journeys are generally expressed using 1 slice, - # round-trips using 2. Value: the fixed string qpxexpress#sliceInfo. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The segment(s) constituting the slice. - # Corresponds to the JSON property `segment` - # @return [Array] - attr_accessor :segment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @duration = args[:duration] unless args[:duration].nil? - @kind = args[:kind] unless args[:kind].nil? - @segment = args[:segment] unless args[:segment].nil? - end - end - - # Criteria a desired slice must satisfy. - class SliceInput - include Google::Apis::Core::Hashable - - # Slices with only the carriers in this alliance should be returned; do not use - # this field with permittedCarrier. Allowed values are ONEWORLD, SKYTEAM, and - # STAR. - # Corresponds to the JSON property `alliance` - # @return [String] - attr_accessor :alliance - - # Departure date in YYYY-MM-DD format. - # Corresponds to the JSON property `date` - # @return [String] - attr_accessor :date - - # Airport or city IATA designator of the destination. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # Identifies this as a slice input object, representing the criteria a desired - # slice must satisfy. Value: the fixed string qpxexpress#sliceInput. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The longest connection between two legs, in minutes, you are willing to accept. - # Corresponds to the JSON property `maxConnectionDuration` - # @return [Fixnum] - attr_accessor :max_connection_duration - - # The maximum number of stops you are willing to accept in this slice. - # Corresponds to the JSON property `maxStops` - # @return [Fixnum] - attr_accessor :max_stops - - # Airport or city IATA designator of the origin. - # Corresponds to the JSON property `origin` - # @return [String] - attr_accessor :origin - - # A list of 2-letter IATA airline designators. Slices with only these carriers - # should be returned. - # Corresponds to the JSON property `permittedCarrier` - # @return [Array] - attr_accessor :permitted_carrier - - # Two times in a single day defining a time range. - # Corresponds to the JSON property `permittedDepartureTime` - # @return [Google::Apis::QpxExpressV1::TimeOfDayRange] - attr_accessor :permitted_departure_time - - # Prefer solutions that book in this cabin for this slice. Allowed values are - # COACH, PREMIUM_COACH, BUSINESS, and FIRST. - # Corresponds to the JSON property `preferredCabin` - # @return [String] - attr_accessor :preferred_cabin - - # A list of 2-letter IATA airline designators. Exclude slices that use these - # carriers. - # Corresponds to the JSON property `prohibitedCarrier` - # @return [Array] - attr_accessor :prohibited_carrier - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alliance = args[:alliance] unless args[:alliance].nil? - @date = args[:date] unless args[:date].nil? - @destination = args[:destination] unless args[:destination].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_connection_duration = args[:max_connection_duration] unless args[:max_connection_duration].nil? - @max_stops = args[:max_stops] unless args[:max_stops].nil? - @origin = args[:origin] unless args[:origin].nil? - @permitted_carrier = args[:permitted_carrier] unless args[:permitted_carrier].nil? - @permitted_departure_time = args[:permitted_departure_time] unless args[:permitted_departure_time].nil? - @preferred_cabin = args[:preferred_cabin] unless args[:preferred_cabin].nil? - @prohibited_carrier = args[:prohibited_carrier] unless args[:prohibited_carrier].nil? - end - end - - # Tax data. - class TaxData - include Google::Apis::Core::Hashable - - # An identifier uniquely identifying a tax in a response. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this as a tax data object, representing some tax. Value: the fixed - # string qpxexpress#taxData. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of a tax. - # 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 - - # Tax information. - class TaxInfo - include Google::Apis::Core::Hashable - - # Whether this is a government charge or a carrier surcharge. - # Corresponds to the JSON property `chargeType` - # @return [String] - attr_accessor :charge_type - - # The code to enter in the ticket's tax box. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # For government charges, the country levying the charge. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # Identifier uniquely identifying this tax in a response. Not present for - # unnamed carrier surcharges. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this as a tax information object. Value: the fixed string - # qpxexpress#taxInfo. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The price of the tax in the sales or equivalent currency. - # Corresponds to the JSON property `salePrice` - # @return [String] - attr_accessor :sale_price - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @charge_type = args[:charge_type] unless args[:charge_type].nil? - @code = args[:code] unless args[:code].nil? - @country = args[:country] unless args[:country].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @sale_price = args[:sale_price] unless args[:sale_price].nil? - end - end - - # Two times in a single day defining a time range. - class TimeOfDayRange - include Google::Apis::Core::Hashable - - # The earliest time of day in HH:MM format. - # Corresponds to the JSON property `earliestTime` - # @return [String] - attr_accessor :earliest_time - - # Identifies this as a time of day range object, representing two times in a - # single day defining a time range. Value: the fixed string qpxexpress# - # timeOfDayRange. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The latest time of day in HH:MM format. - # Corresponds to the JSON property `latestTime` - # @return [String] - attr_accessor :latest_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @earliest_time = args[:earliest_time] unless args[:earliest_time].nil? - @kind = args[:kind] unless args[:kind].nil? - @latest_time = args[:latest_time] unless args[:latest_time].nil? - end - end - - # Trip information. - class TripOption - include Google::Apis::Core::Hashable - - # Identifier uniquely identifying this trip in a response. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies this as a trip information object. Value: the fixed string - # qpxexpress#tripOption. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Per passenger pricing information. - # Corresponds to the JSON property `pricing` - # @return [Array] - attr_accessor :pricing - - # The total price for all passengers on the trip, in the form of a currency - # followed by an amount, e.g. USD253.35. - # Corresponds to the JSON property `saleTotal` - # @return [String] - attr_accessor :sale_total - - # The slices that make up this trip's itinerary. - # Corresponds to the JSON property `slice` - # @return [Array] - attr_accessor :slice - - 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? - @pricing = args[:pricing] unless args[:pricing].nil? - @sale_total = args[:sale_total] unless args[:sale_total].nil? - @slice = args[:slice] unless args[:slice].nil? - end - end - - # A QPX Express search request, which will yield one or more solutions. - class TripOptionsRequest - include Google::Apis::Core::Hashable - - # Do not return solutions that cost more than this price. The alphabetical part - # of the price is in ISO 4217. The format, in regex, is [A-Z]`3`\d+(\.\d+)? - # Example: $102.07 - # Corresponds to the JSON property `maxPrice` - # @return [String] - attr_accessor :max_price - - # The number and type of passengers. Unfortunately the definition of an infant, - # child, adult, and senior citizen varies across carriers and reservation - # systems. - # Corresponds to the JSON property `passengers` - # @return [Google::Apis::QpxExpressV1::PassengerCounts] - attr_accessor :passengers - - # Return only solutions with refundable fares. - # Corresponds to the JSON property `refundable` - # @return [Boolean] - attr_accessor :refundable - alias_method :refundable?, :refundable - - # IATA country code representing the point of sale. This determines the " - # equivalent amount paid" currency for the ticket. - # Corresponds to the JSON property `saleCountry` - # @return [String] - attr_accessor :sale_country - - # The slices that make up the itinerary of this trip. A slice represents a - # traveler's intent, the portion of a low-fare search corresponding to a - # traveler's request to get between two points. One-way journeys are generally - # expressed using one slice, round-trips using two. An example of a one slice - # trip with three segments might be BOS-SYD, SYD-LAX, LAX-BOS if the traveler - # only stopped in SYD and LAX just long enough to change planes. - # Corresponds to the JSON property `slice` - # @return [Array] - attr_accessor :slice - - # The number of solutions to return, maximum 500. - # Corresponds to the JSON property `solutions` - # @return [Fixnum] - attr_accessor :solutions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max_price = args[:max_price] unless args[:max_price].nil? - @passengers = args[:passengers] unless args[:passengers].nil? - @refundable = args[:refundable] unless args[:refundable].nil? - @sale_country = args[:sale_country] unless args[:sale_country].nil? - @slice = args[:slice] unless args[:slice].nil? - @solutions = args[:solutions] unless args[:solutions].nil? - end - end - - # A QPX Express search response. - class TripOptionsResponse - include Google::Apis::Core::Hashable - - # Detailed information about components found in the solutions of this response, - # including a trip's airport, city, taxes, airline, and aircraft. - # Corresponds to the JSON property `data` - # @return [Google::Apis::QpxExpressV1::Data] - attr_accessor :data - - # Identifies this as a QPX Express trip response object, which consists of zero - # or more solutions. Value: the fixed string qpxexpress#tripOptions. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An identifier uniquely identifying this response. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # A list of priced itinerary solutions to the QPX Express query. - # Corresponds to the JSON property `tripOption` - # @return [Array] - attr_accessor :trip_option - - 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? - @request_id = args[:request_id] unless args[:request_id].nil? - @trip_option = args[:trip_option] unless args[:trip_option].nil? - end - end - - # A QPX Express search request. - class SearchTripsRequest - include Google::Apis::Core::Hashable - - # A QPX Express search request, which will yield one or more solutions. - # Corresponds to the JSON property `request` - # @return [Google::Apis::QpxExpressV1::TripOptionsRequest] - attr_accessor :request - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request = args[:request] unless args[:request].nil? - end - end - - # A QPX Express search response. - class SearchTripsResponse - include Google::Apis::Core::Hashable - - # Identifies this as a QPX Express API search response resource. Value: the - # fixed string qpxExpress#tripsSearch. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A QPX Express search response. - # Corresponds to the JSON property `trips` - # @return [Google::Apis::QpxExpressV1::TripOptionsResponse] - attr_accessor :trips - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @trips = args[:trips] unless args[:trips].nil? - end - end - end - end -end diff --git a/generated/google/apis/qpx_express_v1/representations.rb b/generated/google/apis/qpx_express_v1/representations.rb deleted file mode 100644 index 27b76b5ff..000000000 --- a/generated/google/apis/qpx_express_v1/representations.rb +++ /dev/null @@ -1,424 +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 QpxExpressV1 - - class AircraftData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AirportData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BagDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CarrierData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CityData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Data - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FareInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FlightInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class FreeBaggageAllowance - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LegInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PassengerCounts - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PricingInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SegmentInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SegmentPricing - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SliceInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SliceInput - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TaxData - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TaxInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TimeOfDayRange - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TripOption - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TripOptionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TripOptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchTripsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SearchTripsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AircraftData - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class AirportData - class Representation < Google::Apis::Core::JsonRepresentation - property :city, as: 'city' - property :code, as: 'code' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class BagDescriptor - class Representation < Google::Apis::Core::JsonRepresentation - property :commercial_name, as: 'commercialName' - property :count, as: 'count' - collection :description, as: 'description' - property :kind, as: 'kind' - property :subcode, as: 'subcode' - end - end - - # @private - class CarrierData - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class CityData - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :country, as: 'country' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class Data - class Representation < Google::Apis::Core::JsonRepresentation - collection :aircraft, as: 'aircraft', class: Google::Apis::QpxExpressV1::AircraftData, decorator: Google::Apis::QpxExpressV1::AircraftData::Representation - - collection :airport, as: 'airport', class: Google::Apis::QpxExpressV1::AirportData, decorator: Google::Apis::QpxExpressV1::AirportData::Representation - - collection :carrier, as: 'carrier', class: Google::Apis::QpxExpressV1::CarrierData, decorator: Google::Apis::QpxExpressV1::CarrierData::Representation - - collection :city, as: 'city', class: Google::Apis::QpxExpressV1::CityData, decorator: Google::Apis::QpxExpressV1::CityData::Representation - - property :kind, as: 'kind' - collection :tax, as: 'tax', class: Google::Apis::QpxExpressV1::TaxData, decorator: Google::Apis::QpxExpressV1::TaxData::Representation - - end - end - - # @private - class FareInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :basis_code, as: 'basisCode' - property :carrier, as: 'carrier' - property :destination, as: 'destination' - property :id, as: 'id' - property :kind, as: 'kind' - property :origin, as: 'origin' - property :private, as: 'private' - end - end - - # @private - class FlightInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :carrier, as: 'carrier' - property :number, as: 'number' - end - end - - # @private - class FreeBaggageAllowance - class Representation < Google::Apis::Core::JsonRepresentation - collection :bag_descriptor, as: 'bagDescriptor', class: Google::Apis::QpxExpressV1::BagDescriptor, decorator: Google::Apis::QpxExpressV1::BagDescriptor::Representation - - property :kilos, as: 'kilos' - property :kilos_per_piece, as: 'kilosPerPiece' - property :kind, as: 'kind' - property :pieces, as: 'pieces' - property :pounds, as: 'pounds' - end - end - - # @private - class LegInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :aircraft, as: 'aircraft' - property :arrival_time, as: 'arrivalTime' - property :change_plane, as: 'changePlane' - property :connection_duration, as: 'connectionDuration' - property :departure_time, as: 'departureTime' - property :destination, as: 'destination' - property :destination_terminal, as: 'destinationTerminal' - property :duration, as: 'duration' - property :id, as: 'id' - property :kind, as: 'kind' - property :meal, as: 'meal' - property :mileage, as: 'mileage' - property :on_time_performance, as: 'onTimePerformance' - property :operating_disclosure, as: 'operatingDisclosure' - property :origin, as: 'origin' - property :origin_terminal, as: 'originTerminal' - property :secure, as: 'secure' - end - end - - # @private - class PassengerCounts - class Representation < Google::Apis::Core::JsonRepresentation - property :adult_count, as: 'adultCount' - property :child_count, as: 'childCount' - property :infant_in_lap_count, as: 'infantInLapCount' - property :infant_in_seat_count, as: 'infantInSeatCount' - property :kind, as: 'kind' - property :senior_count, as: 'seniorCount' - end - end - - # @private - class PricingInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :base_fare_total, as: 'baseFareTotal' - collection :fare, as: 'fare', class: Google::Apis::QpxExpressV1::FareInfo, decorator: Google::Apis::QpxExpressV1::FareInfo::Representation - - property :fare_calculation, as: 'fareCalculation' - property :kind, as: 'kind' - property :latest_ticketing_time, as: 'latestTicketingTime' - property :passengers, as: 'passengers', class: Google::Apis::QpxExpressV1::PassengerCounts, decorator: Google::Apis::QpxExpressV1::PassengerCounts::Representation - - property :ptc, as: 'ptc' - property :refundable, as: 'refundable' - property :sale_fare_total, as: 'saleFareTotal' - property :sale_tax_total, as: 'saleTaxTotal' - property :sale_total, as: 'saleTotal' - collection :segment_pricing, as: 'segmentPricing', class: Google::Apis::QpxExpressV1::SegmentPricing, decorator: Google::Apis::QpxExpressV1::SegmentPricing::Representation - - collection :tax, as: 'tax', class: Google::Apis::QpxExpressV1::TaxInfo, decorator: Google::Apis::QpxExpressV1::TaxInfo::Representation - - end - end - - # @private - class SegmentInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :booking_code, as: 'bookingCode' - property :booking_code_count, as: 'bookingCodeCount' - property :cabin, as: 'cabin' - property :connection_duration, as: 'connectionDuration' - property :duration, as: 'duration' - property :flight, as: 'flight', class: Google::Apis::QpxExpressV1::FlightInfo, decorator: Google::Apis::QpxExpressV1::FlightInfo::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - collection :leg, as: 'leg', class: Google::Apis::QpxExpressV1::LegInfo, decorator: Google::Apis::QpxExpressV1::LegInfo::Representation - - property :married_segment_group, as: 'marriedSegmentGroup' - property :subject_to_government_approval, as: 'subjectToGovernmentApproval' - end - end - - # @private - class SegmentPricing - class Representation < Google::Apis::Core::JsonRepresentation - property :fare_id, as: 'fareId' - collection :free_baggage_option, as: 'freeBaggageOption', class: Google::Apis::QpxExpressV1::FreeBaggageAllowance, decorator: Google::Apis::QpxExpressV1::FreeBaggageAllowance::Representation - - property :kind, as: 'kind' - property :segment_id, as: 'segmentId' - end - end - - # @private - class SliceInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :duration, as: 'duration' - property :kind, as: 'kind' - collection :segment, as: 'segment', class: Google::Apis::QpxExpressV1::SegmentInfo, decorator: Google::Apis::QpxExpressV1::SegmentInfo::Representation - - end - end - - # @private - class SliceInput - class Representation < Google::Apis::Core::JsonRepresentation - property :alliance, as: 'alliance' - property :date, as: 'date' - property :destination, as: 'destination' - property :kind, as: 'kind' - property :max_connection_duration, as: 'maxConnectionDuration' - property :max_stops, as: 'maxStops' - property :origin, as: 'origin' - collection :permitted_carrier, as: 'permittedCarrier' - property :permitted_departure_time, as: 'permittedDepartureTime', class: Google::Apis::QpxExpressV1::TimeOfDayRange, decorator: Google::Apis::QpxExpressV1::TimeOfDayRange::Representation - - property :preferred_cabin, as: 'preferredCabin' - collection :prohibited_carrier, as: 'prohibitedCarrier' - end - end - - # @private - class TaxData - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - end - end - - # @private - class TaxInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :charge_type, as: 'chargeType' - property :code, as: 'code' - property :country, as: 'country' - property :id, as: 'id' - property :kind, as: 'kind' - property :sale_price, as: 'salePrice' - end - end - - # @private - class TimeOfDayRange - class Representation < Google::Apis::Core::JsonRepresentation - property :earliest_time, as: 'earliestTime' - property :kind, as: 'kind' - property :latest_time, as: 'latestTime' - end - end - - # @private - class TripOption - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - collection :pricing, as: 'pricing', class: Google::Apis::QpxExpressV1::PricingInfo, decorator: Google::Apis::QpxExpressV1::PricingInfo::Representation - - property :sale_total, as: 'saleTotal' - collection :slice, as: 'slice', class: Google::Apis::QpxExpressV1::SliceInfo, decorator: Google::Apis::QpxExpressV1::SliceInfo::Representation - - end - end - - # @private - class TripOptionsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :max_price, as: 'maxPrice' - property :passengers, as: 'passengers', class: Google::Apis::QpxExpressV1::PassengerCounts, decorator: Google::Apis::QpxExpressV1::PassengerCounts::Representation - - property :refundable, as: 'refundable' - property :sale_country, as: 'saleCountry' - collection :slice, as: 'slice', class: Google::Apis::QpxExpressV1::SliceInput, decorator: Google::Apis::QpxExpressV1::SliceInput::Representation - - property :solutions, as: 'solutions' - end - end - - # @private - class TripOptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data', class: Google::Apis::QpxExpressV1::Data, decorator: Google::Apis::QpxExpressV1::Data::Representation - - property :kind, as: 'kind' - property :request_id, as: 'requestId' - collection :trip_option, as: 'tripOption', class: Google::Apis::QpxExpressV1::TripOption, decorator: Google::Apis::QpxExpressV1::TripOption::Representation - - end - end - - # @private - class SearchTripsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :request, as: 'request', class: Google::Apis::QpxExpressV1::TripOptionsRequest, decorator: Google::Apis::QpxExpressV1::TripOptionsRequest::Representation - - end - end - - # @private - class SearchTripsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :trips, as: 'trips', class: Google::Apis::QpxExpressV1::TripOptionsResponse, decorator: Google::Apis::QpxExpressV1::TripOptionsResponse::Representation - - end - end - end - end -end diff --git a/generated/google/apis/qpx_express_v1/service.rb b/generated/google/apis/qpx_express_v1/service.rb deleted file mode 100644 index 6da04902d..000000000 --- a/generated/google/apis/qpx_express_v1/service.rb +++ /dev/null @@ -1,101 +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 QpxExpressV1 - # QPX Express API - # - # Lets you find the least expensive flights between an origin and a destination. - # - # @example - # require 'google/apis/qpx_express_v1' - # - # QpxExpress = Google::Apis::QpxExpressV1 # Alias the module - # service = QpxExpress::QPXExpressService.new - # - # @see http://developers.google.com/qpx-express - class QPXExpressService < 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/', 'qpxExpress/v1/trips/') - end - - # Returns a list of flights. - # @param [Google::Apis::QpxExpressV1::SearchTripsRequest] search_trips_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::QpxExpressV1::SearchTripsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::QpxExpressV1::SearchTripsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trips(search_trips_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'search' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::QpxExpressV1::SearchTripsRequest::Representation - command.request_object = search_trips_request_object - command.response_representation = Google::Apis::QpxExpressV1::SearchTripsResponse::Representation - command.response_class = Google::Apis::QpxExpressV1::SearchTripsResponse - 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 diff --git a/generated/google/apis/replicapool_v1beta2.rb b/generated/google/apis/replicapool_v1beta2.rb deleted file mode 100644 index e854d5b14..000000000 --- a/generated/google/apis/replicapool_v1beta2.rb +++ /dev/null @@ -1,41 +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/replicapool_v1beta2/service.rb' -require 'google/apis/replicapool_v1beta2/classes.rb' -require 'google/apis/replicapool_v1beta2/representations.rb' - -module Google - module Apis - # Google Compute Engine Instance Group Manager API - # - # The Google Compute Engine Instance Group Manager API provides groups of - # homogenous Compute Engine Instances. - # - # @see https://developers.google.com/compute/docs/instance-groups/manager/v1beta2 - module ReplicapoolV1beta2 - VERSION = 'V1beta2' - REVISION = '20150311' - - # 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' - end - end -end diff --git a/generated/google/apis/replicapool_v1beta2/classes.rb b/generated/google/apis/replicapool_v1beta2/classes.rb deleted file mode 100644 index 5aeba3f19..000000000 --- a/generated/google/apis/replicapool_v1beta2/classes.rb +++ /dev/null @@ -1,621 +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 ReplicapoolV1beta2 - - # An Instance Group Manager resource. - class InstanceGroupManager - include Google::Apis::Core::Hashable - - # The autohealing policy for this managed instance group. You can specify only - # one value. - # Corresponds to the JSON property `autoHealingPolicies` - # @return [Array] - attr_accessor :auto_healing_policies - - # The base instance name to use for instances in this group. The value must be a - # valid RFC1035 name. Supported characters are lowercase letters, numbers, and - # hyphens (-). Instances are named by appending a hyphen and a random four- - # character string to the base instance name. - # Corresponds to the JSON property `baseInstanceName` - # @return [String] - attr_accessor :base_instance_name - - # [Output only] The time the instance group manager was created, in RFC3339 text - # format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # [Output only] The number of instances that currently exist and are a part of - # this group. This includes instances that are starting but are not yet RUNNING, - # and instances that are in the process of being deleted or abandoned. - # Corresponds to the JSON property `currentSize` - # @return [Fixnum] - attr_accessor :current_size - - # An optional textual description of the instance group manager. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output only] Fingerprint of the instance group manager. This field is used - # for optimistic locking. An up-to-date fingerprint must be provided in order to - # modify the Instance Group Manager resource. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # [Output only] The full URL of the instance group created by the manager. This - # group contains all of the instances being managed, and cannot contain non- - # managed instances. - # Corresponds to the JSON property `group` - # @return [String] - attr_accessor :group - - # [Output only] A server-assigned unique identifier for the resource. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The full URL to an instance template from which all new instances will be - # created. - # Corresponds to the JSON property `instanceTemplate` - # @return [String] - attr_accessor :instance_template - - # [Output only] The resource type. Always replicapool#instanceGroupManager. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the instance group manager. Must be 1-63 characters long and - # comply with RFC1035. Supported characters include lowercase letters, numbers, - # and hyphens. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output only] The fully qualified URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The full URL of all target pools to which new instances in the group are added. - # Updating the target pool values does not affect existing instances. - # Corresponds to the JSON property `targetPools` - # @return [Array] - attr_accessor :target_pools - - # [Output only] The number of instances that the manager is attempting to - # maintain. Deleting or abandoning instances affects this number, as does - # resizing the group. - # Corresponds to the JSON property `targetSize` - # @return [Fixnum] - attr_accessor :target_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_healing_policies = args[:auto_healing_policies] unless args[:auto_healing_policies].nil? - @base_instance_name = args[:base_instance_name] unless args[:base_instance_name].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @current_size = args[:current_size] unless args[:current_size].nil? - @description = args[:description] unless args[:description].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @group = args[:group] unless args[:group].nil? - @id = args[:id] unless args[:id].nil? - @instance_template = args[:instance_template] unless args[:instance_template].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_pools = args[:target_pools] unless args[:target_pools].nil? - @target_size = args[:target_size] unless args[:target_size].nil? - end - end - - # - class InstanceGroupManagerList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of instance resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # - class AbandonInstancesRequest - include Google::Apis::Core::Hashable - - # The names of one or more instances to abandon. For example: - # ` 'instances': [ 'instance-c3po', 'instance-r2d2' ] ` - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instances = args[:instances] unless args[:instances].nil? - end - end - - # - class DeleteInstancesRequest - include Google::Apis::Core::Hashable - - # Names of instances to delete. - # Example: 'instance-foo', 'instance-bar' - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instances = args[:instances] unless args[:instances].nil? - end - end - - # - class RecreateInstancesRequest - include Google::Apis::Core::Hashable - - # The names of one or more instances to recreate. For example: - # ` 'instances': [ 'instance-c3po', 'instance-r2d2' ] ` - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instances = args[:instances] unless args[:instances].nil? - end - end - - # - class SetInstanceTemplateRequest - include Google::Apis::Core::Hashable - - # The full URL to an Instance Template from which all new instances will be - # created. - # Corresponds to the JSON property `instanceTemplate` - # @return [String] - attr_accessor :instance_template - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instance_template = args[:instance_template] unless args[:instance_template].nil? - end - end - - # - class SetTargetPoolsRequest - include Google::Apis::Core::Hashable - - # The current fingerprint of the Instance Group Manager resource. If this does - # not match the server-side fingerprint of the resource, then the request will - # be rejected. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # A list of fully-qualified URLs to existing Target Pool resources. New - # instances in the Instance Group Manager will be added to the specified target - # pools; existing instances are not affected. - # Corresponds to the JSON property `targetPools` - # @return [Array] - attr_accessor :target_pools - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @target_pools = args[:target_pools] unless args[:target_pools].nil? - end - end - - # An operation resource, used to manage asynchronous API requests. - class Operation - include Google::Apis::Core::Hashable - - # [Output only] An optional identifier specified by the client when the mutation - # was initiated. Must be unique for all operation resources in the project. - # Corresponds to the JSON property `clientOperationId` - # @return [String] - attr_accessor :client_operation_id - - # [Output Only] The time that this operation was requested, in RFC3339 text - # format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # [Output Only] The time that this operation was completed, in RFC3339 text - # format. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # [Output Only] If errors occurred during processing of this operation, this - # field will be populated. - # Corresponds to the JSON property `error` - # @return [Google::Apis::ReplicapoolV1beta2::Operation::Error] - attr_accessor :error - - # [Output only] If operation fails, the HTTP error message returned. - # Corresponds to the JSON property `httpErrorMessage` - # @return [String] - attr_accessor :http_error_message - - # [Output only] If operation fails, the HTTP error status code returned. - # Corresponds to the JSON property `httpErrorStatusCode` - # @return [Fixnum] - attr_accessor :http_error_status_code - - # [Output Only] Unique identifier for the resource, generated by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The time that this operation was requested, in RFC3339 text - # format. - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Output only] Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output only] Type of the operation. Operations include insert, update, and - # delete. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # [Output only] An optional progress indicator that ranges from 0 to 100. There - # is no requirement that this be linear or support any granularity of operations. - # This should not be used to guess at when the operation will be complete. This - # number should be monotonically increasing as the operation progresses. - # Corresponds to the JSON property `progress` - # @return [Fixnum] - attr_accessor :progress - - # [Output Only] URL of the region where the operation resides. Only available - # when performing regional operations. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server-defined fully-qualified URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The time that this operation was started by the server, in - # RFC3339 text format. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # [Output Only] Status of the operation. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] An optional textual description of the current status of the - # operation. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # [Output Only] Unique target ID which identifies a particular incarnation of - # the target. - # Corresponds to the JSON property `targetId` - # @return [String] - attr_accessor :target_id - - # [Output only] URL of the resource the operation is mutating. - # Corresponds to the JSON property `targetLink` - # @return [String] - attr_accessor :target_link - - # [Output Only] User who requested the operation, for example: user@example.com. - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - # [Output Only] If there are issues with this operation, a warning is returned. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - # [Output Only] URL of the zone where the operation resides. Only available when - # performing per-zone operations. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @client_operation_id = args[:client_operation_id] 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 - - # [Output Only] If errors occurred during processing of this operation, this - # field will be populated. - class Error - include Google::Apis::Core::Hashable - - # [Output Only] The array of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - 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 - - # [Output Only] The error type identifier for this error. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Indicates the field in the request which caused the error. This - # property is optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output Only] An optional, human-readable error message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] 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 - - # [Output only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output only] Metadata for this warning in key:value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output only] Optional human-readable details for this 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 - - # [Output Only] Metadata key for this warning. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] Metadata value for this 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 - - # - class OperationList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The operation resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # - class ReplicaPoolAutoHealingPolicy - include Google::Apis::Core::Hashable - - # The URL for the HealthCheck that signals autohealing. - # Corresponds to the JSON property `healthCheck` - # @return [String] - attr_accessor :health_check - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @health_check = args[:health_check] unless args[:health_check].nil? - end - end - end - end -end diff --git a/generated/google/apis/replicapool_v1beta2/representations.rb b/generated/google/apis/replicapool_v1beta2/representations.rb deleted file mode 100644 index c0c65b29e..000000000 --- a/generated/google/apis/replicapool_v1beta2/representations.rb +++ /dev/null @@ -1,235 +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 ReplicapoolV1beta2 - - class InstanceGroupManager - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InstanceGroupManagerList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AbandonInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DeleteInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RecreateInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SetInstanceTemplateRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SetTargetPoolsRequest - 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 ReplicaPoolAutoHealingPolicy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class InstanceGroupManager - class Representation < Google::Apis::Core::JsonRepresentation - collection :auto_healing_policies, as: 'autoHealingPolicies', class: Google::Apis::ReplicapoolV1beta2::ReplicaPoolAutoHealingPolicy, decorator: Google::Apis::ReplicapoolV1beta2::ReplicaPoolAutoHealingPolicy::Representation - - property :base_instance_name, as: 'baseInstanceName' - property :creation_timestamp, as: 'creationTimestamp' - property :current_size, as: 'currentSize' - property :description, as: 'description' - property :fingerprint, :base64 => true, as: 'fingerprint' - property :group, as: 'group' - property :id, as: 'id' - property :instance_template, as: 'instanceTemplate' - property :kind, as: 'kind' - property :name, as: 'name' - property :self_link, as: 'selfLink' - collection :target_pools, as: 'targetPools' - property :target_size, as: 'targetSize' - end - end - - # @private - class InstanceGroupManagerList - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :items, as: 'items', class: Google::Apis::ReplicapoolV1beta2::InstanceGroupManager, decorator: Google::Apis::ReplicapoolV1beta2::InstanceGroupManager::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class AbandonInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :instances, as: 'instances' - end - end - - # @private - class DeleteInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :instances, as: 'instances' - end - end - - # @private - class RecreateInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :instances, as: 'instances' - end - end - - # @private - class SetInstanceTemplateRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :instance_template, as: 'instanceTemplate' - end - end - - # @private - class SetTargetPoolsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :fingerprint, :base64 => true, as: 'fingerprint' - collection :target_pools, as: 'targetPools' - 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::ReplicapoolV1beta2::Operation::Error, decorator: Google::Apis::ReplicapoolV1beta2::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::ReplicapoolV1beta2::Operation::Warning, decorator: Google::Apis::ReplicapoolV1beta2::Operation::Warning::Representation - - property :zone, as: 'zone' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::ReplicapoolV1beta2::Operation::Error::Error, decorator: Google::Apis::ReplicapoolV1beta2::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::ReplicapoolV1beta2::Operation::Warning::Datum, decorator: Google::Apis::ReplicapoolV1beta2::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::ReplicapoolV1beta2::Operation, decorator: Google::Apis::ReplicapoolV1beta2::Operation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ReplicaPoolAutoHealingPolicy - class Representation < Google::Apis::Core::JsonRepresentation - property :health_check, as: 'healthCheck' - end - end - end - end -end diff --git a/generated/google/apis/replicapool_v1beta2/service.rb b/generated/google/apis/replicapool_v1beta2/service.rb deleted file mode 100644 index ea37095b8..000000000 --- a/generated/google/apis/replicapool_v1beta2/service.rb +++ /dev/null @@ -1,620 +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 ReplicapoolV1beta2 - # Google Compute Engine Instance Group Manager API - # - # The Google Compute Engine Instance Group Manager API provides groups of - # homogenous Compute Engine Instances. - # - # @example - # require 'google/apis/replicapool_v1beta2' - # - # Replicapool = Google::Apis::ReplicapoolV1beta2 # Alias the module - # service = Replicapool::ReplicapoolService.new - # - # @see https://developers.google.com/compute/docs/instance-groups/manager/v1beta2 - class ReplicapoolService < 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/', 'replicapool/v1beta2/projects/') - end - - # Removes the specified instances from the managed instance group, and from any - # target pools of which they were members, without deleting the instances. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # The name of the instance group manager. - # @param [Google::Apis::ReplicapoolV1beta2::AbandonInstancesRequest] abandon_instances_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::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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 abandon_instances(project, zone, instance_group_manager, abandon_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ReplicapoolV1beta2::AbandonInstancesRequest::Representation - command.request_object = abandon_instances_request_object - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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 instance group manager and all instances contained within. If you' - # d like to delete the manager without deleting the instances, you must first - # abandon the instances to remove them from the group. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # Name of the Instance Group Manager resource to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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 instances. The instances are deleted, then removed from - # the instance group and any target pools of which they were a member. The - # targetSize of the instance group manager is reduced by the number of instances - # deleted. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # The name of the instance group manager. - # @param [Google::Apis::ReplicapoolV1beta2::DeleteInstancesRequest] delete_instances_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::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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_instances(project, zone, instance_group_manager, delete_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ReplicapoolV1beta2::DeleteInstancesRequest::Representation - command.request_object = delete_instances_request_object - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified Instance Group Manager resource. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # Name of the instance resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ReplicapoolV1beta2::InstanceGroupManager] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::InstanceGroupManager] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ReplicapoolV1beta2::InstanceGroupManager::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::InstanceGroupManager - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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 an instance group manager, as well as the instance group and the - # specified number of instances. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [Google::Apis::ReplicapoolV1beta2::InstanceGroupManager] instance_group_manager_object - # @param [Fixnum] size - # Number of instances that should exist. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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_instance_group_manager(project, zone, instance_group_manager_object = nil, size: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ReplicapoolV1beta2::InstanceGroupManager::Representation - command.request_object = instance_group_manager_object - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.query['size'] = size unless size.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 Instance Group Manager resources contained within the - # specified zone. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] filter - # Optional. Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Optional. Maximum count of results to be returned. Maximum value is 500 and - # default value is 500. - # @param [String] page_token - # Optional. Tag returned by a previous list request truncated by maxResults. - # Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ReplicapoolV1beta2::InstanceGroupManagerList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::InstanceGroupManagerList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instance_group_managers(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}/instanceGroupManagers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ReplicapoolV1beta2::InstanceGroupManagerList::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::InstanceGroupManagerList - 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 - - # Recreates the specified instances. The instances are deleted, then recreated - # using the instance group manager's current instance template. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # The name of the instance group manager. - # @param [Google::Apis::ReplicapoolV1beta2::RecreateInstancesRequest] recreate_instances_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::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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 recreate_instances(project, zone, instance_group_manager, recreate_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ReplicapoolV1beta2::RecreateInstancesRequest::Representation - command.request_object = recreate_instances_request_object - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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 - - # Resizes the managed instance group up or down. If resized up, new instances - # are created using the current instance template. If resized down, instances - # are removed in the order outlined in Resizing a managed instance group. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # The name of the instance group manager. - # @param [Fixnum] size - # Number of instances that should exist in this Instance Group Manager. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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 resize_instance(project, zone, instance_group_manager, size: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? - command.query['size'] = size unless size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Sets the instance template to use when creating new instances in this group. - # Existing instances are not affected. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # The name of the instance group manager. - # @param [Google::Apis::ReplicapoolV1beta2::SetInstanceTemplateRequest] set_instance_template_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_instance_template(project, zone, instance_group_manager, set_instance_template_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ReplicapoolV1beta2::SetInstanceTemplateRequest::Representation - command.request_object = set_instance_template_request_object - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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 - - # Modifies the target pools to which all new instances in this group are - # assigned. Existing instances in the group are not affected. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the instance group manager resides. - # @param [String] instance_group_manager - # The name of the instance group manager. - # @param [Google::Apis::ReplicapoolV1beta2::SetTargetPoolsRequest] set_target_pools_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::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_target_pools(project, zone, instance_group_manager, set_target_pools_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ReplicapoolV1beta2::SetTargetPoolsRequest::Representation - command.request_object = set_target_pools_request_object - command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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 - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] operation - # Name of the operation resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ReplicapoolV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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::ReplicapoolV1beta2::Operation::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::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 - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] filter - # Optional. Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Optional. Maximum count of results to be returned. Maximum value is 500 and - # default value is 500. - # @param [String] page_token - # Optional. Tag returned by a previous list request truncated by maxResults. - # Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ReplicapoolV1beta2::OperationList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolV1beta2::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::ReplicapoolV1beta2::OperationList::Representation - command.response_class = Google::Apis::ReplicapoolV1beta2::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 - - 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 diff --git a/generated/google/apis/replicapoolupdater_v1beta1.rb b/generated/google/apis/replicapoolupdater_v1beta1.rb deleted file mode 100644 index 601e4a618..000000000 --- a/generated/google/apis/replicapoolupdater_v1beta1.rb +++ /dev/null @@ -1,41 +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/replicapoolupdater_v1beta1/service.rb' -require 'google/apis/replicapoolupdater_v1beta1/classes.rb' -require 'google/apis/replicapoolupdater_v1beta1/representations.rb' - -module Google - module Apis - # Google Compute Engine Instance Group Updater API - # - # The Google Compute Engine Instance Group Updater API provides services for - # updating groups of Compute Engine Instances. - # - # @see https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service - module ReplicapoolupdaterV1beta1 - VERSION = 'V1beta1' - REVISION = '20150326' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # View and manage replica pools - AUTH_REPLICAPOOL = 'https://www.googleapis.com/auth/replicapool' - - # View replica pools - AUTH_REPLICAPOOL_READONLY = 'https://www.googleapis.com/auth/replicapool.readonly' - end - end -end diff --git a/generated/google/apis/replicapoolupdater_v1beta1/classes.rb b/generated/google/apis/replicapoolupdater_v1beta1/classes.rb deleted file mode 100644 index 1009da504..000000000 --- a/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +++ /dev/null @@ -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 '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 ReplicapoolupdaterV1beta1 - - # Update of a single instance. - class InstanceUpdate - include Google::Apis::Core::Hashable - - # Errors that occurred during the instance update. - # Corresponds to the JSON property `error` - # @return [Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdate::Error] - attr_accessor :error - - # URL of the instance being updated. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # Status of the instance update. Possible values are: - # - "PENDING": The instance update is pending execution. - # - "ROLLING_FORWARD": The instance update is going forward. - # - "ROLLING_BACK": The instance update is being rolled back. - # - "PAUSED": The instance update is temporarily paused (inactive). - # - "ROLLED_OUT": The instance update is finished, the instance is running the - # new template. - # - "ROLLED_BACK": The instance update is finished, the instance has been - # reverted to the previous template. - # - "CANCELLED": The instance update is paused and no longer can be resumed, - # undefined in which template the instance is running. - # 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) - @error = args[:error] unless args[:error].nil? - @instance = args[:instance] unless args[:instance].nil? - @status = args[:status] unless args[:status].nil? - end - - # Errors that occurred during the instance update. - class Error - include Google::Apis::Core::Hashable - - # [Output Only] The array of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - 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 - - # [Output Only] The error type identifier for this error. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Indicates the field in the request that caused the error. This - # property is optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output Only] An optional, human-readable error message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] unless args[:code].nil? - @location = args[:location] unless args[:location].nil? - @message = args[:message] unless args[:message].nil? - end - end - end - end - - # Response returned by ListInstanceUpdates method. - class InstanceUpdateList - include Google::Apis::Core::Hashable - - # Collection of requested instance updates. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] The fully qualified URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 - - # An operation resource, used to manage asynchronous API requests. - class Operation - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `clientOperationId` - # @return [String] - attr_accessor :client_operation_id - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # [Output Only] If errors occurred during processing of this operation, this - # field will be populated. - # Corresponds to the JSON property `error` - # @return [Google::Apis::ReplicapoolupdaterV1beta1::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 - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The time that this operation was requested. This is in RFC 3339 - # format. - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Output Only] Type of the resource. Always kind#operation for Operation - # resources. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # - # Corresponds to the JSON property `progress` - # @return [Fixnum] - attr_accessor :progress - - # [Output Only] URL of the region where the operation resides. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server defined URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The time that this operation was started by the server. This is - # in RFC 3339 format. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # [Output Only] Status of the operation. Can be one of the following: "PENDING", - # "RUNNING", or "DONE". - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] An optional textual description of the current status of the - # operation. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # [Output Only] Unique target id which identifies a particular incarnation of - # the target. - # Corresponds to the JSON property `targetId` - # @return [String] - attr_accessor :target_id - - # [Output Only] URL of the resource the operation is mutating. - # 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] - attr_accessor :warnings - - # [Output Only] URL of the zone where the operation 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) - @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 - - # [Output Only] If errors occurred during processing of this operation, this - # field will be populated. - class Error - include Google::Apis::Core::Hashable - - # [Output Only] The array of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - 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 - - # [Output Only] The error type identifier for this error. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Indicates the field in the request that caused the error. This - # property is optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output Only] An optional, human-readable error message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] 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 - - # [Output only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output only] Metadata for this warning in key:value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output only] Optional human-readable details for this 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 - - # [Output Only] Metadata key for this warning. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] Metadata value for this 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 - - # The following represents a resource describing a single update (rollout) of a - # group of instances to the given template. - class RollingUpdate - include Google::Apis::Core::Hashable - - # Specifies the action to take for each instance within the instance group. This - # can be RECREATE which will recreate each instance and is only available for - # managed instance groups. It can also be REBOOT which performs a soft reboot - # for each instance and is only available for regular (non-managed) instance - # groups. - # Corresponds to the JSON property `actionType` - # @return [String] - attr_accessor :action_type - - # [Output Only] Creation timestamp in RFC3339 text format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # An optional textual description of the resource; provided by the client when - # the resource is created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # [Output Only] Errors that occurred during the rolling update. - # Corresponds to the JSON property `error` - # @return [Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Error] - attr_accessor :error - - # [Output Only] Unique identifier for the resource; defined by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Fully-qualified URL of an instance group being updated. Exactly one of - # instanceGroupManager and instanceGroup must be set. - # Corresponds to the JSON property `instanceGroup` - # @return [String] - attr_accessor :instance_group - - # Fully-qualified URL of an instance group manager being updated. Exactly one of - # instanceGroupManager and instanceGroup must be set. - # Corresponds to the JSON property `instanceGroupManager` - # @return [String] - attr_accessor :instance_group_manager - - # Fully-qualified URL of an instance template to apply. - # Corresponds to the JSON property `instanceTemplate` - # @return [String] - attr_accessor :instance_template - - # [Output Only] Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Parameters of the update process. - # Corresponds to the JSON property `policy` - # @return [Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Policy] - attr_accessor :policy - - # [Output Only] An optional progress indicator that ranges from 0 to 100. There - # is no requirement that this be linear or support any granularity of operations. - # This should not be used to guess at when the update will be complete. This - # number should be monotonically increasing as the update progresses. - # Corresponds to the JSON property `progress` - # @return [Fixnum] - attr_accessor :progress - - # [Output Only] The fully qualified URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] Status of the update. Possible values are: - # - "ROLLING_FORWARD": The update is going forward. - # - "ROLLING_BACK": The update is being rolled back. - # - "PAUSED": The update is temporarily paused (inactive). - # - "ROLLED_OUT": The update is finished, all instances have been updated - # successfully. - # - "ROLLED_BACK": The update is finished, all instances have been reverted to - # the previous template. - # - "CANCELLED": The update is paused and no longer can be resumed, undefined - # how many instances are running in which template. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] An optional textual description of the current status of the - # update. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # [Output Only] User who requested the update, for example: user@example.com. - # 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) - @action_type = args[:action_type] unless args[:action_type].nil? - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @error = args[:error] unless args[:error].nil? - @id = args[:id] unless args[:id].nil? - @instance_group = args[:instance_group] unless args[:instance_group].nil? - @instance_group_manager = args[:instance_group_manager] unless args[:instance_group_manager].nil? - @instance_template = args[:instance_template] unless args[:instance_template].nil? - @kind = args[:kind] unless args[:kind].nil? - @policy = args[:policy] unless args[:policy].nil? - @progress = args[:progress] unless args[:progress].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @status_message = args[:status_message] unless args[:status_message].nil? - @user = args[:user] unless args[:user].nil? - end - - # [Output Only] Errors that occurred during the rolling update. - class Error - include Google::Apis::Core::Hashable - - # [Output Only] The array of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - 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 - - # [Output Only] The error type identifier for this error. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Indicates the field in the request that caused the error. This - # property is optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output Only] An optional, human-readable error message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] unless args[:code].nil? - @location = args[:location] unless args[:location].nil? - @message = args[:message] unless args[:message].nil? - end - end - end - - # Parameters of the update process. - class Policy - include Google::Apis::Core::Hashable - - # Number of instances to update before the updater pauses the rolling update. - # Corresponds to the JSON property `autoPauseAfterInstances` - # @return [Fixnum] - attr_accessor :auto_pause_after_instances - - # The maximum amount of time that the updater waits for a HEALTHY state after - # all of the update steps are complete. If the HEALTHY state is not received - # before the deadline, the instance update is considered a failure. - # Corresponds to the JSON property `instanceStartupTimeoutSec` - # @return [Fixnum] - attr_accessor :instance_startup_timeout_sec - - # The maximum number of instances that can be updated simultaneously. An - # instance update is considered complete only after the instance is restarted - # and initialized. - # Corresponds to the JSON property `maxNumConcurrentInstances` - # @return [Fixnum] - attr_accessor :max_num_concurrent_instances - - # The maximum number of instance updates that can fail before the group update - # is considered a failure. An instance update is considered failed if any of its - # update actions (e.g. Stop call on Instance resource in Rolling Reboot) failed - # with permanent failure, or if the instance is in an UNHEALTHY state after it - # finishes all of the update actions. - # Corresponds to the JSON property `maxNumFailedInstances` - # @return [Fixnum] - attr_accessor :max_num_failed_instances - - # The minimum amount of time that the updater spends to update each instance. - # Update time is the time it takes to complete all update actions (e.g. Stop - # call on Instance resource in Rolling Reboot), reboot, and initialize. If the - # instance update finishes early, the updater pauses for the remainder of the - # time before it starts the next instance update. - # Corresponds to the JSON property `minInstanceUpdateTimeSec` - # @return [Fixnum] - attr_accessor :min_instance_update_time_sec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_pause_after_instances = args[:auto_pause_after_instances] unless args[:auto_pause_after_instances].nil? - @instance_startup_timeout_sec = args[:instance_startup_timeout_sec] unless args[:instance_startup_timeout_sec].nil? - @max_num_concurrent_instances = args[:max_num_concurrent_instances] unless args[:max_num_concurrent_instances].nil? - @max_num_failed_instances = args[:max_num_failed_instances] unless args[:max_num_failed_instances].nil? - @min_instance_update_time_sec = args[:min_instance_update_time_sec] unless args[:min_instance_update_time_sec].nil? - end - end - end - - # Response returned by List method. - class RollingUpdateList - include Google::Apis::Core::Hashable - - # Collection of requested updates. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # [Output Only] Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output Only] The fully qualified URL for the resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @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 diff --git a/generated/google/apis/replicapoolupdater_v1beta1/representations.rb b/generated/google/apis/replicapoolupdater_v1beta1/representations.rb deleted file mode 100644 index 98c03d9d9..000000000 --- a/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +++ /dev/null @@ -1,247 +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 ReplicapoolupdaterV1beta1 - - class InstanceUpdate - 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 - end - - class InstanceUpdateList - 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 RollingUpdate - 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 Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class RollingUpdateList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class InstanceUpdate - class Representation < Google::Apis::Core::JsonRepresentation - property :error, as: 'error', class: Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdate::Error, decorator: Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdate::Error::Representation - - property :instance, as: 'instance' - property :status, as: 'status' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdate::Error::Error, decorator: Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdate::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 - end - - # @private - class InstanceUpdateList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdate, decorator: Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdate::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - 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::ReplicapoolupdaterV1beta1::Operation::Error, decorator: Google::Apis::ReplicapoolupdaterV1beta1::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::ReplicapoolupdaterV1beta1::Operation::Warning, decorator: Google::Apis::ReplicapoolupdaterV1beta1::Operation::Warning::Representation - - property :zone, as: 'zone' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::ReplicapoolupdaterV1beta1::Operation::Error::Error, decorator: Google::Apis::ReplicapoolupdaterV1beta1::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::ReplicapoolupdaterV1beta1::Operation::Warning::Datum, decorator: Google::Apis::ReplicapoolupdaterV1beta1::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 RollingUpdate - class Representation < Google::Apis::Core::JsonRepresentation - property :action_type, as: 'actionType' - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - property :error, as: 'error', class: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Error, decorator: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Error::Representation - - property :id, as: 'id' - property :instance_group, as: 'instanceGroup' - property :instance_group_manager, as: 'instanceGroupManager' - property :instance_template, as: 'instanceTemplate' - property :kind, as: 'kind' - property :policy, as: 'policy', class: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Policy, decorator: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Policy::Representation - - property :progress, as: 'progress' - property :self_link, as: 'selfLink' - property :status, as: 'status' - property :status_message, as: 'statusMessage' - property :user, as: 'user' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Error::Error, decorator: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::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 Policy - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_pause_after_instances, as: 'autoPauseAfterInstances' - property :instance_startup_timeout_sec, as: 'instanceStartupTimeoutSec' - property :max_num_concurrent_instances, as: 'maxNumConcurrentInstances' - property :max_num_failed_instances, as: 'maxNumFailedInstances' - property :min_instance_update_time_sec, as: 'minInstanceUpdateTimeSec' - end - end - end - - # @private - class RollingUpdateList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate, decorator: Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - end - end -end diff --git a/generated/google/apis/replicapoolupdater_v1beta1/service.rb b/generated/google/apis/replicapoolupdater_v1beta1/service.rb deleted file mode 100644 index db9d028e1..000000000 --- a/generated/google/apis/replicapoolupdater_v1beta1/service.rb +++ /dev/null @@ -1,472 +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 ReplicapoolupdaterV1beta1 - # Google Compute Engine Instance Group Updater API - # - # The Google Compute Engine Instance Group Updater API provides services for - # updating groups of Compute Engine Instances. - # - # @example - # require 'google/apis/replicapoolupdater_v1beta1' - # - # Replicapoolupdater = Google::Apis::ReplicapoolupdaterV1beta1 # Alias the module - # service = Replicapoolupdater::ReplicapoolupdaterService.new - # - # @see https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service - class ReplicapoolupdaterService < 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/', 'replicapoolupdater/v1beta1/projects/') - end - - # Cancels an update. The update must be PAUSED before it can be cancelled. This - # has no effect if the update is already CANCELLED. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [String] rolling_update - # The name of the update. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ReplicapoolupdaterV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::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 cancel_rolling_update(project, zone, rolling_update, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/cancel' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::Operation::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['rollingUpdate'] = rolling_update unless rolling_update.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 information about an update. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [String] rolling_update - # The name of the update. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ReplicapoolupdaterV1beta1::RollingUpdate] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rolling_update(project, zone, rolling_update, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['rollingUpdate'] = rolling_update unless rolling_update.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 and starts a new update. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate] rolling_update_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::ReplicapoolupdaterV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::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_rolling_update(project, zone, rolling_update_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate::Representation - command.request_object = rolling_update_object - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::Operation::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::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 recent updates for a given managed instance group, in reverse - # chronological order and paginated format. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [String] filter - # Optional. Filter expression for filtering listed resources. - # @param [String] instance_group_manager - # The name of the instance group manager. Use this parameter to return only - # updates to instances that are part of a specific instance group. - # @param [Fixnum] max_results - # Optional. Maximum count of results to be returned. Maximum value is 500 and - # default value is 500. - # @param [String] page_token - # Optional. Tag returned by a previous list request truncated by maxResults. - # Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ReplicapoolupdaterV1beta1::RollingUpdateList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdateList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rolling_updates(project, zone, filter: nil, instance_group_manager: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdateList::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdateList - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.query['filter'] = filter unless filter.nil? - command.query['instanceGroupManager'] = instance_group_manager unless instance_group_manager.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 - - # Lists the current status for each instance within a given update. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [String] rolling_update - # The name of the update. - # @param [String] filter - # Optional. Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Optional. Maximum count of results to be returned. Maximum value is 500 and - # default value is 500. - # @param [String] page_token - # Optional. Tag returned by a previous list request truncated by maxResults. - # Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ReplicapoolupdaterV1beta1::InstanceUpdateList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdateList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instance_updates(project, zone, rolling_update, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/instanceUpdates' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdateList::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::InstanceUpdateList - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['rollingUpdate'] = rolling_update unless rolling_update.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 - - # Pauses the update in state from ROLLING_FORWARD or ROLLING_BACK. Has no effect - # if invoked when the state of the update is PAUSED. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [String] rolling_update - # The name of the update. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ReplicapoolupdaterV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::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 pause_rolling_update(project, zone, rolling_update, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/pause' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::Operation::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['rollingUpdate'] = rolling_update unless rolling_update.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 - - # Continues an update in PAUSED state. Has no effect if invoked when the state - # of the update is ROLLED_OUT. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [String] rolling_update - # The name of the update. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ReplicapoolupdaterV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::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 resume_rolling_update(project, zone, rolling_update, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/resume' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::Operation::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['rollingUpdate'] = rolling_update unless rolling_update.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 - - # Rolls back the update in state from ROLLING_FORWARD or PAUSED. Has no effect - # if invoked when the state of the update is ROLLED_BACK. - # @param [String] project - # The Google Developers Console project name. - # @param [String] zone - # The name of the zone in which the update's target resides. - # @param [String] rolling_update - # The name of the update. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ReplicapoolupdaterV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::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 rollback_rolling_update(project, zone, rolling_update, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/rollback' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ReplicapoolupdaterV1beta1::Operation::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['rollingUpdate'] = rolling_update unless rolling_update.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 - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] operation - # Name of the operation resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ReplicapoolupdaterV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ReplicapoolupdaterV1beta1::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::ReplicapoolupdaterV1beta1::Operation::Representation - command.response_class = Google::Apis::ReplicapoolupdaterV1beta1::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 - - 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 diff --git a/generated/google/apis/reseller_v1.rb b/generated/google/apis/reseller_v1.rb deleted file mode 100644 index 4be02d8f2..000000000 --- a/generated/google/apis/reseller_v1.rb +++ /dev/null @@ -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/reseller_v1/service.rb' -require 'google/apis/reseller_v1/classes.rb' -require 'google/apis/reseller_v1/representations.rb' - -module Google - module Apis - # Enterprise Apps Reseller API - # - # Lets you create and manage your customers and their subscriptions. - # - # @see https://developers.google.com/google-apps/reseller/ - module ResellerV1 - VERSION = 'V1' - REVISION = '20150603' - - # Manage users on your domain - AUTH_APPS_ORDER = 'https://www.googleapis.com/auth/apps.order' - - # Manage users on your domain - AUTH_APPS_ORDER_READONLY = 'https://www.googleapis.com/auth/apps.order.readonly' - end - end -end diff --git a/generated/google/apis/reseller_v1/classes.rb b/generated/google/apis/reseller_v1/classes.rb deleted file mode 100644 index cb00b61cb..000000000 --- a/generated/google/apis/reseller_v1/classes.rb +++ /dev/null @@ -1,502 +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 ResellerV1 - - # JSON template for address of a customer. - class Address - include Google::Apis::Core::Hashable - - # Address line 1 of the address. - # Corresponds to the JSON property `addressLine1` - # @return [String] - attr_accessor :address_line1 - - # Address line 2 of the address. - # Corresponds to the JSON property `addressLine2` - # @return [String] - attr_accessor :address_line2 - - # Address line 3 of the address. - # Corresponds to the JSON property `addressLine3` - # @return [String] - attr_accessor :address_line3 - - # Name of the contact person. - # Corresponds to the JSON property `contactName` - # @return [String] - attr_accessor :contact_name - - # ISO 3166 country code. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # Identifies the resource as a customer address. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the locality. This is in accordance with - http://portablecontacts.net/ - # draft-spec.html#address_element. - # Corresponds to the JSON property `locality` - # @return [String] - attr_accessor :locality - - # Name of the organization. - # Corresponds to the JSON property `organizationName` - # @return [String] - attr_accessor :organization_name - - # The postal code. This is in accordance with - http://portablecontacts.net/ - # draft-spec.html#address_element. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # Name of the region. This is in accordance with - http://portablecontacts.net/ - # draft-spec.html#address_element. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address_line1 = args[:address_line1] unless args[:address_line1].nil? - @address_line2 = args[:address_line2] unless args[:address_line2].nil? - @address_line3 = args[:address_line3] unless args[:address_line3].nil? - @contact_name = args[:contact_name] unless args[:contact_name].nil? - @country_code = args[:country_code] unless args[:country_code].nil? - @kind = args[:kind] unless args[:kind].nil? - @locality = args[:locality] unless args[:locality].nil? - @organization_name = args[:organization_name] unless args[:organization_name].nil? - @postal_code = args[:postal_code] unless args[:postal_code].nil? - @region = args[:region] unless args[:region].nil? - end - end - - # JSON template for the ChangePlan rpc request. - class ChangePlanRequest - include Google::Apis::Core::Hashable - - # Identifies the resource as a subscription change plan request. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the plan to change to. - # Corresponds to the JSON property `planName` - # @return [String] - attr_accessor :plan_name - - # Purchase order id for your order tracking purposes. - # Corresponds to the JSON property `purchaseOrderId` - # @return [String] - attr_accessor :purchase_order_id - - # JSON template for subscription seats. - # Corresponds to the JSON property `seats` - # @return [Google::Apis::ResellerV1::Seats] - attr_accessor :seats - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @plan_name = args[:plan_name] unless args[:plan_name].nil? - @purchase_order_id = args[:purchase_order_id] unless args[:purchase_order_id].nil? - @seats = args[:seats] unless args[:seats].nil? - end - end - - # JSON template for a customer. - class Customer - include Google::Apis::Core::Hashable - - # The alternate email of the customer. - # Corresponds to the JSON property `alternateEmail` - # @return [String] - attr_accessor :alternate_email - - # The domain name of the customer. - # Corresponds to the JSON property `customerDomain` - # @return [String] - attr_accessor :customer_domain - - # The id of the customer. - # Corresponds to the JSON property `customerId` - # @return [String] - attr_accessor :customer_id - - # Identifies the resource as a customer. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The phone number of the customer. - # Corresponds to the JSON property `phoneNumber` - # @return [String] - attr_accessor :phone_number - - # JSON template for address of a customer. - # Corresponds to the JSON property `postalAddress` - # @return [Google::Apis::ResellerV1::Address] - attr_accessor :postal_address - - # Ui url for customer resource. - # Corresponds to the JSON property `resourceUiUrl` - # @return [String] - attr_accessor :resource_ui_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alternate_email = args[:alternate_email] unless args[:alternate_email].nil? - @customer_domain = args[:customer_domain] unless args[:customer_domain].nil? - @customer_id = args[:customer_id] unless args[:customer_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @phone_number = args[:phone_number] unless args[:phone_number].nil? - @postal_address = args[:postal_address] unless args[:postal_address].nil? - @resource_ui_url = args[:resource_ui_url] unless args[:resource_ui_url].nil? - end - end - - # JSON template for a subscription renewal settings. - class RenewalSettings - include Google::Apis::Core::Hashable - - # Identifies the resource as a subscription renewal setting. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Subscription renewal type. - # Corresponds to the JSON property `renewalType` - # @return [String] - attr_accessor :renewal_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @renewal_type = args[:renewal_type] unless args[:renewal_type].nil? - end - end - - # JSON template for subscription seats. - class Seats - include Google::Apis::Core::Hashable - - # Identifies the resource as a subscription change plan request. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Read-only field containing the current number of licensed seats for FLEXIBLE - # Google-Apps subscriptions and secondary subscriptions such as Google-Vault and - # Drive-storage. - # Corresponds to the JSON property `licensedNumberOfSeats` - # @return [Fixnum] - attr_accessor :licensed_number_of_seats - - # Maximum number of seats that can be purchased. This needs to be provided only - # for a non-commitment plan. For a commitment plan it is decided by the contract. - # Corresponds to the JSON property `maximumNumberOfSeats` - # @return [Fixnum] - attr_accessor :maximum_number_of_seats - - # Number of seats to purchase. This is applicable only for a commitment plan. - # Corresponds to the JSON property `numberOfSeats` - # @return [Fixnum] - attr_accessor :number_of_seats - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @licensed_number_of_seats = args[:licensed_number_of_seats] unless args[:licensed_number_of_seats].nil? - @maximum_number_of_seats = args[:maximum_number_of_seats] unless args[:maximum_number_of_seats].nil? - @number_of_seats = args[:number_of_seats] unless args[:number_of_seats].nil? - end - end - - # JSON template for a subscription. - class Subscription - include Google::Apis::Core::Hashable - - # Billing method of this subscription. - # Corresponds to the JSON property `billingMethod` - # @return [String] - attr_accessor :billing_method - - # Creation time of this subscription in milliseconds since Unix epoch. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # The id of the customer to whom the subscription belongs. - # Corresponds to the JSON property `customerId` - # @return [String] - attr_accessor :customer_id - - # Identifies the resource as a Subscription. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Plan details of the subscription - # Corresponds to the JSON property `plan` - # @return [Google::Apis::ResellerV1::Subscription::Plan] - attr_accessor :plan - - # Purchase order id for your order tracking purposes. - # Corresponds to the JSON property `purchaseOrderId` - # @return [String] - attr_accessor :purchase_order_id - - # JSON template for a subscription renewal settings. - # Corresponds to the JSON property `renewalSettings` - # @return [Google::Apis::ResellerV1::RenewalSettings] - attr_accessor :renewal_settings - - # Ui url for subscription resource. - # Corresponds to the JSON property `resourceUiUrl` - # @return [String] - attr_accessor :resource_ui_url - - # JSON template for subscription seats. - # Corresponds to the JSON property `seats` - # @return [Google::Apis::ResellerV1::Seats] - attr_accessor :seats - - # Name of the sku for which this subscription is purchased. - # Corresponds to the JSON property `skuId` - # @return [String] - attr_accessor :sku_id - - # Status of the subscription. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The id of the subscription. - # Corresponds to the JSON property `subscriptionId` - # @return [String] - attr_accessor :subscription_id - - # Suspension Reasons - # Corresponds to the JSON property `suspensionReasons` - # @return [Array] - attr_accessor :suspension_reasons - - # Transfer related information for the subscription. - # Corresponds to the JSON property `transferInfo` - # @return [Google::Apis::ResellerV1::Subscription::TransferInfo] - attr_accessor :transfer_info - - # Trial Settings of the subscription. - # Corresponds to the JSON property `trialSettings` - # @return [Google::Apis::ResellerV1::Subscription::TrialSettings] - attr_accessor :trial_settings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @billing_method = args[:billing_method] unless args[:billing_method].nil? - @creation_time = args[:creation_time] unless args[:creation_time].nil? - @customer_id = args[:customer_id] unless args[:customer_id].nil? - @kind = args[:kind] unless args[:kind].nil? - @plan = args[:plan] unless args[:plan].nil? - @purchase_order_id = args[:purchase_order_id] unless args[:purchase_order_id].nil? - @renewal_settings = args[:renewal_settings] unless args[:renewal_settings].nil? - @resource_ui_url = args[:resource_ui_url] unless args[:resource_ui_url].nil? - @seats = args[:seats] unless args[:seats].nil? - @sku_id = args[:sku_id] unless args[:sku_id].nil? - @status = args[:status] unless args[:status].nil? - @subscription_id = args[:subscription_id] unless args[:subscription_id].nil? - @suspension_reasons = args[:suspension_reasons] unless args[:suspension_reasons].nil? - @transfer_info = args[:transfer_info] unless args[:transfer_info].nil? - @trial_settings = args[:trial_settings] unless args[:trial_settings].nil? - end - - # Plan details of the subscription - class Plan - include Google::Apis::Core::Hashable - - # Interval of the commitment if it is a commitment plan. - # Corresponds to the JSON property `commitmentInterval` - # @return [Google::Apis::ResellerV1::Subscription::Plan::CommitmentInterval] - attr_accessor :commitment_interval - - # Whether the plan is a commitment plan or not. - # Corresponds to the JSON property `isCommitmentPlan` - # @return [Boolean] - attr_accessor :is_commitment_plan - alias_method :is_commitment_plan?, :is_commitment_plan - - # The plan name of this subscription's plan. - # Corresponds to the JSON property `planName` - # @return [String] - attr_accessor :plan_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @commitment_interval = args[:commitment_interval] unless args[:commitment_interval].nil? - @is_commitment_plan = args[:is_commitment_plan] unless args[:is_commitment_plan].nil? - @plan_name = args[:plan_name] unless args[:plan_name].nil? - end - - # Interval of the commitment if it is a commitment plan. - class CommitmentInterval - include Google::Apis::Core::Hashable - - # End time of the commitment interval in milliseconds since Unix epoch. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Start time of the commitment interval in milliseconds since Unix epoch. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] unless args[:end_time].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - end - end - end - - # Transfer related information for the subscription. - class TransferInfo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `minimumTransferableSeats` - # @return [Fixnum] - attr_accessor :minimum_transferable_seats - - # Time when transfer token or intent to transfer will expire. - # Corresponds to the JSON property `transferabilityExpirationTime` - # @return [String] - attr_accessor :transferability_expiration_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @minimum_transferable_seats = args[:minimum_transferable_seats] unless args[:minimum_transferable_seats].nil? - @transferability_expiration_time = args[:transferability_expiration_time] unless args[:transferability_expiration_time].nil? - end - end - - # Trial Settings of the subscription. - class TrialSettings - include Google::Apis::Core::Hashable - - # Whether the subscription is in trial. - # Corresponds to the JSON property `isInTrial` - # @return [Boolean] - attr_accessor :is_in_trial - alias_method :is_in_trial?, :is_in_trial - - # End time of the trial in milliseconds since Unix epoch. - # Corresponds to the JSON property `trialEndTime` - # @return [String] - attr_accessor :trial_end_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_in_trial = args[:is_in_trial] unless args[:is_in_trial].nil? - @trial_end_time = args[:trial_end_time] unless args[:trial_end_time].nil? - end - end - end - - # JSON template for a subscription list. - class Subscriptions - include Google::Apis::Core::Hashable - - # Identifies the resource as a collection of subscriptions. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The subscriptions in this page of results. - # Corresponds to the JSON property `subscriptions` - # @return [Array] - attr_accessor :subscriptions - - 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? - @subscriptions = args[:subscriptions] unless args[:subscriptions].nil? - end - end - end - end -end diff --git a/generated/google/apis/reseller_v1/representations.rb b/generated/google/apis/reseller_v1/representations.rb deleted file mode 100644 index 17ad5b999..000000000 --- a/generated/google/apis/reseller_v1/representations.rb +++ /dev/null @@ -1,199 +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 ResellerV1 - - class Address - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ChangePlanRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Customer - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RenewalSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Seats - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Subscription - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Plan - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CommitmentInterval - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class TransferInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TrialSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Subscriptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Address - class Representation < Google::Apis::Core::JsonRepresentation - property :address_line1, as: 'addressLine1' - property :address_line2, as: 'addressLine2' - property :address_line3, as: 'addressLine3' - property :contact_name, as: 'contactName' - property :country_code, as: 'countryCode' - property :kind, as: 'kind' - property :locality, as: 'locality' - property :organization_name, as: 'organizationName' - property :postal_code, as: 'postalCode' - property :region, as: 'region' - end - end - - # @private - class ChangePlanRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :plan_name, as: 'planName' - property :purchase_order_id, as: 'purchaseOrderId' - property :seats, as: 'seats', class: Google::Apis::ResellerV1::Seats, decorator: Google::Apis::ResellerV1::Seats::Representation - - end - end - - # @private - class Customer - class Representation < Google::Apis::Core::JsonRepresentation - property :alternate_email, as: 'alternateEmail' - property :customer_domain, as: 'customerDomain' - property :customer_id, as: 'customerId' - property :kind, as: 'kind' - property :phone_number, as: 'phoneNumber' - property :postal_address, as: 'postalAddress', class: Google::Apis::ResellerV1::Address, decorator: Google::Apis::ResellerV1::Address::Representation - - property :resource_ui_url, as: 'resourceUiUrl' - end - end - - # @private - class RenewalSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :renewal_type, as: 'renewalType' - end - end - - # @private - class Seats - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :licensed_number_of_seats, as: 'licensedNumberOfSeats' - property :maximum_number_of_seats, as: 'maximumNumberOfSeats' - property :number_of_seats, as: 'numberOfSeats' - end - end - - # @private - class Subscription - class Representation < Google::Apis::Core::JsonRepresentation - property :billing_method, as: 'billingMethod' - property :creation_time, as: 'creationTime' - property :customer_id, as: 'customerId' - property :kind, as: 'kind' - property :plan, as: 'plan', class: Google::Apis::ResellerV1::Subscription::Plan, decorator: Google::Apis::ResellerV1::Subscription::Plan::Representation - - property :purchase_order_id, as: 'purchaseOrderId' - property :renewal_settings, as: 'renewalSettings', class: Google::Apis::ResellerV1::RenewalSettings, decorator: Google::Apis::ResellerV1::RenewalSettings::Representation - - property :resource_ui_url, as: 'resourceUiUrl' - property :seats, as: 'seats', class: Google::Apis::ResellerV1::Seats, decorator: Google::Apis::ResellerV1::Seats::Representation - - property :sku_id, as: 'skuId' - property :status, as: 'status' - property :subscription_id, as: 'subscriptionId' - collection :suspension_reasons, as: 'suspensionReasons' - property :transfer_info, as: 'transferInfo', class: Google::Apis::ResellerV1::Subscription::TransferInfo, decorator: Google::Apis::ResellerV1::Subscription::TransferInfo::Representation - - property :trial_settings, as: 'trialSettings', class: Google::Apis::ResellerV1::Subscription::TrialSettings, decorator: Google::Apis::ResellerV1::Subscription::TrialSettings::Representation - - end - - # @private - class Plan - class Representation < Google::Apis::Core::JsonRepresentation - property :commitment_interval, as: 'commitmentInterval', class: Google::Apis::ResellerV1::Subscription::Plan::CommitmentInterval, decorator: Google::Apis::ResellerV1::Subscription::Plan::CommitmentInterval::Representation - - property :is_commitment_plan, as: 'isCommitmentPlan' - property :plan_name, as: 'planName' - end - - # @private - class CommitmentInterval - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - end - end - end - - # @private - class TransferInfo - class Representation < Google::Apis::Core::JsonRepresentation - property :minimum_transferable_seats, as: 'minimumTransferableSeats' - property :transferability_expiration_time, as: 'transferabilityExpirationTime' - end - end - - # @private - class TrialSettings - class Representation < Google::Apis::Core::JsonRepresentation - property :is_in_trial, as: 'isInTrial' - property :trial_end_time, as: 'trialEndTime' - end - end - end - - # @private - class Subscriptions - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :subscriptions, as: 'subscriptions', class: Google::Apis::ResellerV1::Subscription, decorator: Google::Apis::ResellerV1::Subscription::Representation - - end - end - end - end -end diff --git a/generated/google/apis/reseller_v1/service.rb b/generated/google/apis/reseller_v1/service.rb deleted file mode 100644 index b1d77af3a..000000000 --- a/generated/google/apis/reseller_v1/service.rb +++ /dev/null @@ -1,637 +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 ResellerV1 - # Enterprise Apps Reseller API - # - # Lets you create and manage your customers and their subscriptions. - # - # @example - # require 'google/apis/reseller_v1' - # - # Reseller = Google::Apis::ResellerV1 # Alias the module - # service = Reseller::ResellerService.new - # - # @see https://developers.google.com/google-apps/reseller/ - class ResellerService < 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/', 'apps/reseller/v1/') - end - - # Gets a customer resource if one exists and is owned by the reseller. - # @param [String] customer_id - # Id of the Customer - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResellerV1::Customer] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Customer] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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(customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ResellerV1::Customer::Representation - command.response_class = Google::Apis::ResellerV1::Customer - command.params['customerId'] = customer_id unless customer_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 customer resource if one does not already exist. - # @param [Google::Apis::ResellerV1::Customer] customer_object - # @param [String] customer_auth_token - # An auth token needed for inserting a customer for which domain already exists. - # Can be generated at https://www.google.com/a/cpanel//TransferToken. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ResellerV1::Customer] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Customer] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customer(customer_object = nil, customer_auth_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResellerV1::Customer::Representation - command.request_object = customer_object - command.response_representation = Google::Apis::ResellerV1::Customer::Representation - command.response_class = Google::Apis::ResellerV1::Customer - command.query['customerAuthToken'] = customer_auth_token unless customer_auth_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 a customer resource if one it exists and is owned by the reseller. This - # method supports patch semantics. - # @param [String] customer_id - # Id of the Customer - # @param [Google::Apis::ResellerV1::Customer] customer_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::ResellerV1::Customer] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Customer] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::ResellerV1::Customer::Representation - command.request_object = customer_object - command.response_representation = Google::Apis::ResellerV1::Customer::Representation - command.response_class = Google::Apis::ResellerV1::Customer - command.params['customerId'] = customer_id unless customer_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 - - # Update a customer resource if one it exists and is owned by the reseller. - # @param [String] customer_id - # Id of the Customer - # @param [Google::Apis::ResellerV1::Customer] customer_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::ResellerV1::Customer] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Customer] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_customer(customer_id, customer_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::ResellerV1::Customer::Representation - command.request_object = customer_object - command.response_representation = Google::Apis::ResellerV1::Customer::Representation - command.response_class = Google::Apis::ResellerV1::Customer - command.params['customerId'] = customer_id unless customer_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 - - # Activates a subscription previously suspended by the reseller - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def activate_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}/activate' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Changes the plan of a subscription - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [Google::Apis::ResellerV1::ChangePlanRequest] change_plan_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::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def change_plan(customer_id, subscription_id, change_plan_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}/changePlan' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResellerV1::ChangePlanRequest::Representation - command.request_object = change_plan_request_object - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Changes the renewal settings of a subscription - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [Google::Apis::ResellerV1::RenewalSettings] renewal_settings_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::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def change_subscription_renewal_settings(customer_id, subscription_id, renewal_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResellerV1::RenewalSettings::Representation - command.request_object = renewal_settings_object - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Changes the seats configuration of a subscription - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [Google::Apis::ResellerV1::Seats] seats_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::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def change_subscription_seats(customer_id, subscription_id, seats_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}/changeSeats' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResellerV1::Seats::Representation - command.request_object = seats_object - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Cancels/Downgrades a subscription. - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [String] deletion_type - # Whether the subscription is to be fully cancelled or downgraded - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_subscription(customer_id, subscription_id, deletion_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}' - command = make_simple_command(:delete, path, options) - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_id.nil? - command.query['deletionType'] = deletion_type unless deletion_type.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a subscription of the customer. - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_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/Transfers a subscription for the customer. - # @param [String] customer_id - # Id of the Customer - # @param [Google::Apis::ResellerV1::Subscription] subscription_object - # @param [String] customer_auth_token - # An auth token needed for transferring a subscription. Can be generated at - # https://www.google.com/a/cpanel/customer-domain/TransferToken. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(customer_id, subscription_object = nil, customer_auth_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResellerV1::Subscription::Representation - command.request_object = subscription_object - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.query['customerAuthToken'] = customer_auth_token unless customer_auth_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists subscriptions of a reseller, optionally filtered by a customer name - # prefix. - # @param [String] customer_auth_token - # An auth token needed if the customer is not a resold customer of this reseller. - # Can be generated at https://www.google.com/a/cpanel/customer-domain/ - # TransferToken.Optional. - # @param [String] customer_id - # Id of the Customer - # @param [String] customer_name_prefix - # Prefix of the customer's domain name by which the subscriptions should be - # filtered. Optional - # @param [Fixnum] max_results - # Maximum number of results to return - # @param [String] page_token - # Token to specify next page in the list - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResellerV1::Subscriptions] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscriptions] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscriptions(customer_auth_token: nil, customer_id: nil, customer_name_prefix: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'subscriptions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ResellerV1::Subscriptions::Representation - command.response_class = Google::Apis::ResellerV1::Subscriptions - command.query['customerAuthToken'] = customer_auth_token unless customer_auth_token.nil? - command.query['customerId'] = customer_id unless customer_id.nil? - command.query['customerNamePrefix'] = customer_name_prefix unless customer_name_prefix.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 - - # Starts paid service of a trial subscription - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def start_paid_service_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}/startPaidService' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_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 - - # Suspends an active subscription - # @param [String] customer_id - # Id of the Customer - # @param [String] subscription_id - # Id of the subscription, which is unique for a customer - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResellerV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResellerV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def suspend_subscription(customer_id, subscription_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'customers/{customerId}/subscriptions/{subscriptionId}/suspend' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ResellerV1::Subscription::Representation - command.response_class = Google::Apis::ResellerV1::Subscription - command.params['customerId'] = customer_id unless customer_id.nil? - command.params['subscriptionId'] = subscription_id unless subscription_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 diff --git a/generated/google/apis/resourceviews_v1beta2.rb b/generated/google/apis/resourceviews_v1beta2.rb deleted file mode 100644 index e749795b3..000000000 --- a/generated/google/apis/resourceviews_v1beta2.rb +++ /dev/null @@ -1,47 +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/resourceviews_v1beta2/service.rb' -require 'google/apis/resourceviews_v1beta2/classes.rb' -require 'google/apis/resourceviews_v1beta2/representations.rb' - -module Google - module Apis - # Google Compute Engine Instance Groups API - # - # The Resource View API allows users to create and manage logical sets of Google - # Compute Engine instances. - # - # @see https://developers.google.com/compute/ - module ResourceviewsV1beta2 - VERSION = 'V1beta2' - REVISION = '20150326' - - # 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' - - # View and manage your Google Cloud Platform management resources and deployment status information - AUTH_NDEV_CLOUDMAN = 'https://www.googleapis.com/auth/ndev.cloudman' - - # View your Google Cloud Platform management resources and deployment status information - AUTH_NDEV_CLOUDMAN_READONLY = 'https://www.googleapis.com/auth/ndev.cloudman.readonly' - end - end -end diff --git a/generated/google/apis/resourceviews_v1beta2/classes.rb b/generated/google/apis/resourceviews_v1beta2/classes.rb deleted file mode 100644 index 2883360f5..000000000 --- a/generated/google/apis/resourceviews_v1beta2/classes.rb +++ /dev/null @@ -1,660 +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 ResourceviewsV1beta2 - - # The Label to be applied to the resource views. - class Label - include Google::Apis::Core::Hashable - - # Key of the label. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # Value of the label. - # 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 - - # The list response item that contains the resource and end points information. - class ListResourceResponseItem - include Google::Apis::Core::Hashable - - # The list of service end points on the resource. - # Corresponds to the JSON property `endpoints` - # @return [Hash>] - attr_accessor :endpoints - - # The full URL of the resource. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @endpoints = args[:endpoints] unless args[:endpoints].nil? - @resource = args[:resource] unless args[:resource].nil? - end - end - - # An operation resource, used to manage asynchronous API requests. - class Operation - include Google::Apis::Core::Hashable - - # [Output only] An optional identifier specified by the client when the mutation - # was initiated. Must be unique for all operation resources in the project. - # Corresponds to the JSON property `clientOperationId` - # @return [String] - attr_accessor :client_operation_id - - # [Output Only] The time that this operation was requested, in RFC3339 text - # format. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # [Output Only] The time that this operation was completed, in RFC3339 text - # format. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # [Output Only] If errors occurred during processing of this operation, this - # field will be populated. - # Corresponds to the JSON property `error` - # @return [Google::Apis::ResourceviewsV1beta2::Operation::Error] - attr_accessor :error - - # [Output only] If operation fails, the HTTP error message returned. - # Corresponds to the JSON property `httpErrorMessage` - # @return [String] - attr_accessor :http_error_message - - # [Output only] If operation fails, the HTTP error status code returned. - # Corresponds to the JSON property `httpErrorStatusCode` - # @return [Fixnum] - attr_accessor :http_error_status_code - - # [Output Only] Unique identifier for the resource, generated by the server. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output Only] The time that this operation was requested, in RFC3339 text - # format. - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # [Output only] Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # [Output Only] Name of the resource. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # [Output only] Type of the operation. Operations include insert, update, and - # delete. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # [Output only] An optional progress indicator that ranges from 0 to 100. There - # is no requirement that this be linear or support any granularity of operations. - # This should not be used to guess at when the operation will be complete. This - # number should be monotonically increasing as the operation progresses. - # Corresponds to the JSON property `progress` - # @return [Fixnum] - attr_accessor :progress - - # [Output Only] URL of the region where the operation resides. Only available - # when performing regional operations. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # [Output Only] Server-defined fully-qualified URL for this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # [Output Only] The time that this operation was started by the server, in - # RFC3339 text format. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # [Output Only] Status of the operation. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # [Output Only] An optional textual description of the current status of the - # operation. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # [Output Only] Unique target ID which identifies a particular incarnation of - # the target. - # Corresponds to the JSON property `targetId` - # @return [String] - attr_accessor :target_id - - # [Output only] URL of the resource the operation is mutating. - # Corresponds to the JSON property `targetLink` - # @return [String] - attr_accessor :target_link - - # [Output Only] User who requested the operation, for example: user@example.com. - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - # [Output Only] If there are issues with this operation, a warning is returned. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - # [Output Only] URL of the zone where the operation resides. Only available when - # performing per-zone operations. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @client_operation_id = args[:client_operation_id] 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 - - # [Output Only] If errors occurred during processing of this operation, this - # field will be populated. - class Error - include Google::Apis::Core::Hashable - - # [Output Only] The array of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - 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 - - # [Output Only] The error type identifier for this error. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output Only] Indicates the field in the request which caused the error. This - # property is optional. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # [Output Only] An optional, human-readable error message. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] 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 - - # [Output only] The warning type identifier for this warning. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # [Output only] Metadata for this warning in key:value format. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # [Output only] Optional human-readable details for this 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 - - # [Output Only] Metadata key for this warning. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # [Output Only] Metadata value for this 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 - - # - class OperationList - include Google::Apis::Core::Hashable - - # Unique identifier for the resource; defined by the server (output only). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The operation resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used to continue a truncated list request (output only). - # 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 - - # The resource view object. - class ResourceView - include Google::Apis::Core::Hashable - - # The creation time of the resource view. - # Corresponds to the JSON property `creationTimestamp` - # @return [String] - attr_accessor :creation_timestamp - - # The detailed description of the resource view. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Services endpoint information. - # Corresponds to the JSON property `endpoints` - # @return [Array] - attr_accessor :endpoints - - # The fingerprint of the service endpoint information. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # [Output Only] The ID of the resource view. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The labels for events. - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # The name of the resource view. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The URL of a Compute Engine network to which the resources in the view belong. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # A list of all resources in the resource view. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - # [Output Only] A self-link to the resource view. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The total number of resources in the resource view. - # Corresponds to the JSON property `size` - # @return [Fixnum] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_timestamp = args[:creation_timestamp] unless args[:creation_timestamp].nil? - @description = args[:description] unless args[:description].nil? - @endpoints = args[:endpoints] unless args[:endpoints].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @labels = args[:labels] unless args[:labels].nil? - @name = args[:name] unless args[:name].nil? - @network = args[:network] unless args[:network].nil? - @resources = args[:resources] unless args[:resources].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @size = args[:size] unless args[:size].nil? - end - end - - # The service endpoint that may be started in a VM. - class ServiceEndpoint - include Google::Apis::Core::Hashable - - # The name of the service endpoint. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The port of the service endpoint. - # Corresponds to the JSON property `port` - # @return [Fixnum] - attr_accessor :port - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @port = args[:port] unless args[:port].nil? - end - end - - # The request to add resources to the resource view. - class AddResourcesRequest - include Google::Apis::Core::Hashable - - # The list of resources to be added. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class GetServiceResponse - include Google::Apis::Core::Hashable - - # The service information. - # Corresponds to the JSON property `endpoints` - # @return [Array] - attr_accessor :endpoints - - # The fingerprint of the service information. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @endpoints = args[:endpoints] unless args[:endpoints].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - end - end - - # The response to a list request. - class ZoneViewsList - include Google::Apis::Core::Hashable - - # The result that contains all resource views that meet the criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of resource. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A token used for pagination. - # 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) - @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 - - # The response to a list resource request. - class ListResourcesResponse - include Google::Apis::Core::Hashable - - # The formatted JSON that is requested by the user. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The URL of a Compute Engine network to which the resources in the view belong. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # A token used for pagination. - # 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? - @network = args[:network] unless args[:network].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - end - end - - # The request to remove resources from the resource view. - class RemoveResourcesRequest - include Google::Apis::Core::Hashable - - # The list of resources to be removed. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resources = args[:resources] unless args[:resources].nil? - end - end - - # - class SetServiceRequest - include Google::Apis::Core::Hashable - - # The service information to be updated. - # Corresponds to the JSON property `endpoints` - # @return [Array] - attr_accessor :endpoints - - # Fingerprint of the service information; a hash of the contents. This field is - # used for optimistic locking when updating the service entries. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # The name of the resource if user wants to update the service information of - # the resource. - # Corresponds to the JSON property `resourceName` - # @return [String] - attr_accessor :resource_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @endpoints = args[:endpoints] unless args[:endpoints].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @resource_name = args[:resource_name] unless args[:resource_name].nil? - end - end - end - end -end diff --git a/generated/google/apis/resourceviews_v1beta2/representations.rb b/generated/google/apis/resourceviews_v1beta2/representations.rb deleted file mode 100644 index d57f889d3..000000000 --- a/generated/google/apis/resourceviews_v1beta2/representations.rb +++ /dev/null @@ -1,269 +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 ResourceviewsV1beta2 - - class Label - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListResourceResponseItem - 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 ResourceView - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ServiceEndpoint - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AddResourcesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class GetServiceResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ZoneViewsList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListResourcesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RemoveResourcesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SetServiceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Label - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :value, as: 'value' - end - end - - # @private - class ListResourceResponseItem - class Representation < Google::Apis::Core::JsonRepresentation - hash :endpoints, as: 'endpoints', :class => Array do - include Representable::JSON::Collection - items - end - - property :resource, as: 'resource' - 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::ResourceviewsV1beta2::Operation::Error, decorator: Google::Apis::ResourceviewsV1beta2::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::ResourceviewsV1beta2::Operation::Warning, decorator: Google::Apis::ResourceviewsV1beta2::Operation::Warning::Representation - - property :zone, as: 'zone' - end - - # @private - class Error - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::ResourceviewsV1beta2::Operation::Error::Error, decorator: Google::Apis::ResourceviewsV1beta2::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::ResourceviewsV1beta2::Operation::Warning::Datum, decorator: Google::Apis::ResourceviewsV1beta2::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::ResourceviewsV1beta2::Operation, decorator: Google::Apis::ResourceviewsV1beta2::Operation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ResourceView - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_timestamp, as: 'creationTimestamp' - property :description, as: 'description' - collection :endpoints, as: 'endpoints', class: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint, decorator: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint::Representation - - property :fingerprint, as: 'fingerprint' - property :id, as: 'id' - property :kind, as: 'kind' - collection :labels, as: 'labels', class: Google::Apis::ResourceviewsV1beta2::Label, decorator: Google::Apis::ResourceviewsV1beta2::Label::Representation - - property :name, as: 'name' - property :network, as: 'network' - collection :resources, as: 'resources' - property :self_link, as: 'selfLink' - property :size, as: 'size' - end - end - - # @private - class ServiceEndpoint - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :port, as: 'port' - end - end - - # @private - class AddResourcesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :resources, as: 'resources' - end - end - - # @private - class GetServiceResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :endpoints, as: 'endpoints', class: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint, decorator: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint::Representation - - property :fingerprint, as: 'fingerprint' - end - end - - # @private - class ZoneViewsList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::ResourceviewsV1beta2::ResourceView, decorator: Google::Apis::ResourceviewsV1beta2::ResourceView::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :self_link, as: 'selfLink' - end - end - - # @private - class ListResourcesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::ResourceviewsV1beta2::ListResourceResponseItem, decorator: Google::Apis::ResourceviewsV1beta2::ListResourceResponseItem::Representation - - property :network, as: 'network' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class RemoveResourcesRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :resources, as: 'resources' - end - end - - # @private - class SetServiceRequest - class Representation < Google::Apis::Core::JsonRepresentation - collection :endpoints, as: 'endpoints', class: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint, decorator: Google::Apis::ResourceviewsV1beta2::ServiceEndpoint::Representation - - property :fingerprint, as: 'fingerprint' - property :resource_name, as: 'resourceName' - end - end - end - end -end diff --git a/generated/google/apis/resourceviews_v1beta2/service.rb b/generated/google/apis/resourceviews_v1beta2/service.rb deleted file mode 100644 index 6ce4b5c95..000000000 --- a/generated/google/apis/resourceviews_v1beta2/service.rb +++ /dev/null @@ -1,574 +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 ResourceviewsV1beta2 - # Google Compute Engine Instance Groups API - # - # The Resource View API allows users to create and manage logical sets of Google - # Compute Engine instances. - # - # @example - # require 'google/apis/resourceviews_v1beta2' - # - # Resourceviews = Google::Apis::ResourceviewsV1beta2 # Alias the module - # service = Resourceviews::ResourceviewsService.new - # - # @see https://developers.google.com/compute/ - class ResourceviewsService < 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/', 'resourceviews/v1beta2/projects/') - end - - # Retrieves the specified zone-specific operation resource. - # @param [String] project - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] operation - # Name of the operation resource to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::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::ResourceviewsV1beta2::Operation::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::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 - # Name of the project scoping this request. - # @param [String] zone - # Name of the zone scoping this request. - # @param [String] filter - # Optional. Filter expression for filtering listed resources. - # @param [Fixnum] max_results - # Optional. Maximum count of results to be returned. Maximum value is 500 and - # default value is 500. - # @param [String] page_token - # Optional. Tag returned by a previous list request truncated by maxResults. - # Used to continue a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ResourceviewsV1beta2::OperationList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::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::ResourceviewsV1beta2::OperationList::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::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 - - # Add resources to the view. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [String] resource_view - # The name of the resource view. - # @param [Google::Apis::ResourceviewsV1beta2::AddResourcesRequest] add_resources_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_resources_zone_view(project, zone, resource_view, add_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews/{resourceView}/addResources' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResourceviewsV1beta2::AddResourcesRequest::Representation - command.request_object = add_resources_request_object - command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['resourceView'] = resource_view unless resource_view.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 a resource view. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [String] resource_view - # The name of the resource view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResourceviewsV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::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_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews/{resourceView}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['resourceView'] = resource_view unless resource_view.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 information of a zonal resource view. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [String] resource_view - # The name of the resource view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ResourceviewsV1beta2::ResourceView] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::ResourceView] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_view(project, zone, resource_view, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews/{resourceView}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ResourceviewsV1beta2::ResourceView::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::ResourceView - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['resourceView'] = resource_view unless resource_view.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 service information of a resource view or a resource. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [String] resource_view - # The name of the resource view. - # @param [String] resource_name - # The name of the resource if user wants to get the service information of the - # 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::ResourceviewsV1beta2::GetServiceResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::GetServiceResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_service_zone_view(project, zone, resource_view, resource_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews/{resourceView}/getService' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::ResourceviewsV1beta2::GetServiceResponse::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::GetServiceResponse - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['resourceView'] = resource_view unless resource_view.nil? - command.query['resourceName'] = resource_name unless resource_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Create a resource view. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [Google::Apis::ResourceviewsV1beta2::ResourceView] resource_view_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::ResourceviewsV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::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_zone_view(project, zone, resource_view_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResourceviewsV1beta2::ResourceView::Representation - command.request_object = resource_view_object - command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::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 - - # List resource views. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [Fixnum] max_results - # Maximum count of results to be returned. Acceptable values are 0 to 5000, - # inclusive. (Default: 5000) - # @param [String] page_token - # Specifies a nextPageToken returned by a previous list request. This token can - # be used to request the next page of results from a previous list request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::ResourceviewsV1beta2::ZoneViewsList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::ZoneViewsList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_views(project, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ResourceviewsV1beta2::ZoneViewsList::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::ZoneViewsList - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.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 resources of the resource view. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [String] resource_view - # The name of the resource view. - # @param [String] format - # The requested format of the return value. It can be URL or URL_PORT. A JSON - # object will be included in the response based on the format. The default - # format is NONE, which results in no JSON in the response. - # @param [String] list_state - # The state of the instance to list. By default, it lists all instances. - # @param [Fixnum] max_results - # Maximum count of results to be returned. Acceptable values are 0 to 5000, - # inclusive. (Default: 5000) - # @param [String] page_token - # Specifies a nextPageToken returned by a previous list request. This token can - # be used to request the next page of results from a previous list request. - # @param [String] service_name - # The service name to return in the response. It is optional and if it is not - # set, all the service end points 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::ResourceviewsV1beta2::ListResourcesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::ListResourcesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_resources_zone_view(project, zone, resource_view, format: nil, list_state: nil, max_results: nil, page_token: nil, service_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews/{resourceView}/resources' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::ResourceviewsV1beta2::ListResourcesResponse::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::ListResourcesResponse - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['resourceView'] = resource_view unless resource_view.nil? - command.query['format'] = format unless format.nil? - command.query['listState'] = list_state unless list_state.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Remove resources from the view. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [String] resource_view - # The name of the resource view. - # @param [Google::Apis::ResourceviewsV1beta2::RemoveResourcesRequest] remove_resources_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ResourceviewsV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def remove_resources_zone_view(project, zone, resource_view, remove_resources_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews/{resourceView}/removeResources' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResourceviewsV1beta2::RemoveResourcesRequest::Representation - command.request_object = remove_resources_request_object - command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['resourceView'] = resource_view unless resource_view.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 service information of a resource view or a resource. - # @param [String] project - # The project name of the resource view. - # @param [String] zone - # The zone name of the resource view. - # @param [String] resource_view - # The name of the resource view. - # @param [Google::Apis::ResourceviewsV1beta2::SetServiceRequest] set_service_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::ResourceviewsV1beta2::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ResourceviewsV1beta2::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_service_zone_view(project, zone, resource_view, set_service_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/zones/{zone}/resourceViews/{resourceView}/setService' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::ResourceviewsV1beta2::SetServiceRequest::Representation - command.request_object = set_service_request_object - command.response_representation = Google::Apis::ResourceviewsV1beta2::Operation::Representation - command.response_class = Google::Apis::ResourceviewsV1beta2::Operation - command.params['project'] = project unless project.nil? - command.params['zone'] = zone unless zone.nil? - command.params['resourceView'] = resource_view unless resource_view.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 diff --git a/generated/google/apis/site_verification_v1.rb b/generated/google/apis/site_verification_v1.rb deleted file mode 100644 index fc51e22c3..000000000 --- a/generated/google/apis/site_verification_v1.rb +++ /dev/null @@ -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/site_verification_v1/service.rb' -require 'google/apis/site_verification_v1/classes.rb' -require 'google/apis/site_verification_v1/representations.rb' - -module Google - module Apis - # Google Site Verification API - # - # Lets you programatically verify ownership of websites or domains with Google. - # - # @see https://developers.google.com/site-verification/ - module SiteVerificationV1 - VERSION = 'V1' - REVISION = '20131007' - - # Manage the list of sites and domains you control - AUTH_SITEVERIFICATION = 'https://www.googleapis.com/auth/siteverification' - - # Manage your new site verifications with Google - AUTH_SITEVERIFICATION_VERIFY_ONLY = 'https://www.googleapis.com/auth/siteverification.verify_only' - end - end -end diff --git a/generated/google/apis/site_verification_v1/classes.rb b/generated/google/apis/site_verification_v1/classes.rb deleted file mode 100644 index 12ca309fe..000000000 --- a/generated/google/apis/site_verification_v1/classes.rb +++ /dev/null @@ -1,185 +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 SiteVerificationV1 - - # - class GetWebResourceTokenRequest - include Google::Apis::Core::Hashable - - # The site for which a verification token will be generated. - # Corresponds to the JSON property `site` - # @return [Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Site] - attr_accessor :site - - # The verification method that will be used to verify this site. For sites, ' - # FILE' or 'META' methods may be used. For domains, only 'DNS' may be used. - # Corresponds to the JSON property `verificationMethod` - # @return [String] - attr_accessor :verification_method - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @site = args[:site] unless args[:site].nil? - @verification_method = args[:verification_method] unless args[:verification_method].nil? - end - - # The site for which a verification token will be generated. - class Site - include Google::Apis::Core::Hashable - - # The site identifier. If the type is set to SITE, the identifier is a URL. If - # the type is set to INET_DOMAIN, the site identifier is a domain name. - # Corresponds to the JSON property `identifier` - # @return [String] - attr_accessor :identifier - - # The type of resource to be verified. Can be SITE or INET_DOMAIN (domain name). - # 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) - @identifier = args[:identifier] unless args[:identifier].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # - class GetWebResourceTokenResponse - include Google::Apis::Core::Hashable - - # The verification method to use in conjunction with this token. For FILE, the - # token should be placed in the top-level directory of the site, stored inside a - # file of the same name. For META, the token should be placed in the HEAD tag of - # the default page that is loaded for the site. For DNS, the token should be - # placed in a TXT record of the domain. - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :verification_method - - # The verification token. The token must be placed appropriately in order for - # verification to succeed. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @verification_method = args[:verification_method] unless args[:verification_method].nil? - @token = args[:token] unless args[:token].nil? - end - end - - # - class ListWebResourceResponse - include Google::Apis::Core::Hashable - - # The list of sites that are owned by the authenticated user. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - end - end - - # - class SiteVerificationWebResourceResource - include Google::Apis::Core::Hashable - - # The string used to identify this site. This value should be used in the "id" - # portion of the REST URL for the Get, Update, and Delete operations. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The email addresses of all verified owners. - # Corresponds to the JSON property `owners` - # @return [Array] - attr_accessor :owners - - # The address and type of a site that is verified or will be verified. - # Corresponds to the JSON property `site` - # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Site] - attr_accessor :site - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] unless args[:id].nil? - @owners = args[:owners] unless args[:owners].nil? - @site = args[:site] unless args[:site].nil? - end - - # The address and type of a site that is verified or will be verified. - class Site - include Google::Apis::Core::Hashable - - # The site identifier. If the type is set to SITE, the identifier is a URL. If - # the type is set to INET_DOMAIN, the site identifier is a domain name. - # Corresponds to the JSON property `identifier` - # @return [String] - attr_accessor :identifier - - # The site type. Can be SITE or INET_DOMAIN (domain name). - # 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) - @identifier = args[:identifier] unless args[:identifier].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - end - end -end diff --git a/generated/google/apis/site_verification_v1/representations.rb b/generated/google/apis/site_verification_v1/representations.rb deleted file mode 100644 index 8a42143e2..000000000 --- a/generated/google/apis/site_verification_v1/representations.rb +++ /dev/null @@ -1,101 +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 SiteVerificationV1 - - class GetWebResourceTokenRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Site - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class GetWebResourceTokenResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListWebResourceResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SiteVerificationWebResourceResource - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Site - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - # @private - class GetWebResourceTokenRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :site, as: 'site', class: Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Site, decorator: Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Site::Representation - - property :verification_method, as: 'verificationMethod' - end - - # @private - class Site - class Representation < Google::Apis::Core::JsonRepresentation - property :identifier, as: 'identifier' - property :type, as: 'type' - end - end - end - - # @private - class GetWebResourceTokenResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :verification_method, as: 'method' - property :token, as: 'token' - end - end - - # @private - class ListWebResourceResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource, decorator: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - - end - end - - # @private - class SiteVerificationWebResourceResource - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :owners, as: 'owners' - property :site, as: 'site', class: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Site, decorator: Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Site::Representation - - end - - # @private - class Site - class Representation < Google::Apis::Core::JsonRepresentation - property :identifier, as: 'identifier' - property :type, as: 'type' - end - end - end - end - end -end diff --git a/generated/google/apis/site_verification_v1/service.rb b/generated/google/apis/site_verification_v1/service.rb deleted file mode 100644 index d3c55f759..000000000 --- a/generated/google/apis/site_verification_v1/service.rb +++ /dev/null @@ -1,322 +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 SiteVerificationV1 - # Google Site Verification API - # - # Lets you programatically verify ownership of websites or domains with Google. - # - # @example - # require 'google/apis/site_verification_v1' - # - # SiteVerification = Google::Apis::SiteVerificationV1 # Alias the module - # service = SiteVerification::SiteVerificationService.new - # - # @see https://developers.google.com/site-verification/ - class SiteVerificationService < 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/', 'siteVerification/v1/') - end - - # Relinquish ownership of a website or domain. - # @param [String] id - # The id of a verified site or domain. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_web_resource(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'webResource/{id}' - command = make_simple_command(:delete, path, options) - 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 - - # Get the most current data for a website or domain. - # @param [String] id - # The id of a verified site or domain. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_resource(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'webResource/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource - 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 - - # Get a verification token for placing on a website or domain. - # @param [Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest] get_web_resource_token_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::SiteVerificationV1::GetWebResourceTokenResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_token_web_resource(get_web_resource_token_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'token' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Representation - command.request_object = get_web_resource_token_request_object - command.response_representation = Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse::Representation - command.response_class = Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse - 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 - - # Attempt verification of a website or domain. - # @param [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] site_verification_web_resource_resource_object - # @param [String] verification_method - # The method to use for verifying a site or domain. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_resource(site_verification_web_resource_resource_object = nil, verification_method: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'webResource' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - command.request_object = site_verification_web_resource_resource_object - command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource - command.query['verificationMethod'] = verification_method unless verification_method.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 list of your verified websites and domains. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SiteVerificationV1::ListWebResourceResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SiteVerificationV1::ListWebResourceResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_resources(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'webResource' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SiteVerificationV1::ListWebResourceResponse::Representation - command.response_class = Google::Apis::SiteVerificationV1::ListWebResourceResponse - 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 - - # Modify the list of owners for your website or domain. This method supports - # patch semantics. - # @param [String] id - # The id of a verified site or domain. - # @param [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] site_verification_web_resource_resource_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::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'webResource/{id}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - command.request_object = site_verification_web_resource_resource_object - command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource - 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 - - # Modify the list of owners for your website or domain. - # @param [String] id - # The id of a verified site or domain. - # @param [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] site_verification_web_resource_resource_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::SiteVerificationV1::SiteVerificationWebResourceResource] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'webResource/{id}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - command.request_object = site_verification_web_resource_resource_object - command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation - command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource - 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 - - 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 diff --git a/generated/google/apis/sqladmin_v1beta4.rb b/generated/google/apis/sqladmin_v1beta4.rb deleted file mode 100644 index 615694f9a..000000000 --- a/generated/google/apis/sqladmin_v1beta4.rb +++ /dev/null @@ -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/sqladmin_v1beta4/service.rb' -require 'google/apis/sqladmin_v1beta4/classes.rb' -require 'google/apis/sqladmin_v1beta4/representations.rb' - -module Google - module Apis - # Cloud SQL Administration API - # - # API for Cloud SQL database instance management. - # - # @see https://cloud.google.com/sql/docs/reference/latest - module SqladminV1beta4 - VERSION = 'V1beta4' - REVISION = '20150330' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # Manage your Google SQL Service instances - AUTH_SQLSERVICE_ADMIN = 'https://www.googleapis.com/auth/sqlservice.admin' - end - end -end diff --git a/generated/google/apis/sqladmin_v1beta4/classes.rb b/generated/google/apis/sqladmin_v1beta4/classes.rb deleted file mode 100644 index 27acaaa6d..000000000 --- a/generated/google/apis/sqladmin_v1beta4/classes.rb +++ /dev/null @@ -1,1817 +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 SqladminV1beta4 - - # An entry for an Access Control list. - class AclEntry - include Google::Apis::Core::Hashable - - # The time when this access control entry expires in RFC 3339 format, for - # example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `expirationTime` - # @return [DateTime] - attr_accessor :expiration_time - - # This is always sql#aclEntry. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An optional label to identify this entry. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The whitelisted value for the access control list. - # 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) - @expiration_time = args[:expiration_time] unless args[:expiration_time].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Database instance backup configuration. - class BackupConfiguration - include Google::Apis::Core::Hashable - - # Whether binary log is enabled. If backup configuration is disabled, binary log - # must be disabled as well. - # Corresponds to the JSON property `binaryLogEnabled` - # @return [Boolean] - attr_accessor :binary_log_enabled - alias_method :binary_log_enabled?, :binary_log_enabled - - # Whether this configuration is enabled. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - - # This is always sql#backupConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Start time for the daily backup configuration in UTC timezone in the 24 hour - # format - HH:MM. - # 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) - @binary_log_enabled = args[:binary_log_enabled] unless args[:binary_log_enabled].nil? - @enabled = args[:enabled] unless args[:enabled].nil? - @kind = args[:kind] unless args[:kind].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - end - end - - # A database instance backup run resource. - class BackupRun - include Google::Apis::Core::Hashable - - # The time the backup operation completed in UTC timezone in RFC 3339 format, - # for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # The time the run was enqueued in UTC timezone in RFC 3339 format, for example - # 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `enqueuedTime` - # @return [DateTime] - attr_accessor :enqueued_time - - # Database instance operation error. - # Corresponds to the JSON property `error` - # @return [Google::Apis::SqladminV1beta4::OperationError] - attr_accessor :error - - # A unique identifier for this backup run. Note that this is unique only within - # the scope of a particular Cloud SQL instance. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Name of the database instance. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#backupRun. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The time the backup operation actually started in UTC timezone in RFC 3339 - # format, for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - # The status of this run. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The start time of the backup window during which this the backup was attempted - # in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `windowStartTime` - # @return [DateTime] - attr_accessor :window_start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] unless args[:end_time].nil? - @enqueued_time = args[:enqueued_time] unless args[:enqueued_time].nil? - @error = args[:error] unless args[:error].nil? - @id = args[:id] unless args[:id].nil? - @instance = args[:instance] unless args[:instance].nil? - @kind = args[:kind] unless args[:kind].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? - @window_start_time = args[:window_start_time] unless args[:window_start_time].nil? - end - end - - # Backup run list results. - class ListBackupRunsResponse - include Google::Apis::Core::Hashable - - # A list of backup runs in reverse chronological order of the enqueued time. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#backupRunsList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return 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 - - # Binary log coordinates. - class BinLogCoordinates - include Google::Apis::Core::Hashable - - # Name of the binary log file for a Cloud SQL instance. - # Corresponds to the JSON property `binLogFileName` - # @return [String] - attr_accessor :bin_log_file_name - - # Position (offset) within the binary log file. - # Corresponds to the JSON property `binLogPosition` - # @return [String] - attr_accessor :bin_log_position - - # This is always sql#binLogCoordinates. - # 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) - @bin_log_file_name = args[:bin_log_file_name] unless args[:bin_log_file_name].nil? - @bin_log_position = args[:bin_log_position] unless args[:bin_log_position].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Database instance clone context. - class CloneContext - include Google::Apis::Core::Hashable - - # Binary log coordinates. - # Corresponds to the JSON property `binLogCoordinates` - # @return [Google::Apis::SqladminV1beta4::BinLogCoordinates] - attr_accessor :bin_log_coordinates - - # Name of the Cloud SQL instance to be created as a clone. - # Corresponds to the JSON property `destinationInstanceName` - # @return [String] - attr_accessor :destination_instance_name - - # This is always sql#cloneContext. - # 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) - @bin_log_coordinates = args[:bin_log_coordinates] unless args[:bin_log_coordinates].nil? - @destination_instance_name = args[:destination_instance_name] unless args[:destination_instance_name].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # A database resource inside a Cloud SQL instance. - class Database - include Google::Apis::Core::Hashable - - # The MySQL charset value. - # Corresponds to the JSON property `charset` - # @return [String] - attr_accessor :charset - - # The MySQL collation value. - # Corresponds to the JSON property `collation` - # @return [String] - attr_accessor :collation - - # HTTP 1.1 Entity tag for the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The name of the Cloud SQL instance. This does not include the project ID. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#database. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the database in the Cloud SQL instance. This does not include the - # project ID or instance name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The project ID of the project containing the Cloud SQL database. The Google - # apps domain is prefixed if applicable. - # Corresponds to the JSON property `project` - # @return [String] - attr_accessor :project - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @charset = args[:charset] unless args[:charset].nil? - @collation = args[:collation] unless args[:collation].nil? - @etag = args[:etag] unless args[:etag].nil? - @instance = args[:instance] unless args[:instance].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @project = args[:project] unless args[:project].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - end - - # MySQL flags for Cloud SQL instances. - class DatabaseFlags - include Google::Apis::Core::Hashable - - # The name of the flag. These flags are passed at instance startup, so include - # both MySQL server options and MySQL system variables. Flags should be - # specified with underscores, not hyphens. For more information, see Configuring - # MySQL Flags in the Google Cloud SQL documentation, as well as the official - # MySQL documentation for server options and system variables. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The value of the flag. Booleans should be set to on for true and off for false. - # This field must be omitted if the flag doesn't take a 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) - @name = args[:name] unless args[:name].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # A Cloud SQL instance resource. - class DatabaseInstance - include Google::Apis::Core::Hashable - - # The current disk usage of the instance in bytes. - # Corresponds to the JSON property `currentDiskSize` - # @return [String] - attr_accessor :current_disk_size - - # The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults - # to MYSQL_5_5. The databaseVersion can not be changed after instance creation. - # Corresponds to the JSON property `databaseVersion` - # @return [String] - attr_accessor :database_version - - # HTTP 1.1 Entity tag for the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The instance type. This can be one of the following. - # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master. - # ON_PREMISES_INSTANCE: An instance running on the customer's premises. - # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica. - # Corresponds to the JSON property `instanceType` - # @return [String] - attr_accessor :instance_type - - # The assigned IP addresses for the instance. - # Corresponds to the JSON property `ipAddresses` - # @return [Array] - attr_accessor :ip_addresses - - # The IPv6 address assigned to the instance. - # Corresponds to the JSON property `ipv6Address` - # @return [String] - attr_accessor :ipv6_address - - # This is always sql#instance. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the instance which will act as master in the replication setup. - # Corresponds to the JSON property `masterInstanceName` - # @return [String] - attr_accessor :master_instance_name - - # The maximum disk size of the instance in bytes. - # Corresponds to the JSON property `maxDiskSize` - # @return [String] - attr_accessor :max_disk_size - - # Name of the Cloud SQL instance. This does not include the project ID. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # On-premises instance configuration. - # Corresponds to the JSON property `onPremisesConfiguration` - # @return [Google::Apis::SqladminV1beta4::OnPremisesConfiguration] - attr_accessor :on_premises_configuration - - # The project ID of the project containing the Cloud SQL instance. The Google - # apps domain is prefixed if applicable. - # Corresponds to the JSON property `project` - # @return [String] - attr_accessor :project - - # The geographical region. Can be us-central, asia-east1 or europe-west1. - # Defaults to us-central. The region can not be changed after instance creation. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # Read-replica configuration for connecting to the master. - # Corresponds to the JSON property `replicaConfiguration` - # @return [Google::Apis::SqladminV1beta4::ReplicaConfiguration] - attr_accessor :replica_configuration - - # The replicas of the instance. - # Corresponds to the JSON property `replicaNames` - # @return [Array] - attr_accessor :replica_names - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # SslCerts Resource - # Corresponds to the JSON property `serverCaCert` - # @return [Google::Apis::SqladminV1beta4::SslCert] - attr_accessor :server_ca_cert - - # The service account email address assigned to the instance. - # Corresponds to the JSON property `serviceAccountEmailAddress` - # @return [String] - attr_accessor :service_account_email_address - - # Database instance settings. - # Corresponds to the JSON property `settings` - # @return [Google::Apis::SqladminV1beta4::Settings] - attr_accessor :settings - - # The current serving state of the Cloud SQL instance. This can be one of the - # following. - # RUNNABLE: The instance is running, or is ready to run when accessed. - # SUSPENDED: The instance is not available, for example due to problems with - # billing. - # PENDING_CREATE: The instance is being created. - # MAINTENANCE: The instance is down for maintenance. - # FAILED: The instance creation failed. - # UNKNOWN_STATE: The state of the instance is unknown. - # 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) - @current_disk_size = args[:current_disk_size] unless args[:current_disk_size].nil? - @database_version = args[:database_version] unless args[:database_version].nil? - @etag = args[:etag] unless args[:etag].nil? - @instance_type = args[:instance_type] unless args[:instance_type].nil? - @ip_addresses = args[:ip_addresses] unless args[:ip_addresses].nil? - @ipv6_address = args[:ipv6_address] unless args[:ipv6_address].nil? - @kind = args[:kind] unless args[:kind].nil? - @master_instance_name = args[:master_instance_name] unless args[:master_instance_name].nil? - @max_disk_size = args[:max_disk_size] unless args[:max_disk_size].nil? - @name = args[:name] unless args[:name].nil? - @on_premises_configuration = args[:on_premises_configuration] unless args[:on_premises_configuration].nil? - @project = args[:project] unless args[:project].nil? - @region = args[:region] unless args[:region].nil? - @replica_configuration = args[:replica_configuration] unless args[:replica_configuration].nil? - @replica_names = args[:replica_names] unless args[:replica_names].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @server_ca_cert = args[:server_ca_cert] unless args[:server_ca_cert].nil? - @service_account_email_address = args[:service_account_email_address] unless args[:service_account_email_address].nil? - @settings = args[:settings] unless args[:settings].nil? - @state = args[:state] unless args[:state].nil? - end - end - - # Database list response. - class ListDatabasesResponse - include Google::Apis::Core::Hashable - - # List of database resources in the instance. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#databasesList. - # 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 - - # Database instance export context. - class ExportContext - include Google::Apis::Core::Hashable - - # Options for exporting data as CSV. - # Corresponds to the JSON property `csvExportOptions` - # @return [Google::Apis::SqladminV1beta4::ExportContext::CsvExportOptions] - attr_accessor :csv_export_options - - # Databases (for example, guestbook) from which the export is made. If fileType - # is SQL and no database is specified, all databases are exported. If fileType - # is CSV, you can optionally specify at most one database to export. If - # csvExportOptions.selectQuery also specifies the database, this field will be - # ignored. - # Corresponds to the JSON property `databases` - # @return [Array] - attr_accessor :databases - - # The file type for the specified uri. - # SQL: The file contains SQL statements. - # CSV: The file contains CSV data. - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - - # This is always sql#exportContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Options for exporting data as SQL statements. - # Corresponds to the JSON property `sqlExportOptions` - # @return [Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions] - attr_accessor :sql_export_options - - # The path to the file in Google Cloud Storage where the export will be stored. - # The URI is in the form gs://bucketName/fileName. If the file already exists, - # the operation fails. If fileType is SQL and the filename ends with .gz, the - # contents are compressed. - # Corresponds to the JSON property `uri` - # @return [String] - attr_accessor :uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @csv_export_options = args[:csv_export_options] unless args[:csv_export_options].nil? - @databases = args[:databases] unless args[:databases].nil? - @file_type = args[:file_type] unless args[:file_type].nil? - @kind = args[:kind] unless args[:kind].nil? - @sql_export_options = args[:sql_export_options] unless args[:sql_export_options].nil? - @uri = args[:uri] unless args[:uri].nil? - end - - # Options for exporting data as CSV. - class CsvExportOptions - include Google::Apis::Core::Hashable - - # The select query used to extract the data. - # Corresponds to the JSON property `selectQuery` - # @return [String] - attr_accessor :select_query - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @select_query = args[:select_query] unless args[:select_query].nil? - end - end - - # Options for exporting data as SQL statements. - class SqlExportOptions - include Google::Apis::Core::Hashable - - # Tables to export, or that were exported, from the specified database. If you - # specify tables, specify one and only one database. - # Corresponds to the JSON property `tables` - # @return [Array] - attr_accessor :tables - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @tables = args[:tables] unless args[:tables].nil? - end - end - end - - # A Google Cloud SQL service flag resource. - class Flag - include Google::Apis::Core::Hashable - - # For STRING flags, a list of strings that the value can be set to. - # Corresponds to the JSON property `allowedStringValues` - # @return [Array] - attr_accessor :allowed_string_values - - # The database version this flag applies to. Currently this can only be [ - # MYSQL_5_5]. - # Corresponds to the JSON property `appliesTo` - # @return [Array] - attr_accessor :applies_to - - # This is always sql#flag. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # For INTEGER flags, the maximum allowed value. - # Corresponds to the JSON property `maxValue` - # @return [String] - attr_accessor :max_value - - # For INTEGER flags, the minimum allowed value. - # Corresponds to the JSON property `minValue` - # @return [String] - attr_accessor :min_value - - # This is the name of the flag. Flag names always use underscores, not hyphens, - # e.g. max_allowed_packet - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or - # NONE. NONE is used for flags which do not take a value, such as - # skip_grant_tables. - # 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) - @allowed_string_values = args[:allowed_string_values] unless args[:allowed_string_values].nil? - @applies_to = args[:applies_to] unless args[:applies_to].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_value = args[:max_value] unless args[:max_value].nil? - @min_value = args[:min_value] unless args[:min_value].nil? - @name = args[:name] unless args[:name].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Flags list response. - class ListFlagsResponse - include Google::Apis::Core::Hashable - - # List of flags. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#flagsList. - # 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 - - # Database instance import context. - class ImportContext - include Google::Apis::Core::Hashable - - # Options for importing data as CSV. - # Corresponds to the JSON property `csvImportOptions` - # @return [Google::Apis::SqladminV1beta4::ImportContext::CsvImportOptions] - attr_accessor :csv_import_options - - # The database (for example, guestbook) to which the import is made. If fileType - # is SQL and no database is specified, it is assumed that the database is - # specified in the file to be imported. If fileType is CSV, it must be specified. - # Corresponds to the JSON property `database` - # @return [String] - attr_accessor :database - - # The file type for the specified uri. - # SQL: The file contains SQL statements. - # CSV: The file contains CSV data. - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - - # This is always sql#importContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # A path to the file in Google Cloud Storage from which the import is made. The - # URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are - # supported when fileType is SQL. - # Corresponds to the JSON property `uri` - # @return [String] - attr_accessor :uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @csv_import_options = args[:csv_import_options] unless args[:csv_import_options].nil? - @database = args[:database] unless args[:database].nil? - @file_type = args[:file_type] unless args[:file_type].nil? - @kind = args[:kind] unless args[:kind].nil? - @uri = args[:uri] unless args[:uri].nil? - end - - # Options for importing data as CSV. - class CsvImportOptions - include Google::Apis::Core::Hashable - - # The columns to which CSV data is imported. If not specified, all columns of - # the database table are loaded with CSV data. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # The table to which CSV data is imported. - # Corresponds to the JSON property `table` - # @return [String] - attr_accessor :table - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @columns = args[:columns] unless args[:columns].nil? - @table = args[:table] unless args[:table].nil? - end - end - end - - # Database instance clone request. - class CloneInstancesRequest - include Google::Apis::Core::Hashable - - # Database instance clone context. - # Corresponds to the JSON property `cloneContext` - # @return [Google::Apis::SqladminV1beta4::CloneContext] - attr_accessor :clone_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @clone_context = args[:clone_context] unless args[:clone_context].nil? - end - end - - # Database instance export request. - class ExportInstancesRequest - include Google::Apis::Core::Hashable - - # Database instance export context. - # Corresponds to the JSON property `exportContext` - # @return [Google::Apis::SqladminV1beta4::ExportContext] - attr_accessor :export_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @export_context = args[:export_context] unless args[:export_context].nil? - end - end - - # Database instance import request. - class ImportInstancesRequest - include Google::Apis::Core::Hashable - - # Database instance import context. - # Corresponds to the JSON property `importContext` - # @return [Google::Apis::SqladminV1beta4::ImportContext] - attr_accessor :import_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @import_context = args[:import_context] unless args[:import_context].nil? - end - end - - # Database instances list response. - class ListInstancesResponse - include Google::Apis::Core::Hashable - - # List of database instance resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#instancesList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return 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 - - # Database instance restore backup request. - class RestoreInstancesBackupRequest - include Google::Apis::Core::Hashable - - # Database instance restore from backup context. - # Corresponds to the JSON property `restoreBackupContext` - # @return [Google::Apis::SqladminV1beta4::RestoreBackupContext] - attr_accessor :restore_backup_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @restore_backup_context = args[:restore_backup_context] unless args[:restore_backup_context].nil? - end - end - - # IP Management configuration. - class IpConfiguration - include Google::Apis::Core::Hashable - - # The list of external networks that are allowed to connect to the instance - # using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168. - # 100.0/24). - # Corresponds to the JSON property `authorizedNetworks` - # @return [Array] - attr_accessor :authorized_networks - - # Whether the instance should be assigned an IP address or not. - # Corresponds to the JSON property `ipv4Enabled` - # @return [Boolean] - attr_accessor :ipv4_enabled - alias_method :ipv4_enabled?, :ipv4_enabled - - # Whether the mysqld should default to 'REQUIRE X509' for users connecting over - # IP. - # Corresponds to the JSON property `requireSsl` - # @return [Boolean] - attr_accessor :require_ssl - alias_method :require_ssl?, :require_ssl - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @authorized_networks = args[:authorized_networks] unless args[:authorized_networks].nil? - @ipv4_enabled = args[:ipv4_enabled] unless args[:ipv4_enabled].nil? - @require_ssl = args[:require_ssl] unless args[:require_ssl].nil? - end - end - - # Database instance IP Mapping. - class IpMapping - include Google::Apis::Core::Hashable - - # The IP address assigned. - # Corresponds to the JSON property `ipAddress` - # @return [String] - attr_accessor :ip_address - - # The due time for this IP to be retired in RFC 3339 format, for example 2012-11- - # 15T16:19:00.094Z. This field is only available when the IP is scheduled to be - # retired. - # Corresponds to the JSON property `timeToRetire` - # @return [DateTime] - attr_accessor :time_to_retire - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ip_address = args[:ip_address] unless args[:ip_address].nil? - @time_to_retire = args[:time_to_retire] unless args[:time_to_retire].nil? - end - end - - # Preferred location. This specifies where a Cloud SQL instance should - # preferably be located, either in a specific Compute Engine zone, or co-located - # with an App Engine application. Note that if the preferred location is not - # available, the instance will be located as close as possible within the region. - # Only one location may be specified. - class LocationPreference - include Google::Apis::Core::Hashable - - # The AppEngine application to follow, it must be in the same region as the - # Cloud SQL instance. - # Corresponds to the JSON property `followGaeApplication` - # @return [String] - attr_accessor :follow_gae_application - - # This is always sql#locationPreference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.). - # 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) - @follow_gae_application = args[:follow_gae_application] unless args[:follow_gae_application].nil? - @kind = args[:kind] unless args[:kind].nil? - @zone = args[:zone] unless args[:zone].nil? - end - end - - # Read-replica configuration specific to MySQL databases. - class MySqlReplicaConfiguration - include Google::Apis::Core::Hashable - - # PEM representation of the trusted CA's x509 certificate. - # Corresponds to the JSON property `caCertificate` - # @return [String] - attr_accessor :ca_certificate - - # PEM representation of the slave's x509 certificate. - # Corresponds to the JSON property `clientCertificate` - # @return [String] - attr_accessor :client_certificate - - # PEM representation of the slave's private key. The corresponsing public key is - # encoded in the client's certificate. - # Corresponds to the JSON property `clientKey` - # @return [String] - attr_accessor :client_key - - # Seconds to wait between connect retries. MySQL's default is 60 seconds. - # Corresponds to the JSON property `connectRetryInterval` - # @return [Fixnum] - attr_accessor :connect_retry_interval - - # Path to a SQL dump file in Google Cloud Storage from which the slave instance - # is to be created. The URI is in the form gs://bucketName/fileName. Compressed - # gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates - # from which replication should begin. This can be accomplished by setting -- - # master-data to 1 when using mysqldump. - # Corresponds to the JSON property `dumpFilePath` - # @return [String] - attr_accessor :dump_file_path - - # This is always sql#mysqlReplicaConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Interval in milliseconds between replication heartbeats. - # Corresponds to the JSON property `masterHeartbeatPeriod` - # @return [String] - attr_accessor :master_heartbeat_period - - # The password for the replication connection. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # A list of permissible ciphers to use for SSL encryption. - # Corresponds to the JSON property `sslCipher` - # @return [String] - attr_accessor :ssl_cipher - - # The username for the replication connection. - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - # Whether or not to check the master's Common Name value in the certificate that - # it sends during the SSL handshake. - # Corresponds to the JSON property `verifyServerCertificate` - # @return [Boolean] - attr_accessor :verify_server_certificate - alias_method :verify_server_certificate?, :verify_server_certificate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ca_certificate = args[:ca_certificate] unless args[:ca_certificate].nil? - @client_certificate = args[:client_certificate] unless args[:client_certificate].nil? - @client_key = args[:client_key] unless args[:client_key].nil? - @connect_retry_interval = args[:connect_retry_interval] unless args[:connect_retry_interval].nil? - @dump_file_path = args[:dump_file_path] unless args[:dump_file_path].nil? - @kind = args[:kind] unless args[:kind].nil? - @master_heartbeat_period = args[:master_heartbeat_period] unless args[:master_heartbeat_period].nil? - @password = args[:password] unless args[:password].nil? - @ssl_cipher = args[:ssl_cipher] unless args[:ssl_cipher].nil? - @username = args[:username] unless args[:username].nil? - @verify_server_certificate = args[:verify_server_certificate] unless args[:verify_server_certificate].nil? - end - end - - # On-premises instance configuration. - class OnPremisesConfiguration - include Google::Apis::Core::Hashable - - # The host and port of the on-premises instance in host:port format - # Corresponds to the JSON property `hostPort` - # @return [String] - attr_accessor :host_port - - # This is always sql#onPremisesConfiguration. - # 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) - @host_port = args[:host_port] unless args[:host_port].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # An Operations resource contains information about database instance operations - # such as create, delete, and restart. Operations resources are created in - # response to operations that were initiated; you never create them directly. - class Operation - include Google::Apis::Core::Hashable - - # The time this operation finished in UTC timezone in RFC 3339 format, for - # example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # Database instance operation errors list wrapper. - # Corresponds to the JSON property `error` - # @return [Google::Apis::SqladminV1beta4::OperationErrors] - attr_accessor :error - - # Database instance export context. - # Corresponds to the JSON property `exportContext` - # @return [Google::Apis::SqladminV1beta4::ExportContext] - attr_accessor :export_context - - # Database instance import context. - # Corresponds to the JSON property `importContext` - # @return [Google::Apis::SqladminV1beta4::ImportContext] - attr_accessor :import_context - - # The time this operation was enqueued in UTC timezone in RFC 3339 format, for - # example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `insertTime` - # @return [DateTime] - attr_accessor :insert_time - - # This is always sql#operation. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An identifier that uniquely identifies the operation. You can use this - # identifier to retrieve the Operations resource that has information about the - # operation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, - # IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, - # CREATE_DATABASE, DELETE_DATABASE . - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The time this operation actually started in UTC timezone in RFC 3339 format, - # for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Name of the database instance related to this operation. - # Corresponds to the JSON property `targetId` - # @return [String] - attr_accessor :target_id - - # The URI of the instance related to the operation. - # Corresponds to the JSON property `targetLink` - # @return [String] - attr_accessor :target_link - - # The project ID of the target instance related to this operation. - # Corresponds to the JSON property `targetProject` - # @return [String] - attr_accessor :target_project - - # The email address of the user who initiated this operation. - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] unless args[:end_time].nil? - @error = args[:error] unless args[:error].nil? - @export_context = args[:export_context] unless args[:export_context].nil? - @import_context = args[:import_context] unless args[:import_context].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? - @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? - @target_id = args[:target_id] unless args[:target_id].nil? - @target_link = args[:target_link] unless args[:target_link].nil? - @target_project = args[:target_project] unless args[:target_project].nil? - @user = args[:user] unless args[:user].nil? - end - end - - # Database instance operation error. - class OperationError - include Google::Apis::Core::Hashable - - # Identifies the specific error that occurred. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # This is always sql#operationError. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Additional information about the error encountered. - # 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? - @kind = args[:kind] unless args[:kind].nil? - @message = args[:message] unless args[:message].nil? - end - end - - # Database instance operation errors list wrapper. - class OperationErrors - include Google::Apis::Core::Hashable - - # The list of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # This is always sql#operationErrors. - # 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) - @errors = args[:errors] unless args[:errors].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Database instance list operations response. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # List of operation resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#operationsList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return 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 - - # Read-replica configuration for connecting to the master. - class ReplicaConfiguration - include Google::Apis::Core::Hashable - - # This is always sql#replicaConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Read-replica configuration specific to MySQL databases. - # Corresponds to the JSON property `mysqlReplicaConfiguration` - # @return [Google::Apis::SqladminV1beta4::MySqlReplicaConfiguration] - attr_accessor :mysql_replica_configuration - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] unless args[:kind].nil? - @mysql_replica_configuration = args[:mysql_replica_configuration] unless args[:mysql_replica_configuration].nil? - end - end - - # Database instance restore from backup context. - class RestoreBackupContext - include Google::Apis::Core::Hashable - - # The ID of the backup run to restore from. - # Corresponds to the JSON property `backupRunId` - # @return [String] - attr_accessor :backup_run_id - - # The ID of the instance that the backup was taken from. - # Corresponds to the JSON property `instanceId` - # @return [String] - attr_accessor :instance_id - - # This is always sql#restoreBackupContext. - # 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) - @backup_run_id = args[:backup_run_id] unless args[:backup_run_id].nil? - @instance_id = args[:instance_id] unless args[:instance_id].nil? - @kind = args[:kind] unless args[:kind].nil? - end - end - - # Database instance settings. - class Settings - include Google::Apis::Core::Hashable - - # The activation policy for this instance. This specifies when the instance - # should be activated and is applicable only when the instance state is RUNNABLE. - # This can be one of the following. - # ALWAYS: The instance should always be active. - # NEVER: The instance should never be activated. - # ON_DEMAND: The instance is activated upon receiving requests. - # Corresponds to the JSON property `activationPolicy` - # @return [String] - attr_accessor :activation_policy - - # The App Engine app IDs that can access this instance. - # Corresponds to the JSON property `authorizedGaeApplications` - # @return [Array] - attr_accessor :authorized_gae_applications - - # Database instance backup configuration. - # Corresponds to the JSON property `backupConfiguration` - # @return [Google::Apis::SqladminV1beta4::BackupConfiguration] - attr_accessor :backup_configuration - - # Configuration specific to read replica instances. Indicates whether database - # flags for crash-safe replication are enabled. - # Corresponds to the JSON property `crashSafeReplicationEnabled` - # @return [Boolean] - attr_accessor :crash_safe_replication_enabled - alias_method :crash_safe_replication_enabled?, :crash_safe_replication_enabled - - # The database flags passed to the instance at startup. - # Corresponds to the JSON property `databaseFlags` - # @return [Array] - attr_accessor :database_flags - - # Configuration specific to read replica instances. Indicates whether - # replication is enabled or not. - # Corresponds to the JSON property `databaseReplicationEnabled` - # @return [Boolean] - attr_accessor :database_replication_enabled - alias_method :database_replication_enabled?, :database_replication_enabled - - # IP Management configuration. - # Corresponds to the JSON property `ipConfiguration` - # @return [Google::Apis::SqladminV1beta4::IpConfiguration] - attr_accessor :ip_configuration - - # This is always sql#settings. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Preferred location. This specifies where a Cloud SQL instance should - # preferably be located, either in a specific Compute Engine zone, or co-located - # with an App Engine application. Note that if the preferred location is not - # available, the instance will be located as close as possible within the region. - # Only one location may be specified. - # Corresponds to the JSON property `locationPreference` - # @return [Google::Apis::SqladminV1beta4::LocationPreference] - attr_accessor :location_preference - - # The pricing plan for this instance. This can be either PER_USE or PACKAGE. - # Corresponds to the JSON property `pricingPlan` - # @return [String] - attr_accessor :pricing_plan - - # The type of replication this instance uses. This can be either ASYNCHRONOUS or - # SYNCHRONOUS. - # Corresponds to the JSON property `replicationType` - # @return [String] - attr_accessor :replication_type - - # The version of instance settings. This is a required field for update method - # to make sure concurrent updates are handled properly. During update, use the - # most recent settingsVersion value for this instance and do not try to update - # this value. - # Corresponds to the JSON property `settingsVersion` - # @return [String] - attr_accessor :settings_version - - # The tier of service for this instance, for example D1, D2. For more - # information, see pricing. - # Corresponds to the JSON property `tier` - # @return [String] - attr_accessor :tier - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @activation_policy = args[:activation_policy] unless args[:activation_policy].nil? - @authorized_gae_applications = args[:authorized_gae_applications] unless args[:authorized_gae_applications].nil? - @backup_configuration = args[:backup_configuration] unless args[:backup_configuration].nil? - @crash_safe_replication_enabled = args[:crash_safe_replication_enabled] unless args[:crash_safe_replication_enabled].nil? - @database_flags = args[:database_flags] unless args[:database_flags].nil? - @database_replication_enabled = args[:database_replication_enabled] unless args[:database_replication_enabled].nil? - @ip_configuration = args[:ip_configuration] unless args[:ip_configuration].nil? - @kind = args[:kind] unless args[:kind].nil? - @location_preference = args[:location_preference] unless args[:location_preference].nil? - @pricing_plan = args[:pricing_plan] unless args[:pricing_plan].nil? - @replication_type = args[:replication_type] unless args[:replication_type].nil? - @settings_version = args[:settings_version] unless args[:settings_version].nil? - @tier = args[:tier] unless args[:tier].nil? - end - end - - # SslCerts Resource - class SslCert - include Google::Apis::Core::Hashable - - # PEM representation. - # Corresponds to the JSON property `cert` - # @return [String] - attr_accessor :cert - - # Serial number, as extracted from the certificate. - # Corresponds to the JSON property `certSerialNumber` - # @return [String] - attr_accessor :cert_serial_number - - # User supplied name. Constrained to [a-zA-Z.-_ ]+. - # Corresponds to the JSON property `commonName` - # @return [String] - attr_accessor :common_name - - # The time when the certificate was created in RFC 3339 format, for example 2012- - # 11-15T16:19:00.094Z - # Corresponds to the JSON property `createTime` - # @return [DateTime] - attr_accessor :create_time - - # The time when the certificate expires in RFC 3339 format, for example 2012-11- - # 15T16:19:00.094Z. - # Corresponds to the JSON property `expirationTime` - # @return [DateTime] - attr_accessor :expiration_time - - # Name of the database instance. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#sslCert. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Sha1 Fingerprint. - # Corresponds to the JSON property `sha1Fingerprint` - # @return [String] - attr_accessor :sha1_fingerprint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cert = args[:cert] unless args[:cert].nil? - @cert_serial_number = args[:cert_serial_number] unless args[:cert_serial_number].nil? - @common_name = args[:common_name] unless args[:common_name].nil? - @create_time = args[:create_time] unless args[:create_time].nil? - @expiration_time = args[:expiration_time] unless args[:expiration_time].nil? - @instance = args[:instance] unless args[:instance].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @sha1_fingerprint = args[:sha1_fingerprint] unless args[:sha1_fingerprint].nil? - end - end - - # SslCertDetail. - class SslCertDetail - include Google::Apis::Core::Hashable - - # SslCerts Resource - # Corresponds to the JSON property `certInfo` - # @return [Google::Apis::SqladminV1beta4::SslCert] - attr_accessor :cert_info - - # The private key for the client cert, in pem format. Keep private in order to - # protect your security. - # Corresponds to the JSON property `certPrivateKey` - # @return [String] - attr_accessor :cert_private_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cert_info = args[:cert_info] unless args[:cert_info].nil? - @cert_private_key = args[:cert_private_key] unless args[:cert_private_key].nil? - end - end - - # SslCerts insert request. - class InsertSslCertsRequest - include Google::Apis::Core::Hashable - - # User supplied name. Must be a distinct name from the other certificates for - # this instance. New certificates will not be usable until the instance is - # restarted. - # Corresponds to the JSON property `commonName` - # @return [String] - attr_accessor :common_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @common_name = args[:common_name] unless args[:common_name].nil? - end - end - - # SslCert insert response. - class InsertSslCertsResponse - include Google::Apis::Core::Hashable - - # SslCertDetail. - # Corresponds to the JSON property `clientCert` - # @return [Google::Apis::SqladminV1beta4::SslCertDetail] - attr_accessor :client_cert - - # This is always sql#sslCertsInsert. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # SslCerts Resource - # Corresponds to the JSON property `serverCaCert` - # @return [Google::Apis::SqladminV1beta4::SslCert] - attr_accessor :server_ca_cert - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @client_cert = args[:client_cert] unless args[:client_cert].nil? - @kind = args[:kind] unless args[:kind].nil? - @server_ca_cert = args[:server_ca_cert] unless args[:server_ca_cert].nil? - end - end - - # SslCerts list response. - class ListSslCertsResponse - include Google::Apis::Core::Hashable - - # List of client certificates for the instance. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#sslCertsList. - # 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 - - # A Google Cloud SQL service tier resource. - class Tier - include Google::Apis::Core::Hashable - - # The maximum disk size of this tier in bytes. - # Corresponds to the JSON property `DiskQuota` - # @return [String] - attr_accessor :disk_quota - - # The maximum RAM usage of this tier in bytes. - # Corresponds to the JSON property `RAM` - # @return [String] - attr_accessor :ram - - # This is always sql#tier. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The applicable regions for this tier. Can be us-east1, europe-west1 or asia- - # east1. - # Corresponds to the JSON property `region` - # @return [Array] - attr_accessor :region - - # An identifier for the service tier, for example D1, D2 etc. For related - # information, see Pricing. - # Corresponds to the JSON property `tier` - # @return [String] - attr_accessor :tier - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disk_quota = args[:disk_quota] unless args[:disk_quota].nil? - @ram = args[:ram] unless args[:ram].nil? - @kind = args[:kind] unless args[:kind].nil? - @region = args[:region] unless args[:region].nil? - @tier = args[:tier] unless args[:tier].nil? - end - end - - # Tiers list response. - class ListTiersResponse - include Google::Apis::Core::Hashable - - # List of tiers. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#tiersList. - # 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 - - # A Cloud SQL user resource. - class User - include Google::Apis::Core::Hashable - - # HTTP 1.1 Entity tag for the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The host name from which the user can connect. For insert operations, host - # defaults to an empty string. For update operations, host is specified as part - # of the request URL. The host name is not mutable with this API. - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # The name of the Cloud SQL instance. This does not include the project ID. Can - # be omitted for update since it is already specified on the URL. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#user. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the user in the Cloud SQL instance. Can be omitted for update - # since it is already specified on the URL. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The password for the user. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # The project ID of the project containing the Cloud SQL database. The Google - # apps domain is prefixed if applicable. Can be omitted for update since it is - # already specified on the URL. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @host = args[:host] unless args[:host].nil? - @instance = args[:instance] unless args[:instance].nil? - @kind = args[:kind] unless args[:kind].nil? - @name = args[:name] unless args[:name].nil? - @password = args[:password] unless args[:password].nil? - @project = args[:project] unless args[:project].nil? - end - end - - # User list response. - class ListUsersResponse - include Google::Apis::Core::Hashable - - # List of user resources in the instance. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#usersList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An identifier that uniquely identifies the operation. You can use this - # identifier to retrieve the Operations resource that has information about the - # operation. - # 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 - end - end -end diff --git a/generated/google/apis/sqladmin_v1beta4/representations.rb b/generated/google/apis/sqladmin_v1beta4/representations.rb deleted file mode 100644 index 6659f4388..000000000 --- a/generated/google/apis/sqladmin_v1beta4/representations.rb +++ /dev/null @@ -1,688 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module SqladminV1beta4 - - class AclEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BackupConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BackupRun - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListBackupRunsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BinLogCoordinates - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CloneContext - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Database - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatabaseFlags - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DatabaseInstance - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListDatabasesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExportContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CsvExportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SqlExportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Flag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListFlagsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CsvImportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CloneInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ExportInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ImportInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListInstancesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RestoreInstancesBackupRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class IpConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class IpMapping - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LocationPreference - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class MySqlReplicaConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OnPremisesConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Operation - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OperationError - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class OperationErrors - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ReplicaConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RestoreBackupContext - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Settings - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SslCert - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class SslCertDetail - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InsertSslCertsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class InsertSslCertsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSslCertsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Tier - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTiersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class User - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListUsersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AclEntry - class Representation < Google::Apis::Core::JsonRepresentation - property :expiration_time, as: 'expirationTime', type: DateTime - - property :kind, as: 'kind' - property :name, as: 'name' - property :value, as: 'value' - end - end - - # @private - class BackupConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :binary_log_enabled, as: 'binaryLogEnabled' - property :enabled, as: 'enabled' - property :kind, as: 'kind' - property :start_time, as: 'startTime' - end - end - - # @private - class BackupRun - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime', type: DateTime - - property :enqueued_time, as: 'enqueuedTime', type: DateTime - - property :error, as: 'error', class: Google::Apis::SqladminV1beta4::OperationError, decorator: Google::Apis::SqladminV1beta4::OperationError::Representation - - property :id, as: 'id' - property :instance, as: 'instance' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - property :start_time, as: 'startTime', type: DateTime - - property :status, as: 'status' - property :window_start_time, as: 'windowStartTime', type: DateTime - - end - end - - # @private - class ListBackupRunsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::BackupRun, decorator: Google::Apis::SqladminV1beta4::BackupRun::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class BinLogCoordinates - class Representation < Google::Apis::Core::JsonRepresentation - property :bin_log_file_name, as: 'binLogFileName' - property :bin_log_position, as: 'binLogPosition' - property :kind, as: 'kind' - end - end - - # @private - class CloneContext - class Representation < Google::Apis::Core::JsonRepresentation - property :bin_log_coordinates, as: 'binLogCoordinates', class: Google::Apis::SqladminV1beta4::BinLogCoordinates, decorator: Google::Apis::SqladminV1beta4::BinLogCoordinates::Representation - - property :destination_instance_name, as: 'destinationInstanceName' - property :kind, as: 'kind' - end - end - - # @private - class Database - class Representation < Google::Apis::Core::JsonRepresentation - property :charset, as: 'charset' - property :collation, as: 'collation' - property :etag, as: 'etag' - property :instance, as: 'instance' - property :kind, as: 'kind' - property :name, as: 'name' - property :project, as: 'project' - property :self_link, as: 'selfLink' - end - end - - # @private - class DatabaseFlags - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :value, as: 'value' - end - end - - # @private - class DatabaseInstance - class Representation < Google::Apis::Core::JsonRepresentation - property :current_disk_size, as: 'currentDiskSize' - property :database_version, as: 'databaseVersion' - property :etag, as: 'etag' - property :instance_type, as: 'instanceType' - collection :ip_addresses, as: 'ipAddresses', class: Google::Apis::SqladminV1beta4::IpMapping, decorator: Google::Apis::SqladminV1beta4::IpMapping::Representation - - property :ipv6_address, as: 'ipv6Address' - property :kind, as: 'kind' - property :master_instance_name, as: 'masterInstanceName' - property :max_disk_size, as: 'maxDiskSize' - property :name, as: 'name' - property :on_premises_configuration, as: 'onPremisesConfiguration', class: Google::Apis::SqladminV1beta4::OnPremisesConfiguration, decorator: Google::Apis::SqladminV1beta4::OnPremisesConfiguration::Representation - - property :project, as: 'project' - property :region, as: 'region' - property :replica_configuration, as: 'replicaConfiguration', class: Google::Apis::SqladminV1beta4::ReplicaConfiguration, decorator: Google::Apis::SqladminV1beta4::ReplicaConfiguration::Representation - - collection :replica_names, as: 'replicaNames' - property :self_link, as: 'selfLink' - property :server_ca_cert, as: 'serverCaCert', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - property :service_account_email_address, as: 'serviceAccountEmailAddress' - property :settings, as: 'settings', class: Google::Apis::SqladminV1beta4::Settings, decorator: Google::Apis::SqladminV1beta4::Settings::Representation - - property :state, as: 'state' - end - end - - # @private - class ListDatabasesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Database, decorator: Google::Apis::SqladminV1beta4::Database::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ExportContext - class Representation < Google::Apis::Core::JsonRepresentation - property :csv_export_options, as: 'csvExportOptions', class: Google::Apis::SqladminV1beta4::ExportContext::CsvExportOptions, decorator: Google::Apis::SqladminV1beta4::ExportContext::CsvExportOptions::Representation - - collection :databases, as: 'databases' - property :file_type, as: 'fileType' - property :kind, as: 'kind' - property :sql_export_options, as: 'sqlExportOptions', class: Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions, decorator: Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions::Representation - - property :uri, as: 'uri' - end - - # @private - class CsvExportOptions - class Representation < Google::Apis::Core::JsonRepresentation - property :select_query, as: 'selectQuery' - end - end - - # @private - class SqlExportOptions - class Representation < Google::Apis::Core::JsonRepresentation - collection :tables, as: 'tables' - end - end - end - - # @private - class Flag - class Representation < Google::Apis::Core::JsonRepresentation - collection :allowed_string_values, as: 'allowedStringValues' - collection :applies_to, as: 'appliesTo' - property :kind, as: 'kind' - property :max_value, as: 'maxValue' - property :min_value, as: 'minValue' - property :name, as: 'name' - property :type, as: 'type' - end - end - - # @private - class ListFlagsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Flag, decorator: Google::Apis::SqladminV1beta4::Flag::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ImportContext - class Representation < Google::Apis::Core::JsonRepresentation - property :csv_import_options, as: 'csvImportOptions', class: Google::Apis::SqladminV1beta4::ImportContext::CsvImportOptions, decorator: Google::Apis::SqladminV1beta4::ImportContext::CsvImportOptions::Representation - - property :database, as: 'database' - property :file_type, as: 'fileType' - property :kind, as: 'kind' - property :uri, as: 'uri' - end - - # @private - class CsvImportOptions - class Representation < Google::Apis::Core::JsonRepresentation - collection :columns, as: 'columns' - property :table, as: 'table' - end - end - end - - # @private - class CloneInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :clone_context, as: 'cloneContext', class: Google::Apis::SqladminV1beta4::CloneContext, decorator: Google::Apis::SqladminV1beta4::CloneContext::Representation - - end - end - - # @private - class ExportInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :export_context, as: 'exportContext', class: Google::Apis::SqladminV1beta4::ExportContext, decorator: Google::Apis::SqladminV1beta4::ExportContext::Representation - - end - end - - # @private - class ImportInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :import_context, as: 'importContext', class: Google::Apis::SqladminV1beta4::ImportContext, decorator: Google::Apis::SqladminV1beta4::ImportContext::Representation - - end - end - - # @private - class ListInstancesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::DatabaseInstance, decorator: Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class RestoreInstancesBackupRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :restore_backup_context, as: 'restoreBackupContext', class: Google::Apis::SqladminV1beta4::RestoreBackupContext, decorator: Google::Apis::SqladminV1beta4::RestoreBackupContext::Representation - - end - end - - # @private - class IpConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - collection :authorized_networks, as: 'authorizedNetworks', class: Google::Apis::SqladminV1beta4::AclEntry, decorator: Google::Apis::SqladminV1beta4::AclEntry::Representation - - property :ipv4_enabled, as: 'ipv4Enabled' - property :require_ssl, as: 'requireSsl' - end - end - - # @private - class IpMapping - class Representation < Google::Apis::Core::JsonRepresentation - property :ip_address, as: 'ipAddress' - property :time_to_retire, as: 'timeToRetire', type: DateTime - - end - end - - # @private - class LocationPreference - class Representation < Google::Apis::Core::JsonRepresentation - property :follow_gae_application, as: 'followGaeApplication' - property :kind, as: 'kind' - property :zone, as: 'zone' - end - end - - # @private - class MySqlReplicaConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :ca_certificate, as: 'caCertificate' - property :client_certificate, as: 'clientCertificate' - property :client_key, as: 'clientKey' - property :connect_retry_interval, as: 'connectRetryInterval' - property :dump_file_path, as: 'dumpFilePath' - property :kind, as: 'kind' - property :master_heartbeat_period, as: 'masterHeartbeatPeriod' - property :password, as: 'password' - property :ssl_cipher, as: 'sslCipher' - property :username, as: 'username' - property :verify_server_certificate, as: 'verifyServerCertificate' - end - end - - # @private - class OnPremisesConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :host_port, as: 'hostPort' - property :kind, as: 'kind' - end - end - - # @private - class Operation - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime', type: DateTime - - property :error, as: 'error', class: Google::Apis::SqladminV1beta4::OperationErrors, decorator: Google::Apis::SqladminV1beta4::OperationErrors::Representation - - property :export_context, as: 'exportContext', class: Google::Apis::SqladminV1beta4::ExportContext, decorator: Google::Apis::SqladminV1beta4::ExportContext::Representation - - property :import_context, as: 'importContext', class: Google::Apis::SqladminV1beta4::ImportContext, decorator: Google::Apis::SqladminV1beta4::ImportContext::Representation - - property :insert_time, as: 'insertTime', type: DateTime - - property :kind, as: 'kind' - property :name, as: 'name' - property :operation_type, as: 'operationType' - property :self_link, as: 'selfLink' - property :start_time, as: 'startTime', type: DateTime - - property :status, as: 'status' - property :target_id, as: 'targetId' - property :target_link, as: 'targetLink' - property :target_project, as: 'targetProject' - property :user, as: 'user' - end - end - - # @private - class OperationError - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :kind, as: 'kind' - property :message, as: 'message' - end - end - - # @private - class OperationErrors - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::SqladminV1beta4::OperationError, decorator: Google::Apis::SqladminV1beta4::OperationError::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Operation, decorator: Google::Apis::SqladminV1beta4::Operation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class ReplicaConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :mysql_replica_configuration, as: 'mysqlReplicaConfiguration', class: Google::Apis::SqladminV1beta4::MySqlReplicaConfiguration, decorator: Google::Apis::SqladminV1beta4::MySqlReplicaConfiguration::Representation - - end - end - - # @private - class RestoreBackupContext - class Representation < Google::Apis::Core::JsonRepresentation - property :backup_run_id, as: 'backupRunId' - property :instance_id, as: 'instanceId' - property :kind, as: 'kind' - end - end - - # @private - class Settings - class Representation < Google::Apis::Core::JsonRepresentation - property :activation_policy, as: 'activationPolicy' - collection :authorized_gae_applications, as: 'authorizedGaeApplications' - property :backup_configuration, as: 'backupConfiguration', class: Google::Apis::SqladminV1beta4::BackupConfiguration, decorator: Google::Apis::SqladminV1beta4::BackupConfiguration::Representation - - property :crash_safe_replication_enabled, as: 'crashSafeReplicationEnabled' - collection :database_flags, as: 'databaseFlags', class: Google::Apis::SqladminV1beta4::DatabaseFlags, decorator: Google::Apis::SqladminV1beta4::DatabaseFlags::Representation - - property :database_replication_enabled, as: 'databaseReplicationEnabled' - property :ip_configuration, as: 'ipConfiguration', class: Google::Apis::SqladminV1beta4::IpConfiguration, decorator: Google::Apis::SqladminV1beta4::IpConfiguration::Representation - - property :kind, as: 'kind' - property :location_preference, as: 'locationPreference', class: Google::Apis::SqladminV1beta4::LocationPreference, decorator: Google::Apis::SqladminV1beta4::LocationPreference::Representation - - property :pricing_plan, as: 'pricingPlan' - property :replication_type, as: 'replicationType' - property :settings_version, as: 'settingsVersion' - property :tier, as: 'tier' - end - end - - # @private - class SslCert - class Representation < Google::Apis::Core::JsonRepresentation - property :cert, as: 'cert' - property :cert_serial_number, as: 'certSerialNumber' - property :common_name, as: 'commonName' - property :create_time, as: 'createTime', type: DateTime - - property :expiration_time, as: 'expirationTime', type: DateTime - - property :instance, as: 'instance' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - property :sha1_fingerprint, as: 'sha1Fingerprint' - end - end - - # @private - class SslCertDetail - class Representation < Google::Apis::Core::JsonRepresentation - property :cert_info, as: 'certInfo', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - property :cert_private_key, as: 'certPrivateKey' - end - end - - # @private - class InsertSslCertsRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :common_name, as: 'commonName' - end - end - - # @private - class InsertSslCertsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :client_cert, as: 'clientCert', class: Google::Apis::SqladminV1beta4::SslCertDetail, decorator: Google::Apis::SqladminV1beta4::SslCertDetail::Representation - - property :kind, as: 'kind' - property :server_ca_cert, as: 'serverCaCert', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - end - end - - # @private - class ListSslCertsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Tier - class Representation < Google::Apis::Core::JsonRepresentation - property :disk_quota, as: 'DiskQuota' - property :ram, as: 'RAM' - property :kind, as: 'kind' - collection :region, as: 'region' - property :tier, as: 'tier' - end - end - - # @private - class ListTiersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Tier, decorator: Google::Apis::SqladminV1beta4::Tier::Representation - - property :kind, as: 'kind' - end - end - - # @private - class User - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :host, as: 'host' - property :instance, as: 'instance' - property :kind, as: 'kind' - property :name, as: 'name' - property :password, as: 'password' - property :project, as: 'project' - end - end - - # @private - class ListUsersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::User, decorator: Google::Apis::SqladminV1beta4::User::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - end - end -end diff --git a/generated/google/apis/sqladmin_v1beta4/service.rb b/generated/google/apis/sqladmin_v1beta4/service.rb deleted file mode 100644 index ac698dc23..000000000 --- a/generated/google/apis/sqladmin_v1beta4/service.rb +++ /dev/null @@ -1,1534 +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 SqladminV1beta4 - # Cloud SQL Administration API - # - # API for Cloud SQL database instance management. - # - # @example - # require 'google/apis/sqladmin_v1beta4' - # - # Sqladmin = Google::Apis::SqladminV1beta4 # Alias the module - # service = Sqladmin::SQLAdminService.new - # - # @see https://cloud.google.com/sql/docs/reference/latest - class SQLAdminService < 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/', 'sql/v1beta4/') - end - - # Retrieves a resource containing information about a backup run. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] id - # The ID of this Backup Run. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::BackupRun] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::BackupRun] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/backupRuns/{id}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation - command.response_class = Google::Apis::SqladminV1beta4::BackupRun - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all backup runs associated with a given instance and configuration in - # the reverse chronological order of the enqueued time. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Fixnum] max_results - # Maximum number of backup runs per response. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::ListBackupRunsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListBackupRunsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/backupRuns' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListBackupRunsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListBackupRunsResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.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 - - # Deletes a resource containing information about a database inside a Cloud SQL - # instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database to be deleted in the instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/databases/{database}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.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 resource containing information about a database inside a Cloud - # SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database in the instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::SqladminV1beta4::Database] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::Database] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/databases/{database}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.response_class = Google::Apis::SqladminV1beta4::Database - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.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 resource containing information about a database inside a Cloud SQL - # instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::Database] database_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_database(project, instance, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/databases' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.request_object = database_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists databases in the specified Cloud SQL instance. - # @param [String] project - # Project ID of the project for which to list Cloud SQL instances. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project 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::SqladminV1beta4::ListDatabasesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListDatabasesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/databases' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListDatabasesResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListDatabasesResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a resource containing information about a database inside a Cloud SQL - # instance. This method supports patch semantics. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database to be updated in the instance. - # @param [Google::Apis::SqladminV1beta4::Database] database_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/databases/{database}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.request_object = database_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.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 resource containing information about a database inside a Cloud SQL - # instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database to be updated in the instance. - # @param [Google::Apis::SqladminV1beta4::Database] database_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/databases/{database}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.request_object = database_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.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 available database flags for Google Cloud SQL instances. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::ListFlagsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListFlagsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_flags(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'flags' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse - 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 Cloud SQL instance as a clone of the source instance. - # @param [String] project - # Project ID of the source as well as the clone Cloud SQL instance. - # @param [String] instance - # The ID of the Cloud SQL instance to be cloned (source). This does not include - # the project ID. - # @param [Google::Apis::SqladminV1beta4::CloneInstancesRequest] clone_instances_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/clone' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::CloneInstancesRequest::Representation - command.request_object = clone_instances_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance to be deleted. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a - # MySQL dump file. - # @param [String] project - # Project ID of the project that contains the instance to be exported. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/export' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::ExportInstancesRequest::Representation - command.request_object = export_instances_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a resource containing information about a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project 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::SqladminV1beta4::DatabaseInstance] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::DatabaseInstance] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.response_class = Google::Apis::SqladminV1beta4::DatabaseInstance - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud - # Storage. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::ImportInstancesRequest] import_instances_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/import' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::ImportInstancesRequest::Representation - command.request_object = import_instances_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new Cloud SQL instance. - # @param [String] project - # Project ID of the project to which the newly created Cloud SQL instances - # should belong. - # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.request_object = database_instance_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists instances under a given project in the alphabetical order of the - # instance name. - # @param [String] project - # Project ID of the project for which to list Cloud SQL instances. - # @param [Fixnum] max_results - # The maximum number of results to return per response. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::ListInstancesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListInstancesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_instances(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse - command.params['project'] = project unless project.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 - - # Updates settings of a Cloud SQL instance. Caution: This is not a partial - # update, so you must include values for all the settings that you want to - # retain. For partial updates, use patch.. This method supports patch semantics. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.request_object = database_instance_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Promotes the read replica instance to be a stand-alone Cloud SQL instance. - # @param [String] project - # ID of the project that contains the read replica. - # @param [String] instance - # Cloud SQL read replica instance name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 promote_replica_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/promoteReplica' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes all client certificates and generates a new server SSL certificate for - # the instance. The changes will not take effect until the instance is restarted. - # Existing instances without a server certificate will need to call this once - # to set a server certificate. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 reset_ssl_config_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/resetSslConfig' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Restarts a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance to be restarted. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/restart' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Restores a backup of a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest] restore_instances_backup_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 restore_backup_instance(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/restoreBackup' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest::Representation - command.request_object = restore_instances_backup_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Starts the replication in the read replica instance. - # @param [String] project - # ID of the project that contains the read replica. - # @param [String] instance - # Cloud SQL read replica instance name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 start_replica_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/startReplica' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Stops the replication in the read replica instance. - # @param [String] project - # ID of the project that contains the read replica. - # @param [String] instance - # Cloud SQL read replica instance name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 stop_replica_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/stopReplica' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates settings of a Cloud SQL instance. Caution: This is not a partial - # update, so you must include values for all the settings that you want to - # retain. For partial updates, use patch. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.request_object = database_instance_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves an instance operation that has been performed on an instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] operation - # Instance operation 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/operations/{operation}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['operation'] = operation unless operation.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all instance operations that have been performed on the given Cloud SQL - # instance in the reverse chronological order of the start time. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Fixnum] max_results - # Maximum number of operations per response. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListOperationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(project, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/operations' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListOperationsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListOperationsResponse - command.params['project'] = project unless project.nil? - command.query['instance'] = instance unless instance.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 - - # Deletes the SSL certificate. The change will not take effect until the - # instance is restarted. - # @param [String] project - # Project ID of the project that contains the instance to be deleted. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] sha1_fingerprint - # Sha1 FingerPrint. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a particular SSL certificate. Does not include the private key ( - # required for usage). The private key must be saved from the response to - # initial creation. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] sha1_fingerprint - # Sha1 FingerPrint. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::SslCert] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::SslCert] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation - command.response_class = Google::Apis::SqladminV1beta4::SslCert - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates an SSL certificate and returns it along with the private key and - # server certificate authority. The new certificate will not be usable until the - # instance is restarted. - # @param [String] project - # Project ID of the project to which the newly created Cloud SQL instances - # should belong. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::InsertSslCertsRequest] insert_ssl_certs_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::SqladminV1beta4::InsertSslCertsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::InsertSslCertsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/sslCerts' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::InsertSslCertsRequest::Representation - command.request_object = insert_ssl_certs_request_object - command.response_representation = Google::Apis::SqladminV1beta4::InsertSslCertsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::InsertSslCertsResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all of the current SSL certificates for the instance. - # @param [String] project - # Project ID of the project for which to list Cloud SQL instances. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project 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::SqladminV1beta4::ListSslCertsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListSslCertsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/sslCerts' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListSslCertsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListSslCertsResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all available service tiers for Google Cloud SQL, for example D1, D2. - # For related information, see Pricing. - # @param [String] project - # Project ID of the project for which to list tiers. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::SqladminV1beta4::ListTiersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListTiersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tiers(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/tiers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListTiersResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListTiersResponse - 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 - - # Deletes a user from a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] host - # Host of the user in the instance. - # @param [String] name - # Name of the user in the instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_user(project, instance, host: nil, name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/users' - command = make_simple_command(:delete, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['host'] = host unless host.nil? - command.query['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new user in a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::User] user_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/users' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists users in the specified Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project 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::SqladminV1beta4::ListUsersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListUsersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_users(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/users' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::SqladminV1beta4::ListUsersResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListUsersResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing user in a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::User] user_object - # @param [String] host - # Host of the user in the instance. - # @param [String] name - # Name of the user in the instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_user(project, instance, user_object = nil, host: nil, name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'projects/{project}/instances/{instance}/users' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::SqladminV1beta4::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['host'] = host unless host.nil? - command.query['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - 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 diff --git a/generated/google/apis/storage_v1.rb b/generated/google/apis/storage_v1.rb deleted file mode 100644 index 6a9ab6b18..000000000 --- a/generated/google/apis/storage_v1.rb +++ /dev/null @@ -1,43 +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/storage_v1/service.rb' -require 'google/apis/storage_v1/classes.rb' -require 'google/apis/storage_v1/representations.rb' - -module Google - module Apis - # Cloud Storage API - # - # Lets you store and retrieve potentially-large, immutable data objects. - # - # @see https://developers.google.com/storage/docs/json_api/ - module StorageV1 - VERSION = 'V1' - REVISION = '20150326' - - # 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 diff --git a/generated/google/apis/storage_v1/classes.rb b/generated/google/apis/storage_v1/classes.rb deleted file mode 100644 index 9792076fd..000000000 --- a/generated/google/apis/storage_v1/classes.rb +++ /dev/null @@ -1,1177 +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 StorageV1 - - # A bucket. - class Bucket - include Google::Apis::Core::Hashable - - # Access controls on the bucket. - # Corresponds to the JSON property `acl` - # @return [Array] - attr_accessor :acl - - # The bucket's Cross-Origin Resource Sharing (CORS) configuration. - # Corresponds to the JSON property `cors` - # @return [Array] - attr_accessor :cors_configurations - - # Default access controls to apply to new objects when no ACL is provided. - # Corresponds to the JSON property `defaultObjectAcl` - # @return [Array] - attr_accessor :default_object_acl - - # HTTP 1.1 Entity tag for the bucket. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of the bucket. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of item this is. For buckets, this is always storage#bucket. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The bucket's lifecycle configuration. See lifecycle management for more - # information. - # Corresponds to the JSON property `lifecycle` - # @return [Google::Apis::StorageV1::Bucket::Lifecycle] - attr_accessor :lifecycle - - # The location of the bucket. Object data for objects in the bucket resides in - # physical storage within this region. Defaults to US. See the developer's guide - # for the authoritative list. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # The bucket's logging configuration, which defines the destination bucket and - # optional name prefix for the current bucket's logs. - # Corresponds to the JSON property `logging` - # @return [Google::Apis::StorageV1::Bucket::Logging] - attr_accessor :logging - - # The metadata generation of this bucket. - # Corresponds to the JSON property `metageneration` - # @return [String] - attr_accessor :metageneration - - # The name of the bucket. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The owner of the bucket. This is always the project team's owner group. - # Corresponds to the JSON property `owner` - # @return [Google::Apis::StorageV1::Bucket::Owner] - attr_accessor :owner - - # The project number of the project the bucket belongs to. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # The URI of this bucket. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The bucket's storage class. This defines how objects in the bucket are stored - # and determines the SLA and the cost of storage. Values include STANDARD, - # NEARLINE and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. For more - # information, see storage classes. - # Corresponds to the JSON property `storageClass` - # @return [String] - attr_accessor :storage_class - - # Creation time of the bucket in RFC 3339 format. - # Corresponds to the JSON property `timeCreated` - # @return [DateTime] - attr_accessor :time_created - - # The bucket's versioning configuration. - # Corresponds to the JSON property `versioning` - # @return [Google::Apis::StorageV1::Bucket::Versioning] - attr_accessor :versioning - - # The bucket's website configuration. - # Corresponds to the JSON property `website` - # @return [Google::Apis::StorageV1::Bucket::Website] - attr_accessor :website - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acl = args[:acl] unless args[:acl].nil? - @cors_configurations = args[:cors_configurations] unless args[:cors_configurations].nil? - @default_object_acl = args[:default_object_acl] unless args[:default_object_acl].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @lifecycle = args[:lifecycle] unless args[:lifecycle].nil? - @location = args[:location] unless args[:location].nil? - @logging = args[:logging] unless args[:logging].nil? - @metageneration = args[:metageneration] unless args[:metageneration].nil? - @name = args[:name] unless args[:name].nil? - @owner = args[:owner] unless args[:owner].nil? - @project_number = args[:project_number] unless args[:project_number].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @storage_class = args[:storage_class] unless args[:storage_class].nil? - @time_created = args[:time_created] unless args[:time_created].nil? - @versioning = args[:versioning] unless args[:versioning].nil? - @website = args[:website] unless args[:website].nil? - end - - # - class CorsConfiguration - include Google::Apis::Core::Hashable - - # The value, in seconds, to return in the Access-Control-Max-Age header used in - # preflight responses. - # Corresponds to the JSON property `maxAgeSeconds` - # @return [Fixnum] - attr_accessor :max_age_seconds - - # The list of HTTP methods on which to include CORS response headers, (GET, - # OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means " - # any method". - # Corresponds to the JSON property `method` - # @return [Array] - attr_accessor :http_method - - # The list of Origins eligible to receive CORS response headers. Note: "*" is - # permitted in the list of origins, and means "any Origin". - # Corresponds to the JSON property `origin` - # @return [Array] - attr_accessor :origin - - # The list of HTTP headers other than the simple response headers to give - # permission for the user-agent to share across domains. - # Corresponds to the JSON property `responseHeader` - # @return [Array] - attr_accessor :response_header - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max_age_seconds = args[:max_age_seconds] unless args[:max_age_seconds].nil? - @http_method = args[:http_method] unless args[:http_method].nil? - @origin = args[:origin] unless args[:origin].nil? - @response_header = args[:response_header] unless args[:response_header].nil? - end - end - - # The bucket's lifecycle configuration. See lifecycle management for more - # information. - class Lifecycle - include Google::Apis::Core::Hashable - - # A lifecycle management rule, which is made of an action to take and the - # condition(s) under which the action will be taken. - # Corresponds to the JSON property `rule` - # @return [Array] - attr_accessor :rule - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rule = args[:rule] unless args[:rule].nil? - end - - # - class Rule - include Google::Apis::Core::Hashable - - # The action to take. - # Corresponds to the JSON property `action` - # @return [Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action] - attr_accessor :action - - # The condition(s) under which the action will be taken. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition] - attr_accessor :condition - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @action = args[:action] unless args[:action].nil? - @condition = args[:condition] unless args[:condition].nil? - end - - # The action to take. - class Action - include Google::Apis::Core::Hashable - - # Type of the action. Currently, only Delete is supported. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] unless args[:type].nil? - end - end - - # The condition(s) under which the action will be taken. - class Condition - include Google::Apis::Core::Hashable - - # Age of an object (in days). This condition is satisfied when an object reaches - # the specified age. - # Corresponds to the JSON property `age` - # @return [Fixnum] - attr_accessor :age - - # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). - # This condition is satisfied when an object is created before midnight of the - # specified date in UTC. - # Corresponds to the JSON property `createdBefore` - # @return [Date] - attr_accessor :created_before - - # Relevant only for versioned objects. If the value is true, this condition - # matches live objects; if the value is false, it matches archived objects. - # Corresponds to the JSON property `isLive` - # @return [Boolean] - attr_accessor :is_live - alias_method :is_live?, :is_live - - # Relevant only for versioned objects. If the value is N, this condition is - # satisfied when there are at least N versions (including the live version) - # newer than this version of the object. - # Corresponds to the JSON property `numNewerVersions` - # @return [Fixnum] - attr_accessor :num_newer_versions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @age = args[:age] unless args[:age].nil? - @created_before = args[:created_before] unless args[:created_before].nil? - @is_live = args[:is_live] unless args[:is_live].nil? - @num_newer_versions = args[:num_newer_versions] unless args[:num_newer_versions].nil? - end - end - end - end - - # The bucket's logging configuration, which defines the destination bucket and - # optional name prefix for the current bucket's logs. - class Logging - include Google::Apis::Core::Hashable - - # The destination bucket where the current bucket's logs should be placed. - # Corresponds to the JSON property `logBucket` - # @return [String] - attr_accessor :log_bucket - - # A prefix for log object names. - # Corresponds to the JSON property `logObjectPrefix` - # @return [String] - attr_accessor :log_object_prefix - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @log_bucket = args[:log_bucket] unless args[:log_bucket].nil? - @log_object_prefix = args[:log_object_prefix] unless args[:log_object_prefix].nil? - end - end - - # The owner of the bucket. This is always the project team's owner group. - class Owner - include Google::Apis::Core::Hashable - - # The entity, in the form project-owner-projectId. - # Corresponds to the JSON property `entity` - # @return [String] - attr_accessor :entity - - # The ID for the entity. - # Corresponds to the JSON property `entityId` - # @return [String] - attr_accessor :entity_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entity = args[:entity] unless args[:entity].nil? - @entity_id = args[:entity_id] unless args[:entity_id].nil? - end - end - - # The bucket's versioning configuration. - class Versioning - include Google::Apis::Core::Hashable - - # While set to true, versioning is fully enabled for this bucket. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @enabled = args[:enabled] unless args[:enabled].nil? - end - end - - # The bucket's website configuration. - class Website - include Google::Apis::Core::Hashable - - # Behaves as the bucket's directory index where missing objects are treated as - # potential directories. - # Corresponds to the JSON property `mainPageSuffix` - # @return [String] - attr_accessor :main_page_suffix - - # The custom object to return when a requested resource is not found. - # Corresponds to the JSON property `notFoundPage` - # @return [String] - attr_accessor :not_found_page - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @main_page_suffix = args[:main_page_suffix] unless args[:main_page_suffix].nil? - @not_found_page = args[:not_found_page] unless args[:not_found_page].nil? - end - end - end - - # An access-control entry. - class BucketAccessControl - include Google::Apis::Core::Hashable - - # The name of the bucket. - # Corresponds to the JSON property `bucket` - # @return [String] - attr_accessor :bucket - - # The domain associated with the entity, if any. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # The email address associated with the entity, if any. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The entity holding the permission, in one of the following forms: - # - user-userId - # - user-email - # - group-groupId - # - group-email - # - domain-domain - # - project-team-projectId - # - allUsers - # - allAuthenticatedUsers Examples: - # - The user liz@example.com would be user-liz@example.com. - # - The group example@googlegroups.com would be group-example@googlegroups.com. - # - To refer to all members of the Google Apps for Business domain example.com, - # the entity would be domain-example.com. - # Corresponds to the JSON property `entity` - # @return [String] - attr_accessor :entity - - # The ID for the entity, if any. - # Corresponds to the JSON property `entityId` - # @return [String] - attr_accessor :entity_id - - # HTTP 1.1 Entity tag for the access-control entry. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID of the access-control entry. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of item this is. For bucket access control entries, this is always - # storage#bucketAccessControl. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The project team associated with the entity, if any. - # Corresponds to the JSON property `projectTeam` - # @return [Google::Apis::StorageV1::BucketAccessControl::ProjectTeam] - attr_accessor :project_team - - # The access permission for the entity. Can be READER, WRITER, or OWNER. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # The link to this access-control entry. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket = args[:bucket] unless args[:bucket].nil? - @domain = args[:domain] unless args[:domain].nil? - @email = args[:email] unless args[:email].nil? - @entity = args[:entity] unless args[:entity].nil? - @entity_id = args[:entity_id] unless args[:entity_id].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @project_team = args[:project_team] unless args[:project_team].nil? - @role = args[:role] unless args[:role].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - - # The project team associated with the entity, if any. - class ProjectTeam - include Google::Apis::Core::Hashable - - # The project number. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # The team. Can be owners, editors, or viewers. - # Corresponds to the JSON property `team` - # @return [String] - attr_accessor :team - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_number = args[:project_number] unless args[:project_number].nil? - @team = args[:team] unless args[:team].nil? - end - end - end - - # An access-control list. - class BucketAccessControls - include Google::Apis::Core::Hashable - - # The list of items. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For lists of bucket access control entries, this is - # always storage#bucketAccessControls. - # 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 - - # A list of buckets. - class Buckets - include Google::Apis::Core::Hashable - - # The list of items. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For lists of buckets, this is always storage#buckets. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return 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 - - # 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] - 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 - - # A Compose request. - class ComposeRequest - include Google::Apis::Core::Hashable - - # An object. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::StorageV1::Object] - attr_accessor :destination - - # The kind of item this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The list of source objects that will be concatenated into a single object. - # Corresponds to the JSON property `sourceObjects` - # @return [Array] - attr_accessor :source_objects - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination = args[:destination] unless args[:destination].nil? - @kind = args[:kind] unless args[:kind].nil? - @source_objects = args[:source_objects] unless args[:source_objects].nil? - end - - # - class SourceObject - include Google::Apis::Core::Hashable - - # The generation of this object to use as the source. - # Corresponds to the JSON property `generation` - # @return [String] - attr_accessor :generation - - # The source object's name. The source object's bucket is implicitly the - # destination bucket. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Conditions that must be met for this operation to execute. - # Corresponds to the JSON property `objectPreconditions` - # @return [Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions] - attr_accessor :object_preconditions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @generation = args[:generation] unless args[:generation].nil? - @name = args[:name] unless args[:name].nil? - @object_preconditions = args[:object_preconditions] unless args[:object_preconditions].nil? - end - - # Conditions that must be met for this operation to execute. - class ObjectPreconditions - include Google::Apis::Core::Hashable - - # Only perform the composition if the generation of the source object that would - # be used matches this value. If this value and a generation are both specified, - # they must be the same value or the call will fail. - # Corresponds to the JSON property `ifGenerationMatch` - # @return [String] - attr_accessor :if_generation_match - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @if_generation_match = args[:if_generation_match] unless args[:if_generation_match].nil? - end - end - end - end - - # An object. - class Object - include Google::Apis::Core::Hashable - - # Access controls on the object. - # Corresponds to the JSON property `acl` - # @return [Array] - attr_accessor :acl - - # The name of the bucket containing this object. - # Corresponds to the JSON property `bucket` - # @return [String] - attr_accessor :bucket - - # Cache-Control directive for the object data. - # Corresponds to the JSON property `cacheControl` - # @return [String] - attr_accessor :cache_control - - # Number of underlying components that make up this object. Components are - # accumulated by compose operations. - # Corresponds to the JSON property `componentCount` - # @return [Fixnum] - attr_accessor :component_count - - # Content-Disposition of the object data. - # Corresponds to the JSON property `contentDisposition` - # @return [String] - attr_accessor :content_disposition - - # Content-Encoding of the object data. - # Corresponds to the JSON property `contentEncoding` - # @return [String] - attr_accessor :content_encoding - - # Content-Language of the object data. - # Corresponds to the JSON property `contentLanguage` - # @return [String] - attr_accessor :content_language - - # Content-Type of the object data. - # Corresponds to the JSON property `contentType` - # @return [String] - attr_accessor :content_type - - # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in - # big-endian byte order. - # Corresponds to the JSON property `crc32c` - # @return [String] - attr_accessor :crc32c - - # HTTP 1.1 Entity tag for the object. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The content generation of this object. Used for object versioning. - # Corresponds to the JSON property `generation` - # @return [String] - attr_accessor :generation - - # The ID of the object. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of item this is. For objects, this is always storage#object. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # MD5 hash of the data; encoded using base64. - # Corresponds to the JSON property `md5Hash` - # @return [String] - attr_accessor :md5_hash - - # Media download link. - # Corresponds to the JSON property `mediaLink` - # @return [String] - attr_accessor :media_link - - # User-provided metadata, in key/value pairs. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The version of the metadata for this object at this generation. Used for - # preconditions and for detecting changes in metadata. A metageneration number - # is only meaningful in the context of a particular generation of a particular - # object. - # Corresponds to the JSON property `metageneration` - # @return [String] - attr_accessor :metageneration - - # The name of this object. Required if not specified by URL parameter. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The owner of the object. This will always be the uploader of the object. - # Corresponds to the JSON property `owner` - # @return [Google::Apis::StorageV1::Object::Owner] - attr_accessor :owner - - # The link to this object. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Content-Length of the data in bytes. - # Corresponds to the JSON property `size` - # @return [String] - attr_accessor :size - - # Storage class of the object. - # Corresponds to the JSON property `storageClass` - # @return [String] - attr_accessor :storage_class - - # The deletion time of the object in RFC 3339 format. Will be returned if and - # only if this version of the object has been deleted. - # Corresponds to the JSON property `timeDeleted` - # @return [DateTime] - attr_accessor :time_deleted - - # The creation or modification time of the object in RFC 3339 format. For - # buckets with versioning enabled, changing an object's metadata does not change - # this property. - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acl = args[:acl] unless args[:acl].nil? - @bucket = args[:bucket] unless args[:bucket].nil? - @cache_control = args[:cache_control] unless args[:cache_control].nil? - @component_count = args[:component_count] unless args[:component_count].nil? - @content_disposition = args[:content_disposition] unless args[:content_disposition].nil? - @content_encoding = args[:content_encoding] unless args[:content_encoding].nil? - @content_language = args[:content_language] unless args[:content_language].nil? - @content_type = args[:content_type] unless args[:content_type].nil? - @crc32c = args[:crc32c] unless args[:crc32c].nil? - @etag = args[:etag] unless args[:etag].nil? - @generation = args[:generation] unless args[:generation].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @md5_hash = args[:md5_hash] unless args[:md5_hash].nil? - @media_link = args[:media_link] unless args[:media_link].nil? - @metadata = args[:metadata] unless args[:metadata].nil? - @metageneration = args[:metageneration] unless args[:metageneration].nil? - @name = args[:name] unless args[:name].nil? - @owner = args[:owner] unless args[:owner].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @size = args[:size] unless args[:size].nil? - @storage_class = args[:storage_class] unless args[:storage_class].nil? - @time_deleted = args[:time_deleted] unless args[:time_deleted].nil? - @updated = args[:updated] unless args[:updated].nil? - end - - # The owner of the object. This will always be the uploader of the object. - class Owner - include Google::Apis::Core::Hashable - - # The entity, in the form user-userId. - # Corresponds to the JSON property `entity` - # @return [String] - attr_accessor :entity - - # The ID for the entity. - # Corresponds to the JSON property `entityId` - # @return [String] - attr_accessor :entity_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entity = args[:entity] unless args[:entity].nil? - @entity_id = args[:entity_id] unless args[:entity_id].nil? - end - end - end - - # An access-control entry. - class ObjectAccessControl - include Google::Apis::Core::Hashable - - # The name of the bucket. - # Corresponds to the JSON property `bucket` - # @return [String] - attr_accessor :bucket - - # The domain associated with the entity, if any. - # Corresponds to the JSON property `domain` - # @return [String] - attr_accessor :domain - - # The email address associated with the entity, if any. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The entity holding the permission, in one of the following forms: - # - user-userId - # - user-email - # - group-groupId - # - group-email - # - domain-domain - # - project-team-projectId - # - allUsers - # - allAuthenticatedUsers Examples: - # - The user liz@example.com would be user-liz@example.com. - # - The group example@googlegroups.com would be group-example@googlegroups.com. - # - To refer to all members of the Google Apps for Business domain example.com, - # the entity would be domain-example.com. - # Corresponds to the JSON property `entity` - # @return [String] - attr_accessor :entity - - # The ID for the entity, if any. - # Corresponds to the JSON property `entityId` - # @return [String] - attr_accessor :entity_id - - # HTTP 1.1 Entity tag for the access-control entry. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The content generation of the object. - # Corresponds to the JSON property `generation` - # @return [String] - attr_accessor :generation - - # The ID of the access-control entry. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of item this is. For object access control entries, this is always - # storage#objectAccessControl. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the object. - # Corresponds to the JSON property `object` - # @return [String] - attr_accessor :object - - # The project team associated with the entity, if any. - # Corresponds to the JSON property `projectTeam` - # @return [Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam] - attr_accessor :project_team - - # The access permission for the entity. Can be READER or OWNER. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # The link to this access-control entry. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket = args[:bucket] unless args[:bucket].nil? - @domain = args[:domain] unless args[:domain].nil? - @email = args[:email] unless args[:email].nil? - @entity = args[:entity] unless args[:entity].nil? - @entity_id = args[:entity_id] unless args[:entity_id].nil? - @etag = args[:etag] unless args[:etag].nil? - @generation = args[:generation] unless args[:generation].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @object = args[:object] unless args[:object].nil? - @project_team = args[:project_team] unless args[:project_team].nil? - @role = args[:role] unless args[:role].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - end - - # The project team associated with the entity, if any. - class ProjectTeam - include Google::Apis::Core::Hashable - - # The project number. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # The team. Can be owners, editors, or viewers. - # Corresponds to the JSON property `team` - # @return [String] - attr_accessor :team - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_number = args[:project_number] unless args[:project_number].nil? - @team = args[:team] unless args[:team].nil? - end - end - end - - # An access-control list. - class ObjectAccessControls - include Google::Apis::Core::Hashable - - # The list of items. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For lists of object access control entries, this is - # always storage#objectAccessControls. - # 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 - - # A list of objects. - class Objects - include Google::Apis::Core::Hashable - - # The list of items. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of item this is. For lists of objects, this is always storage#objects. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of prefixes of objects matching-but-not-listed up to and including - # the requested delimiter. - # Corresponds to the JSON property `prefixes` - # @return [Array] - attr_accessor :prefixes - - 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? - @prefixes = args[:prefixes] unless args[:prefixes].nil? - end - end - - # A rewrite response. - class RewriteResponse - include Google::Apis::Core::Hashable - - # true if the copy is finished; otherwise, false if the copy is in progress. - # This property is always present in the response. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - # The kind of item this is. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The total size of the object being copied in bytes. This property is always - # present in the response. - # Corresponds to the JSON property `objectSize` - # @return [String] - attr_accessor :object_size - - # An object. - # Corresponds to the JSON property `resource` - # @return [Google::Apis::StorageV1::Object] - attr_accessor :resource - - # A token to use in subsequent requests to continue copying data. This token is - # present in the response only when there is more data to copy. - # Corresponds to the JSON property `rewriteToken` - # @return [String] - attr_accessor :rewrite_token - - # The total bytes written so far, which can be used to provide a waiting user - # with a progress indicator. This property is always present in the response. - # Corresponds to the JSON property `totalBytesRewritten` - # @return [String] - attr_accessor :total_bytes_rewritten - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @done = args[:done] unless args[:done].nil? - @kind = args[:kind] unless args[:kind].nil? - @object_size = args[:object_size] unless args[:object_size].nil? - @resource = args[:resource] unless args[:resource].nil? - @rewrite_token = args[:rewrite_token] unless args[:rewrite_token].nil? - @total_bytes_rewritten = args[:total_bytes_rewritten] unless args[:total_bytes_rewritten].nil? - end - end - end - end -end diff --git a/generated/google/apis/storage_v1/representations.rb b/generated/google/apis/storage_v1/representations.rb deleted file mode 100644 index f203dd8f1..000000000 --- a/generated/google/apis/storage_v1/representations.rb +++ /dev/null @@ -1,427 +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 StorageV1 - - class Bucket - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CorsConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Lifecycle - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Rule - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Action - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Condition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Logging - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Owner - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Versioning - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Website - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class BucketAccessControl - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ProjectTeam - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class BucketAccessControls - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Buckets - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Channel - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ComposeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - class SourceObject - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ObjectPreconditions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - end - - class Object - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Owner - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ObjectAccessControl - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ProjectTeam - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ObjectAccessControls - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Objects - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class RewriteResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Bucket - class Representation < Google::Apis::Core::JsonRepresentation - collection :acl, as: 'acl', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation - - collection :cors_configurations, as: 'cors', class: Google::Apis::StorageV1::Bucket::CorsConfiguration, decorator: Google::Apis::StorageV1::Bucket::CorsConfiguration::Representation - - collection :default_object_acl, as: 'defaultObjectAcl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation - - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :lifecycle, as: 'lifecycle', class: Google::Apis::StorageV1::Bucket::Lifecycle, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Representation - - property :location, as: 'location' - property :logging, as: 'logging', class: Google::Apis::StorageV1::Bucket::Logging, decorator: Google::Apis::StorageV1::Bucket::Logging::Representation - - property :metageneration, as: 'metageneration' - property :name, as: 'name' - property :owner, as: 'owner', class: Google::Apis::StorageV1::Bucket::Owner, decorator: Google::Apis::StorageV1::Bucket::Owner::Representation - - property :project_number, as: 'projectNumber' - property :self_link, as: 'selfLink' - property :storage_class, as: 'storageClass' - property :time_created, as: 'timeCreated', type: DateTime - - property :versioning, as: 'versioning', class: Google::Apis::StorageV1::Bucket::Versioning, decorator: Google::Apis::StorageV1::Bucket::Versioning::Representation - - property :website, as: 'website', class: Google::Apis::StorageV1::Bucket::Website, decorator: Google::Apis::StorageV1::Bucket::Website::Representation - - end - - # @private - class CorsConfiguration - class Representation < Google::Apis::Core::JsonRepresentation - property :max_age_seconds, as: 'maxAgeSeconds' - collection :http_method, as: 'method' - collection :origin, as: 'origin' - collection :response_header, as: 'responseHeader' - end - end - - # @private - class Lifecycle - class Representation < Google::Apis::Core::JsonRepresentation - collection :rule, as: 'rule', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Representation - - end - - # @private - class Rule - class Representation < Google::Apis::Core::JsonRepresentation - property :action, as: 'action', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action::Representation - - property :condition, as: 'condition', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition::Representation - - end - - # @private - class Action - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - end - end - - # @private - class Condition - class Representation < Google::Apis::Core::JsonRepresentation - property :age, as: 'age' - property :created_before, as: 'createdBefore', type: Date - - property :is_live, as: 'isLive' - property :num_newer_versions, as: 'numNewerVersions' - end - end - end - end - - # @private - class Logging - class Representation < Google::Apis::Core::JsonRepresentation - property :log_bucket, as: 'logBucket' - property :log_object_prefix, as: 'logObjectPrefix' - end - end - - # @private - class Owner - class Representation < Google::Apis::Core::JsonRepresentation - property :entity, as: 'entity' - property :entity_id, as: 'entityId' - end - end - - # @private - class Versioning - class Representation < Google::Apis::Core::JsonRepresentation - property :enabled, as: 'enabled' - end - end - - # @private - class Website - class Representation < Google::Apis::Core::JsonRepresentation - property :main_page_suffix, as: 'mainPageSuffix' - property :not_found_page, as: 'notFoundPage' - end - end - end - - # @private - class BucketAccessControl - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket, as: 'bucket' - property :domain, as: 'domain' - property :email, as: 'email' - property :entity, as: 'entity' - property :entity_id, as: 'entityId' - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam::Representation - - property :role, as: 'role' - property :self_link, as: 'selfLink' - end - - # @private - class ProjectTeam - class Representation < Google::Apis::Core::JsonRepresentation - property :project_number, as: 'projectNumber' - property :team, as: 'team' - end - end - end - - # @private - class BucketAccessControls - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Buckets - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::StorageV1::Bucket, decorator: Google::Apis::StorageV1::Bucket::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - 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 ComposeRequest - class Representation < Google::Apis::Core::JsonRepresentation - property :destination, as: 'destination', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation - - property :kind, as: 'kind' - collection :source_objects, as: 'sourceObjects', class: Google::Apis::StorageV1::ComposeRequest::SourceObject, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::Representation - - end - - # @private - class SourceObject - class Representation < Google::Apis::Core::JsonRepresentation - property :generation, as: 'generation' - property :name, as: 'name' - property :object_preconditions, as: 'objectPreconditions', class: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions::Representation - - end - - # @private - class ObjectPreconditions - class Representation < Google::Apis::Core::JsonRepresentation - property :if_generation_match, as: 'ifGenerationMatch' - end - end - end - end - - # @private - class Object - class Representation < Google::Apis::Core::JsonRepresentation - collection :acl, as: 'acl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation - - property :bucket, as: 'bucket' - property :cache_control, as: 'cacheControl' - property :component_count, as: 'componentCount' - property :content_disposition, as: 'contentDisposition' - property :content_encoding, as: 'contentEncoding' - property :content_language, as: 'contentLanguage' - property :content_type, as: 'contentType' - property :crc32c, as: 'crc32c' - property :etag, as: 'etag' - property :generation, as: 'generation' - property :id, as: 'id' - property :kind, as: 'kind' - property :md5_hash, as: 'md5Hash' - property :media_link, as: 'mediaLink' - hash :metadata, as: 'metadata' - property :metageneration, as: 'metageneration' - property :name, as: 'name' - property :owner, as: 'owner', class: Google::Apis::StorageV1::Object::Owner, decorator: Google::Apis::StorageV1::Object::Owner::Representation - - property :self_link, as: 'selfLink' - property :size, as: 'size' - property :storage_class, as: 'storageClass' - property :time_deleted, as: 'timeDeleted', type: DateTime - - property :updated, as: 'updated', type: DateTime - - end - - # @private - class Owner - class Representation < Google::Apis::Core::JsonRepresentation - property :entity, as: 'entity' - property :entity_id, as: 'entityId' - end - end - end - - # @private - class ObjectAccessControl - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket, as: 'bucket' - property :domain, as: 'domain' - property :email, as: 'email' - property :entity, as: 'entity' - property :entity_id, as: 'entityId' - property :etag, as: 'etag' - property :generation, as: 'generation' - property :id, as: 'id' - property :kind, as: 'kind' - property :object, as: 'object' - property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam::Representation - - property :role, as: 'role' - property :self_link, as: 'selfLink' - end - - # @private - class ProjectTeam - class Representation < Google::Apis::Core::JsonRepresentation - property :project_number, as: 'projectNumber' - property :team, as: 'team' - end - end - end - - # @private - class ObjectAccessControls - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items' - property :kind, as: 'kind' - end - end - - # @private - class Objects - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :prefixes, as: 'prefixes' - end - end - - # @private - class RewriteResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :done, as: 'done' - property :kind, as: 'kind' - property :object_size, as: 'objectSize' - property :resource, as: 'resource', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation - - property :rewrite_token, as: 'rewriteToken' - property :total_bytes_rewritten, as: 'totalBytesRewritten' - end - end - end - end -end diff --git a/generated/google/apis/storage_v1/service.rb b/generated/google/apis/storage_v1/service.rb deleted file mode 100644 index f78862423..000000000 --- a/generated/google/apis/storage_v1/service.rb +++ /dev/null @@ -1,1920 +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 StorageV1 - # Cloud Storage API - # - # Lets you store and retrieve potentially-large, immutable data objects. - # - # @example - # require 'google/apis/storage_v1' - # - # Storage = Google::Apis::StorageV1 # Alias the module - # service = Storage::StorageService.new - # - # @see https://developers.google.com/storage/docs/json_api/ - class StorageService < 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/', 'storage/v1/') - end - - # Permanently deletes the ACL entry for the specified entity on the specified - # bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/acl/{entity}' - command = make_simple_command(:delete, path, options) - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 ACL entry for the specified entity on the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::BucketAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::BucketAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/acl/{entity}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation - command.response_class = Google::Apis::StorageV1::BucketAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 new ACL entry on the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_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::StorageV1::BucketAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::BucketAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket_access_control(bucket, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/acl' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation - command.request_object = bucket_access_control_object - command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation - command.response_class = Google::Apis::StorageV1::BucketAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves ACL entries on the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::BucketAccessControls] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::BucketAccessControls] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket_access_controls(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/acl' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::BucketAccessControls::Representation - command.response_class = Google::Apis::StorageV1::BucketAccessControls - command.params['bucket'] = bucket unless bucket.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an ACL entry on the specified bucket. This method supports patch - # semantics. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_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::StorageV1::BucketAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::BucketAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/acl/{entity}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation - command.request_object = bucket_access_control_object - command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation - command.response_class = Google::Apis::StorageV1::BucketAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 ACL entry on the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_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::StorageV1::BucketAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::BucketAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/acl/{entity}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation - command.request_object = bucket_access_control_object - command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation - command.response_class = Google::Apis::StorageV1::BucketAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 - - # Permanently deletes an empty bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] if_metageneration_match - # If set, only deletes the bucket if its metageneration matches this value. - # @param [String] if_metageneration_not_match - # If set, only deletes the bucket if its metageneration does not match this - # value. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}' - command = make_simple_command(:delete, path, options) - command.params['bucket'] = bucket unless bucket.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.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 metadata for the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] if_metageneration_match - # Makes the return of the bucket metadata conditional on whether the bucket's - # current metageneration matches the given value. - # @param [String] if_metageneration_not_match - # Makes the return of the bucket metadata conditional on whether the bucket's - # current metageneration does not match the given value. - # @param [String] projection - # Set of properties to return. Defaults to noAcl. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Bucket] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Bucket] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::Bucket::Representation - command.response_class = Google::Apis::StorageV1::Bucket - command.params['bucket'] = bucket unless bucket.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['projection'] = projection unless projection.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 new bucket. - # @param [Google::Apis::StorageV1::Bucket] bucket_object - # @param [String] predefined_acl - # Apply a predefined set of access controls to this bucket. - # @param [String] predefined_default_object_acl - # Apply a predefined set of default object access controls to this bucket. - # @param [String] project - # A valid API project identifier. - # @param [String] projection - # Set of properties to return. Defaults to noAcl, unless the bucket resource - # specifies acl or defaultObjectAcl properties, when it defaults to full. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Bucket] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Bucket] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket(bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, project: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::StorageV1::Bucket::Representation - command.request_object = bucket_object - command.response_representation = Google::Apis::StorageV1::Bucket::Representation - command.response_class = Google::Apis::StorageV1::Bucket - command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? - command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? - command.query['project'] = project unless project.nil? - command.query['projection'] = projection unless projection.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 buckets for a given project. - # @param [Fixnum] max_results - # Maximum number of buckets to return. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] prefix - # Filter results to buckets whose names begin with this prefix. - # @param [String] project - # A valid API project identifier. - # @param [String] projection - # Set of properties to return. Defaults to noAcl. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Buckets] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Buckets] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_buckets(max_results: nil, page_token: nil, prefix: nil, project: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::Buckets::Representation - command.response_class = Google::Apis::StorageV1::Buckets - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['prefix'] = prefix unless prefix.nil? - command.query['project'] = project unless project.nil? - command.query['projection'] = projection unless projection.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 bucket. This method supports patch semantics. - # @param [String] bucket - # Name of a bucket. - # @param [Google::Apis::StorageV1::Bucket] bucket_object - # @param [String] if_metageneration_match - # Makes the return of the bucket metadata conditional on whether the bucket's - # current metageneration matches the given value. - # @param [String] if_metageneration_not_match - # Makes the return of the bucket metadata conditional on whether the bucket's - # current metageneration does not match the given value. - # @param [String] predefined_acl - # Apply a predefined set of access controls to this bucket. - # @param [String] predefined_default_object_acl - # Apply a predefined set of default object access controls to this bucket. - # @param [String] projection - # Set of properties to return. Defaults to full. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Bucket] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Bucket] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::StorageV1::Bucket::Representation - command.request_object = bucket_object - command.response_representation = Google::Apis::StorageV1::Bucket::Representation - command.response_class = Google::Apis::StorageV1::Bucket - command.params['bucket'] = bucket unless bucket.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? - command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? - command.query['projection'] = projection unless projection.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 bucket. - # @param [String] bucket - # Name of a bucket. - # @param [Google::Apis::StorageV1::Bucket] bucket_object - # @param [String] if_metageneration_match - # Makes the return of the bucket metadata conditional on whether the bucket's - # current metageneration matches the given value. - # @param [String] if_metageneration_not_match - # Makes the return of the bucket metadata conditional on whether the bucket's - # current metageneration does not match the given value. - # @param [String] predefined_acl - # Apply a predefined set of access controls to this bucket. - # @param [String] predefined_default_object_acl - # Apply a predefined set of default object access controls to this bucket. - # @param [String] projection - # Set of properties to return. Defaults to full. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Bucket] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Bucket] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::StorageV1::Bucket::Representation - command.request_object = bucket_object - command.response_representation = Google::Apis::StorageV1::Bucket::Representation - command.response_class = Google::Apis::StorageV1::Bucket - command.params['bucket'] = bucket unless bucket.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? - command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? - command.query['projection'] = projection unless projection.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::StorageV1::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 = 'channels/stop' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::StorageV1::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 - - # Permanently deletes the default object ACL entry for the specified entity on - # the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/defaultObjectAcl/{entity}' - command = make_simple_command(:delete, path, options) - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 default object ACL entry for the specified entity on the specified - # bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/defaultObjectAcl/{entity}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 new default object ACL entry on the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_default_object_access_control(bucket, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/defaultObjectAcl' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.request_object = object_access_control_object - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves default object ACL entries on the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] if_metageneration_match - # If present, only return default ACL listing if the bucket's current - # metageneration matches this value. - # @param [String] if_metageneration_not_match - # If present, only return default ACL listing if the bucket's current - # metageneration does not match the given value. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::ObjectAccessControls] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControls] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/defaultObjectAcl' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControls - command.params['bucket'] = bucket unless bucket.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.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 default object ACL entry on the specified bucket. This method - # supports patch semantics. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/defaultObjectAcl/{entity}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.request_object = object_access_control_object - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 default object ACL entry on the specified bucket. - # @param [String] bucket - # Name of a bucket. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/defaultObjectAcl/{entity}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.request_object = object_access_control_object - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['entity'] = entity unless entity.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 - - # Permanently deletes the ACL entry for the specified entity on the specified - # object. - # @param [String] bucket - # Name of a bucket. - # @param [String] object - # Name of the object. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}/acl/{entity}' - command = make_simple_command(:delete, path, options) - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.params['entity'] = entity unless entity.nil? - command.query['generation'] = generation unless generation.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 ACL entry for the specified entity on the specified object. - # @param [String] bucket - # Name of a bucket. - # @param [String] object - # Name of the object. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}/acl/{entity}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.params['entity'] = entity unless entity.nil? - command.query['generation'] = generation unless generation.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 new ACL entry on the specified object. - # @param [String] bucket - # Name of a bucket. - # @param [String] object - # Name of the object. - # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}/acl' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.request_object = object_access_control_object - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.query['generation'] = generation unless generation.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 ACL entries on the specified object. - # @param [String] bucket - # Name of a bucket. - # @param [String] object - # Name of the object. - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::StorageV1::ObjectAccessControls] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControls] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object_access_controls(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}/acl' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControls - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.query['generation'] = generation unless generation.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 ACL entry on the specified object. This method supports patch - # semantics. - # @param [String] bucket - # Name of a bucket. - # @param [String] object - # Name of the object. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}/acl/{entity}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.request_object = object_access_control_object - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.params['entity'] = entity unless entity.nil? - command.query['generation'] = generation unless generation.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 ACL entry on the specified object. - # @param [String] bucket - # Name of a bucket. - # @param [String] object - # Name of the object. - # @param [String] entity - # The entity holding the permission. Can be user-userId, user-emailAddress, - # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. - # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::StorageV1::ObjectAccessControl] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::ObjectAccessControl] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}/acl/{entity}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.request_object = object_access_control_object - command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation - command.response_class = Google::Apis::StorageV1::ObjectAccessControl - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.params['entity'] = entity unless entity.nil? - command.query['generation'] = generation unless generation.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 - - # Concatenates a list of existing objects into a new object in the same bucket. - # @param [String] destination_bucket - # Name of the bucket in which to store the new object. - # @param [String] destination_object - # Name of the new object. - # @param [Google::Apis::StorageV1::ComposeRequest] compose_request_object - # @param [String] destination_predefined_acl - # Apply a predefined set of access controls to the destination object. - # @param [String] if_generation_match - # Makes the operation conditional on whether the object's current generation - # matches the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the object's current metageneration - # matches the given value. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Object] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Object] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def compose(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'b/{destinationBucket}/o/{destinationObject}/compose' - if download_dest.nil? - command = make_simple_command(:post, path, options) - else - command = make_download_command(:post, path, options) - command.download_dest = download_dest - end - command.request_representation = Google::Apis::StorageV1::ComposeRequest::Representation - command.request_object = compose_request_object - command.response_representation = Google::Apis::StorageV1::Object::Representation - command.response_class = Google::Apis::StorageV1::Object - command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil? - command.params['destinationObject'] = destination_object unless destination_object.nil? - command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.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 - - # Copies a source object to a destination object. Optionally overrides metadata. - # @param [String] source_bucket - # Name of the bucket in which to find the source object. - # @param [String] source_object - # Name of the source object. - # @param [String] destination_bucket - # Name of the bucket in which to store the new object. Overrides the provided - # object metadata's bucket value, if any. - # @param [String] destination_object - # Name of the new object. Required when the object metadata is not otherwise - # provided. Overrides the object metadata's name value, if any. - # @param [Google::Apis::StorageV1::Object] object_object - # @param [String] destination_predefined_acl - # Apply a predefined set of access controls to the destination object. - # @param [String] if_generation_match - # Makes the operation conditional on whether the destination object's current - # generation matches the given value. - # @param [String] if_generation_not_match - # Makes the operation conditional on whether the destination object's current - # generation does not match the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the destination object's current - # metageneration matches the given value. - # @param [String] if_metageneration_not_match - # Makes the operation conditional on whether the destination object's current - # metageneration does not match the given value. - # @param [String] if_source_generation_match - # Makes the operation conditional on whether the source object's generation - # matches the given value. - # @param [String] if_source_generation_not_match - # Makes the operation conditional on whether the source object's generation does - # not match the given value. - # @param [String] if_source_metageneration_match - # Makes the operation conditional on whether the source object's current - # metageneration matches the given value. - # @param [String] if_source_metageneration_not_match - # Makes the operation conditional on whether the source object's current - # metageneration does not match the given value. - # @param [String] projection - # Set of properties to return. Defaults to noAcl, unless the object resource - # specifies the acl property, when it defaults to full. - # @param [String] source_generation - # If present, selects a specific revision of the source object (as opposed to - # the latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::StorageV1::Object] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Object] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}' - if download_dest.nil? - command = make_simple_command(:post, path, options) - else - command = make_download_command(:post, path, options) - command.download_dest = download_dest - end - command.request_representation = Google::Apis::StorageV1::Object::Representation - command.request_object = object_object - command.response_representation = Google::Apis::StorageV1::Object::Representation - command.response_class = Google::Apis::StorageV1::Object - command.params['sourceBucket'] = source_bucket unless source_bucket.nil? - command.params['sourceObject'] = source_object unless source_object.nil? - command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil? - command.params['destinationObject'] = destination_object unless destination_object.nil? - command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil? - command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil? - command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil? - command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil? - command.query['projection'] = projection unless projection.nil? - command.query['sourceGeneration'] = source_generation unless source_generation.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 object and its metadata. Deletions are permanent if versioning is - # not enabled for the bucket, or if the generation parameter is used. - # @param [String] bucket - # Name of the bucket in which the object resides. - # @param [String] object - # Name of the object. - # @param [String] generation - # If present, permanently deletes a specific revision of this object (as opposed - # to the latest version, the default). - # @param [String] if_generation_match - # Makes the operation conditional on whether the object's current generation - # matches the given value. - # @param [String] if_generation_not_match - # Makes the operation conditional on whether the object's current generation - # does not match the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the object's current metageneration - # matches the given value. - # @param [String] if_metageneration_not_match - # Makes the operation conditional on whether the object's current metageneration - # does not match the given value. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}' - command = make_simple_command(:delete, path, options) - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.query['generation'] = generation unless generation.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves an object or its metadata. - # @param [String] bucket - # Name of the bucket in which the object resides. - # @param [String] object - # Name of the object. - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] if_generation_match - # Makes the operation conditional on whether the object's generation matches the - # given value. - # @param [String] if_generation_not_match - # Makes the operation conditional on whether the object's generation does not - # match the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the object's current metageneration - # matches the given value. - # @param [String] if_metageneration_not_match - # Makes the operation conditional on whether the object's current metageneration - # does not match the given value. - # @param [String] projection - # Set of properties to return. Defaults to noAcl. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Object] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Object] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}' - 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::StorageV1::Object::Representation - command.response_class = Google::Apis::StorageV1::Object - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.query['generation'] = generation unless generation.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['projection'] = projection unless projection.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 - - # Stores a new object and metadata. - # @param [String] bucket - # Name of the bucket in which to store the new object. Overrides the provided - # object metadata's bucket value, if any. - # @param [Google::Apis::StorageV1::Object] object_object - # @param [String] content_encoding - # If set, sets the contentEncoding property of the final object to this value. - # Setting this parameter is equivalent to setting the contentEncoding metadata - # property. This can be useful when uploading an object with uploadType=media to - # indicate the encoding of the content being uploaded. - # @param [String] if_generation_match - # Makes the operation conditional on whether the object's current generation - # matches the given value. - # @param [String] if_generation_not_match - # Makes the operation conditional on whether the object's current generation - # does not match the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the object's current metageneration - # matches the given value. - # @param [String] if_metageneration_not_match - # Makes the operation conditional on whether the object's current metageneration - # does not match the given value. - # @param [String] name - # Name of the object. Required when the object metadata is not otherwise - # provided. Overrides the object metadata's name value, if any. - # @param [String] predefined_acl - # Apply a predefined set of access controls to this object. - # @param [String] projection - # Set of properties to return. Defaults to noAcl, unless the object resource - # specifies the acl property, when it defaults to full. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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] upload_source - # IO stream or filename containing content to upload - # @param [String] content_type - # Content type of the uploaded content. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::StorageV1::Object] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Object] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, name: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) - path = 'b/{bucket}/o' - if upload_source.nil? - command = make_simple_command(:post, path, options) - else - command = make_upload_command(:post, path, options) - command.upload_source = upload_source - command.upload_content_type = content_type - end - command.request_representation = Google::Apis::StorageV1::Object::Representation - command.request_object = object_object - command.response_representation = Google::Apis::StorageV1::Object::Representation - command.response_class = Google::Apis::StorageV1::Object - command.params['bucket'] = bucket unless bucket.nil? - command.query['contentEncoding'] = content_encoding unless content_encoding.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['name'] = name unless name.nil? - command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? - command.query['projection'] = projection unless projection.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 objects matching the criteria. - # @param [String] bucket - # Name of the bucket in which to look for objects. - # @param [String] delimiter - # Returns results in a directory-like mode. items will contain only objects - # whose names, aside from the prefix, do not contain delimiter. Objects whose - # names, aside from the prefix, contain delimiter will have their name, - # truncated after the delimiter, returned in prefixes. Duplicate prefixes are - # omitted. - # @param [Fixnum] max_results - # Maximum number of items plus prefixes to return. As duplicate prefixes are - # omitted, fewer total results may be returned than requested. The default value - # of this parameter is 1,000 items. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] prefix - # Filter results to objects whose names begin with this prefix. - # @param [String] projection - # Set of properties to return. Defaults to noAcl. - # @param [Boolean] versions - # If true, lists all versions of an object as distinct results. The default is - # false. For more information, see Object Versioning. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Objects] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Objects] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::StorageV1::Objects::Representation - command.response_class = Google::Apis::StorageV1::Objects - command.params['bucket'] = bucket unless bucket.nil? - command.query['delimiter'] = delimiter unless delimiter.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['prefix'] = prefix unless prefix.nil? - command.query['projection'] = projection unless projection.nil? - command.query['versions'] = versions unless versions.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 object's metadata. This method supports patch semantics. - # @param [String] bucket - # Name of the bucket in which the object resides. - # @param [String] object - # Name of the object. - # @param [Google::Apis::StorageV1::Object] object_object - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] if_generation_match - # Makes the operation conditional on whether the object's current generation - # matches the given value. - # @param [String] if_generation_not_match - # Makes the operation conditional on whether the object's current generation - # does not match the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the object's current metageneration - # matches the given value. - # @param [String] if_metageneration_not_match - # Makes the operation conditional on whether the object's current metageneration - # does not match the given value. - # @param [String] predefined_acl - # Apply a predefined set of access controls to this object. - # @param [String] projection - # Set of properties to return. Defaults to full. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Object] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Object] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::StorageV1::Object::Representation - command.request_object = object_object - command.response_representation = Google::Apis::StorageV1::Object::Representation - command.response_class = Google::Apis::StorageV1::Object - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.query['generation'] = generation unless generation.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? - command.query['projection'] = projection unless projection.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 - - # Rewrites a source object to a destination object. Optionally overrides - # metadata. - # @param [String] source_bucket - # Name of the bucket in which to find the source object. - # @param [String] source_object - # Name of the source object. - # @param [String] destination_bucket - # Name of the bucket in which to store the new object. Overrides the provided - # object metadata's bucket value, if any. - # @param [String] destination_object - # Name of the new object. Required when the object metadata is not otherwise - # provided. Overrides the object metadata's name value, if any. - # @param [Google::Apis::StorageV1::Object] object_object - # @param [String] destination_predefined_acl - # Apply a predefined set of access controls to the destination object. - # @param [String] if_generation_match - # Makes the operation conditional on whether the destination object's current - # generation matches the given value. - # @param [String] if_generation_not_match - # Makes the operation conditional on whether the destination object's current - # generation does not match the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the destination object's current - # metageneration matches the given value. - # @param [String] if_metageneration_not_match - # Makes the operation conditional on whether the destination object's current - # metageneration does not match the given value. - # @param [String] if_source_generation_match - # Makes the operation conditional on whether the source object's generation - # matches the given value. - # @param [String] if_source_generation_not_match - # Makes the operation conditional on whether the source object's generation does - # not match the given value. - # @param [String] if_source_metageneration_match - # Makes the operation conditional on whether the source object's current - # metageneration matches the given value. - # @param [String] if_source_metageneration_not_match - # Makes the operation conditional on whether the source object's current - # metageneration does not match the given value. - # @param [String] max_bytes_rewritten_per_call - # The maximum number of bytes that will be rewritten per rewrite request. Most - # callers shouldn't need to specify this parameter - it is primarily in place to - # support testing. If specified the value must be an integral multiple of 1 MiB ( - # 1048576). Also, this only applies to requests where the source and destination - # span locations and/or storage classes. Finally, this value must not change - # across rewrite calls else you'll get an error that the rewriteToken is invalid. - # @param [String] projection - # Set of properties to return. Defaults to noAcl, unless the object resource - # specifies the acl property, when it defaults to full. - # @param [String] rewrite_token - # Include this field (from the previous rewrite response) on each rewrite - # request after the first one, until the rewrite response 'done' flag is true. - # Calls that provide a rewriteToken can omit all other request fields, but if - # included those fields must match the values provided in the first rewrite - # request. - # @param [String] source_generation - # If present, selects a specific revision of the source object (as opposed to - # the latest version, the default). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::StorageV1::RewriteResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::RewriteResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::StorageV1::Object::Representation - command.request_object = object_object - command.response_representation = Google::Apis::StorageV1::RewriteResponse::Representation - command.response_class = Google::Apis::StorageV1::RewriteResponse - command.params['sourceBucket'] = source_bucket unless source_bucket.nil? - command.params['sourceObject'] = source_object unless source_object.nil? - command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil? - command.params['destinationObject'] = destination_object unless destination_object.nil? - command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil? - command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil? - command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil? - command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil? - command.query['maxBytesRewrittenPerCall'] = max_bytes_rewritten_per_call unless max_bytes_rewritten_per_call.nil? - command.query['projection'] = projection unless projection.nil? - command.query['rewriteToken'] = rewrite_token unless rewrite_token.nil? - command.query['sourceGeneration'] = source_generation unless source_generation.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 object's metadata. - # @param [String] bucket - # Name of the bucket in which the object resides. - # @param [String] object - # Name of the object. - # @param [Google::Apis::StorageV1::Object] object_object - # @param [String] generation - # If present, selects a specific revision of this object (as opposed to the - # latest version, the default). - # @param [String] if_generation_match - # Makes the operation conditional on whether the object's current generation - # matches the given value. - # @param [String] if_generation_not_match - # Makes the operation conditional on whether the object's current generation - # does not match the given value. - # @param [String] if_metageneration_match - # Makes the operation conditional on whether the object's current metageneration - # matches the given value. - # @param [String] if_metageneration_not_match - # Makes the operation conditional on whether the object's current metageneration - # does not match the given value. - # @param [String] predefined_acl - # Apply a predefined set of access controls to this object. - # @param [String] projection - # Set of properties to return. Defaults to full. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Object] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::Object] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - path = 'b/{bucket}/o/{object}' - if download_dest.nil? - command = make_simple_command(:put, path, options) - else - command = make_download_command(:put, path, options) - command.download_dest = download_dest - end - command.request_representation = Google::Apis::StorageV1::Object::Representation - command.request_object = object_object - command.response_representation = Google::Apis::StorageV1::Object::Representation - command.response_class = Google::Apis::StorageV1::Object - command.params['bucket'] = bucket unless bucket.nil? - command.params['object'] = object unless object.nil? - command.query['generation'] = generation unless generation.nil? - command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? - command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? - command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? - command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? - command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? - command.query['projection'] = projection unless projection.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 - - # Watch for changes on all objects in a bucket. - # @param [String] bucket - # Name of the bucket in which to look for objects. - # @param [Google::Apis::StorageV1::Channel] channel_object - # @param [String] delimiter - # Returns results in a directory-like mode. items will contain only objects - # whose names, aside from the prefix, do not contain delimiter. Objects whose - # names, aside from the prefix, contain delimiter will have their name, - # truncated after the delimiter, returned in prefixes. Duplicate prefixes are - # omitted. - # @param [Fixnum] max_results - # Maximum number of items plus prefixes to return. As duplicate prefixes are - # omitted, fewer total results may be returned than requested. The default value - # of this parameter is 1,000 items. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] prefix - # Filter results to objects whose names begin with this prefix. - # @param [String] projection - # Set of properties to return. Defaults to noAcl. - # @param [Boolean] versions - # If true, lists all versions of an object as distinct results. The default is - # false. For more information, see Object Versioning. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::StorageV1::Channel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StorageV1::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_all_object(bucket, channel_object = nil, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'b/{bucket}/o/watch' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::StorageV1::Channel::Representation - command.request_object = channel_object - command.response_representation = Google::Apis::StorageV1::Channel::Representation - command.response_class = Google::Apis::StorageV1::Channel - command.params['bucket'] = bucket unless bucket.nil? - command.query['delimiter'] = delimiter unless delimiter.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['prefix'] = prefix unless prefix.nil? - command.query['projection'] = projection unless projection.nil? - command.query['versions'] = versions unless versions.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 diff --git a/generated/google/apis/tagmanager_v1.rb b/generated/google/apis/tagmanager_v1.rb deleted file mode 100644 index 41dcdbb84..000000000 --- a/generated/google/apis/tagmanager_v1.rb +++ /dev/null @@ -1,52 +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/tagmanager_v1/service.rb' -require 'google/apis/tagmanager_v1/classes.rb' -require 'google/apis/tagmanager_v1/representations.rb' - -module Google - module Apis - # Tag Manager API - # - # API for accessing Tag Manager accounts and containers. - # - # @see https://developers.google.com/tag-manager/api/v1/ - module TagmanagerV1 - VERSION = 'V1' - REVISION = '20150526' - - # Delete your Google Tag Manager containers - AUTH_TAGMANAGER_DELETE_CONTAINERS = 'https://www.googleapis.com/auth/tagmanager.delete.containers' - - # Manage your Google Tag Manager containers - AUTH_TAGMANAGER_EDIT_CONTAINERS = 'https://www.googleapis.com/auth/tagmanager.edit.containers' - - # Manage your Google Tag Manager container versions - AUTH_TAGMANAGER_EDIT_CONTAINERVERSIONS = 'https://www.googleapis.com/auth/tagmanager.edit.containerversions' - - # Manage your Google Tag Manager accounts - AUTH_TAGMANAGER_MANAGE_ACCOUNTS = 'https://www.googleapis.com/auth/tagmanager.manage.accounts' - - # Manage user permissions of your Google Tag Manager data - AUTH_TAGMANAGER_MANAGE_USERS = 'https://www.googleapis.com/auth/tagmanager.manage.users' - - # Publish your Google Tag Manager containers - AUTH_TAGMANAGER_PUBLISH = 'https://www.googleapis.com/auth/tagmanager.publish' - - # View your Google Tag Manager containers - AUTH_TAGMANAGER_READONLY = 'https://www.googleapis.com/auth/tagmanager.readonly' - end - end -end diff --git a/generated/google/apis/tagmanager_v1/classes.rb b/generated/google/apis/tagmanager_v1/classes.rb deleted file mode 100644 index d6d30e5c1..000000000 --- a/generated/google/apis/tagmanager_v1/classes.rb +++ /dev/null @@ -1,1226 +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 TagmanagerV1 - - # Represents a Google Tag Manager Account. - class Account - include Google::Apis::Core::Hashable - - # The Account ID uniquely identifies the GTM Account. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The fingerprint of the GTM Account as computed at storage time. This value is - # recomputed whenever the account is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # Account display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Whether the account shares data anonymously with Google and others. - # Corresponds to the JSON property `shareData` - # @return [Boolean] - attr_accessor :share_data - alias_method :share_data?, :share_data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @name = args[:name] unless args[:name].nil? - @share_data = args[:share_data] unless args[:share_data].nil? - end - end - - # Defines the Google Tag Manager Account access permissions. - class AccountAccess - include Google::Apis::Core::Hashable - - # List of Account permissions. Valid account permissions are read and manage. - # Corresponds to the JSON property `permission` - # @return [Array] - attr_accessor :permission - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permission = args[:permission] unless args[:permission].nil? - end - end - - # Represents a predicate. - class Condition - include Google::Apis::Core::Hashable - - # A list of named parameters (key/value), depending on the condition's type. - # Notes: - # - For binary operators, include parameters named arg0 and arg1 for specifying - # the left and right operands, respectively. - # - At this time, the left operand (arg0) must be a reference to a macro. - # - For case-insensitive Regex matching, include a boolean parameter named - # ignore_case that is set to true. If not specified or set to any other value, - # the matching will be case sensitive. - # - To negate an operator, include a boolean parameter named negate boolean - # parameter that is set to true. - # Corresponds to the JSON property `parameter` - # @return [Array] - attr_accessor :parameter - - # The type of operator for this condition. - # 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) - @parameter = args[:parameter] unless args[:parameter].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a Google Tag Manager Container. - class Container - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The Container ID uniquely identifies the GTM Container. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # Optional list of domain names associated with the Container. - # Corresponds to the JSON property `domainName` - # @return [Array] - attr_accessor :domain_name - - # List of enabled built-in variables. Valid values include: pageUrl, - # pageHostname, pagePath, referrer, event, clickElement, clickClasses, clickId, - # clickTarget, clickUrl, clickText, formElement, formClasses, formId, formTarget, - # formUrl, formText, errorMessage, errorUrl, errorLine, newHistoryFragment, - # oldHistoryFragment, newHistoryState, oldHistoryState, historySource, - # containerVersion, debugMode, randomNumber, containerId. - # Corresponds to the JSON property `enabledBuiltInVariable` - # @return [Array] - attr_accessor :enabled_built_in_variable - - # The fingerprint of the GTM Container as computed at storage time. This value - # is recomputed whenever the account is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # Container display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Container Notes. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # Container Public ID. - # Corresponds to the JSON property `publicId` - # @return [String] - attr_accessor :public_id - - # Container Country ID. - # Corresponds to the JSON property `timeZoneCountryId` - # @return [String] - attr_accessor :time_zone_country_id - - # Container Time Zone ID. - # Corresponds to the JSON property `timeZoneId` - # @return [String] - attr_accessor :time_zone_id - - # List of Usage Contexts for the Container. Valid values include: web, android, - # ios. - # Corresponds to the JSON property `usageContext` - # @return [Array] - attr_accessor :usage_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @domain_name = args[:domain_name] unless args[:domain_name].nil? - @enabled_built_in_variable = args[:enabled_built_in_variable] unless args[:enabled_built_in_variable].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @public_id = args[:public_id] unless args[:public_id].nil? - @time_zone_country_id = args[:time_zone_country_id] unless args[:time_zone_country_id].nil? - @time_zone_id = args[:time_zone_id] unless args[:time_zone_id].nil? - @usage_context = args[:usage_context] unless args[:usage_context].nil? - end - end - - # Defines the Google Tag Manager Container access permissions. - class ContainerAccess - include Google::Apis::Core::Hashable - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # List of Container permissions. Valid container permissions are: read, edit, - # delete, publish. - # Corresponds to the JSON property `permission` - # @return [Array] - attr_accessor :permission - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @container_id = args[:container_id] unless args[:container_id].nil? - @permission = args[:permission] unless args[:permission].nil? - end - end - - # Represents a Google Tag Manager Container Version. - class ContainerVersion - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Represents a Google Tag Manager Container. - # Corresponds to the JSON property `container` - # @return [Google::Apis::TagmanagerV1::Container] - attr_accessor :container - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # The Container Version ID uniquely identifies the GTM Container Version. - # Corresponds to the JSON property `containerVersionId` - # @return [String] - attr_accessor :container_version_id - - # A value of true indicates this container version has been deleted. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # The fingerprint of the GTM Container Version as computed at storage time. This - # value is recomputed whenever the container version is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # The macros in the container that this version was taken from. - # Corresponds to the JSON property `macro` - # @return [Array] - attr_accessor :macro - - # Container version display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # User notes on how to apply this container version in the container. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # The rules in the container that this version was taken from. - # Corresponds to the JSON property `rule` - # @return [Array] - attr_accessor :rule - - # The tags in the container that this version was taken from. - # Corresponds to the JSON property `tag` - # @return [Array] - attr_accessor :tag - - # The triggers in the container that this version was taken from. - # Corresponds to the JSON property `trigger` - # @return [Array] - attr_accessor :trigger - - # The variables in the container that this version was taken from. - # Corresponds to the JSON property `variable` - # @return [Array] - attr_accessor :variable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @container = args[:container] unless args[:container].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @container_version_id = args[:container_version_id] unless args[:container_version_id].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @macro = args[:macro] unless args[:macro].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @rule = args[:rule] unless args[:rule].nil? - @tag = args[:tag] unless args[:tag].nil? - @trigger = args[:trigger] unless args[:trigger].nil? - @variable = args[:variable] unless args[:variable].nil? - end - end - - # Represents a Google Tag Manager Container Version Header. - class ContainerVersionHeader - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # The Container Version ID uniquely identifies the GTM Container Version. - # Corresponds to the JSON property `containerVersionId` - # @return [String] - attr_accessor :container_version_id - - # A value of true indicates this container version has been deleted. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # Container version display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Number of macros in the container version. - # Corresponds to the JSON property `numMacros` - # @return [String] - attr_accessor :num_macros - - # Number of rules in the container version. - # Corresponds to the JSON property `numRules` - # @return [String] - attr_accessor :num_rules - - # Number of tags in the container version. - # Corresponds to the JSON property `numTags` - # @return [String] - attr_accessor :num_tags - - # Number of triggers in the container version. - # Corresponds to the JSON property `numTriggers` - # @return [String] - attr_accessor :num_triggers - - # Number of variables in the container version. - # Corresponds to the JSON property `numVariables` - # @return [String] - attr_accessor :num_variables - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @container_version_id = args[:container_version_id] unless args[:container_version_id].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @name = args[:name] unless args[:name].nil? - @num_macros = args[:num_macros] unless args[:num_macros].nil? - @num_rules = args[:num_rules] unless args[:num_rules].nil? - @num_tags = args[:num_tags] unless args[:num_tags].nil? - @num_triggers = args[:num_triggers] unless args[:num_triggers].nil? - @num_variables = args[:num_variables] unless args[:num_variables].nil? - end - end - - # Options for new container versions. - class CreateContainerVersionRequestVersionOptions - include Google::Apis::Core::Hashable - - # The name of the container version to be created. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The notes of the container version to be created. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # The creation of this version may be for quick preview and shouldn't be saved. - # Corresponds to the JSON property `quickPreview` - # @return [Boolean] - attr_accessor :quick_preview - alias_method :quick_preview?, :quick_preview - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @quick_preview = args[:quick_preview] unless args[:quick_preview].nil? - end - end - - # Create container versions response. - class CreateContainerVersionResponse - include Google::Apis::Core::Hashable - - # Compiler errors or not. - # Corresponds to the JSON property `compilerError` - # @return [Boolean] - attr_accessor :compiler_error - alias_method :compiler_error?, :compiler_error - - # Represents a Google Tag Manager Container Version. - # Corresponds to the JSON property `containerVersion` - # @return [Google::Apis::TagmanagerV1::ContainerVersion] - attr_accessor :container_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @compiler_error = args[:compiler_error] unless args[:compiler_error].nil? - @container_version = args[:container_version] unless args[:container_version].nil? - end - end - - # List AccountUsers Response. - class ListAccountUsersResponse - include Google::Apis::Core::Hashable - - # All GTM AccountUsers of a GTM Account. - # Corresponds to the JSON property `userAccess` - # @return [Array] - attr_accessor :user_access - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @user_access = args[:user_access] unless args[:user_access].nil? - end - end - - # List Accounts Response. - class ListAccountsResponse - include Google::Apis::Core::Hashable - - # List of GTM Accounts that a user has access to. - # Corresponds to the JSON property `accounts` - # @return [Array] - attr_accessor :accounts - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @accounts = args[:accounts] unless args[:accounts].nil? - end - end - - # List container versions response. - class ListContainerVersionsResponse - include Google::Apis::Core::Hashable - - # All versions of a GTM Container. - # Corresponds to the JSON property `containerVersion` - # @return [Array] - attr_accessor :container_version - - # All container version headers of a GTM Container. - # Corresponds to the JSON property `containerVersionHeader` - # @return [Array] - attr_accessor :container_version_header - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @container_version = args[:container_version] unless args[:container_version].nil? - @container_version_header = args[:container_version_header] unless args[:container_version_header].nil? - end - end - - # List Containers Response. - class ListContainersResponse - include Google::Apis::Core::Hashable - - # All Containers of a GTM Account. - # Corresponds to the JSON property `containers` - # @return [Array] - attr_accessor :containers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @containers = args[:containers] unless args[:containers].nil? - end - end - - # List Macros Response. - class ListMacrosResponse - include Google::Apis::Core::Hashable - - # All GTM Macros of a GTM Container. - # Corresponds to the JSON property `macros` - # @return [Array] - attr_accessor :macros - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @macros = args[:macros] unless args[:macros].nil? - end - end - - # List Rules Response. - class ListRulesResponse - include Google::Apis::Core::Hashable - - # All GTM Rules of a GTM Container. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rules = args[:rules] unless args[:rules].nil? - end - end - - # List Tags Response. - class ListTagsResponse - include Google::Apis::Core::Hashable - - # All GTM Tags of a GTM Container. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @tags = args[:tags] unless args[:tags].nil? - end - end - - # List triggers response. - class ListTriggersResponse - include Google::Apis::Core::Hashable - - # All GTM Triggers of a GTM Container. - # Corresponds to the JSON property `triggers` - # @return [Array] - attr_accessor :triggers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @triggers = args[:triggers] unless args[:triggers].nil? - end - end - - # List Variables Response. - class ListVariablesResponse - include Google::Apis::Core::Hashable - - # All GTM Variables of a GTM Container. - # Corresponds to the JSON property `variables` - # @return [Array] - attr_accessor :variables - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variables = args[:variables] unless args[:variables].nil? - end - end - - # Represents a Google Tag Manager Macro. - class Macro - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # For mobile containers only: A list of rule IDs for disabling conditional - # macros; the macro is enabled if one of the enabling rules is true while all - # the disabling rules are false. Treated as an unordered set. - # Corresponds to the JSON property `disablingRuleId` - # @return [Array] - attr_accessor :disabling_rule_id - - # For mobile containers only: A list of rule IDs for enabling conditional macros; - # the macro is enabled if one of the enabling rules is true while all the - # disabling rules are false. Treated as an unordered set. - # Corresponds to the JSON property `enablingRuleId` - # @return [Array] - attr_accessor :enabling_rule_id - - # The fingerprint of the GTM Macro as computed at storage time. This value is - # recomputed whenever the macro is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # The Macro ID uniquely identifies the GTM Macro. - # Corresponds to the JSON property `macroId` - # @return [String] - attr_accessor :macro_id - - # Macro display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # User notes on how to apply this macro in the container. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # The macro's parameters. - # Corresponds to the JSON property `parameter` - # @return [Array] - attr_accessor :parameter - - # The end timestamp in milliseconds to schedule a macro. - # Corresponds to the JSON property `scheduleEndMs` - # @return [String] - attr_accessor :schedule_end_ms - - # The start timestamp in milliseconds to schedule a macro. - # Corresponds to the JSON property `scheduleStartMs` - # @return [String] - attr_accessor :schedule_start_ms - - # GTM Macro 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @disabling_rule_id = args[:disabling_rule_id] unless args[:disabling_rule_id].nil? - @enabling_rule_id = args[:enabling_rule_id] unless args[:enabling_rule_id].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @macro_id = args[:macro_id] unless args[:macro_id].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @parameter = args[:parameter] unless args[:parameter].nil? - @schedule_end_ms = args[:schedule_end_ms] unless args[:schedule_end_ms].nil? - @schedule_start_ms = args[:schedule_start_ms] unless args[:schedule_start_ms].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a Google Tag Manager Parameter. - class Parameter - include Google::Apis::Core::Hashable - - # The named key that uniquely identifies a parameter. Required for top-level - # parameters, as well as map values. Ignored for list values. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # This list parameter's parameters (keys will be ignored). - # Corresponds to the JSON property `list` - # @return [Array] - attr_accessor :list - - # This map parameter's parameters (must have keys; keys must be unique). - # Corresponds to the JSON property `map` - # @return [Array] - attr_accessor :map - - # The parameter type. Valid values are: - # - boolean: The value represents a boolean, represented as 'true' or 'false' - # - integer: The value represents a 64-bit signed integer value, in base 10 - # - list: A list of parameters should be specified - # - map: A map of parameters should be specified - # - template: The value represents any text; this can include macro references ( - # even macro references that might return non-string types) - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A parameter's value (may contain macro references such as "``myMacro``") as - # appropriate to the specified type. - # 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? - @list = args[:list] unless args[:list].nil? - @map = args[:map] unless args[:map].nil? - @type = args[:type] unless args[:type].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Publish container version response. - class PublishContainerVersionResponse - include Google::Apis::Core::Hashable - - # Compiler errors or not. - # Corresponds to the JSON property `compilerError` - # @return [Boolean] - attr_accessor :compiler_error - alias_method :compiler_error?, :compiler_error - - # Represents a Google Tag Manager Container Version. - # Corresponds to the JSON property `containerVersion` - # @return [Google::Apis::TagmanagerV1::ContainerVersion] - attr_accessor :container_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @compiler_error = args[:compiler_error] unless args[:compiler_error].nil? - @container_version = args[:container_version] unless args[:container_version].nil? - end - end - - # Represents a Google Tag Manager Rule. - class Rule - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # The list of conditions that make up this rule (implicit AND between them). - # Corresponds to the JSON property `condition` - # @return [Array] - attr_accessor :condition - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # The fingerprint of the GTM Rule as computed at storage time. This value is - # recomputed whenever the rule is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # Rule display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # User notes on how to apply this rule in the container. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # The Rule ID uniquely identifies the GTM Rule. - # Corresponds to the JSON property `ruleId` - # @return [String] - attr_accessor :rule_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @condition = args[:condition] unless args[:condition].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @rule_id = args[:rule_id] unless args[:rule_id].nil? - end - end - - # Represents a Google Tag Manager Tag. - class Tag - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Blocking rule IDs. If any of the listed rules evaluate to true, the tag will - # not fire. - # Corresponds to the JSON property `blockingRuleId` - # @return [Array] - attr_accessor :blocking_rule_id - - # Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag - # will not fire. - # Corresponds to the JSON property `blockingTriggerId` - # @return [Array] - attr_accessor :blocking_trigger_id - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # The fingerprint of the GTM Tag as computed at storage time. This value is - # recomputed whenever the tag is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # Firing rule IDs. A tag will fire when any of the listed rules are true and all - # of its blockingRuleIds (if any specified) are false. - # Corresponds to the JSON property `firingRuleId` - # @return [Array] - attr_accessor :firing_rule_id - - # Firing trigger IDs. A tag will fire when any of the listed triggers are true - # and all of its blockingTriggerIds (if any specified) are false. - # Corresponds to the JSON property `firingTriggerId` - # @return [Array] - attr_accessor :firing_trigger_id - - # If set to true, this tag will only fire in the live environment (e.g. not in - # preview or debug mode). - # Corresponds to the JSON property `liveOnly` - # @return [Boolean] - attr_accessor :live_only - alias_method :live_only?, :live_only - - # Tag display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # User notes on how to apply this tag in the container. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # The tag's parameters. - # Corresponds to the JSON property `parameter` - # @return [Array] - attr_accessor :parameter - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `priority` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :priority - - # The end timestamp in milliseconds to schedule a tag. - # Corresponds to the JSON property `scheduleEndMs` - # @return [String] - attr_accessor :schedule_end_ms - - # The start timestamp in milliseconds to schedule a tag. - # Corresponds to the JSON property `scheduleStartMs` - # @return [String] - attr_accessor :schedule_start_ms - - # The Tag ID uniquely identifies the GTM Tag. - # Corresponds to the JSON property `tagId` - # @return [String] - attr_accessor :tag_id - - # GTM Tag 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) - @account_id = args[:account_id] unless args[:account_id].nil? - @blocking_rule_id = args[:blocking_rule_id] unless args[:blocking_rule_id].nil? - @blocking_trigger_id = args[:blocking_trigger_id] unless args[:blocking_trigger_id].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @firing_rule_id = args[:firing_rule_id] unless args[:firing_rule_id].nil? - @firing_trigger_id = args[:firing_trigger_id] unless args[:firing_trigger_id].nil? - @live_only = args[:live_only] unless args[:live_only].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @parameter = args[:parameter] unless args[:parameter].nil? - @priority = args[:priority] unless args[:priority].nil? - @schedule_end_ms = args[:schedule_end_ms] unless args[:schedule_end_ms].nil? - @schedule_start_ms = args[:schedule_start_ms] unless args[:schedule_start_ms].nil? - @tag_id = args[:tag_id] unless args[:tag_id].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Represents a Google Tag Manager Trigger - class Trigger - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Used in the case of auto event tracking. - # Corresponds to the JSON property `autoEventFilter` - # @return [Array] - attr_accessor :auto_event_filter - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `checkValidation` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :check_validation - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # Used in the case of custom event, which is fired iff all Conditions are true. - # Corresponds to the JSON property `customEventFilter` - # @return [Array] - attr_accessor :custom_event_filter - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `enableAllVideos` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :enable_all_videos - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `eventName` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :event_name - - # The trigger will only fire iff all Conditions are true. - # Corresponds to the JSON property `filter` - # @return [Array] - attr_accessor :filter - - # The fingerprint of the GTM Trigger as computed at storage time. This value is - # recomputed whenever the trigger is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `interval` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :interval - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `limit` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :limit - - # Trigger display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The Trigger ID uniquely identifies the GTM Trigger. - # Corresponds to the JSON property `triggerId` - # @return [String] - attr_accessor :trigger_id - - # Defines the data layer event that causes this trigger. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `uniqueTriggerId` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :unique_trigger_id - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `videoPercentageList` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :video_percentage_list - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `waitForTags` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :wait_for_tags - - # Represents a Google Tag Manager Parameter. - # Corresponds to the JSON property `waitForTagsTimeout` - # @return [Google::Apis::TagmanagerV1::Parameter] - attr_accessor :wait_for_tags_timeout - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @auto_event_filter = args[:auto_event_filter] unless args[:auto_event_filter].nil? - @check_validation = args[:check_validation] unless args[:check_validation].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @custom_event_filter = args[:custom_event_filter] unless args[:custom_event_filter].nil? - @enable_all_videos = args[:enable_all_videos] unless args[:enable_all_videos].nil? - @event_name = args[:event_name] unless args[:event_name].nil? - @filter = args[:filter] unless args[:filter].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @interval = args[:interval] unless args[:interval].nil? - @limit = args[:limit] unless args[:limit].nil? - @name = args[:name] unless args[:name].nil? - @trigger_id = args[:trigger_id] unless args[:trigger_id].nil? - @type = args[:type] unless args[:type].nil? - @unique_trigger_id = args[:unique_trigger_id] unless args[:unique_trigger_id].nil? - @video_percentage_list = args[:video_percentage_list] unless args[:video_percentage_list].nil? - @wait_for_tags = args[:wait_for_tags] unless args[:wait_for_tags].nil? - @wait_for_tags_timeout = args[:wait_for_tags_timeout] unless args[:wait_for_tags_timeout].nil? - end - end - - # Represents a user's permissions to an account and its container. - class UserAccess - include Google::Apis::Core::Hashable - - # Defines the Google Tag Manager Account access permissions. - # Corresponds to the JSON property `accountAccess` - # @return [Google::Apis::TagmanagerV1::AccountAccess] - attr_accessor :account_access - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # GTM Container access permissions. - # Corresponds to the JSON property `containerAccess` - # @return [Array] - attr_accessor :container_access - - # User's email address. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # Account Permission ID. - # Corresponds to the JSON property `permissionId` - # @return [String] - attr_accessor :permission_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_access = args[:account_access] unless args[:account_access].nil? - @account_id = args[:account_id] unless args[:account_id].nil? - @container_access = args[:container_access] unless args[:container_access].nil? - @email_address = args[:email_address] unless args[:email_address].nil? - @permission_id = args[:permission_id] unless args[:permission_id].nil? - end - end - - # Represents a Google Tag Manager Variable. - class Variable - include Google::Apis::Core::Hashable - - # GTM Account ID. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # GTM Container ID. - # Corresponds to the JSON property `containerId` - # @return [String] - attr_accessor :container_id - - # For mobile containers only: A list of trigger IDs for disabling conditional - # variables; the variable is enabled if one of the enabling trigger is true - # while all the disabling trigger are false. Treated as an unordered set. - # Corresponds to the JSON property `disablingTriggerId` - # @return [Array] - attr_accessor :disabling_trigger_id - - # For mobile containers only: A list of trigger IDs for enabling conditional - # variables; the variable is enabled if one of the enabling triggers is true - # while all the disabling triggers are false. Treated as an unordered set. - # Corresponds to the JSON property `enablingTriggerId` - # @return [Array] - attr_accessor :enabling_trigger_id - - # The fingerprint of the GTM Variable as computed at storage time. This value is - # recomputed whenever the variable is modified. - # Corresponds to the JSON property `fingerprint` - # @return [String] - attr_accessor :fingerprint - - # Variable display name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # User notes on how to apply this variable in the container. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # The variable's parameters. - # Corresponds to the JSON property `parameter` - # @return [Array] - attr_accessor :parameter - - # The end timestamp in milliseconds to schedule a variable. - # Corresponds to the JSON property `scheduleEndMs` - # @return [String] - attr_accessor :schedule_end_ms - - # The start timestamp in milliseconds to schedule a variable. - # Corresponds to the JSON property `scheduleStartMs` - # @return [String] - attr_accessor :schedule_start_ms - - # GTM Variable Type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The Variable ID uniquely identifies the GTM Variable. - # Corresponds to the JSON property `variableId` - # @return [String] - attr_accessor :variable_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @account_id = args[:account_id] unless args[:account_id].nil? - @container_id = args[:container_id] unless args[:container_id].nil? - @disabling_trigger_id = args[:disabling_trigger_id] unless args[:disabling_trigger_id].nil? - @enabling_trigger_id = args[:enabling_trigger_id] unless args[:enabling_trigger_id].nil? - @fingerprint = args[:fingerprint] unless args[:fingerprint].nil? - @name = args[:name] unless args[:name].nil? - @notes = args[:notes] unless args[:notes].nil? - @parameter = args[:parameter] unless args[:parameter].nil? - @schedule_end_ms = args[:schedule_end_ms] unless args[:schedule_end_ms].nil? - @schedule_start_ms = args[:schedule_start_ms] unless args[:schedule_start_ms].nil? - @type = args[:type] unless args[:type].nil? - @variable_id = args[:variable_id] unless args[:variable_id].nil? - end - end - end - end -end diff --git a/generated/google/apis/tagmanager_v1/representations.rb b/generated/google/apis/tagmanager_v1/representations.rb deleted file mode 100644 index 7c0c3fee6..000000000 --- a/generated/google/apis/tagmanager_v1/representations.rb +++ /dev/null @@ -1,461 +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 TagmanagerV1 - - class Account - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AccountAccess - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Condition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Container - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ContainerAccess - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ContainerVersion - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ContainerVersionHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreateContainerVersionRequestVersionOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class CreateContainerVersionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountUsersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListContainerVersionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListContainersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListMacrosResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListRulesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTagsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTriggersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListVariablesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Macro - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Parameter - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class PublishContainerVersionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Rule - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Tag - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Trigger - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UserAccess - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Variable - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Account - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :fingerprint, as: 'fingerprint' - property :name, as: 'name' - property :share_data, as: 'shareData' - end - end - - # @private - class AccountAccess - class Representation < Google::Apis::Core::JsonRepresentation - collection :permission, as: 'permission' - end - end - - # @private - class Condition - class Representation < Google::Apis::Core::JsonRepresentation - collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :type, as: 'type' - end - end - - # @private - class Container - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :container_id, as: 'containerId' - collection :domain_name, as: 'domainName' - collection :enabled_built_in_variable, as: 'enabledBuiltInVariable' - property :fingerprint, as: 'fingerprint' - property :name, as: 'name' - property :notes, as: 'notes' - property :public_id, as: 'publicId' - property :time_zone_country_id, as: 'timeZoneCountryId' - property :time_zone_id, as: 'timeZoneId' - collection :usage_context, as: 'usageContext' - end - end - - # @private - class ContainerAccess - class Representation < Google::Apis::Core::JsonRepresentation - property :container_id, as: 'containerId' - collection :permission, as: 'permission' - end - end - - # @private - class ContainerVersion - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :container, as: 'container', class: Google::Apis::TagmanagerV1::Container, decorator: Google::Apis::TagmanagerV1::Container::Representation - - property :container_id, as: 'containerId' - property :container_version_id, as: 'containerVersionId' - property :deleted, as: 'deleted' - property :fingerprint, as: 'fingerprint' - collection :macro, as: 'macro', class: Google::Apis::TagmanagerV1::Macro, decorator: Google::Apis::TagmanagerV1::Macro::Representation - - property :name, as: 'name' - property :notes, as: 'notes' - collection :rule, as: 'rule', class: Google::Apis::TagmanagerV1::Rule, decorator: Google::Apis::TagmanagerV1::Rule::Representation - - collection :tag, as: 'tag', class: Google::Apis::TagmanagerV1::Tag, decorator: Google::Apis::TagmanagerV1::Tag::Representation - - collection :trigger, as: 'trigger', class: Google::Apis::TagmanagerV1::Trigger, decorator: Google::Apis::TagmanagerV1::Trigger::Representation - - collection :variable, as: 'variable', class: Google::Apis::TagmanagerV1::Variable, decorator: Google::Apis::TagmanagerV1::Variable::Representation - - end - end - - # @private - class ContainerVersionHeader - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :container_id, as: 'containerId' - property :container_version_id, as: 'containerVersionId' - property :deleted, as: 'deleted' - property :name, as: 'name' - property :num_macros, as: 'numMacros' - property :num_rules, as: 'numRules' - property :num_tags, as: 'numTags' - property :num_triggers, as: 'numTriggers' - property :num_variables, as: 'numVariables' - end - end - - # @private - class CreateContainerVersionRequestVersionOptions - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :notes, as: 'notes' - property :quick_preview, as: 'quickPreview' - end - end - - # @private - class CreateContainerVersionResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :compiler_error, as: 'compilerError' - property :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV1::ContainerVersion, decorator: Google::Apis::TagmanagerV1::ContainerVersion::Representation - - end - end - - # @private - class ListAccountUsersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :user_access, as: 'userAccess', class: Google::Apis::TagmanagerV1::UserAccess, decorator: Google::Apis::TagmanagerV1::UserAccess::Representation - - end - end - - # @private - class ListAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :accounts, as: 'accounts', class: Google::Apis::TagmanagerV1::Account, decorator: Google::Apis::TagmanagerV1::Account::Representation - - end - end - - # @private - class ListContainerVersionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV1::ContainerVersion, decorator: Google::Apis::TagmanagerV1::ContainerVersion::Representation - - collection :container_version_header, as: 'containerVersionHeader', class: Google::Apis::TagmanagerV1::ContainerVersionHeader, decorator: Google::Apis::TagmanagerV1::ContainerVersionHeader::Representation - - end - end - - # @private - class ListContainersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :containers, as: 'containers', class: Google::Apis::TagmanagerV1::Container, decorator: Google::Apis::TagmanagerV1::Container::Representation - - end - end - - # @private - class ListMacrosResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :macros, as: 'macros', class: Google::Apis::TagmanagerV1::Macro, decorator: Google::Apis::TagmanagerV1::Macro::Representation - - end - end - - # @private - class ListRulesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :rules, as: 'rules', class: Google::Apis::TagmanagerV1::Rule, decorator: Google::Apis::TagmanagerV1::Rule::Representation - - end - end - - # @private - class ListTagsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :tags, as: 'tags', class: Google::Apis::TagmanagerV1::Tag, decorator: Google::Apis::TagmanagerV1::Tag::Representation - - end - end - - # @private - class ListTriggersResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :triggers, as: 'triggers', class: Google::Apis::TagmanagerV1::Trigger, decorator: Google::Apis::TagmanagerV1::Trigger::Representation - - end - end - - # @private - class ListVariablesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :variables, as: 'variables', class: Google::Apis::TagmanagerV1::Variable, decorator: Google::Apis::TagmanagerV1::Variable::Representation - - end - end - - # @private - class Macro - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :container_id, as: 'containerId' - collection :disabling_rule_id, as: 'disablingRuleId' - collection :enabling_rule_id, as: 'enablingRuleId' - property :fingerprint, as: 'fingerprint' - property :macro_id, as: 'macroId' - property :name, as: 'name' - property :notes, as: 'notes' - collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :schedule_end_ms, as: 'scheduleEndMs' - property :schedule_start_ms, as: 'scheduleStartMs' - property :type, as: 'type' - end - end - - # @private - class Parameter - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - collection :list, as: 'list', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - collection :map, as: 'map', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :type, as: 'type' - property :value, as: 'value' - end - end - - # @private - class PublishContainerVersionResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :compiler_error, as: 'compilerError' - property :container_version, as: 'containerVersion', class: Google::Apis::TagmanagerV1::ContainerVersion, decorator: Google::Apis::TagmanagerV1::ContainerVersion::Representation - - end - end - - # @private - class Rule - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :condition, as: 'condition', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation - - property :container_id, as: 'containerId' - property :fingerprint, as: 'fingerprint' - property :name, as: 'name' - property :notes, as: 'notes' - property :rule_id, as: 'ruleId' - end - end - - # @private - class Tag - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :blocking_rule_id, as: 'blockingRuleId' - collection :blocking_trigger_id, as: 'blockingTriggerId' - property :container_id, as: 'containerId' - property :fingerprint, as: 'fingerprint' - collection :firing_rule_id, as: 'firingRuleId' - collection :firing_trigger_id, as: 'firingTriggerId' - property :live_only, as: 'liveOnly' - property :name, as: 'name' - property :notes, as: 'notes' - collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :priority, as: 'priority', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :schedule_end_ms, as: 'scheduleEndMs' - property :schedule_start_ms, as: 'scheduleStartMs' - property :tag_id, as: 'tagId' - property :type, as: 'type' - end - end - - # @private - class Trigger - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - collection :auto_event_filter, as: 'autoEventFilter', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation - - property :check_validation, as: 'checkValidation', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :container_id, as: 'containerId' - collection :custom_event_filter, as: 'customEventFilter', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation - - property :enable_all_videos, as: 'enableAllVideos', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :event_name, as: 'eventName', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - collection :filter, as: 'filter', class: Google::Apis::TagmanagerV1::Condition, decorator: Google::Apis::TagmanagerV1::Condition::Representation - - property :fingerprint, as: 'fingerprint' - property :interval, as: 'interval', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :limit, as: 'limit', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :name, as: 'name' - property :trigger_id, as: 'triggerId' - property :type, as: 'type' - property :unique_trigger_id, as: 'uniqueTriggerId', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :video_percentage_list, as: 'videoPercentageList', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :wait_for_tags, as: 'waitForTags', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :wait_for_tags_timeout, as: 'waitForTagsTimeout', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - end - end - - # @private - class UserAccess - class Representation < Google::Apis::Core::JsonRepresentation - property :account_access, as: 'accountAccess', class: Google::Apis::TagmanagerV1::AccountAccess, decorator: Google::Apis::TagmanagerV1::AccountAccess::Representation - - property :account_id, as: 'accountId' - collection :container_access, as: 'containerAccess', class: Google::Apis::TagmanagerV1::ContainerAccess, decorator: Google::Apis::TagmanagerV1::ContainerAccess::Representation - - property :email_address, as: 'emailAddress' - property :permission_id, as: 'permissionId' - end - end - - # @private - class Variable - class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' - property :container_id, as: 'containerId' - collection :disabling_trigger_id, as: 'disablingTriggerId' - collection :enabling_trigger_id, as: 'enablingTriggerId' - property :fingerprint, as: 'fingerprint' - property :name, as: 'name' - property :notes, as: 'notes' - collection :parameter, as: 'parameter', class: Google::Apis::TagmanagerV1::Parameter, decorator: Google::Apis::TagmanagerV1::Parameter::Representation - - property :schedule_end_ms, as: 'scheduleEndMs' - property :schedule_start_ms, as: 'scheduleStartMs' - property :type, as: 'type' - property :variable_id, as: 'variableId' - end - end - end - end -end diff --git a/generated/google/apis/tagmanager_v1/service.rb b/generated/google/apis/tagmanager_v1/service.rb deleted file mode 100644 index c95cd4436..000000000 --- a/generated/google/apis/tagmanager_v1/service.rb +++ /dev/null @@ -1,1978 +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 TagmanagerV1 - # Tag Manager API - # - # API for accessing Tag Manager accounts and containers. - # - # @example - # require 'google/apis/tagmanager_v1' - # - # Tagmanager = Google::Apis::TagmanagerV1 # Alias the module - # service = Tagmanager::TagManagerService.new - # - # @see https://developers.google.com/tag-manager/api/v1/ - class TagManagerService < 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/', 'tagmanager/v1/') - end - - # Gets a GTM Account. - # @param [String] account_id - # The GTM 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::TagmanagerV1::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::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::TagmanagerV1::Account::Representation - command.response_class = Google::Apis::TagmanagerV1::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 - - # Lists all GTM Accounts that a user has access to. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::ListAccountsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListAccountsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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::TagmanagerV1::ListAccountsResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListAccountsResponse - 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 GTM Account. - # @param [String] account_id - # The GTM Account ID. - # @param [Google::Apis::TagmanagerV1::Account] account_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the account in - # storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::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(account_id, account_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::TagmanagerV1::Account::Representation - command.response_class = Google::Apis::TagmanagerV1::Account - command.params['accountId'] = account_id unless account_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [Google::Apis::TagmanagerV1::Container] container_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::TagmanagerV1::Container] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Container] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_container(account_id, container_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Container::Representation - command.request_object = container_object - command.response_representation = Google::Apis::TagmanagerV1::Container::Representation - command.response_class = Google::Apis::TagmanagerV1::Container - 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 - - # Deletes a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container 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 [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_container(account_id, container_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container 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::TagmanagerV1::Container] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Container] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_container(account_id, container_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::Container::Representation - command.response_class = Google::Apis::TagmanagerV1::Container - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 Containers that belongs to a GTM Account. - # @param [String] account_id - # The GTM 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::TagmanagerV1::ListContainersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListContainersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_containers(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListContainersResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListContainersResponse - 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 a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Google::Apis::TagmanagerV1::Container] container_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the container in - # storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::Container] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Container] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_container(account_id, container_id, container_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Container::Representation - command.request_object = container_object - command.response_representation = Google::Apis::TagmanagerV1::Container::Representation - command.response_class = Google::Apis::TagmanagerV1::Container - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a GTM Macro. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Google::Apis::TagmanagerV1::Macro] macro_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::TagmanagerV1::Macro] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Macro] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_macro(account_id, container_id, macro_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/macros' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Macro::Representation - command.request_object = macro_object - command.response_representation = Google::Apis::TagmanagerV1::Macro::Representation - command.response_class = Google::Apis::TagmanagerV1::Macro - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 a GTM Macro. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] macro_id - # The GTM Macro 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 [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_macro(account_id, container_id, macro_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/macros/{macroId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['macroId'] = macro_id unless macro_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 GTM Macro. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] macro_id - # The GTM Macro 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::TagmanagerV1::Macro] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Macro] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_macro(account_id, container_id, macro_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/macros/{macroId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::Macro::Representation - command.response_class = Google::Apis::TagmanagerV1::Macro - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['macroId'] = macro_id unless macro_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 GTM Macros of a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container 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::TagmanagerV1::ListMacrosResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListMacrosResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_macros(account_id, container_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/macros' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListMacrosResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListMacrosResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a GTM Macro. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] macro_id - # The GTM Macro ID. - # @param [Google::Apis::TagmanagerV1::Macro] macro_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the macro in - # storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::Macro] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Macro] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_macro(account_id, container_id, macro_id, macro_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/macros/{macroId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Macro::Representation - command.request_object = macro_object - command.response_representation = Google::Apis::TagmanagerV1::Macro::Representation - command.response_class = Google::Apis::TagmanagerV1::Macro - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['macroId'] = macro_id unless macro_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a GTM Rule. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Google::Apis::TagmanagerV1::Rule] rule_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::TagmanagerV1::Rule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Rule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rule(account_id, container_id, rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/rules' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Rule::Representation - command.request_object = rule_object - command.response_representation = Google::Apis::TagmanagerV1::Rule::Representation - command.response_class = Google::Apis::TagmanagerV1::Rule - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 a GTM Rule. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] rule_id - # The GTM Rule 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 [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_rule(account_id, container_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/rules/{ruleId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['ruleId'] = rule_id unless rule_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 GTM Rule. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] rule_id - # The GTM Rule 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::TagmanagerV1::Rule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Rule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rule(account_id, container_id, rule_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/rules/{ruleId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::Rule::Representation - command.response_class = Google::Apis::TagmanagerV1::Rule - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['ruleId'] = rule_id unless rule_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 GTM Rules of a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container 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::TagmanagerV1::ListRulesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListRulesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rules(account_id, container_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/rules' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListRulesResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListRulesResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a GTM Rule. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] rule_id - # The GTM Rule ID. - # @param [Google::Apis::TagmanagerV1::Rule] rule_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the rule in - # storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::Rule] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Rule] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rule(account_id, container_id, rule_id, rule_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/rules/{ruleId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Rule::Representation - command.request_object = rule_object - command.response_representation = Google::Apis::TagmanagerV1::Rule::Representation - command.response_class = Google::Apis::TagmanagerV1::Rule - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['ruleId'] = rule_id unless rule_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a GTM Tag. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Google::Apis::TagmanagerV1::Tag] tag_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::TagmanagerV1::Tag] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Tag] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tag(account_id, container_id, tag_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/tags' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Tag::Representation - command.request_object = tag_object - command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation - command.response_class = Google::Apis::TagmanagerV1::Tag - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 a GTM Tag. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] tag_id - # The GTM Tag 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 [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_tag(account_id, container_id, tag_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/tags/{tagId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['tagId'] = tag_id unless tag_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 GTM Tag. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] tag_id - # The GTM Tag 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::TagmanagerV1::Tag] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Tag] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tag(account_id, container_id, tag_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/tags/{tagId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation - command.response_class = Google::Apis::TagmanagerV1::Tag - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['tagId'] = tag_id unless tag_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 GTM Tags of a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container 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::TagmanagerV1::ListTagsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListTagsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tags(account_id, container_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/tags' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListTagsResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListTagsResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a GTM Tag. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] tag_id - # The GTM Tag ID. - # @param [Google::Apis::TagmanagerV1::Tag] tag_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the tag in - # storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::Tag] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Tag] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tag(account_id, container_id, tag_id, tag_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/tags/{tagId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Tag::Representation - command.request_object = tag_object - command.response_representation = Google::Apis::TagmanagerV1::Tag::Representation - command.response_class = Google::Apis::TagmanagerV1::Tag - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['tagId'] = tag_id unless tag_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a GTM Trigger. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Google::Apis::TagmanagerV1::Trigger] trigger_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::TagmanagerV1::Trigger] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Trigger] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trigger(account_id, container_id, trigger_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/triggers' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Trigger::Representation - command.request_object = trigger_object - command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation - command.response_class = Google::Apis::TagmanagerV1::Trigger - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 a GTM Trigger. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] trigger_id - # The GTM Trigger 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 [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_trigger(account_id, container_id, trigger_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/triggers/{triggerId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['triggerId'] = trigger_id unless trigger_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Gets a GTM Trigger. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] trigger_id - # The GTM Trigger 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::TagmanagerV1::Trigger] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Trigger] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trigger(account_id, container_id, trigger_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/triggers/{triggerId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation - command.response_class = Google::Apis::TagmanagerV1::Trigger - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['triggerId'] = trigger_id unless trigger_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all GTM Triggers of a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container 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::TagmanagerV1::ListTriggersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListTriggersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_triggers(account_id, container_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/triggers' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListTriggersResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListTriggersResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a GTM Trigger. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] trigger_id - # The GTM Trigger ID. - # @param [Google::Apis::TagmanagerV1::Trigger] trigger_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the trigger in - # storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::Trigger] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Trigger] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trigger(account_id, container_id, trigger_id, trigger_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/triggers/{triggerId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Trigger::Representation - command.request_object = trigger_object - command.response_representation = Google::Apis::TagmanagerV1::Trigger::Representation - command.response_class = Google::Apis::TagmanagerV1::Trigger - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['triggerId'] = trigger_id unless trigger_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a GTM Variable. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Google::Apis::TagmanagerV1::Variable] variable_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::TagmanagerV1::Variable] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Variable] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variable(account_id, container_id, variable_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/variables' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Variable::Representation - command.request_object = variable_object - command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation - command.response_class = Google::Apis::TagmanagerV1::Variable - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 a GTM Variable. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] variable_id - # The GTM Variable 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 [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_variable(account_id, container_id, variable_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/variables/{variableId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['variableId'] = variable_id unless variable_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 GTM Variable. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] variable_id - # The GTM Variable 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::TagmanagerV1::Variable] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Variable] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variable(account_id, container_id, variable_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/variables/{variableId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation - command.response_class = Google::Apis::TagmanagerV1::Variable - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['variableId'] = variable_id unless variable_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 GTM Variables of a Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container 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::TagmanagerV1::ListVariablesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListVariablesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variables(account_id, container_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/variables' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListVariablesResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListVariablesResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a GTM Variable. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] variable_id - # The GTM Variable ID. - # @param [Google::Apis::TagmanagerV1::Variable] variable_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the variable in - # storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::Variable] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::Variable] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_variable(account_id, container_id, variable_id, variable_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/variables/{variableId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::Variable::Representation - command.request_object = variable_object - command.response_representation = Google::Apis::TagmanagerV1::Variable::Representation - command.response_class = Google::Apis::TagmanagerV1::Variable - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['variableId'] = variable_id unless variable_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a Container Version. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Google::Apis::TagmanagerV1::CreateContainerVersionRequestVersionOptions] create_container_version_request_version_options_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::TagmanagerV1::CreateContainerVersionResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::CreateContainerVersionResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_version(account_id, container_id, create_container_version_request_version_options_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::CreateContainerVersionRequestVersionOptions::Representation - command.request_object = create_container_version_request_version_options_object - command.response_representation = Google::Apis::TagmanagerV1::CreateContainerVersionResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::CreateContainerVersionResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_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 a Container Version. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] container_version_id - # The GTM Container Version 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 [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_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['containerVersionId'] = container_version_id unless container_version_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 Container Version. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] container_version_id - # The GTM Container Version ID. Specify published to retrieve the currently - # published version. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::ContainerVersion] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ContainerVersion] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation - command.response_class = Google::Apis::TagmanagerV1::ContainerVersion - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['containerVersionId'] = container_version_id unless container_version_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 Container Versions of a GTM Container. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [Boolean] headers - # Retrieve headers only when true. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::ListContainerVersionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListContainerVersionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_versions(account_id, container_id, headers: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListContainerVersionsResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListContainerVersionsResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.query['headers'] = headers unless headers.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 - - # Publishes a Container Version. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] container_version_id - # The GTM Container Version ID. - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the container - # version in storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::PublishContainerVersionResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::PublishContainerVersionResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish_version(account_id, container_id, container_version_id, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/publish' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::TagmanagerV1::PublishContainerVersionResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::PublishContainerVersionResponse - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['containerVersionId'] = container_version_id unless container_version_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Restores a Container Version. This will overwrite the container's current - # configuration (including its macros, rules and tags). The operation will not - # have any effect on the version that is being served (i.e. the published - # version). - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] container_version_id - # The GTM Container Version 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::TagmanagerV1::ContainerVersion] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ContainerVersion] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def restore_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/restore' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation - command.response_class = Google::Apis::TagmanagerV1::ContainerVersion - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['containerVersionId'] = container_version_id unless container_version_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 - - # Undeletes a Container Version. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] container_version_id - # The GTM Container Version 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::TagmanagerV1::ContainerVersion] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ContainerVersion] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_version(account_id, container_id, container_version_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation - command.response_class = Google::Apis::TagmanagerV1::ContainerVersion - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['containerVersionId'] = container_version_id unless container_version_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a Container Version. - # @param [String] account_id - # The GTM Account ID. - # @param [String] container_id - # The GTM Container ID. - # @param [String] container_version_id - # The GTM Container Version ID. - # @param [Google::Apis::TagmanagerV1::ContainerVersion] container_version_object - # @param [String] fingerprint - # When provided, this fingerprint must match the fingerprint of the container - # version in storage. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::ContainerVersion] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ContainerVersion] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_version(account_id, container_id, container_version_id, container_version_object = nil, fingerprint: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation - command.request_object = container_version_object - command.response_representation = Google::Apis::TagmanagerV1::ContainerVersion::Representation - command.response_class = Google::Apis::TagmanagerV1::ContainerVersion - command.params['accountId'] = account_id unless account_id.nil? - command.params['containerId'] = container_id unless container_id.nil? - command.params['containerVersionId'] = container_version_id unless container_version_id.nil? - command.query['fingerprint'] = fingerprint unless fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a user's Account & Container Permissions. - # @param [String] account_id - # The GTM Account ID. - # @param [Google::Apis::TagmanagerV1::UserAccess] user_access_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::TagmanagerV1::UserAccess] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::UserAccess] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(account_id, user_access_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/permissions' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TagmanagerV1::UserAccess::Representation - command.request_object = user_access_object - command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation - command.response_class = Google::Apis::TagmanagerV1::UserAccess - 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 - - # Removes a user from the account, revoking access to it and all of its - # containers. - # @param [String] account_id - # The GTM Account ID. - # @param [String] permission_id - # The GTM User 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 [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_permission(account_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/permissions/{permissionId}' - command = make_simple_command(:delete, path, options) - command.params['accountId'] = account_id unless account_id.nil? - command.params['permissionId'] = permission_id unless permission_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 user's Account & Container Permissions. - # @param [String] account_id - # The GTM Account ID. - # @param [String] permission_id - # The GTM User 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::TagmanagerV1::UserAccess] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::UserAccess] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(account_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/permissions/{permissionId}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation - command.response_class = Google::Apis::TagmanagerV1::UserAccess - command.params['accountId'] = account_id unless account_id.nil? - command.params['permissionId'] = permission_id unless permission_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 users that have access to the account along with Account and - # Container Permissions granted to each of them. - # @param [String] account_id - # The GTM Account ID. @required tagmanager.accounts.permissions.list - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TagmanagerV1::ListAccountUsersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::ListAccountUsersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permissions(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/permissions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TagmanagerV1::ListAccountUsersResponse::Representation - command.response_class = Google::Apis::TagmanagerV1::ListAccountUsersResponse - 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 a user's Account & Container Permissions. - # @param [String] account_id - # The GTM Account ID. - # @param [String] permission_id - # The GTM User ID. - # @param [Google::Apis::TagmanagerV1::UserAccess] user_access_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::TagmanagerV1::UserAccess] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TagmanagerV1::UserAccess] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_permission(account_id, permission_id, user_access_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'accounts/{accountId}/permissions/{permissionId}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TagmanagerV1::UserAccess::Representation - command.request_object = user_access_object - command.response_representation = Google::Apis::TagmanagerV1::UserAccess::Representation - command.response_class = Google::Apis::TagmanagerV1::UserAccess - command.params['accountId'] = account_id unless account_id.nil? - command.params['permissionId'] = permission_id unless permission_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 diff --git a/generated/google/apis/taskqueue_v1beta2.rb b/generated/google/apis/taskqueue_v1beta2.rb deleted file mode 100644 index a031c2ad1..000000000 --- a/generated/google/apis/taskqueue_v1beta2.rb +++ /dev/null @@ -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/taskqueue_v1beta2/service.rb' -require 'google/apis/taskqueue_v1beta2/classes.rb' -require 'google/apis/taskqueue_v1beta2/representations.rb' - -module Google - module Apis - # TaskQueue API - # - # Lets you access a Google App Engine Pull Task Queue over REST. - # - # @see https://developers.google.com/appengine/docs/python/taskqueue/rest - module TaskqueueV1beta2 - VERSION = 'V1beta2' - REVISION = '20141111' - - # Manage your Tasks and Taskqueues - AUTH_TASKQUEUE = 'https://www.googleapis.com/auth/taskqueue' - - # Consume Tasks from your Taskqueues - AUTH_TASKQUEUE_CONSUMER = 'https://www.googleapis.com/auth/taskqueue.consumer' - end - end -end diff --git a/generated/google/apis/taskqueue_v1beta2/classes.rb b/generated/google/apis/taskqueue_v1beta2/classes.rb deleted file mode 100644 index b9e9ebf17..000000000 --- a/generated/google/apis/taskqueue_v1beta2/classes.rb +++ /dev/null @@ -1,254 +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 TaskqueueV1beta2 - - # - class Task - include Google::Apis::Core::Hashable - - # Time (in seconds since the epoch) at which the task was enqueued. - # Corresponds to the JSON property `enqueueTimestamp` - # @return [String] - attr_accessor :enqueue_timestamp - - # Name of the task. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of object returned, in this case set to task. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Time (in seconds since the epoch) at which the task lease will expire. This - # value is 0 if the task isnt currently leased out to a worker. - # Corresponds to the JSON property `leaseTimestamp` - # @return [String] - attr_accessor :lease_timestamp - - # A bag of bytes which is the task payload. The payload on the JSON side is - # always Base64 encoded. - # Corresponds to the JSON property `payloadBase64` - # @return [String] - attr_accessor :payload_base64 - - # Name of the queue that the task is in. - # Corresponds to the JSON property `queueName` - # @return [String] - attr_accessor :queue_name - - # The number of leases applied to this task. - # Corresponds to the JSON property `retry_count` - # @return [Fixnum] - attr_accessor :retry_count - - # Tag for the task, could be used later to lease tasks grouped by a specific tag. - # Corresponds to the JSON property `tag` - # @return [String] - attr_accessor :tag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @enqueue_timestamp = args[:enqueue_timestamp] unless args[:enqueue_timestamp].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @lease_timestamp = args[:lease_timestamp] unless args[:lease_timestamp].nil? - @payload_base64 = args[:payload_base64] unless args[:payload_base64].nil? - @queue_name = args[:queue_name] unless args[:queue_name].nil? - @retry_count = args[:retry_count] unless args[:retry_count].nil? - @tag = args[:tag] unless args[:tag].nil? - end - end - - # - class TaskQueue - include Google::Apis::Core::Hashable - - # ACLs that are applicable to this TaskQueue object. - # Corresponds to the JSON property `acl` - # @return [Google::Apis::TaskqueueV1beta2::TaskQueue::Acl] - attr_accessor :acl - - # Name of the taskqueue. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The kind of REST object returned, in this case taskqueue. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The number of times we should lease out tasks before giving up on them. If - # unset we lease them out forever until a worker deletes the task. - # Corresponds to the JSON property `maxLeases` - # @return [Fixnum] - attr_accessor :max_leases - - # Statistics for the TaskQueue object in question. - # Corresponds to the JSON property `stats` - # @return [Google::Apis::TaskqueueV1beta2::TaskQueue::Stats] - attr_accessor :stats - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acl = args[:acl] unless args[:acl].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @max_leases = args[:max_leases] unless args[:max_leases].nil? - @stats = args[:stats] unless args[:stats].nil? - end - - # ACLs that are applicable to this TaskQueue object. - class Acl - include Google::Apis::Core::Hashable - - # Email addresses of users who are "admins" of the TaskQueue. This means they - # can control the queue, eg set ACLs for the queue. - # Corresponds to the JSON property `adminEmails` - # @return [Array] - attr_accessor :admin_emails - - # Email addresses of users who can "consume" tasks from the TaskQueue. This - # means they can Dequeue and Delete tasks from the queue. - # Corresponds to the JSON property `consumerEmails` - # @return [Array] - attr_accessor :consumer_emails - - # Email addresses of users who can "produce" tasks into the TaskQueue. This - # means they can Insert tasks into the queue. - # Corresponds to the JSON property `producerEmails` - # @return [Array] - attr_accessor :producer_emails - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @admin_emails = args[:admin_emails] unless args[:admin_emails].nil? - @consumer_emails = args[:consumer_emails] unless args[:consumer_emails].nil? - @producer_emails = args[:producer_emails] unless args[:producer_emails].nil? - end - end - - # Statistics for the TaskQueue object in question. - class Stats - include Google::Apis::Core::Hashable - - # Number of tasks leased in the last hour. - # Corresponds to the JSON property `leasedLastHour` - # @return [String] - attr_accessor :leased_last_hour - - # Number of tasks leased in the last minute. - # Corresponds to the JSON property `leasedLastMinute` - # @return [String] - attr_accessor :leased_last_minute - - # The timestamp (in seconds since the epoch) of the oldest unfinished task. - # Corresponds to the JSON property `oldestTask` - # @return [String] - attr_accessor :oldest_task - - # Number of tasks in the queue. - # Corresponds to the JSON property `totalTasks` - # @return [Fixnum] - attr_accessor :total_tasks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @leased_last_hour = args[:leased_last_hour] unless args[:leased_last_hour].nil? - @leased_last_minute = args[:leased_last_minute] unless args[:leased_last_minute].nil? - @oldest_task = args[:oldest_task] unless args[:oldest_task].nil? - @total_tasks = args[:total_tasks] unless args[:total_tasks].nil? - end - end - end - - # - class Tasks - include Google::Apis::Core::Hashable - - # The actual list of tasks returned as a result of the lease operation. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of object returned, a list of tasks. - # 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 Tasks2 - include Google::Apis::Core::Hashable - - # The actual list of tasks currently active in the TaskQueue. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # The kind of object returned, a list of tasks. - # 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 diff --git a/generated/google/apis/taskqueue_v1beta2/representations.rb b/generated/google/apis/taskqueue_v1beta2/representations.rb deleted file mode 100644 index dd8da1369..000000000 --- a/generated/google/apis/taskqueue_v1beta2/representations.rb +++ /dev/null @@ -1,114 +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 TaskqueueV1beta2 - - class Task - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TaskQueue - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Acl - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Stats - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Tasks - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Tasks2 - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Task - class Representation < Google::Apis::Core::JsonRepresentation - property :enqueue_timestamp, as: 'enqueueTimestamp' - property :id, as: 'id' - property :kind, as: 'kind' - property :lease_timestamp, as: 'leaseTimestamp' - property :payload_base64, as: 'payloadBase64' - property :queue_name, as: 'queueName' - property :retry_count, as: 'retry_count' - property :tag, as: 'tag' - end - end - - # @private - class TaskQueue - class Representation < Google::Apis::Core::JsonRepresentation - property :acl, as: 'acl', class: Google::Apis::TaskqueueV1beta2::TaskQueue::Acl, decorator: Google::Apis::TaskqueueV1beta2::TaskQueue::Acl::Representation - - property :id, as: 'id' - property :kind, as: 'kind' - property :max_leases, as: 'maxLeases' - property :stats, as: 'stats', class: Google::Apis::TaskqueueV1beta2::TaskQueue::Stats, decorator: Google::Apis::TaskqueueV1beta2::TaskQueue::Stats::Representation - - end - - # @private - class Acl - class Representation < Google::Apis::Core::JsonRepresentation - collection :admin_emails, as: 'adminEmails' - collection :consumer_emails, as: 'consumerEmails' - collection :producer_emails, as: 'producerEmails' - end - end - - # @private - class Stats - class Representation < Google::Apis::Core::JsonRepresentation - property :leased_last_hour, as: 'leasedLastHour' - property :leased_last_minute, as: 'leasedLastMinute' - property :oldest_task, as: 'oldestTask' - property :total_tasks, as: 'totalTasks' - end - end - end - - # @private - class Tasks - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::TaskqueueV1beta2::Task, decorator: Google::Apis::TaskqueueV1beta2::Task::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Tasks2 - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::TaskqueueV1beta2::Task, decorator: Google::Apis::TaskqueueV1beta2::Task::Representation - - property :kind, as: 'kind' - end - end - end - end -end diff --git a/generated/google/apis/taskqueue_v1beta2/service.rb b/generated/google/apis/taskqueue_v1beta2/service.rb deleted file mode 100644 index 33af55ceb..000000000 --- a/generated/google/apis/taskqueue_v1beta2/service.rb +++ /dev/null @@ -1,416 +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 TaskqueueV1beta2 - # TaskQueue API - # - # Lets you access a Google App Engine Pull Task Queue over REST. - # - # @example - # require 'google/apis/taskqueue_v1beta2' - # - # Taskqueue = Google::Apis::TaskqueueV1beta2 # Alias the module - # service = Taskqueue::TaskqueueService.new - # - # @see https://developers.google.com/appengine/docs/python/taskqueue/rest - class TaskqueueService < 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/', 'taskqueue/v1beta2/projects/') - end - - # Get detailed information about a TaskQueue. - # @param [String] project - # The project under which the queue lies. - # @param [String] taskqueue - # The id of the taskqueue to get the properties of. - # @param [Boolean] get_stats - # Whether to get stats. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::TaskqueueV1beta2::TaskQueue] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TaskqueueV1beta2::TaskQueue] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_taskqueue(project, taskqueue, get_stats: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TaskqueueV1beta2::TaskQueue::Representation - command.response_class = Google::Apis::TaskqueueV1beta2::TaskQueue - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.nil? - command.query['getStats'] = get_stats unless get_stats.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 a task from a TaskQueue. - # @param [String] project - # The project under which the queue lies. - # @param [String] taskqueue - # The taskqueue to delete a task from. - # @param [String] task - # The id of the task 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_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}/tasks/{task}' - command = make_simple_command(:delete, path, options) - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.nil? - command.params['task'] = task unless task.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Get a particular task from a TaskQueue. - # @param [String] project - # The project under which the queue lies. - # @param [String] taskqueue - # The taskqueue in which the task belongs. - # @param [String] task - # The task to get properties of. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TaskqueueV1beta2::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TaskqueueV1beta2::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}/tasks/{task}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TaskqueueV1beta2::Task::Representation - command.response_class = Google::Apis::TaskqueueV1beta2::Task - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.nil? - command.params['task'] = task unless task.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 - - # Insert a new task in a TaskQueue - # @param [String] project - # The project under which the queue lies - # @param [String] taskqueue - # The taskqueue to insert the task into - # @param [Google::Apis::TaskqueueV1beta2::Task] task_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::TaskqueueV1beta2::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TaskqueueV1beta2::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_task(project, taskqueue, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}/tasks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TaskqueueV1beta2::Task::Representation - command.request_object = task_object - command.response_representation = Google::Apis::TaskqueueV1beta2::Task::Representation - command.response_class = Google::Apis::TaskqueueV1beta2::Task - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.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 - - # Lease 1 or more tasks from a TaskQueue. - # @param [String] project - # The project under which the queue lies. - # @param [String] taskqueue - # The taskqueue to lease a task from. - # @param [Boolean] group_by_tag - # When true, all returned tasks will have the same tag - # @param [Fixnum] lease_secs - # The lease in seconds. - # @param [Fixnum] num_tasks - # The number of tasks to lease. - # @param [String] tag - # The tag allowed for tasks in the response. Must only be specified if - # group_by_tag is true. If group_by_tag is true and tag is not specified the tag - # will be that of the oldest task by eta, i.e. the first available tag - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TaskqueueV1beta2::Tasks] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TaskqueueV1beta2::Tasks] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def lease_task(project, taskqueue, group_by_tag: nil, lease_secs: nil, num_tasks: nil, tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}/tasks/lease' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::TaskqueueV1beta2::Tasks::Representation - command.response_class = Google::Apis::TaskqueueV1beta2::Tasks - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.nil? - command.query['groupByTag'] = group_by_tag unless group_by_tag.nil? - command.query['leaseSecs'] = lease_secs unless lease_secs.nil? - command.query['numTasks'] = num_tasks unless num_tasks.nil? - command.query['tag'] = tag unless tag.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 Tasks in a TaskQueue - # @param [String] project - # The project under which the queue lies. - # @param [String] taskqueue - # The id of the taskqueue to list tasks from. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TaskqueueV1beta2::Tasks2] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TaskqueueV1beta2::Tasks2] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasks(project, taskqueue, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}/tasks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TaskqueueV1beta2::Tasks2::Representation - command.response_class = Google::Apis::TaskqueueV1beta2::Tasks2 - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.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 tasks that are leased out of a TaskQueue. This method supports patch - # semantics. - # @param [String] project - # The project under which the queue lies. - # @param [String] taskqueue - # @param [String] task - # @param [Google::Apis::TaskqueueV1beta2::Task] task_object - # @param [Fixnum] new_lease_seconds - # The new lease in seconds. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TaskqueueV1beta2::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TaskqueueV1beta2::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_task(project, taskqueue, task, task_object = nil, new_lease_seconds: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}/tasks/{task}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::TaskqueueV1beta2::Task::Representation - command.request_object = task_object - command.response_representation = Google::Apis::TaskqueueV1beta2::Task::Representation - command.response_class = Google::Apis::TaskqueueV1beta2::Task - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.nil? - command.params['task'] = task unless task.nil? - command.query['newLeaseSeconds'] = new_lease_seconds unless new_lease_seconds.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 tasks that are leased out of a TaskQueue. - # @param [String] project - # The project under which the queue lies. - # @param [String] taskqueue - # @param [String] task - # @param [Google::Apis::TaskqueueV1beta2::Task] task_object - # @param [Fixnum] new_lease_seconds - # The new lease in seconds. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TaskqueueV1beta2::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TaskqueueV1beta2::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_task(project, taskqueue, task, task_object = nil, new_lease_seconds: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = '{project}/taskqueues/{taskqueue}/tasks/{task}' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TaskqueueV1beta2::Task::Representation - command.request_object = task_object - command.response_representation = Google::Apis::TaskqueueV1beta2::Task::Representation - command.response_class = Google::Apis::TaskqueueV1beta2::Task - command.params['project'] = project unless project.nil? - command.params['taskqueue'] = taskqueue unless taskqueue.nil? - command.params['task'] = task unless task.nil? - command.query['newLeaseSeconds'] = new_lease_seconds unless new_lease_seconds.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 diff --git a/generated/google/apis/tasks_v1.rb b/generated/google/apis/tasks_v1.rb deleted file mode 100644 index 0e3f1127b..000000000 --- a/generated/google/apis/tasks_v1.rb +++ /dev/null @@ -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/tasks_v1/service.rb' -require 'google/apis/tasks_v1/classes.rb' -require 'google/apis/tasks_v1/representations.rb' - -module Google - module Apis - # Tasks API - # - # Lets you manage your tasks and task lists. - # - # @see https://developers.google.com/google-apps/tasks/firstapp - module TasksV1 - VERSION = 'V1' - REVISION = '20141121' - - # Manage your tasks - AUTH_TASKS = 'https://www.googleapis.com/auth/tasks' - - # View your tasks - AUTH_TASKS_READONLY = 'https://www.googleapis.com/auth/tasks.readonly' - end - end -end diff --git a/generated/google/apis/tasks_v1/classes.rb b/generated/google/apis/tasks_v1/classes.rb deleted file mode 100644 index 35583ad1d..000000000 --- a/generated/google/apis/tasks_v1/classes.rb +++ /dev/null @@ -1,296 +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 TasksV1 - - # - class Task - include Google::Apis::Core::Hashable - - # Completion date of the task (as a RFC 3339 timestamp). This field is omitted - # if the task has not been completed. - # Corresponds to the JSON property `completed` - # @return [DateTime] - attr_accessor :completed - - # Flag indicating whether the task has been deleted. The default if False. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # Due date of the task (as a RFC 3339 timestamp). Optional. - # Corresponds to the JSON property `due` - # @return [DateTime] - attr_accessor :due - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Flag indicating whether the task is hidden. This is the case if the task had - # been marked completed when the task list was last cleared. The default is - # False. This field is read-only. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # Task identifier. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. This is always "tasks#task". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Collection of links. This collection is read-only. - # Corresponds to the JSON property `links` - # @return [Array] - attr_accessor :links - - # Notes describing the task. Optional. - # Corresponds to the JSON property `notes` - # @return [String] - attr_accessor :notes - - # Parent task identifier. This field is omitted if it is a top-level task. This - # field is read-only. Use the "move" method to move the task under a different - # parent or to the top level. - # Corresponds to the JSON property `parent` - # @return [String] - attr_accessor :parent - - # String indicating the position of the task among its sibling tasks under the - # same parent task or at the top level. If this string is greater than another - # task's corresponding position string according to lexicographical ordering, - # the task is positioned after the other task under the same parent task (or at - # the top level). This field is read-only. Use the "move" method to move the - # task to another position. - # Corresponds to the JSON property `position` - # @return [String] - attr_accessor :position - - # URL pointing to this task. Used to retrieve, update, or delete this task. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Status of the task. This is either "needsAction" or "completed". - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Title of the task. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Last modification time of the task (as a RFC 3339 timestamp). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @completed = args[:completed] unless args[:completed].nil? - @deleted = args[:deleted] unless args[:deleted].nil? - @due = args[:due] unless args[:due].nil? - @etag = args[:etag] unless args[:etag].nil? - @hidden = args[:hidden] unless args[:hidden].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @links = args[:links] unless args[:links].nil? - @notes = args[:notes] unless args[:notes].nil? - @parent = args[:parent] unless args[:parent].nil? - @position = args[:position] unless args[:position].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @status = args[:status] unless args[:status].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - - # - class Link - include Google::Apis::Core::Hashable - - # The description. In HTML speak: Everything between and . - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The URL. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - - # Type of the link, e.g. "email". - # 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) - @description = args[:description] unless args[:description].nil? - @link = args[:link] unless args[:link].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - - # - class TaskList - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Task list identifier. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Type of the resource. This is always "tasks#taskList". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # URL pointing to this task list. Used to retrieve, update, or delete this task - # list. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Title of the task list. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Last modification time of the task list (as a RFC 3339 timestamp). - # Corresponds to the JSON property `updated` - # @return [DateTime] - attr_accessor :updated - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @self_link = args[:self_link] unless args[:self_link].nil? - @title = args[:title] unless args[:title].nil? - @updated = args[:updated] unless args[:updated].nil? - end - end - - # - class TaskLists - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Collection of task lists. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of the resource. This is always "tasks#taskLists". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token that can be used to request the next page of this result. - # 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 Tasks - include Google::Apis::Core::Hashable - - # ETag of the resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Collection of tasks. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Type of the resource. This is always "tasks#tasks". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Token used to access the next page of this result. - # 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 diff --git a/generated/google/apis/tasks_v1/representations.rb b/generated/google/apis/tasks_v1/representations.rb deleted file mode 100644 index 171a908fd..000000000 --- a/generated/google/apis/tasks_v1/representations.rb +++ /dev/null @@ -1,115 +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 TasksV1 - - class Task - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Link - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class TaskList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TaskLists - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Tasks - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class Task - class Representation < Google::Apis::Core::JsonRepresentation - property :completed, as: 'completed', type: DateTime - - property :deleted, as: 'deleted' - property :due, as: 'due', type: DateTime - - property :etag, as: 'etag' - property :hidden, as: 'hidden' - property :id, as: 'id' - property :kind, as: 'kind' - collection :links, as: 'links', class: Google::Apis::TasksV1::Task::Link, decorator: Google::Apis::TasksV1::Task::Link::Representation - - property :notes, as: 'notes' - property :parent, as: 'parent' - property :position, as: 'position' - property :self_link, as: 'selfLink' - property :status, as: 'status' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - - # @private - class Link - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :link, as: 'link' - property :type, as: 'type' - end - end - end - - # @private - class TaskList - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - property :title, as: 'title' - property :updated, as: 'updated', type: DateTime - - end - end - - # @private - class TaskLists - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::TasksV1::TaskList, decorator: Google::Apis::TasksV1::TaskList::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - # @private - class Tasks - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::TasksV1::Task, decorator: Google::Apis::TasksV1::Task::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - end - end -end diff --git a/generated/google/apis/tasks_v1/service.rb b/generated/google/apis/tasks_v1/service.rb deleted file mode 100644 index 9d50cb604..000000000 --- a/generated/google/apis/tasks_v1/service.rb +++ /dev/null @@ -1,657 +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 TasksV1 - # Tasks API - # - # Lets you manage your tasks and task lists. - # - # @example - # require 'google/apis/tasks_v1' - # - # Tasks = Google::Apis::TasksV1 # Alias the module - # service = Tasks::TasksService.new - # - # @see https://developers.google.com/google-apps/tasks/firstapp - class TasksService < 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/', 'tasks/v1/') - end - - # Deletes the authenticated user's specified task list. - # @param [String] tasklist - # Task list identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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_tasklist(tasklist, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/@me/lists/{tasklist}' - command = make_simple_command(:delete, path, options) - command.params['tasklist'] = tasklist unless tasklist.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 authenticated user's specified task list. - # @param [String] tasklist - # Task list identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::TasksV1::TaskList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::TaskList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasklist(tasklist, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/@me/lists/{tasklist}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TasksV1::TaskList::Representation - command.response_class = Google::Apis::TasksV1::TaskList - command.params['tasklist'] = tasklist unless tasklist.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 new task list and adds it to the authenticated user's task lists. - # @param [Google::Apis::TasksV1::TaskList] task_list_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::TasksV1::TaskList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::TaskList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasklist(task_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/@me/lists' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TasksV1::TaskList::Representation - command.request_object = task_list_object - command.response_representation = Google::Apis::TasksV1::TaskList::Representation - command.response_class = Google::Apis::TasksV1::TaskList - 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 all the authenticated user's task lists. - # @param [String] max_results - # Maximum number of task lists returned on one page. Optional. The default is - # 100. - # @param [String] page_token - # Token specifying the result page to return. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::TasksV1::TaskLists] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::TaskLists] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasklists(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/@me/lists' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TasksV1::TaskLists::Representation - command.response_class = Google::Apis::TasksV1::TaskLists - 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 - - # Updates the authenticated user's specified task list. This method supports - # patch semantics. - # @param [String] tasklist - # Task list identifier. - # @param [Google::Apis::TasksV1::TaskList] task_list_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::TasksV1::TaskList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::TaskList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasklist(tasklist, task_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/@me/lists/{tasklist}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::TasksV1::TaskList::Representation - command.request_object = task_list_object - command.response_representation = Google::Apis::TasksV1::TaskList::Representation - command.response_class = Google::Apis::TasksV1::TaskList - command.params['tasklist'] = tasklist unless tasklist.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 authenticated user's specified task list. - # @param [String] tasklist - # Task list identifier. - # @param [Google::Apis::TasksV1::TaskList] task_list_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::TasksV1::TaskList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::TaskList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasklist(tasklist, task_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'users/@me/lists/{tasklist}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TasksV1::TaskList::Representation - command.request_object = task_list_object - command.response_representation = Google::Apis::TasksV1::TaskList::Representation - command.response_class = Google::Apis::TasksV1::TaskList - command.params['tasklist'] = tasklist unless tasklist.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 - - # Clears all completed tasks from the specified task list. The affected tasks - # will be marked as 'hidden' and no longer be returned by default when - # retrieving all tasks for a task list. - # @param [String] tasklist - # Task list identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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 clear_task(tasklist, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/clear' - command = make_simple_command(:post, path, options) - command.params['tasklist'] = tasklist unless tasklist.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 task from the task list. - # @param [String] tasklist - # Task list identifier. - # @param [String] task - # Task identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [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_task(tasklist, task, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/tasks/{task}' - command = make_simple_command(:delete, path, options) - command.params['tasklist'] = tasklist unless tasklist.nil? - command.params['task'] = task unless task.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns the specified task. - # @param [String] tasklist - # Task list identifier. - # @param [String] task - # Task identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::TasksV1::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_task(tasklist, task, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/tasks/{task}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TasksV1::Task::Representation - command.response_class = Google::Apis::TasksV1::Task - command.params['tasklist'] = tasklist unless tasklist.nil? - command.params['task'] = task unless task.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 new task on the specified task list. - # @param [String] tasklist - # Task list identifier. - # @param [Google::Apis::TasksV1::Task] task_object - # @param [String] parent - # Parent task identifier. If the task is created at the top level, this - # parameter is omitted. Optional. - # @param [String] previous - # Previous sibling task identifier. If the task is created at the first position - # among its siblings, this parameter is omitted. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::TasksV1::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_task(tasklist, task_object = nil, parent: nil, previous: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/tasks' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::TasksV1::Task::Representation - command.request_object = task_object - command.response_representation = Google::Apis::TasksV1::Task::Representation - command.response_class = Google::Apis::TasksV1::Task - command.params['tasklist'] = tasklist unless tasklist.nil? - command.query['parent'] = parent unless parent.nil? - command.query['previous'] = previous unless previous.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 all tasks in the specified task list. - # @param [String] tasklist - # Task list identifier. - # @param [String] completed_max - # Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter - # by. Optional. The default is not to filter by completion date. - # @param [String] completed_min - # Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter - # by. Optional. The default is not to filter by completion date. - # @param [String] due_max - # Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. - # Optional. The default is not to filter by due date. - # @param [String] due_min - # Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. - # Optional. The default is not to filter by due date. - # @param [String] max_results - # Maximum number of task lists returned on one page. Optional. The default is - # 100. - # @param [String] page_token - # Token specifying the result page to return. Optional. - # @param [Boolean] show_completed - # Flag indicating whether completed tasks are returned in the result. Optional. - # The default is True. - # @param [Boolean] show_deleted - # Flag indicating whether deleted tasks are returned in the result. Optional. - # The default is False. - # @param [Boolean] show_hidden - # Flag indicating whether hidden tasks are returned in the result. Optional. The - # default is False. - # @param [String] updated_min - # Lower bound for a task's last modification time (as a RFC 3339 timestamp) to - # filter by. Optional. The default is not to filter by last modification 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::TasksV1::Tasks] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::Tasks] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_tasks(tasklist, completed_max: nil, completed_min: nil, due_max: nil, due_min: nil, max_results: nil, page_token: nil, show_completed: nil, show_deleted: nil, show_hidden: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/tasks' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TasksV1::Tasks::Representation - command.response_class = Google::Apis::TasksV1::Tasks - command.params['tasklist'] = tasklist unless tasklist.nil? - command.query['completedMax'] = completed_max unless completed_max.nil? - command.query['completedMin'] = completed_min unless completed_min.nil? - command.query['dueMax'] = due_max unless due_max.nil? - command.query['dueMin'] = due_min unless due_min.nil? - command.query['maxResults'] = max_results unless max_results.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['showCompleted'] = show_completed unless show_completed.nil? - command.query['showDeleted'] = show_deleted unless show_deleted.nil? - command.query['showHidden'] = show_hidden unless show_hidden.nil? - command.query['updatedMin'] = updated_min unless updated_min.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 - - # Moves the specified task to another position in the task list. This can - # include putting it as a child task under a new parent and/or move it to a - # different position among its sibling tasks. - # @param [String] tasklist - # Task list identifier. - # @param [String] task - # Task identifier. - # @param [String] parent - # New parent task identifier. If the task is moved to the top level, this - # parameter is omitted. Optional. - # @param [String] previous - # New previous sibling task identifier. If the task is moved to the first - # position among its siblings, this parameter is omitted. Optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::TasksV1::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def move_task(tasklist, task, parent: nil, previous: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/tasks/{task}/move' - command = make_simple_command(:post, path, options) - command.response_representation = Google::Apis::TasksV1::Task::Representation - command.response_class = Google::Apis::TasksV1::Task - command.params['tasklist'] = tasklist unless tasklist.nil? - command.params['task'] = task unless task.nil? - command.query['parent'] = parent unless parent.nil? - command.query['previous'] = previous unless previous.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the specified task. This method supports patch semantics. - # @param [String] tasklist - # Task list identifier. - # @param [String] task - # Task identifier. - # @param [Google::Apis::TasksV1::Task] task_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::TasksV1::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_task(tasklist, task, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/tasks/{task}' - command = make_simple_command(:patch, path, options) - command.request_representation = Google::Apis::TasksV1::Task::Representation - command.request_object = task_object - command.response_representation = Google::Apis::TasksV1::Task::Representation - command.response_class = Google::Apis::TasksV1::Task - command.params['tasklist'] = tasklist unless tasklist.nil? - command.params['task'] = task unless task.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates the specified task. - # @param [String] tasklist - # Task list identifier. - # @param [String] task - # Task identifier. - # @param [Google::Apis::TasksV1::Task] task_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::TasksV1::Task] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TasksV1::Task] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_task(tasklist, task, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'lists/{tasklist}/tasks/{task}' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::TasksV1::Task::Representation - command.request_object = task_object - command.response_representation = Google::Apis::TasksV1::Task::Representation - command.response_class = Google::Apis::TasksV1::Task - command.params['tasklist'] = tasklist unless tasklist.nil? - command.params['task'] = task unless task.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 diff --git a/generated/google/apis/translate_v2.rb b/generated/google/apis/translate_v2.rb deleted file mode 100644 index 8b4bb5ea5..000000000 --- a/generated/google/apis/translate_v2.rb +++ /dev/null @@ -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/translate_v2/service.rb' -require 'google/apis/translate_v2/classes.rb' -require 'google/apis/translate_v2/representations.rb' - -module Google - module Apis - # Translate API - # - # Lets you translate text from one language to another - # - # @see https://developers.google.com/translate/v2/using_rest - module TranslateV2 - VERSION = 'V2' - REVISION = '20141123' - end - end -end diff --git a/generated/google/apis/translate_v2/classes.rb b/generated/google/apis/translate_v2/classes.rb deleted file mode 100644 index dc7384cfa..000000000 --- a/generated/google/apis/translate_v2/classes.rb +++ /dev/null @@ -1,168 +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 TranslateV2 - - # - class ListDetectionsResponse - include Google::Apis::Core::Hashable - - # A detections contains detection results of several text - # Corresponds to the JSON property `detections` - # @return [Array>] - attr_accessor :detections - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @detections = args[:detections] unless args[:detections].nil? - end - end - - # - class DetectionsResource - include Google::Apis::Core::Hashable - - # The confidence of the detection resul of this language. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # A boolean to indicate is the language detection result reliable. - # Corresponds to the JSON property `isReliable` - # @return [Boolean] - attr_accessor :is_reliable - alias_method :is_reliable?, :is_reliable - - # The language we detect - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @confidence = args[:confidence] unless args[:confidence].nil? - @is_reliable = args[:is_reliable] unless args[:is_reliable].nil? - @language = args[:language] unless args[:language].nil? - end - end - - # - class ListLanguagesResponse - include Google::Apis::Core::Hashable - - # List of source/target languages supported by the translation API. If target - # parameter is unspecified, the list is sorted by the ASCII code point order of - # the language code. If target parameter is specified, the list is sorted by the - # collation order of the language name in the target language. - # Corresponds to the JSON property `languages` - # @return [Array] - attr_accessor :languages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @languages = args[:languages] unless args[:languages].nil? - end - end - - # - class LanguagesResource - include Google::Apis::Core::Hashable - - # The language code. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # The localized name of the language if target parameter is given. - # 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) - @language = args[:language] unless args[:language].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # - class ListTranslationsResponse - include Google::Apis::Core::Hashable - - # Translations contains list of translation results of given text - # Corresponds to the JSON property `translations` - # @return [Array] - attr_accessor :translations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @translations = args[:translations] unless args[:translations].nil? - end - end - - # - class TranslationsResource - include Google::Apis::Core::Hashable - - # Detected source language if source parameter is unspecified. - # Corresponds to the JSON property `detectedSourceLanguage` - # @return [String] - attr_accessor :detected_source_language - - # The translation. - # Corresponds to the JSON property `translatedText` - # @return [String] - attr_accessor :translated_text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @detected_source_language = args[:detected_source_language] unless args[:detected_source_language].nil? - @translated_text = args[:translated_text] unless args[:translated_text].nil? - end - end - end - end -end diff --git a/generated/google/apis/translate_v2/representations.rb b/generated/google/apis/translate_v2/representations.rb deleted file mode 100644 index 24ed11588..000000000 --- a/generated/google/apis/translate_v2/representations.rb +++ /dev/null @@ -1,109 +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 TranslateV2 - - class ListDetectionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class DetectionsResource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListLanguagesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class LanguagesResource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListTranslationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TranslationsResource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class ListDetectionsResponse - class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::ListDetectionsResponse } - collection :detections, as: 'detections', :class => Array do - include Representable::JSON::Collection - items class: Google::Apis::TranslateV2::DetectionsResource, decorator: Google::Apis::TranslateV2::DetectionsResource::Representation - - end - - end - end - - # @private - class DetectionsResource - class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::DetectionsResource } - property :confidence, as: 'confidence' - property :is_reliable, as: 'isReliable' - property :language, as: 'language' - end - end - - # @private - class ListLanguagesResponse - class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::ListLanguagesResponse } - collection :languages, as: 'languages', class: Google::Apis::TranslateV2::LanguagesResource, decorator: Google::Apis::TranslateV2::LanguagesResource::Representation - - end - end - - # @private - class LanguagesResource - class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::LanguagesResource } - property :language, as: 'language' - property :name, as: 'name' - end - end - - # @private - class ListTranslationsResponse - class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::ListTranslationsResponse } - collection :translations, as: 'translations', class: Google::Apis::TranslateV2::TranslationsResource, decorator: Google::Apis::TranslateV2::TranslationsResource::Representation - - end - end - - # @private - class TranslationsResource - class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::TranslationsResource } - property :detected_source_language, as: 'detectedSourceLanguage' - property :translated_text, as: 'translatedText' - end - end - end - end -end diff --git a/generated/google/apis/translate_v2/service.rb b/generated/google/apis/translate_v2/service.rb deleted file mode 100644 index c411fc7c8..000000000 --- a/generated/google/apis/translate_v2/service.rb +++ /dev/null @@ -1,185 +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 TranslateV2 - # Translate API - # - # Lets you translate text from one language to another - # - # @example - # require 'google/apis/translate_v2' - # - # Translate = Google::Apis::TranslateV2 # Alias the module - # service = Translate::TranslateService.new - # - # @see https://developers.google.com/translate/v2/using_rest - class TranslateService < 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/', 'language/translate/') - end - - # Detect the language of text. - # @param [Array, String] q - # The text to detect - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TranslateV2::ListDetectionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TranslateV2::ListDetectionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_detections(q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'v2/detect' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TranslateV2::ListDetectionsResponse::Representation - command.response_class = Google::Apis::TranslateV2::ListDetectionsResponse - command.query['q'] = q unless q.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 source/target languages supported by the API - # @param [String] target - # the language and collation in which the localized results should be returned - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # 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::TranslateV2::ListLanguagesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TranslateV2::ListLanguagesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_languages(target: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'v2/languages' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TranslateV2::ListLanguagesResponse::Representation - command.response_class = Google::Apis::TranslateV2::ListLanguagesResponse - command.query['target'] = target unless target.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 text translations from one language to another. - # @param [Array, String] cid - # The customization id for translate - # @param [String] format - # The format of the text - # @param [Array, String] q - # The text to translate - # @param [String] source - # The source language of the text - # @param [String] target - # The target language into which the text should be translated - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::TranslateV2::ListTranslationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TranslateV2::ListTranslationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_translations(cid: nil, format: nil, q: nil, source: nil, target: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'v2' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::TranslateV2::ListTranslationsResponse::Representation - command.response_class = Google::Apis::TranslateV2::ListTranslationsResponse - command.query['cid'] = cid unless cid.nil? - command.query['format'] = format unless format.nil? - command.query['q'] = q unless q.nil? - command.query['source'] = source unless source.nil? - command.query['target'] = target unless target.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 diff --git a/generated/google/apis/urlshortener_v1.rb b/generated/google/apis/urlshortener_v1.rb deleted file mode 100644 index c1e3f1fc8..000000000 --- a/generated/google/apis/urlshortener_v1.rb +++ /dev/null @@ -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/urlshortener_v1/service.rb' -require 'google/apis/urlshortener_v1/classes.rb' -require 'google/apis/urlshortener_v1/representations.rb' - -module Google - module Apis - # URL Shortener API - # - # Lets you create, inspect, and manage goo.gl short URLs - # - # @see https://developers.google.com/url-shortener/v1/getting_started - module UrlshortenerV1 - VERSION = 'V1' - REVISION = '20150519' - - # Manage your goo.gl short URLs - AUTH_URLSHORTENER = 'https://www.googleapis.com/auth/urlshortener' - end - end -end diff --git a/generated/google/apis/urlshortener_v1/classes.rb b/generated/google/apis/urlshortener_v1/classes.rb deleted file mode 100644 index a48ed2857..000000000 --- a/generated/google/apis/urlshortener_v1/classes.rb +++ /dev/null @@ -1,246 +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 UrlshortenerV1 - - # - class AnalyticsSnapshot - include Google::Apis::Core::Hashable - - # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present - # if this data is available. - # Corresponds to the JSON property `browsers` - # @return [Array] - attr_accessor :browsers - - # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by ( - # descending) click counts. Only present if this data is available. - # Corresponds to the JSON property `countries` - # @return [Array] - attr_accessor :countries - - # Number of clicks on all goo.gl short URLs pointing to this long URL. - # Corresponds to the JSON property `longUrlClicks` - # @return [String] - attr_accessor :long_url_clicks - - # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. - # Only present if this data is available. - # Corresponds to the JSON property `platforms` - # @return [Array] - attr_accessor :platforms - - # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click - # counts. Only present if this data is available. - # Corresponds to the JSON property `referrers` - # @return [Array] - attr_accessor :referrers - - # Number of clicks on this short URL. - # Corresponds to the JSON property `shortUrlClicks` - # @return [String] - attr_accessor :short_url_clicks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @browsers = args[:browsers] unless args[:browsers].nil? - @countries = args[:countries] unless args[:countries].nil? - @long_url_clicks = args[:long_url_clicks] unless args[:long_url_clicks].nil? - @platforms = args[:platforms] unless args[:platforms].nil? - @referrers = args[:referrers] unless args[:referrers].nil? - @short_url_clicks = args[:short_url_clicks] unless args[:short_url_clicks].nil? - end - end - - # - class AnalyticsSummary - include Google::Apis::Core::Hashable - - # Click analytics over all time. - # Corresponds to the JSON property `allTime` - # @return [Google::Apis::UrlshortenerV1::AnalyticsSnapshot] - attr_accessor :all_time - - # Click analytics over the last day. - # Corresponds to the JSON property `day` - # @return [Google::Apis::UrlshortenerV1::AnalyticsSnapshot] - attr_accessor :day - - # Click analytics over the last month. - # Corresponds to the JSON property `month` - # @return [Google::Apis::UrlshortenerV1::AnalyticsSnapshot] - attr_accessor :month - - # Click analytics over the last two hours. - # Corresponds to the JSON property `twoHours` - # @return [Google::Apis::UrlshortenerV1::AnalyticsSnapshot] - attr_accessor :two_hours - - # Click analytics over the last week. - # Corresponds to the JSON property `week` - # @return [Google::Apis::UrlshortenerV1::AnalyticsSnapshot] - attr_accessor :week - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @all_time = args[:all_time] unless args[:all_time].nil? - @day = args[:day] unless args[:day].nil? - @month = args[:month] unless args[:month].nil? - @two_hours = args[:two_hours] unless args[:two_hours].nil? - @week = args[:week] unless args[:week].nil? - end - end - - # - class StringCount - include Google::Apis::Core::Hashable - - # Number of clicks for this top entry, e.g. for this particular country or - # browser. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # Label assigned to this top entry, e.g. "US" or "Chrome". - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @id = args[:id] unless args[:id].nil? - end - end - - # - class Url - include Google::Apis::Core::Hashable - - # A summary of the click analytics for the short and long URL. Might not be - # present if not requested or currently unavailable. - # Corresponds to the JSON property `analytics` - # @return [Google::Apis::UrlshortenerV1::AnalyticsSummary] - attr_accessor :analytics - - # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T' - # HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00". - # Corresponds to the JSON property `created` - # @return [String] - attr_accessor :created - - # Short URL, e.g. "http://goo.gl/l6MS". - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The fixed string "urlshortener#url". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Long URL, e.g. "http://www.google.com/". Might not be present if the status is - # "REMOVED". - # Corresponds to the JSON property `longUrl` - # @return [String] - attr_accessor :long_url - - # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or " - # REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for - # example. - # 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) - @analytics = args[:analytics] unless args[:analytics].nil? - @created = args[:created] unless args[:created].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @long_url = args[:long_url] unless args[:long_url].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class UrlHistory - include Google::Apis::Core::Hashable - - # A list of URL resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Number of items returned with each full "page" of results. Note that the last - # page could have fewer items than the "itemsPerPage" value. - # Corresponds to the JSON property `itemsPerPage` - # @return [Fixnum] - attr_accessor :items_per_page - - # The fixed string "urlshortener#urlHistory". - # 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 - - # Total number of short URLs associated with this user (may be approximate). - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] unless args[:items].nil? - @items_per_page = args[:items_per_page] unless args[:items_per_page].nil? - @kind = args[:kind] unless args[:kind].nil? - @next_page_token = args[:next_page_token] unless args[:next_page_token].nil? - @total_items = args[:total_items] unless args[:total_items].nil? - end - end - end - end -end diff --git a/generated/google/apis/urlshortener_v1/representations.rb b/generated/google/apis/urlshortener_v1/representations.rb deleted file mode 100644 index bfc852cc0..000000000 --- a/generated/google/apis/urlshortener_v1/representations.rb +++ /dev/null @@ -1,111 +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 UrlshortenerV1 - - class AnalyticsSnapshot - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class AnalyticsSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class StringCount - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Url - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlHistory - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class AnalyticsSnapshot - class Representation < Google::Apis::Core::JsonRepresentation - collection :browsers, as: 'browsers', class: Google::Apis::UrlshortenerV1::StringCount, decorator: Google::Apis::UrlshortenerV1::StringCount::Representation - - collection :countries, as: 'countries', class: Google::Apis::UrlshortenerV1::StringCount, decorator: Google::Apis::UrlshortenerV1::StringCount::Representation - - property :long_url_clicks, as: 'longUrlClicks' - collection :platforms, as: 'platforms', class: Google::Apis::UrlshortenerV1::StringCount, decorator: Google::Apis::UrlshortenerV1::StringCount::Representation - - collection :referrers, as: 'referrers', class: Google::Apis::UrlshortenerV1::StringCount, decorator: Google::Apis::UrlshortenerV1::StringCount::Representation - - property :short_url_clicks, as: 'shortUrlClicks' - end - end - - # @private - class AnalyticsSummary - class Representation < Google::Apis::Core::JsonRepresentation - property :all_time, as: 'allTime', class: Google::Apis::UrlshortenerV1::AnalyticsSnapshot, decorator: Google::Apis::UrlshortenerV1::AnalyticsSnapshot::Representation - - property :day, as: 'day', class: Google::Apis::UrlshortenerV1::AnalyticsSnapshot, decorator: Google::Apis::UrlshortenerV1::AnalyticsSnapshot::Representation - - property :month, as: 'month', class: Google::Apis::UrlshortenerV1::AnalyticsSnapshot, decorator: Google::Apis::UrlshortenerV1::AnalyticsSnapshot::Representation - - property :two_hours, as: 'twoHours', class: Google::Apis::UrlshortenerV1::AnalyticsSnapshot, decorator: Google::Apis::UrlshortenerV1::AnalyticsSnapshot::Representation - - property :week, as: 'week', class: Google::Apis::UrlshortenerV1::AnalyticsSnapshot, decorator: Google::Apis::UrlshortenerV1::AnalyticsSnapshot::Representation - - end - end - - # @private - class StringCount - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :id, as: 'id' - end - end - - # @private - class Url - class Representation < Google::Apis::Core::JsonRepresentation - property :analytics, as: 'analytics', class: Google::Apis::UrlshortenerV1::AnalyticsSummary, decorator: Google::Apis::UrlshortenerV1::AnalyticsSummary::Representation - - property :created, as: 'created' - property :id, as: 'id' - property :kind, as: 'kind' - property :long_url, as: 'longUrl' - property :status, as: 'status' - end - end - - # @private - class UrlHistory - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::UrlshortenerV1::Url, decorator: Google::Apis::UrlshortenerV1::Url::Representation - - property :items_per_page, as: 'itemsPerPage' - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - property :total_items, as: 'totalItems' - end - end - end - end -end diff --git a/generated/google/apis/urlshortener_v1/service.rb b/generated/google/apis/urlshortener_v1/service.rb deleted file mode 100644 index 68b593069..000000000 --- a/generated/google/apis/urlshortener_v1/service.rb +++ /dev/null @@ -1,179 +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 UrlshortenerV1 - # URL Shortener API - # - # Lets you create, inspect, and manage goo.gl short URLs - # - # @example - # require 'google/apis/urlshortener_v1' - # - # Urlshortener = Google::Apis::UrlshortenerV1 # Alias the module - # service = Urlshortener::UrlshortenerService.new - # - # @see https://developers.google.com/url-shortener/v1/getting_started - class UrlshortenerService < 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/', 'urlshortener/v1/') - end - - # Expands a short URL or gets creation time and analytics. - # @param [String] projection - # Additional information to return. - # @param [String] short_url - # The short URL, including the protocol. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::UrlshortenerV1::Url] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::UrlshortenerV1::Url] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_url(projection: nil, short_url: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'url' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::UrlshortenerV1::Url::Representation - command.response_class = Google::Apis::UrlshortenerV1::Url - command.query['projection'] = projection unless projection.nil? - command.query['shortUrl'] = short_url unless short_url.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 new short URL. - # @param [Google::Apis::UrlshortenerV1::Url] url_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::UrlshortenerV1::Url] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::UrlshortenerV1::Url] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_url(url_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'url' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::UrlshortenerV1::Url::Representation - command.request_object = url_object - command.response_representation = Google::Apis::UrlshortenerV1::Url::Representation - command.response_class = Google::Apis::UrlshortenerV1::Url - 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 URLs shortened by a user. - # @param [String] projection - # Additional information to return. - # @param [String] start_token - # Token for requesting successive pages of results. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - # @param [String] user_ip - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::UrlshortenerV1::UrlHistory] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::UrlshortenerV1::UrlHistory] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_urls(projection: nil, start_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'url/history' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::UrlshortenerV1::UrlHistory::Representation - command.response_class = Google::Apis::UrlshortenerV1::UrlHistory - command.query['projection'] = projection unless projection.nil? - command.query['start-token'] = start_token unless start_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 diff --git a/generated/google/apis/webmasters_v3.rb b/generated/google/apis/webmasters_v3.rb deleted file mode 100644 index 4d5ba105f..000000000 --- a/generated/google/apis/webmasters_v3.rb +++ /dev/null @@ -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/webmasters_v3/service.rb' -require 'google/apis/webmasters_v3/classes.rb' -require 'google/apis/webmasters_v3/representations.rb' - -module Google - module Apis - # Webmaster Tools API - # - # Lets you view Google Webmaster Tools data for your verified sites. - # - # @see https://developers.google.com/webmaster-tools/v3/welcome - module WebmastersV3 - VERSION = 'V3' - REVISION = '20140908' - - # View and modify Webmaster Tools data for your verified sites - AUTH_WEBMASTERS = 'https://www.googleapis.com/auth/webmasters' - - # View Webmaster Tools data for your verified sites - AUTH_WEBMASTERS_READONLY = 'https://www.googleapis.com/auth/webmasters.readonly' - end - end -end diff --git a/generated/google/apis/webmasters_v3/classes.rb b/generated/google/apis/webmasters_v3/classes.rb deleted file mode 100644 index cdb4f96e7..000000000 --- a/generated/google/apis/webmasters_v3/classes.rb +++ /dev/null @@ -1,357 +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 WebmastersV3 - - # List of sitemaps. - class ListSitemapsResponse - include Google::Apis::Core::Hashable - - # Information about a sitemap entry. - # Corresponds to the JSON property `sitemap` - # @return [Array] - attr_accessor :sitemap - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sitemap = args[:sitemap] unless args[:sitemap].nil? - end - end - - # List of sites with access level information. - class ListSitesResponse - include Google::Apis::Core::Hashable - - # Access level information for a Webmaster Tools site. - # Corresponds to the JSON property `siteEntry` - # @return [Array] - attr_accessor :site_entry - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @site_entry = args[:site_entry] unless args[:site_entry].nil? - end - end - - # An entry in a URL crawl errors time series. - class UrlCrawlErrorCount - include Google::Apis::Core::Hashable - - # The error count at the given timestamp. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # The time (well, date) when errors were detected, in RFC 3339 format. - # Corresponds to the JSON property `timestamp` - # @return [DateTime] - attr_accessor :timestamp - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count = args[:count] unless args[:count].nil? - @timestamp = args[:timestamp] unless args[:timestamp].nil? - end - end - - # Number of errors per day for a specific error type (defined by platform and - # category). - class UrlCrawlErrorCountsPerType - include Google::Apis::Core::Hashable - - # The crawl error type. - # Corresponds to the JSON property `category` - # @return [String] - attr_accessor :category - - # The error count entries time series. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Corresponding to the user agent that made the request. - # Corresponds to the JSON property `platform` - # @return [String] - attr_accessor :platform - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @category = args[:category] unless args[:category].nil? - @entries = args[:entries] unless args[:entries].nil? - @platform = args[:platform] unless args[:platform].nil? - end - end - - # A time series of the number of URL crawl errors per error category and - # platform. - class QueryUrlCrawlErrorsCountsResponse - include Google::Apis::Core::Hashable - - # The time series of the number of URL crawl errors for per error category and - # platform. - # Corresponds to the JSON property `countPerTypes` - # @return [Array] - attr_accessor :count_per_types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @count_per_types = args[:count_per_types] unless args[:count_per_types].nil? - end - end - - # - class UrlCrawlErrorsSample - include Google::Apis::Core::Hashable - - # The time the error was first detected, in RFC 3339 format. - # Corresponds to the JSON property `first_detected` - # @return [DateTime] - attr_accessor :first_detected - - # The time when the URL was last crawled, in RFC 3339 format. - # Corresponds to the JSON property `last_crawled` - # @return [DateTime] - attr_accessor :last_crawled - - # The URL of an error, relative to the site. - # Corresponds to the JSON property `pageUrl` - # @return [String] - attr_accessor :page_url - - # The HTTP response code, if any. - # Corresponds to the JSON property `responseCode` - # @return [Fixnum] - attr_accessor :response_code - - # Additional details about the URL, set only when calling get(). - # Corresponds to the JSON property `urlDetails` - # @return [Google::Apis::WebmastersV3::UrlSampleDetails] - attr_accessor :url_details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @first_detected = args[:first_detected] unless args[:first_detected].nil? - @last_crawled = args[:last_crawled] unless args[:last_crawled].nil? - @page_url = args[:page_url] unless args[:page_url].nil? - @response_code = args[:response_code] unless args[:response_code].nil? - @url_details = args[:url_details] unless args[:url_details].nil? - end - end - - # List of crawl error samples. - class ListUrlCrawlErrorsSamplesResponse - include Google::Apis::Core::Hashable - - # Information about the sample URL and its crawl error. - # Corresponds to the JSON property `urlCrawlErrorSample` - # @return [Array] - attr_accessor :url_crawl_error_sample - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @url_crawl_error_sample = args[:url_crawl_error_sample] unless args[:url_crawl_error_sample].nil? - end - end - - # Additional details about the URL, set only when calling get(). - class UrlSampleDetails - include Google::Apis::Core::Hashable - - # List of sitemaps pointing at this URL. - # Corresponds to the JSON property `containingSitemaps` - # @return [Array] - attr_accessor :containing_sitemaps - - # A sample set of URLs linking to this URL. - # Corresponds to the JSON property `linkedFromUrls` - # @return [Array] - attr_accessor :linked_from_urls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @containing_sitemaps = args[:containing_sitemaps] unless args[:containing_sitemaps].nil? - @linked_from_urls = args[:linked_from_urls] unless args[:linked_from_urls].nil? - end - end - - # Access level information for a Webmaster Tools site. - class WmxSite - include Google::Apis::Core::Hashable - - # The user's permission level for the site. - # Corresponds to the JSON property `permissionLevel` - # @return [String] - attr_accessor :permission_level - - # The URL of the site. - # Corresponds to the JSON property `siteUrl` - # @return [String] - attr_accessor :site_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permission_level = args[:permission_level] unless args[:permission_level].nil? - @site_url = args[:site_url] unless args[:site_url].nil? - end - end - - # - class WmxSitemap - include Google::Apis::Core::Hashable - - # The various content types in the sitemap. - # Corresponds to the JSON property `contents` - # @return [Array] - attr_accessor :contents - - # Number of errors in the sitemap - issues with the sitemap itself, that needs - # to be fixed before it can be processed correctly. - # Corresponds to the JSON property `errors` - # @return [String] - attr_accessor :errors - - # If true, the sitemap has not been processed. - # Corresponds to the JSON property `isPending` - # @return [Boolean] - attr_accessor :is_pending - alias_method :is_pending?, :is_pending - - # If true, the sitemap is a collection of sitemaps. - # Corresponds to the JSON property `isSitemapsIndex` - # @return [Boolean] - attr_accessor :is_sitemaps_index - alias_method :is_sitemaps_index?, :is_sitemaps_index - - # Date & time in which this sitemap was last downloaded. Date format is in RFC - # 3339 format (yyyy-mm-dd). - # Corresponds to the JSON property `lastDownloaded` - # @return [DateTime] - attr_accessor :last_downloaded - - # Date & time in which this sitemap was submitted. Date format is in RFC 3339 - # format (yyyy-mm-dd). - # Corresponds to the JSON property `lastSubmitted` - # @return [DateTime] - attr_accessor :last_submitted - - # The url of the sitemap. - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - # The type of the sitemap (for example "sitemap"). - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Number of warnings for the sitemap - issues with URLs in the sitemaps. - # Corresponds to the JSON property `warnings` - # @return [String] - attr_accessor :warnings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contents = args[:contents] unless args[:contents].nil? - @errors = args[:errors] unless args[:errors].nil? - @is_pending = args[:is_pending] unless args[:is_pending].nil? - @is_sitemaps_index = args[:is_sitemaps_index] unless args[:is_sitemaps_index].nil? - @last_downloaded = args[:last_downloaded] unless args[:last_downloaded].nil? - @last_submitted = args[:last_submitted] unless args[:last_submitted].nil? - @path = args[:path] unless args[:path].nil? - @type = args[:type] unless args[:type].nil? - @warnings = args[:warnings] unless args[:warnings].nil? - end - end - - # Information about the various content types in the sitemap. - class WmxSitemapContent - include Google::Apis::Core::Hashable - - # The number of URLs from the sitemap that were indexed (of the content type). - # Corresponds to the JSON property `indexed` - # @return [String] - attr_accessor :indexed - - # The number of URLs in the sitemap (of the content type). - # Corresponds to the JSON property `submitted` - # @return [String] - attr_accessor :submitted - - # The specific type of content in this sitemap (for example "web", "images"). - # 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) - @indexed = args[:indexed] unless args[:indexed].nil? - @submitted = args[:submitted] unless args[:submitted].nil? - @type = args[:type] unless args[:type].nil? - end - end - end - end -end diff --git a/generated/google/apis/webmasters_v3/representations.rb b/generated/google/apis/webmasters_v3/representations.rb deleted file mode 100644 index a5ad2eb77..000000000 --- a/generated/google/apis/webmasters_v3/representations.rb +++ /dev/null @@ -1,178 +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 WebmastersV3 - - class ListSitemapsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListSitesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlCrawlErrorCount - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlCrawlErrorCountsPerType - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class QueryUrlCrawlErrorsCountsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlCrawlErrorsSample - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListUrlCrawlErrorsSamplesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class UrlSampleDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WmxSite - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WmxSitemap - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class WmxSitemapContent - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - # @private - class ListSitemapsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :sitemap, as: 'sitemap', class: Google::Apis::WebmastersV3::WmxSitemap, decorator: Google::Apis::WebmastersV3::WmxSitemap::Representation - - end - end - - # @private - class ListSitesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :site_entry, as: 'siteEntry', class: Google::Apis::WebmastersV3::WmxSite, decorator: Google::Apis::WebmastersV3::WmxSite::Representation - - end - end - - # @private - class UrlCrawlErrorCount - class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count' - property :timestamp, as: 'timestamp', type: DateTime - - end - end - - # @private - class UrlCrawlErrorCountsPerType - class Representation < Google::Apis::Core::JsonRepresentation - property :category, as: 'category' - collection :entries, as: 'entries', class: Google::Apis::WebmastersV3::UrlCrawlErrorCount, decorator: Google::Apis::WebmastersV3::UrlCrawlErrorCount::Representation - - property :platform, as: 'platform' - end - end - - # @private - class QueryUrlCrawlErrorsCountsResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :count_per_types, as: 'countPerTypes', class: Google::Apis::WebmastersV3::UrlCrawlErrorCountsPerType, decorator: Google::Apis::WebmastersV3::UrlCrawlErrorCountsPerType::Representation - - end - end - - # @private - class UrlCrawlErrorsSample - class Representation < Google::Apis::Core::JsonRepresentation - property :first_detected, as: 'first_detected', type: DateTime - - property :last_crawled, as: 'last_crawled', type: DateTime - - property :page_url, as: 'pageUrl' - property :response_code, as: 'responseCode' - property :url_details, as: 'urlDetails', class: Google::Apis::WebmastersV3::UrlSampleDetails, decorator: Google::Apis::WebmastersV3::UrlSampleDetails::Representation - - end - end - - # @private - class ListUrlCrawlErrorsSamplesResponse - class Representation < Google::Apis::Core::JsonRepresentation - collection :url_crawl_error_sample, as: 'urlCrawlErrorSample', class: Google::Apis::WebmastersV3::UrlCrawlErrorsSample, decorator: Google::Apis::WebmastersV3::UrlCrawlErrorsSample::Representation - - end - end - - # @private - class UrlSampleDetails - class Representation < Google::Apis::Core::JsonRepresentation - collection :containing_sitemaps, as: 'containingSitemaps' - collection :linked_from_urls, as: 'linkedFromUrls' - end - end - - # @private - class WmxSite - class Representation < Google::Apis::Core::JsonRepresentation - property :permission_level, as: 'permissionLevel' - property :site_url, as: 'siteUrl' - end - end - - # @private - class WmxSitemap - class Representation < Google::Apis::Core::JsonRepresentation - collection :contents, as: 'contents', class: Google::Apis::WebmastersV3::WmxSitemapContent, decorator: Google::Apis::WebmastersV3::WmxSitemapContent::Representation - - property :errors, as: 'errors' - property :is_pending, as: 'isPending' - property :is_sitemaps_index, as: 'isSitemapsIndex' - property :last_downloaded, as: 'lastDownloaded', type: DateTime - - property :last_submitted, as: 'lastSubmitted', type: DateTime - - property :path, as: 'path' - property :type, as: 'type' - property :warnings, as: 'warnings' - end - end - - # @private - class WmxSitemapContent - class Representation < Google::Apis::Core::JsonRepresentation - property :indexed, as: 'indexed' - property :submitted, as: 'submitted' - property :type, as: 'type' - end - end - end - end -end diff --git a/generated/google/apis/webmasters_v3/service.rb b/generated/google/apis/webmasters_v3/service.rb deleted file mode 100644 index 2406039b7..000000000 --- a/generated/google/apis/webmasters_v3/service.rb +++ /dev/null @@ -1,535 +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 WebmastersV3 - # Webmaster Tools API - # - # Lets you view Google Webmaster Tools data for your verified sites. - # - # @example - # require 'google/apis/webmasters_v3' - # - # Webmasters = Google::Apis::WebmastersV3 # Alias the module - # service = Webmasters::WebmastersService.new - # - # @see https://developers.google.com/webmaster-tools/v3/welcome - class WebmastersService < 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/', 'webmasters/v3/') - end - - # Deletes a sitemap from this site. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] feedpath - # The URL of the actual sitemap (for example http://www.example.com/sitemap.xml). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/sitemaps/{feedpath}' - command = make_simple_command(:delete, path, options) - command.params['siteUrl'] = site_url unless site_url.nil? - command.params['feedpath'] = feedpath unless feedpath.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 information about a specific sitemap. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] feedpath - # The URL of the actual sitemap (for example http://www.example.com/sitemap.xml). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::WebmastersV3::WmxSitemap] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::WebmastersV3::WmxSitemap] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/sitemaps/{feedpath}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::WebmastersV3::WmxSitemap::Representation - command.response_class = Google::Apis::WebmastersV3::WmxSitemap - command.params['siteUrl'] = site_url unless site_url.nil? - command.params['feedpath'] = feedpath unless feedpath.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 sitemaps uploaded to the site. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] sitemap_index - # A URL of a site's sitemap index. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::WebmastersV3::ListSitemapsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::WebmastersV3::ListSitemapsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_sitemaps(site_url, sitemap_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/sitemaps' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::WebmastersV3::ListSitemapsResponse::Representation - command.response_class = Google::Apis::WebmastersV3::ListSitemapsResponse - command.params['siteUrl'] = site_url unless site_url.nil? - command.query['sitemapIndex'] = sitemap_index unless sitemap_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 - - # Submits a sitemap for a site. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] feedpath - # The URL of the sitemap to add. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 submit_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/sitemaps/{feedpath}' - command = make_simple_command(:put, path, options) - command.params['siteUrl'] = site_url unless site_url.nil? - command.params['feedpath'] = feedpath unless feedpath.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Adds a site to the set of the user's sites in Webmaster Tools. - # @param [String] site_url - # The URL of the site to add. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 add_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}' - command = make_simple_command(:put, path, options) - command.params['siteUrl'] = site_url unless site_url.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes a site from the set of the user's Webmaster Tools sites. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}' - command = make_simple_command(:delete, path, options) - command.params['siteUrl'] = site_url unless site_url.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 information about specific site. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::WebmastersV3::WmxSite] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::WebmastersV3::WmxSite] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::WebmastersV3::WmxSite::Representation - command.response_class = Google::Apis::WebmastersV3::WmxSite - command.params['siteUrl'] = site_url unless site_url.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 your Webmaster Tools sites. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::WebmastersV3::ListSitesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::WebmastersV3::ListSitesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_sites(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::WebmastersV3::ListSitesResponse::Representation - command.response_class = Google::Apis::WebmastersV3::ListSitesResponse - 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 time series of the number of URL crawl errors per error category - # and platform. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] category - # The crawl error category, for example 'serverError'. If not specified, we - # return results for all categories. - # @param [Boolean] latest_counts_only - # If true, returns only the latest crawl error counts. - # @param [String] platform - # The user agent type (platform) that made the request, for example 'web'. If - # not specified, we return results for all platforms. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::WebmastersV3::QueryUrlCrawlErrorsCountsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::WebmastersV3::QueryUrlCrawlErrorsCountsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_errors_count(site_url, category: nil, latest_counts_only: nil, platform: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/urlCrawlErrorsCounts/query' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::WebmastersV3::QueryUrlCrawlErrorsCountsResponse::Representation - command.response_class = Google::Apis::WebmastersV3::QueryUrlCrawlErrorsCountsResponse - command.params['siteUrl'] = site_url unless site_url.nil? - command.query['category'] = category unless category.nil? - command.query['latestCountsOnly'] = latest_counts_only unless latest_counts_only.nil? - command.query['platform'] = platform unless platform.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 details about crawl errors for a site's sample URL. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] url - # The relative path (without the site) of the sample URL; must be one of the - # URLs returned by list - # @param [String] category - # The crawl error category, for example 'authPermissions' - # @param [String] platform - # The user agent type (platform) that made the request, for example 'web' - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::WebmastersV3::UrlCrawlErrorsSample] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::WebmastersV3::UrlCrawlErrorsSample] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_errors_sample(site_url, url, category: nil, platform: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/urlCrawlErrorsSamples/{url}' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::WebmastersV3::UrlCrawlErrorsSample::Representation - command.response_class = Google::Apis::WebmastersV3::UrlCrawlErrorsSample - command.params['siteUrl'] = site_url unless site_url.nil? - command.params['url'] = url unless url.nil? - command.query['category'] = category unless category.nil? - command.query['platform'] = platform unless platform.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 a site's sample URLs for the specified crawl error category and platform. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] category - # The crawl error category, for example 'authPermissions' - # @param [String] platform - # The user agent type (platform) that made the request, for example 'web' - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::WebmastersV3::ListUrlCrawlErrorsSamplesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::WebmastersV3::ListUrlCrawlErrorsSamplesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_errors_samples(site_url, category: nil, platform: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/urlCrawlErrorsSamples' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::WebmastersV3::ListUrlCrawlErrorsSamplesResponse::Representation - command.response_class = Google::Apis::WebmastersV3::ListUrlCrawlErrorsSamplesResponse - command.params['siteUrl'] = site_url unless site_url.nil? - command.query['category'] = category unless category.nil? - command.query['platform'] = platform unless platform.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Marks the provided site's sample URL as fixed, and removes it from the samples - # list. - # @param [String] site_url - # The site's URL, including protocol, for example 'http://www.example.com/' - # @param [String] url - # The relative path (without the site) of the sample URL; must be one of the - # URLs returned by list - # @param [String] category - # The crawl error category, for example 'authPermissions' - # @param [String] platform - # The user agent type (platform) that made the request, for example 'web' - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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 mark_as_fixed(site_url, url, category: nil, platform: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'sites/{siteUrl}/urlCrawlErrorsSamples/{url}' - command = make_simple_command(:delete, path, options) - command.params['siteUrl'] = site_url unless site_url.nil? - command.params['url'] = url unless url.nil? - command.query['category'] = category unless category.nil? - command.query['platform'] = platform unless platform.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 diff --git a/generated/google/apis/youtube_analytics_v1.rb b/generated/google/apis/youtube_analytics_v1.rb deleted file mode 100644 index 7471b4133..000000000 --- a/generated/google/apis/youtube_analytics_v1.rb +++ /dev/null @@ -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/youtube_analytics_v1/service.rb' -require 'google/apis/youtube_analytics_v1/classes.rb' -require 'google/apis/youtube_analytics_v1/representations.rb' - -module Google - module Apis - # YouTube Analytics API - # - # Retrieve your YouTube Analytics reports. - # - # @see http://developers.google.com/youtube/analytics/ - module YoutubeAnalyticsV1 - VERSION = 'V1' - REVISION = '20150304' - - # Manage your YouTube account - AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube' - - # View your YouTube account - AUTH_YOUTUBE_READONLY = 'https://www.googleapis.com/auth/youtube.readonly' - - # View and manage your assets and associated content on YouTube - AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner' - - # View YouTube Analytics monetary reports for your YouTube content - AUTH_YT_ANALYTICS_MONETARY_READONLY = 'https://www.googleapis.com/auth/yt-analytics-monetary.readonly' - - # View YouTube Analytics reports for your YouTube content - AUTH_YT_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/yt-analytics.readonly' - end - end -end diff --git a/generated/google/apis/youtube_analytics_v1/classes.rb b/generated/google/apis/youtube_analytics_v1/classes.rb deleted file mode 100644 index d5d40b006..000000000 --- a/generated/google/apis/youtube_analytics_v1/classes.rb +++ /dev/null @@ -1,540 +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 YoutubeAnalyticsV1 - - # Contains single batchReport resource. - class BatchReport - include Google::Apis::Core::Hashable - - # The ID that YouTube assigns and uses to uniquely identify the report. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # This value specifies the type of data of this item. For batch report the kind - # property value is youtubeAnalytics#batchReport. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Report outputs. - # Corresponds to the JSON property `outputs` - # @return [Array] - attr_accessor :outputs - - # The ID of the the report definition. - # Corresponds to the JSON property `reportId` - # @return [String] - attr_accessor :report_id - - # Period included in the report. For reports containing all entities endTime is - # not set. Both startTime and endTime are inclusive. - # Corresponds to the JSON property `timeSpan` - # @return [Google::Apis::YoutubeAnalyticsV1::BatchReport::TimeSpan] - attr_accessor :time_span - - # The time when the report was updated. - # Corresponds to the JSON property `timeUpdated` - # @return [DateTime] - attr_accessor :time_updated - - 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? - @outputs = args[:outputs] unless args[:outputs].nil? - @report_id = args[:report_id] unless args[:report_id].nil? - @time_span = args[:time_span] unless args[:time_span].nil? - @time_updated = args[:time_updated] unless args[:time_updated].nil? - end - - # - class Output - include Google::Apis::Core::Hashable - - # Cloud storage URL to download this report. This URL is valid for 30 minutes. - # Corresponds to the JSON property `downloadUrl` - # @return [String] - attr_accessor :download_url - - # Format of the output. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Type of the output. - # 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) - @download_url = args[:download_url] unless args[:download_url].nil? - @format = args[:format] unless args[:format].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Period included in the report. For reports containing all entities endTime is - # not set. Both startTime and endTime are inclusive. - class TimeSpan - include Google::Apis::Core::Hashable - - # End of the period included in the report. Inclusive. For reports containing - # all entities endTime is not set. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # Start of the period included in the report. Inclusive. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] unless args[:end_time].nil? - @start_time = args[:start_time] unless args[:start_time].nil? - end - end - end - - # Contains single batchReportDefinition resource. - class BatchReportDefinition - include Google::Apis::Core::Hashable - - # The ID that YouTube assigns and uses to uniquely identify the report - # definition. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # This value specifies the type of data of this item. For batch report - # definition the kind property value is youtubeAnalytics#batchReportDefinition. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Name of the report definition. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Status of the report definition. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Type of the report definition. - # 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? - @name = args[:name] unless args[:name].nil? - @status = args[:status] unless args[:status].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A paginated list of batchReportDefinition resources returned in response to a - # youtubeAnalytics.batchReportDefinitions.list request. - class BatchReportDefinitionList - include Google::Apis::Core::Hashable - - # A list of batchReportDefinition resources that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This value specifies the type of data included in the API response. For the - # list method, the kind property value is youtubeAnalytics# - # batchReportDefinitionList. - # 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 - - # A paginated list of batchReport resources returned in response to a - # youtubeAnalytics.batchReport.list request. - class BatchReportList - include Google::Apis::Core::Hashable - - # A list of batchReport resources that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This value specifies the type of data included in the API response. For the - # list method, the kind property value is youtubeAnalytics#batchReportList. - # 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 Group - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeAnalyticsV1::Group::ContentDetails] - attr_accessor :content_details - - # - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeAnalyticsV1::Group::Snippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_details = args[:content_details] unless args[:content_details].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - - # - class ContentDetails - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `itemCount` - # @return [String] - attr_accessor :item_count - - # - # Corresponds to the JSON property `itemType` - # @return [String] - attr_accessor :item_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @item_count = args[:item_count] unless args[:item_count].nil? - @item_type = args[:item_type] unless args[:item_type].nil? - end - end - - # - class Snippet - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `publishedAt` - # @return [DateTime] - attr_accessor :published_at - - # - # 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) - @published_at = args[:published_at] unless args[:published_at].nil? - @title = args[:title] unless args[:title].nil? - end - end - end - - # - class GroupItem - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # - # Corresponds to the JSON property `groupId` - # @return [String] - attr_accessor :group_id - - # - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # - # Corresponds to the JSON property `resource` - # @return [Google::Apis::YoutubeAnalyticsV1::GroupItem::Resource] - attr_accessor :resource - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @group_id = args[:group_id] unless args[:group_id].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @resource = args[:resource] unless args[:resource].nil? - end - - # - class Resource - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # - # 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 - end - - # A paginated list of grouList resources returned in response to a - # youtubeAnalytics.groupApi.list request. - class ListGroupItemResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # - # 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 - - # A paginated list of grouList resources returned in response to a - # youtubeAnalytics.groupApi.list request. - class ListGroupsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # - # 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 - - # Contains a single result table. The table is returned as an array of rows that - # contain the values for the cells of the table. Depending on the metric or - # dimension, the cell can contain a string (video ID, country code) or a number ( - # number of views or number of likes). - class ResultTable - include Google::Apis::Core::Hashable - - # This value specifies information about the data returned in the rows fields. - # Each item in the columnHeaders list identifies a field returned in the rows - # value, which contains a list of comma-delimited data. The columnHeaders list - # will begin with the dimensions specified in the API request, which will be - # followed by the metrics specified in the API request. The order of both - # dimensions and metrics will match the ordering in the API request. For example, - # if the API request contains the parameters dimensions=ageGroup,gender&metrics= - # viewerPercentage, the API response will return columns in this order: ageGroup, - # gender,viewerPercentage. - # Corresponds to the JSON property `columnHeaders` - # @return [Array] - attr_accessor :column_headers - - # This value specifies the type of data included in the API response. For the - # query method, the kind property value will be youtubeAnalytics#resultTable. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The list contains all rows of the result table. Each item in the list is an - # array that contains comma-delimited data corresponding to a single row of data. - # The order of the comma-delimited data fields will match the order of the - # columns listed in the columnHeaders field. If no data is available for the - # given query, the rows element will be omitted from the response. The response - # for a query with the day dimension will not contain rows for the most recent - # days. - # Corresponds to the JSON property `rows` - # @return [Array>] - attr_accessor :rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_headers = args[:column_headers] unless args[:column_headers].nil? - @kind = args[:kind] unless args[:kind].nil? - @rows = args[:rows] unless args[:rows].nil? - end - - # - class ColumnHeader - include Google::Apis::Core::Hashable - - # The type of the column (DIMENSION or METRIC). - # Corresponds to the JSON property `columnType` - # @return [String] - attr_accessor :column_type - - # The type of the data in the column (STRING, INTEGER, FLOAT, etc.). - # Corresponds to the JSON property `dataType` - # @return [String] - attr_accessor :data_type - - # The name of the dimension or metric. - # 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) - @column_type = args[:column_type] unless args[:column_type].nil? - @data_type = args[:data_type] unless args[:data_type].nil? - @name = args[:name] unless args[:name].nil? - end - end - end - end - end -end diff --git a/generated/google/apis/youtube_analytics_v1/representations.rb b/generated/google/apis/youtube_analytics_v1/representations.rb deleted file mode 100644 index 50281e6f1..000000000 --- a/generated/google/apis/youtube_analytics_v1/representations.rb +++ /dev/null @@ -1,242 +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 YoutubeAnalyticsV1 - - class BatchReport - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Output - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class TimeSpan - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class BatchReportDefinition - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchReportDefinitionList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class BatchReportList - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Group - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ContentDetails - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class Snippet - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class GroupItem - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Resource - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class ListGroupItemResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ListGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - end - - class ResultTable - class Representation < Google::Apis::Core::JsonRepresentation; end - - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - # @private - class BatchReport - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - collection :outputs, as: 'outputs', class: Google::Apis::YoutubeAnalyticsV1::BatchReport::Output, decorator: Google::Apis::YoutubeAnalyticsV1::BatchReport::Output::Representation - - property :report_id, as: 'reportId' - property :time_span, as: 'timeSpan', class: Google::Apis::YoutubeAnalyticsV1::BatchReport::TimeSpan, decorator: Google::Apis::YoutubeAnalyticsV1::BatchReport::TimeSpan::Representation - - property :time_updated, as: 'timeUpdated', type: DateTime - - end - - # @private - class Output - class Representation < Google::Apis::Core::JsonRepresentation - property :download_url, as: 'downloadUrl' - property :format, as: 'format' - property :type, as: 'type' - end - end - - # @private - class TimeSpan - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime', type: DateTime - - property :start_time, as: 'startTime', type: DateTime - - end - end - end - - # @private - class BatchReportDefinition - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - property :name, as: 'name' - property :status, as: 'status' - property :type, as: 'type' - end - end - - # @private - class BatchReportDefinitionList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::YoutubeAnalyticsV1::BatchReportDefinition, decorator: Google::Apis::YoutubeAnalyticsV1::BatchReportDefinition::Representation - - property :kind, as: 'kind' - end - end - - # @private - class BatchReportList - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::YoutubeAnalyticsV1::BatchReport, decorator: Google::Apis::YoutubeAnalyticsV1::BatchReport::Representation - - property :kind, as: 'kind' - end - end - - # @private - class Group - class Representation < Google::Apis::Core::JsonRepresentation - property :content_details, as: 'contentDetails', class: Google::Apis::YoutubeAnalyticsV1::Group::ContentDetails, decorator: Google::Apis::YoutubeAnalyticsV1::Group::ContentDetails::Representation - - property :etag, as: 'etag' - property :id, as: 'id' - property :kind, as: 'kind' - property :snippet, as: 'snippet', class: Google::Apis::YoutubeAnalyticsV1::Group::Snippet, decorator: Google::Apis::YoutubeAnalyticsV1::Group::Snippet::Representation - - end - - # @private - class ContentDetails - class Representation < Google::Apis::Core::JsonRepresentation - property :item_count, as: 'itemCount' - property :item_type, as: 'itemType' - end - end - - # @private - class Snippet - class Representation < Google::Apis::Core::JsonRepresentation - property :published_at, as: 'publishedAt', type: DateTime - - property :title, as: 'title' - end - end - end - - # @private - class GroupItem - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :group_id, as: 'groupId' - property :id, as: 'id' - property :kind, as: 'kind' - property :resource, as: 'resource', class: Google::Apis::YoutubeAnalyticsV1::GroupItem::Resource, decorator: Google::Apis::YoutubeAnalyticsV1::GroupItem::Resource::Representation - - end - - # @private - class Resource - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :kind, as: 'kind' - end - end - end - - # @private - class ListGroupItemResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::YoutubeAnalyticsV1::GroupItem, decorator: Google::Apis::YoutubeAnalyticsV1::GroupItem::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ListGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - collection :items, as: 'items', class: Google::Apis::YoutubeAnalyticsV1::Group, decorator: Google::Apis::YoutubeAnalyticsV1::Group::Representation - - property :kind, as: 'kind' - end - end - - # @private - class ResultTable - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_headers, as: 'columnHeaders', class: Google::Apis::YoutubeAnalyticsV1::ResultTable::ColumnHeader, decorator: Google::Apis::YoutubeAnalyticsV1::ResultTable::ColumnHeader::Representation - - property :kind, as: 'kind' - collection :rows, as: 'rows', :class => Array do - include Representable::JSON::Collection - items - end - - end - - # @private - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation - property :column_type, as: 'columnType' - property :data_type, as: 'dataType' - property :name, as: 'name' - end - end - end - end - end -end diff --git a/generated/google/apis/youtube_analytics_v1/service.rb b/generated/google/apis/youtube_analytics_v1/service.rb deleted file mode 100644 index 7455e5d4f..000000000 --- a/generated/google/apis/youtube_analytics_v1/service.rb +++ /dev/null @@ -1,567 +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 YoutubeAnalyticsV1 - # YouTube Analytics API - # - # Retrieve your YouTube Analytics reports. - # - # @example - # require 'google/apis/youtube_analytics_v1' - # - # YoutubeAnalytics = Google::Apis::YoutubeAnalyticsV1 # Alias the module - # service = YoutubeAnalytics::YouTubeAnalyticsService.new - # - # @see http://developers.google.com/youtube/analytics/ - class YouTubeAnalyticsService < 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/', 'youtube/analytics/v1/') - end - - # Retrieves a list of available batch report definitions. - # @param [String] on_behalf_of_content_owner - # The onBehalfOfContentOwner parameter identifies the content owner that the - # user is acting on behalf of. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::BatchReportDefinitionList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::BatchReportDefinitionList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_batch_report_definitions(on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'batchReportDefinitions' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::YoutubeAnalyticsV1::BatchReportDefinitionList::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::BatchReportDefinitionList - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a list of processed batch reports. - # @param [String] batch_report_definition_id - # The batchReportDefinitionId parameter specifies the ID of the batch reportort - # definition for which you are retrieving reports. - # @param [String] on_behalf_of_content_owner - # The onBehalfOfContentOwner parameter identifies the content owner that the - # user is acting on behalf of. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::BatchReportList] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::BatchReportList] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_batch_reports(batch_report_definition_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'batchReports' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::YoutubeAnalyticsV1::BatchReportList::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::BatchReportList - command.query['batchReportDefinitionId'] = batch_report_definition_id unless batch_report_definition_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes an item from a group. - # @param [String] id - # The id parameter specifies the YouTube group item ID for the group that is - # being deleted. - # @param [String] on_behalf_of_content_owner - # Note: This parameter is intended exclusively for YouTube content partners. - # The onBehalfOfContentOwner parameter indicates that the request's - # authorization credentials identify a YouTube CMS user who is acting on behalf - # of the content owner specified in the parameter value. This parameter is - # intended for YouTube content partners that own and manage many different - # YouTube channels. It allows content owners to authenticate once and get access - # to all their video and channel data, without having to provide authentication - # credentials for each individual channel. The CMS account that the user - # authenticates with must be linked to the specified YouTube content owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_group_item(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groupItems' - command = make_simple_command(:delete, path, options) - command.query['id'] = id unless id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a group item. - # @param [Google::Apis::YoutubeAnalyticsV1::GroupItem] group_item_object - # @param [String] on_behalf_of_content_owner - # Note: This parameter is intended exclusively for YouTube content partners. - # The onBehalfOfContentOwner parameter indicates that the request's - # authorization credentials identify a YouTube CMS user who is acting on behalf - # of the content owner specified in the parameter value. This parameter is - # intended for YouTube content partners that own and manage many different - # YouTube channels. It allows content owners to authenticate once and get access - # to all their video and channel data, without having to provide authentication - # credentials for each individual channel. The CMS account that the user - # authenticates with must be linked to the specified YouTube content owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::GroupItem] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::GroupItem] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_group_item(group_item_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groupItems' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::YoutubeAnalyticsV1::GroupItem::Representation - command.request_object = group_item_object - command.response_representation = Google::Apis::YoutubeAnalyticsV1::GroupItem::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::GroupItem - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a collection of group items that match the API request parameters. - # @param [String] group_id - # The id parameter specifies the unique ID of the group for which you want to - # retrieve group items. - # @param [String] on_behalf_of_content_owner - # Note: This parameter is intended exclusively for YouTube content partners. - # The onBehalfOfContentOwner parameter indicates that the request's - # authorization credentials identify a YouTube CMS user who is acting on behalf - # of the content owner specified in the parameter value. This parameter is - # intended for YouTube content partners that own and manage many different - # YouTube channels. It allows content owners to authenticate once and get access - # to all their video and channel data, without having to provide authentication - # credentials for each individual channel. The CMS account that the user - # authenticates with must be linked to the specified YouTube content owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::ListGroupItemResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::ListGroupItemResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_group_items(group_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groupItems' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::YoutubeAnalyticsV1::ListGroupItemResponse::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::ListGroupItemResponse - command.query['groupId'] = group_id unless group_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a group. - # @param [String] id - # The id parameter specifies the YouTube group ID for the group that is being - # deleted. - # @param [String] on_behalf_of_content_owner - # Note: This parameter is intended exclusively for YouTube content partners. - # The onBehalfOfContentOwner parameter indicates that the request's - # authorization credentials identify a YouTube CMS user who is acting on behalf - # of the content owner specified in the parameter value. This parameter is - # intended for YouTube content partners that own and manage many different - # YouTube channels. It allows content owners to authenticate once and get access - # to all their video and channel data, without having to provide authentication - # credentials for each individual channel. The CMS account that the user - # authenticates with must be linked to the specified YouTube content owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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_group(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups' - command = make_simple_command(:delete, path, options) - command.query['id'] = id unless id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a group. - # @param [Google::Apis::YoutubeAnalyticsV1::Group] group_object - # @param [String] on_behalf_of_content_owner - # Note: This parameter is intended exclusively for YouTube content partners. - # The onBehalfOfContentOwner parameter indicates that the request's - # authorization credentials identify a YouTube CMS user who is acting on behalf - # of the content owner specified in the parameter value. This parameter is - # intended for YouTube content partners that own and manage many different - # YouTube channels. It allows content owners to authenticate once and get access - # to all their video and channel data, without having to provide authentication - # credentials for each individual channel. The CMS account that the user - # authenticates with must be linked to the specified YouTube content owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups' - command = make_simple_command(:post, path, options) - command.request_representation = Google::Apis::YoutubeAnalyticsV1::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::YoutubeAnalyticsV1::Group::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::Group - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Returns a collection of groups that match the API request parameters. For - # example, you can retrieve all groups that the authenticated user owns, or you - # can retrieve one or more groups by their unique IDs. - # @param [String] id - # The id parameter specifies a comma-separated list of the YouTube group ID(s) - # for the resource(s) that are being retrieved. In a group resource, the id - # property specifies the group's YouTube group ID. - # @param [Boolean] mine - # Set this parameter's value to true to instruct the API to only return groups - # owned by the authenticated user. - # @param [String] on_behalf_of_content_owner - # Note: This parameter is intended exclusively for YouTube content partners. - # The onBehalfOfContentOwner parameter indicates that the request's - # authorization credentials identify a YouTube CMS user who is acting on behalf - # of the content owner specified in the parameter value. This parameter is - # intended for YouTube content partners that own and manage many different - # YouTube channels. It allows content owners to authenticate once and get access - # to all their video and channel data, without having to provide authentication - # credentials for each individual channel. The CMS account that the user - # authenticates with must be linked to the specified YouTube content owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::ListGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::ListGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_groups(id: nil, mine: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::YoutubeAnalyticsV1::ListGroupsResponse::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::ListGroupsResponse - command.query['id'] = id unless id.nil? - command.query['mine'] = mine unless mine.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Modifies a group. For example, you could change a group's title. - # @param [Google::Apis::YoutubeAnalyticsV1::Group] group_object - # @param [String] on_behalf_of_content_owner - # Note: This parameter is intended exclusively for YouTube content partners. - # The onBehalfOfContentOwner parameter indicates that the request's - # authorization credentials identify a YouTube CMS user who is acting on behalf - # of the content owner specified in the parameter value. This parameter is - # intended for YouTube content partners that own and manage many different - # YouTube channels. It allows content owners to authenticate once and get access - # to all their video and channel data, without having to provide authentication - # credentials for each individual channel. The CMS account that the user - # authenticates with must be linked to the specified YouTube content owner. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'groups' - command = make_simple_command(:put, path, options) - command.request_representation = Google::Apis::YoutubeAnalyticsV1::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::YoutubeAnalyticsV1::Group::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::Group - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieve your YouTube Analytics reports. - # @param [String] currency - # The currency to which financial metrics should be converted. The default is US - # Dollar (USD). If the result contains no financial metrics, this flag will be - # ignored. Responds with an error if the specified currency is not recognized. - # @param [String] dimensions - # A comma-separated list of YouTube Analytics dimensions, such as views or - # ageGroup,gender. See the Available Reports document for a list of the reports - # that you can retrieve and the dimensions used for those reports. Also see the - # Dimensions document for definitions of those dimensions. - # @param [String] end_date - # The end date for fetching YouTube Analytics data. The value should be in YYYY- - # MM-DD format. - # @param [String] filters - # A list of filters that should be applied when retrieving YouTube Analytics - # data. The Available Reports document identifies the dimensions that can be - # used to filter each report, and the Dimensions document defines those - # dimensions. If a request uses multiple filters, join them together with a - # semicolon (;), and the returned result table will satisfy both filters. For - # example, a filters parameter value of video==dMH0bHeiRNg;country==IT restricts - # the result set to include data for the given video in Italy. - # @param [String] ids - # Identifies the YouTube channel or content owner for which you are retrieving - # YouTube Analytics data. - # - To request data for a YouTube user, set the ids parameter value to channel== - # CHANNEL_ID, where CHANNEL_ID specifies the unique YouTube channel ID. - # - To request data for a YouTube CMS content owner, set the ids parameter value - # to contentOwner==OWNER_NAME, where OWNER_NAME is the CMS name of the content - # owner. - # @param [Fixnum] max_results - # The maximum number of rows to include in the response. - # @param [String] metrics - # A comma-separated list of YouTube Analytics metrics, such as views or likes, - # dislikes. See the Available Reports document for a list of the reports that - # you can retrieve and the metrics available in each report, and see the Metrics - # document for definitions of those metrics. - # @param [String] sort - # A comma-separated list of dimensions or metrics that determine the sort order - # for YouTube Analytics data. By default the sort order is ascending. The '-' - # prefix causes descending sort order. - # @param [String] start_date - # The start date for fetching YouTube Analytics data. The value should be in - # YYYY-MM-DD format. - # @param [Fixnum] start_index - # An index of the first entity to retrieve. Use this parameter as a pagination - # mechanism along with the max-results parameter (one-based, inclusive). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::YoutubeAnalyticsV1::ResultTable] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubeAnalyticsV1::ResultTable] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_report(currency: nil, dimensions: nil, end_date: nil, filters: nil, ids: nil, max_results: nil, metrics: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - path = 'reports' - command = make_simple_command(:get, path, options) - command.response_representation = Google::Apis::YoutubeAnalyticsV1::ResultTable::Representation - command.response_class = Google::Apis::YoutubeAnalyticsV1::ResultTable - command.query['currency'] = currency unless currency.nil? - command.query['dimensions'] = dimensions unless dimensions.nil? - command.query['end-date'] = end_date unless end_date.nil? - command.query['filters'] = filters unless filters.nil? - command.query['ids'] = ids unless ids.nil? - command.query['max-results'] = max_results unless max_results.nil? - command.query['metrics'] = metrics unless metrics.nil? - command.query['sort'] = sort unless sort.nil? - command.query['start-date'] = start_date unless start_date.nil? - command.query['start-index'] = start_index unless start_index.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - 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 diff --git a/generated/google/apis/youtube_v3.rb b/generated/google/apis/youtube_v3.rb deleted file mode 100644 index 1e8abb294..000000000 --- a/generated/google/apis/youtube_v3.rb +++ /dev/null @@ -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/youtube_v3/service.rb' -require 'google/apis/youtube_v3/classes.rb' -require 'google/apis/youtube_v3/representations.rb' - -module Google - module Apis - # YouTube Data API - # - # Programmatic access to YouTube features. - # - # @see https://developers.google.com/youtube/v3 - module YoutubeV3 - VERSION = 'V3' - REVISION = '20150526' - - # Manage your YouTube account - AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube' - - # Manage your YouTube account - AUTH_YOUTUBE_FORCE_SSL = 'https://www.googleapis.com/auth/youtube.force-ssl' - - # View your YouTube account - AUTH_YOUTUBE_READONLY = 'https://www.googleapis.com/auth/youtube.readonly' - - # Manage your YouTube videos - AUTH_YOUTUBE_UPLOAD = 'https://www.googleapis.com/auth/youtube.upload' - - # View and manage your assets and associated content on YouTube - AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner' - - # View private information of your YouTube channel relevant during the audit process with a YouTube partner - AUTH_YOUTUBEPARTNER_CHANNEL_AUDIT = 'https://www.googleapis.com/auth/youtubepartner-channel-audit' - end - end -end diff --git a/generated/google/apis/youtube_v3/classes.rb b/generated/google/apis/youtube_v3/classes.rb deleted file mode 100644 index 76db88eea..000000000 --- a/generated/google/apis/youtube_v3/classes.rb +++ /dev/null @@ -1,7226 +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 YoutubeV3 - - # Rights management policy for YouTube resources. - class AccessPolicy - include Google::Apis::Core::Hashable - - # The value of allowed indicates whether the access to the policy is allowed or - # denied by default. - # Corresponds to the JSON property `allowed` - # @return [Boolean] - attr_accessor :allowed - alias_method :allowed?, :allowed - - # A list of region codes that identify countries where the default policy do not - # apply. - # Corresponds to the JSON property `exception` - # @return [Array] - attr_accessor :exception - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allowed = args[:allowed] unless args[:allowed].nil? - @exception = args[:exception] unless args[:exception].nil? - end - end - - # An activity resource contains information about an action that a particular - # channel, or user, has taken on YouTube.The actions reported in activity feeds - # include rating a video, sharing a video, marking a video as a favorite, - # commenting on a video, uploading a video, and so forth. Each activity resource - # identifies the type of action, the channel associated with the action, and the - # resource(s) associated with the action, such as the video that was rated or - # uploaded. - class Activity - include Google::Apis::Core::Hashable - - # Details about the content of an activity: the video that was shared, the - # channel that was subscribed to, etc. - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeV3::ActivityContentDetails] - attr_accessor :content_details - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the activity. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # activity". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Basic details about an activity, including title, description, thumbnails, - # activity type and group. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::ActivitySnippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_details = args[:content_details] unless args[:content_details].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # Details about the content of an activity: the video that was shared, the - # channel that was subscribed to, etc. - class ActivityContentDetails - include Google::Apis::Core::Hashable - - # Details about a channel bulletin post. - # Corresponds to the JSON property `bulletin` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsBulletin] - attr_accessor :bulletin - - # Details about a resource which was added to a channel. - # Corresponds to the JSON property `channelItem` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsChannelItem] - attr_accessor :channel_item - - # Information about a resource that received a comment. - # Corresponds to the JSON property `comment` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsComment] - attr_accessor :comment - - # Information about a video that was marked as a favorite video. - # Corresponds to the JSON property `favorite` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsFavorite] - attr_accessor :favorite - - # Information about a resource that received a positive (like) rating. - # Corresponds to the JSON property `like` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsLike] - attr_accessor :like - - # Information about a new playlist item. - # Corresponds to the JSON property `playlistItem` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsPlaylistItem] - attr_accessor :playlist_item - - # Details about a resource which is being promoted. - # Corresponds to the JSON property `promotedItem` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsPromotedItem] - attr_accessor :promoted_item - - # Information that identifies the recommended resource. - # Corresponds to the JSON property `recommendation` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsRecommendation] - attr_accessor :recommendation - - # Details about a social network post. - # Corresponds to the JSON property `social` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsSocial] - attr_accessor :social - - # Information about a channel that a user subscribed to. - # Corresponds to the JSON property `subscription` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsSubscription] - attr_accessor :subscription - - # Information about the uploaded video. - # Corresponds to the JSON property `upload` - # @return [Google::Apis::YoutubeV3::ActivityContentDetailsUpload] - attr_accessor :upload - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bulletin = args[:bulletin] unless args[:bulletin].nil? - @channel_item = args[:channel_item] unless args[:channel_item].nil? - @comment = args[:comment] unless args[:comment].nil? - @favorite = args[:favorite] unless args[:favorite].nil? - @like = args[:like] unless args[:like].nil? - @playlist_item = args[:playlist_item] unless args[:playlist_item].nil? - @promoted_item = args[:promoted_item] unless args[:promoted_item].nil? - @recommendation = args[:recommendation] unless args[:recommendation].nil? - @social = args[:social] unless args[:social].nil? - @subscription = args[:subscription] unless args[:subscription].nil? - @upload = args[:upload] unless args[:upload].nil? - end - end - - # Details about a channel bulletin post. - class ActivityContentDetailsBulletin - include Google::Apis::Core::Hashable - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] unless args[:resource_id].nil? - end - end - - # Details about a resource which was added to a channel. - class ActivityContentDetailsChannelItem - include Google::Apis::Core::Hashable - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] unless args[:resource_id].nil? - end - end - - # Information about a resource that received a comment. - class ActivityContentDetailsComment - include Google::Apis::Core::Hashable - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] unless args[:resource_id].nil? - end - end - - # Information about a video that was marked as a favorite video. - class ActivityContentDetailsFavorite - include Google::Apis::Core::Hashable - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] unless args[:resource_id].nil? - end - end - - # Information about a resource that received a positive (like) rating. - class ActivityContentDetailsLike - include Google::Apis::Core::Hashable - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] unless args[:resource_id].nil? - end - end - - # Information about a new playlist item. - class ActivityContentDetailsPlaylistItem - include Google::Apis::Core::Hashable - - # The value that YouTube uses to uniquely identify the playlist. - # Corresponds to the JSON property `playlistId` - # @return [String] - attr_accessor :playlist_id - - # ID of the item within the playlist. - # Corresponds to the JSON property `playlistItemId` - # @return [String] - attr_accessor :playlist_item_id - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @playlist_id = args[:playlist_id] unless args[:playlist_id].nil? - @playlist_item_id = args[:playlist_item_id] unless args[:playlist_item_id].nil? - @resource_id = args[:resource_id] unless args[:resource_id].nil? - end - end - - # Details about a resource which is being promoted. - class ActivityContentDetailsPromotedItem - include Google::Apis::Core::Hashable - - # The URL the client should fetch to request a promoted item. - # Corresponds to the JSON property `adTag` - # @return [String] - attr_accessor :ad_tag - - # The URL the client should ping to indicate that the user clicked through on - # this promoted item. - # Corresponds to the JSON property `clickTrackingUrl` - # @return [String] - attr_accessor :click_tracking_url - - # The URL the client should ping to indicate that the user was shown this - # promoted item. - # Corresponds to the JSON property `creativeViewUrl` - # @return [String] - attr_accessor :creative_view_url - - # The type of call-to-action, a message to the user indicating action that can - # be taken. - # Corresponds to the JSON property `ctaType` - # @return [String] - attr_accessor :cta_type - - # The custom call-to-action button text. If specified, it will override the - # default button text for the cta_type. - # Corresponds to the JSON property `customCtaButtonText` - # @return [String] - attr_accessor :custom_cta_button_text - - # The text description to accompany the promoted item. - # Corresponds to the JSON property `descriptionText` - # @return [String] - attr_accessor :description_text - - # The URL the client should direct the user to, if the user chooses to visit the - # advertiser's website. - # Corresponds to the JSON property `destinationUrl` - # @return [String] - attr_accessor :destination_url - - # The list of forecasting URLs. The client should ping all of these URLs when a - # promoted item is not available, to indicate that a promoted item could have - # been shown. - # Corresponds to the JSON property `forecastingUrl` - # @return [Array] - attr_accessor :forecasting_url - - # The list of impression URLs. The client should ping all of these URLs to - # indicate that the user was shown this promoted item. - # Corresponds to the JSON property `impressionUrl` - # @return [Array] - attr_accessor :impression_url - - # The ID that YouTube uses to uniquely identify the promoted video. - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ad_tag = args[:ad_tag] unless args[:ad_tag].nil? - @click_tracking_url = args[:click_tracking_url] unless args[:click_tracking_url].nil? - @creative_view_url = args[:creative_view_url] unless args[:creative_view_url].nil? - @cta_type = args[:cta_type] unless args[:cta_type].nil? - @custom_cta_button_text = args[:custom_cta_button_text] unless args[:custom_cta_button_text].nil? - @description_text = args[:description_text] unless args[:description_text].nil? - @destination_url = args[:destination_url] unless args[:destination_url].nil? - @forecasting_url = args[:forecasting_url] unless args[:forecasting_url].nil? - @impression_url = args[:impression_url] unless args[:impression_url].nil? - @video_id = args[:video_id] unless args[:video_id].nil? - end - end - - # Information that identifies the recommended resource. - class ActivityContentDetailsRecommendation - include Google::Apis::Core::Hashable - - # The reason that the resource is recommended to the user. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `seedResourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :seed_resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reason = args[:reason] unless args[:reason].nil? - @resource_id = args[:resource_id] unless args[:resource_id].nil? - @seed_resource_id = args[:seed_resource_id] unless args[:seed_resource_id].nil? - end - end - - # Details about a social network post. - class ActivityContentDetailsSocial - include Google::Apis::Core::Hashable - - # The author of the social network post. - # Corresponds to the JSON property `author` - # @return [String] - attr_accessor :author - - # An image of the post's author. - # Corresponds to the JSON property `imageUrl` - # @return [String] - attr_accessor :image_url - - # The URL of the social network post. - # Corresponds to the JSON property `referenceUrl` - # @return [String] - attr_accessor :reference_url - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - # The name of the social network. - # 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) - @author = args[:author] unless args[:author].nil? - @image_url = args[:image_url] unless args[:image_url].nil? - @reference_url = args[:reference_url] unless args[:reference_url].nil? - @resource_id = args[:resource_id] unless args[:resource_id].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Information about a channel that a user subscribed to. - class ActivityContentDetailsSubscription - include Google::Apis::Core::Hashable - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] unless args[:resource_id].nil? - end - end - - # Information about the uploaded video. - class ActivityContentDetailsUpload - include Google::Apis::Core::Hashable - - # The ID that YouTube uses to uniquely identify the uploaded video. - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @video_id = args[:video_id] unless args[:video_id].nil? - end - end - - # - class ListActivitiesResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of activities, or events, that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # activityListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # The token that can be used as the value of the pageToken parameter to retrieve - # the previous page in the result set. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Basic details about an activity, including title, description, thumbnails, - # activity type and group. - class ActivitySnippet - include Google::Apis::Core::Hashable - - # The ID that YouTube uses to uniquely identify the channel associated with the - # activity. - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # Channel title for the channel responsible for this activity - # Corresponds to the JSON property `channelTitle` - # @return [String] - attr_accessor :channel_title - - # The description of the resource primarily associated with the activity. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The group ID associated with the activity. A group ID identifies user events - # that are associated with the same user and resource. For example, if a user - # rates a video and marks the same video as a favorite, the entries for those - # events would have the same group ID in the user's activity feed. In your user - # interface, you can avoid repetition by grouping events with the same groupId - # value. - # Corresponds to the JSON property `groupId` - # @return [String] - attr_accessor :group_id - - # The date and time that the video was uploaded. The value is specified in ISO - # 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `publishedAt` - # @return [DateTime] - attr_accessor :published_at - - # Internal representation of thumbnails for a YouTube resource. - # Corresponds to the JSON property `thumbnails` - # @return [Google::Apis::YoutubeV3::ThumbnailDetails] - attr_accessor :thumbnails - - # The title of the resource primarily associated with the activity. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The type of activity that the resource describes. - # 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) - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @channel_title = args[:channel_title] unless args[:channel_title].nil? - @description = args[:description] unless args[:description].nil? - @group_id = args[:group_id] unless args[:group_id].nil? - @published_at = args[:published_at] unless args[:published_at].nil? - @thumbnails = args[:thumbnails] unless args[:thumbnails].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # A caption resource represents a YouTube caption track. A caption track is - # associated with exactly one YouTube video. - class Caption - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the caption track. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # caption". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Basic details about a caption track, such as its language and name. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::CaptionSnippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # - class ListCaptionsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of captions that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # captionListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Basic details about a caption track, such as its language and name. - class CaptionSnippet - include Google::Apis::Core::Hashable - - # The type of audio track associated with the caption track. - # Corresponds to the JSON property `audioTrackType` - # @return [String] - attr_accessor :audio_track_type - - # The reason that YouTube failed to process the caption track. This property is - # only present if the state property's value is failed. - # Corresponds to the JSON property `failureReason` - # @return [String] - attr_accessor :failure_reason - - # Indicates whether YouTube synchronized the caption track to the audio track in - # the video. The value will be true if a sync was explicitly requested when the - # caption track was uploaded. For example, when calling the captions.insert or - # captions.update methods, you can set the sync parameter to true to instruct - # YouTube to sync the uploaded track to the video. If the value is false, - # YouTube uses the time codes in the uploaded caption track to determine when to - # display captions. - # Corresponds to the JSON property `isAutoSynced` - # @return [Boolean] - attr_accessor :is_auto_synced - alias_method :is_auto_synced?, :is_auto_synced - - # Indicates whether the track contains closed captions for the deaf and hard of - # hearing. The default value is false. - # Corresponds to the JSON property `isCC` - # @return [Boolean] - attr_accessor :is_cc - alias_method :is_cc?, :is_cc - - # Indicates whether the caption track is a draft. If the value is true, then the - # track is not publicly visible. The default value is false. - # Corresponds to the JSON property `isDraft` - # @return [Boolean] - attr_accessor :is_draft - alias_method :is_draft?, :is_draft - - # Indicates whether caption track is formatted for "easy reader," meaning it is - # at a third-grade level for language learners. The default value is false. - # Corresponds to the JSON property `isEasyReader` - # @return [Boolean] - attr_accessor :is_easy_reader - alias_method :is_easy_reader?, :is_easy_reader - - # Indicates whether the caption track uses large text for the vision-impaired. - # The default value is false. - # Corresponds to the JSON property `isLarge` - # @return [Boolean] - attr_accessor :is_large - alias_method :is_large?, :is_large - - # The language of the caption track. The property value is a BCP-47 language tag. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # The date and time when the caption track was last updated. The value is - # specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `lastUpdated` - # @return [DateTime] - attr_accessor :last_updated - - # The name of the caption track. The name is intended to be visible to the user - # as an option during playback. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The caption track's status. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The caption track's type. - # Corresponds to the JSON property `trackKind` - # @return [String] - attr_accessor :track_kind - - # The ID that YouTube uses to uniquely identify the video associated with the - # caption track. - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @audio_track_type = args[:audio_track_type] unless args[:audio_track_type].nil? - @failure_reason = args[:failure_reason] unless args[:failure_reason].nil? - @is_auto_synced = args[:is_auto_synced] unless args[:is_auto_synced].nil? - @is_cc = args[:is_cc] unless args[:is_cc].nil? - @is_draft = args[:is_draft] unless args[:is_draft].nil? - @is_easy_reader = args[:is_easy_reader] unless args[:is_easy_reader].nil? - @is_large = args[:is_large] unless args[:is_large].nil? - @language = args[:language] unless args[:language].nil? - @last_updated = args[:last_updated] unless args[:last_updated].nil? - @name = args[:name] unless args[:name].nil? - @status = args[:status] unless args[:status].nil? - @track_kind = args[:track_kind] unless args[:track_kind].nil? - @video_id = args[:video_id] unless args[:video_id].nil? - end - end - - # Brief description of the live stream cdn settings. - class CdnSettings - include Google::Apis::Core::Hashable - - # The format of the video stream that you are sending to Youtube. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Describes information necessary for ingesting an RTMP or an HTTP stream. - # Corresponds to the JSON property `ingestionInfo` - # @return [Google::Apis::YoutubeV3::IngestionInfo] - attr_accessor :ingestion_info - - # The method or protocol used to transmit the video stream. - # Corresponds to the JSON property `ingestionType` - # @return [String] - attr_accessor :ingestion_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @format = args[:format] unless args[:format].nil? - @ingestion_info = args[:ingestion_info] unless args[:ingestion_info].nil? - @ingestion_type = args[:ingestion_type] unless args[:ingestion_type].nil? - end - end - - # A channel resource contains information about a YouTube channel. - class Channel - include Google::Apis::Core::Hashable - - # The auditDetails object encapsulates channel data that is relevant for YouTube - # Partners during the audit process. - # Corresponds to the JSON property `auditDetails` - # @return [Google::Apis::YoutubeV3::ChannelAuditDetails] - attr_accessor :audit_details - - # Branding properties of a YouTube channel. - # Corresponds to the JSON property `brandingSettings` - # @return [Google::Apis::YoutubeV3::ChannelBrandingSettings] - attr_accessor :branding_settings - - # Details about the content of a channel. - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeV3::ChannelContentDetails] - attr_accessor :content_details - - # The contentOwnerDetails object encapsulates channel data that is relevant for - # YouTube Partners linked with the channel. - # Corresponds to the JSON property `contentOwnerDetails` - # @return [Google::Apis::YoutubeV3::ChannelContentOwnerDetails] - attr_accessor :content_owner_details - - # The conversionPings object encapsulates information about conversion pings - # that need to be respected by the channel. - # Corresponds to the JSON property `conversionPings` - # @return [Google::Apis::YoutubeV3::ChannelConversionPings] - attr_accessor :conversion_pings - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the channel. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Describes an invideo promotion campaign consisting of multiple promoted items. - # A campaign belongs to a single channel_id. - # Corresponds to the JSON property `invideoPromotion` - # @return [Google::Apis::YoutubeV3::InvideoPromotion] - attr_accessor :invideo_promotion - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # channel". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Localizations for different languages - # Corresponds to the JSON property `localizations` - # @return [Hash] - attr_accessor :localizations - - # Basic details about a channel, including title, description and thumbnails. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::ChannelSnippet] - attr_accessor :snippet - - # Statistics about a channel: number of subscribers, number of videos in the - # channel, etc. - # Corresponds to the JSON property `statistics` - # @return [Google::Apis::YoutubeV3::ChannelStatistics] - attr_accessor :statistics - - # JSON template for the status part of a channel. - # Corresponds to the JSON property `status` - # @return [Google::Apis::YoutubeV3::ChannelStatus] - attr_accessor :status - - # Freebase topic information related to the channel. - # Corresponds to the JSON property `topicDetails` - # @return [Google::Apis::YoutubeV3::ChannelTopicDetails] - attr_accessor :topic_details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @audit_details = args[:audit_details] unless args[:audit_details].nil? - @branding_settings = args[:branding_settings] unless args[:branding_settings].nil? - @content_details = args[:content_details] unless args[:content_details].nil? - @content_owner_details = args[:content_owner_details] unless args[:content_owner_details].nil? - @conversion_pings = args[:conversion_pings] unless args[:conversion_pings].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @invideo_promotion = args[:invideo_promotion] unless args[:invideo_promotion].nil? - @kind = args[:kind] unless args[:kind].nil? - @localizations = args[:localizations] unless args[:localizations].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @statistics = args[:statistics] unless args[:statistics].nil? - @status = args[:status] unless args[:status].nil? - @topic_details = args[:topic_details] unless args[:topic_details].nil? - end - end - - # The auditDetails object encapsulates channel data that is relevant for YouTube - # Partners during the audit process. - class ChannelAuditDetails - include Google::Apis::Core::Hashable - - # Whether or not the channel respects the community guidelines. - # Corresponds to the JSON property `communityGuidelinesGoodStanding` - # @return [Boolean] - attr_accessor :community_guidelines_good_standing - alias_method :community_guidelines_good_standing?, :community_guidelines_good_standing - - # Whether or not the channel has any unresolved claims. - # Corresponds to the JSON property `contentIdClaimsGoodStanding` - # @return [Boolean] - attr_accessor :content_id_claims_good_standing - alias_method :content_id_claims_good_standing?, :content_id_claims_good_standing - - # Whether or not the channel has any copyright strikes. - # Corresponds to the JSON property `copyrightStrikesGoodStanding` - # @return [Boolean] - attr_accessor :copyright_strikes_good_standing - alias_method :copyright_strikes_good_standing?, :copyright_strikes_good_standing - - # Describes the general state of the channel. This field will always show if - # there are any issues whatsoever with the channel. Currently this field - # represents the result of the logical and operation over the community - # guidelines good standing, the copyright strikes good standing and the content - # ID claims good standing, but this may change in the future. - # Corresponds to the JSON property `overallGoodStanding` - # @return [Boolean] - attr_accessor :overall_good_standing - alias_method :overall_good_standing?, :overall_good_standing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @community_guidelines_good_standing = args[:community_guidelines_good_standing] unless args[:community_guidelines_good_standing].nil? - @content_id_claims_good_standing = args[:content_id_claims_good_standing] unless args[:content_id_claims_good_standing].nil? - @copyright_strikes_good_standing = args[:copyright_strikes_good_standing] unless args[:copyright_strikes_good_standing].nil? - @overall_good_standing = args[:overall_good_standing] unless args[:overall_good_standing].nil? - end - end - - # A channel banner returned as the response to a channel_banner.insert call. - class ChannelBannerResource - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # channelBannerResource". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The URL of this banner image. - # 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) - @etag = args[:etag] unless args[:etag].nil? - @kind = args[:kind] unless args[:kind].nil? - @url = args[:url] unless args[:url].nil? - end - end - - # Branding properties of a YouTube channel. - class ChannelBrandingSettings - include Google::Apis::Core::Hashable - - # Branding properties for the channel view. - # Corresponds to the JSON property `channel` - # @return [Google::Apis::YoutubeV3::ChannelSettings] - attr_accessor :channel - - # Additional experimental branding properties. - # Corresponds to the JSON property `hints` - # @return [Array] - attr_accessor :hints - - # Branding properties for images associated with the channel. - # Corresponds to the JSON property `image` - # @return [Google::Apis::YoutubeV3::ImageSettings] - attr_accessor :image - - # Branding properties for the watch. - # Corresponds to the JSON property `watch` - # @return [Google::Apis::YoutubeV3::WatchSettings] - attr_accessor :watch - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @channel = args[:channel] unless args[:channel].nil? - @hints = args[:hints] unless args[:hints].nil? - @image = args[:image] unless args[:image].nil? - @watch = args[:watch] unless args[:watch].nil? - end - end - - # Details about the content of a channel. - class ChannelContentDetails - include Google::Apis::Core::Hashable - - # The googlePlusUserId object identifies the Google+ profile ID associated with - # this channel. - # Corresponds to the JSON property `googlePlusUserId` - # @return [String] - attr_accessor :google_plus_user_id - - # - # Corresponds to the JSON property `relatedPlaylists` - # @return [Google::Apis::YoutubeV3::ChannelContentDetails::RelatedPlaylists] - attr_accessor :related_playlists - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @google_plus_user_id = args[:google_plus_user_id] unless args[:google_plus_user_id].nil? - @related_playlists = args[:related_playlists] unless args[:related_playlists].nil? - end - - # - class RelatedPlaylists - include Google::Apis::Core::Hashable - - # The ID of the playlist that contains the channel"s favorite videos. Use the - # playlistItems.insert and playlistItems.delete to add or remove items from - # that list. - # Corresponds to the JSON property `favorites` - # @return [String] - attr_accessor :favorites - - # The ID of the playlist that contains the channel"s liked videos. Use the - # playlistItems.insert and playlistItems.delete to add or remove items from - # that list. - # Corresponds to the JSON property `likes` - # @return [String] - attr_accessor :likes - - # The ID of the playlist that contains the channel"s uploaded videos. Use the - # videos.insert method to upload new videos and the videos.delete method to - # delete previously uploaded videos. - # Corresponds to the JSON property `uploads` - # @return [String] - attr_accessor :uploads - - # The ID of the playlist that contains the channel"s watch history. Use the - # playlistItems.insert and playlistItems.delete to add or remove items from - # that list. - # Corresponds to the JSON property `watchHistory` - # @return [String] - attr_accessor :watch_history - - # The ID of the playlist that contains the channel"s watch later playlist. Use - # the playlistItems.insert and playlistItems.delete to add or remove items from - # that list. - # Corresponds to the JSON property `watchLater` - # @return [String] - attr_accessor :watch_later - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @favorites = args[:favorites] unless args[:favorites].nil? - @likes = args[:likes] unless args[:likes].nil? - @uploads = args[:uploads] unless args[:uploads].nil? - @watch_history = args[:watch_history] unless args[:watch_history].nil? - @watch_later = args[:watch_later] unless args[:watch_later].nil? - end - end - end - - # The contentOwnerDetails object encapsulates channel data that is relevant for - # YouTube Partners linked with the channel. - class ChannelContentOwnerDetails - include Google::Apis::Core::Hashable - - # The ID of the content owner linked to the channel. - # Corresponds to the JSON property `contentOwner` - # @return [String] - attr_accessor :content_owner - - # The date and time of when the channel was linked to the content owner. The - # value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `timeLinked` - # @return [DateTime] - attr_accessor :time_linked - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_owner = args[:content_owner] unless args[:content_owner].nil? - @time_linked = args[:time_linked] unless args[:time_linked].nil? - end - end - - # Pings that the app shall fire (authenticated by biscotti cookie). Each ping - # has a context, in which the app must fire the ping, and a url identifying the - # ping. - class ChannelConversionPing - include Google::Apis::Core::Hashable - - # Defines the context of the ping. - # Corresponds to the JSON property `context` - # @return [String] - attr_accessor :context - - # The url (without the schema) that the player shall send the ping to. It's at - # caller's descretion to decide which schema to use (http vs https) Example of a - # returned url: //googleads.g.doubleclick.net/pagead/ viewthroughconversion/ - # 962985656/?data=path%3DtHe_path%3Btype%3D cview%3Butuid% - # 3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must append biscotti - # authentication (ms param in case of mobile, for example) to this ping. - # Corresponds to the JSON property `conversionUrl` - # @return [String] - attr_accessor :conversion_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @context = args[:context] unless args[:context].nil? - @conversion_url = args[:conversion_url] unless args[:conversion_url].nil? - end - end - - # The conversionPings object encapsulates information about conversion pings - # that need to be respected by the channel. - class ChannelConversionPings - include Google::Apis::Core::Hashable - - # Pings that the app shall fire (authenticated by biscotti cookie). Each ping - # has a context, in which the app must fire the ping, and a url identifying the - # ping. - # Corresponds to the JSON property `pings` - # @return [Array] - attr_accessor :pings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pings = args[:pings] unless args[:pings].nil? - end - end - - # - class ChannelId - include Google::Apis::Core::Hashable - - # - # 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) - @value = args[:value] unless args[:value].nil? - end - end - - # - class ListChannelsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of channels that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # channelListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # The token that can be used as the value of the pageToken parameter to retrieve - # the previous page in the result set. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Channel localization setting - class ChannelLocalization - include Google::Apis::Core::Hashable - - # The localized strings for channel's description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The localized strings for channel'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) - @description = args[:description] unless args[:description].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # - class ChannelSection - include Google::Apis::Core::Hashable - - # Details about a channelsection, including playlists and channels. - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeV3::ChannelSectionContentDetails] - attr_accessor :content_details - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the channel section. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # channelSection". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Localizations for different languages - # Corresponds to the JSON property `localizations` - # @return [Hash] - attr_accessor :localizations - - # Basic details about a channel section, including title, style and position. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::ChannelSectionSnippet] - attr_accessor :snippet - - # ChannelSection targeting setting. - # Corresponds to the JSON property `targeting` - # @return [Google::Apis::YoutubeV3::ChannelSectionTargeting] - attr_accessor :targeting - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_details = args[:content_details] unless args[:content_details].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @localizations = args[:localizations] unless args[:localizations].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @targeting = args[:targeting] unless args[:targeting].nil? - end - end - - # Details about a channelsection, including playlists and channels. - class ChannelSectionContentDetails - include Google::Apis::Core::Hashable - - # The channel ids for type multiple_channels. - # Corresponds to the JSON property `channels` - # @return [Array] - attr_accessor :channels - - # The playlist ids for type single_playlist and multiple_playlists. For - # singlePlaylist, only one playlistId is allowed. - # Corresponds to the JSON property `playlists` - # @return [Array] - attr_accessor :playlists - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @channels = args[:channels] unless args[:channels].nil? - @playlists = args[:playlists] unless args[:playlists].nil? - end - end - - # - class ListChannelSectionsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of ChannelSections that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # channelSectionListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # ChannelSection localization setting - class ChannelSectionLocalization - include Google::Apis::Core::Hashable - - # The localized strings for channel section'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) - @title = args[:title] unless args[:title].nil? - end - end - - # Basic details about a channel section, including title, style and position. - class ChannelSectionSnippet - include Google::Apis::Core::Hashable - - # The ID that YouTube uses to uniquely identify the channel that published the - # channel section. - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # The language of the channel section's default title and description. - # Corresponds to the JSON property `defaultLanguage` - # @return [String] - attr_accessor :default_language - - # ChannelSection localization setting - # Corresponds to the JSON property `localized` - # @return [Google::Apis::YoutubeV3::ChannelSectionLocalization] - attr_accessor :localized - - # The position of the channel section in the channel. - # Corresponds to the JSON property `position` - # @return [Fixnum] - attr_accessor :position - - # The style of the channel section. - # Corresponds to the JSON property `style` - # @return [String] - attr_accessor :style - - # The channel section's title for multiple_playlists and multiple_channels. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The type of the channel section. - # 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) - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @default_language = args[:default_language] unless args[:default_language].nil? - @localized = args[:localized] unless args[:localized].nil? - @position = args[:position] unless args[:position].nil? - @style = args[:style] unless args[:style].nil? - @title = args[:title] unless args[:title].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # ChannelSection targeting setting. - class ChannelSectionTargeting - include Google::Apis::Core::Hashable - - # The country the channel section is targeting. - # Corresponds to the JSON property `countries` - # @return [Array] - attr_accessor :countries - - # The language the channel section is targeting. - # Corresponds to the JSON property `languages` - # @return [Array] - attr_accessor :languages - - # The region the channel section is targeting. - # Corresponds to the JSON property `regions` - # @return [Array] - attr_accessor :regions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @countries = args[:countries] unless args[:countries].nil? - @languages = args[:languages] unless args[:languages].nil? - @regions = args[:regions] unless args[:regions].nil? - end - end - - # Branding properties for the channel view. - class ChannelSettings - include Google::Apis::Core::Hashable - - # The country of the channel. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # - # Corresponds to the JSON property `defaultLanguage` - # @return [String] - attr_accessor :default_language - - # Which content tab users should see when viewing the channel. - # Corresponds to the JSON property `defaultTab` - # @return [String] - attr_accessor :default_tab - - # Specifies the channel description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Title for the featured channels tab. - # Corresponds to the JSON property `featuredChannelsTitle` - # @return [String] - attr_accessor :featured_channels_title - - # The list of featured channels. - # Corresponds to the JSON property `featuredChannelsUrls` - # @return [Array] - attr_accessor :featured_channels_urls - - # Lists keywords associated with the channel, comma-separated. - # Corresponds to the JSON property `keywords` - # @return [String] - attr_accessor :keywords - - # Whether user-submitted comments left on the channel page need to be approved - # by the channel owner to be publicly visible. - # Corresponds to the JSON property `moderateComments` - # @return [Boolean] - attr_accessor :moderate_comments - alias_method :moderate_comments?, :moderate_comments - - # A prominent color that can be rendered on this channel page. - # Corresponds to the JSON property `profileColor` - # @return [String] - attr_accessor :profile_color - - # Whether the tab to browse the videos should be displayed. - # Corresponds to the JSON property `showBrowseView` - # @return [Boolean] - attr_accessor :show_browse_view - alias_method :show_browse_view?, :show_browse_view - - # Whether related channels should be proposed. - # Corresponds to the JSON property `showRelatedChannels` - # @return [Boolean] - attr_accessor :show_related_channels - alias_method :show_related_channels?, :show_related_channels - - # Specifies the channel title. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The ID for a Google Analytics account to track and measure traffic to the - # channels. - # Corresponds to the JSON property `trackingAnalyticsAccountId` - # @return [String] - attr_accessor :tracking_analytics_account_id - - # The trailer of the channel, for users that are not subscribers. - # Corresponds to the JSON property `unsubscribedTrailer` - # @return [String] - attr_accessor :unsubscribed_trailer - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] unless args[:country].nil? - @default_language = args[:default_language] unless args[:default_language].nil? - @default_tab = args[:default_tab] unless args[:default_tab].nil? - @description = args[:description] unless args[:description].nil? - @featured_channels_title = args[:featured_channels_title] unless args[:featured_channels_title].nil? - @featured_channels_urls = args[:featured_channels_urls] unless args[:featured_channels_urls].nil? - @keywords = args[:keywords] unless args[:keywords].nil? - @moderate_comments = args[:moderate_comments] unless args[:moderate_comments].nil? - @profile_color = args[:profile_color] unless args[:profile_color].nil? - @show_browse_view = args[:show_browse_view] unless args[:show_browse_view].nil? - @show_related_channels = args[:show_related_channels] unless args[:show_related_channels].nil? - @title = args[:title] unless args[:title].nil? - @tracking_analytics_account_id = args[:tracking_analytics_account_id] unless args[:tracking_analytics_account_id].nil? - @unsubscribed_trailer = args[:unsubscribed_trailer] unless args[:unsubscribed_trailer].nil? - end - end - - # Basic details about a channel, including title, description and thumbnails. - class ChannelSnippet - include Google::Apis::Core::Hashable - - # The country of the channel. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # The language of the channel's default title and description. - # Corresponds to the JSON property `defaultLanguage` - # @return [String] - attr_accessor :default_language - - # The description of the channel. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Channel localization setting - # Corresponds to the JSON property `localized` - # @return [Google::Apis::YoutubeV3::ChannelLocalization] - attr_accessor :localized - - # The date and time that the channel was created. The value is specified in ISO - # 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `publishedAt` - # @return [DateTime] - attr_accessor :published_at - - # Internal representation of thumbnails for a YouTube resource. - # Corresponds to the JSON property `thumbnails` - # @return [Google::Apis::YoutubeV3::ThumbnailDetails] - attr_accessor :thumbnails - - # The channel'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) - @country = args[:country] unless args[:country].nil? - @default_language = args[:default_language] unless args[:default_language].nil? - @description = args[:description] unless args[:description].nil? - @localized = args[:localized] unless args[:localized].nil? - @published_at = args[:published_at] unless args[:published_at].nil? - @thumbnails = args[:thumbnails] unless args[:thumbnails].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # Statistics about a channel: number of subscribers, number of videos in the - # channel, etc. - class ChannelStatistics - include Google::Apis::Core::Hashable - - # The number of comments for the channel. - # Corresponds to the JSON property `commentCount` - # @return [String] - attr_accessor :comment_count - - # Whether or not the number of subscribers is shown for this user. - # Corresponds to the JSON property `hiddenSubscriberCount` - # @return [Boolean] - attr_accessor :hidden_subscriber_count - alias_method :hidden_subscriber_count?, :hidden_subscriber_count - - # The number of subscribers that the channel has. - # Corresponds to the JSON property `subscriberCount` - # @return [String] - attr_accessor :subscriber_count - - # The number of videos uploaded to the channel. - # Corresponds to the JSON property `videoCount` - # @return [String] - attr_accessor :video_count - - # The number of times the channel has been viewed. - # Corresponds to the JSON property `viewCount` - # @return [String] - attr_accessor :view_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @comment_count = args[:comment_count] unless args[:comment_count].nil? - @hidden_subscriber_count = args[:hidden_subscriber_count] unless args[:hidden_subscriber_count].nil? - @subscriber_count = args[:subscriber_count] unless args[:subscriber_count].nil? - @video_count = args[:video_count] unless args[:video_count].nil? - @view_count = args[:view_count] unless args[:view_count].nil? - end - end - - # JSON template for the status part of a channel. - class ChannelStatus - include Google::Apis::Core::Hashable - - # If true, then the user is linked to either a YouTube username or G+ account. - # Otherwise, the user doesn't have a public YouTube identity. - # Corresponds to the JSON property `isLinked` - # @return [Boolean] - attr_accessor :is_linked - alias_method :is_linked?, :is_linked - - # The long uploads status of this channel. See - # Corresponds to the JSON property `longUploadsStatus` - # @return [String] - attr_accessor :long_uploads_status - - # Privacy status of the channel. - # Corresponds to the JSON property `privacyStatus` - # @return [String] - attr_accessor :privacy_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_linked = args[:is_linked] unless args[:is_linked].nil? - @long_uploads_status = args[:long_uploads_status] unless args[:long_uploads_status].nil? - @privacy_status = args[:privacy_status] unless args[:privacy_status].nil? - end - end - - # Freebase topic information related to the channel. - class ChannelTopicDetails - include Google::Apis::Core::Hashable - - # A list of Freebase topic IDs associated with the channel. You can retrieve - # information about each topic using the Freebase Topic API. - # Corresponds to the JSON property `topicIds` - # @return [Array] - attr_accessor :topic_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @topic_ids = args[:topic_ids] unless args[:topic_ids].nil? - end - end - - # A comment represents a single YouTube comment. - class Comment - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the comment. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # comment". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Basic details about a comment, such as its author and text. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::CommentSnippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # - class ListCommentsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of comments that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # commentListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Basic details about a comment, such as its author and text. - class CommentSnippet - include Google::Apis::Core::Hashable - - # The id of the author's YouTube channel, if any. - # Corresponds to the JSON property `authorChannelId` - # @return [Google::Apis::YoutubeV3::ChannelId] - attr_accessor :author_channel_id - - # Link to the author's YouTube channel, if any. - # Corresponds to the JSON property `authorChannelUrl` - # @return [String] - attr_accessor :author_channel_url - - # The name of the user who posted the comment. - # Corresponds to the JSON property `authorDisplayName` - # @return [String] - attr_accessor :author_display_name - - # Link to the author's Google+ profile, if any. - # Corresponds to the JSON property `authorGoogleplusProfileUrl` - # @return [String] - attr_accessor :author_googleplus_profile_url - - # The URL for the avatar of the user who posted the comment. - # Corresponds to the JSON property `authorProfileImageUrl` - # @return [String] - attr_accessor :author_profile_image_url - - # Whether the current viewer can rate this comment. - # Corresponds to the JSON property `canRate` - # @return [Boolean] - attr_accessor :can_rate - alias_method :can_rate?, :can_rate - - # The id of the corresponding YouTube channel. In case of a channel comment this - # is the channel the comment refers to. In case of a video comment it's the - # video's channel. - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # The total number of likes this comment has received. - # Corresponds to the JSON property `likeCount` - # @return [Fixnum] - attr_accessor :like_count - - # The comment's moderation status. Will not be set if the comments were - # requested through the id filter. - # Corresponds to the JSON property `moderationStatus` - # @return [String] - attr_accessor :moderation_status - - # The unique id of the parent comment, only set for replies. - # Corresponds to the JSON property `parentId` - # @return [String] - attr_accessor :parent_id - - # The date and time when the comment was orignally published. The value is - # specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `publishedAt` - # @return [DateTime] - attr_accessor :published_at - - # The comment's text. The format is either plain text or HTML dependent on what - # has been requested. Even the plain text representation may differ from the - # text originally posted in that it may replace video links with video titles - # etc. - # Corresponds to the JSON property `textDisplay` - # @return [String] - attr_accessor :text_display - - # The comment's original raw text as initially posted or last updated. The - # original text will only be returned if it is accessible to the viewer, which - # is only guaranteed if the viewer is the comment's author. - # Corresponds to the JSON property `textOriginal` - # @return [String] - attr_accessor :text_original - - # The date and time when was last updated . The value is specified in ISO 8601 ( - # YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `updatedAt` - # @return [DateTime] - attr_accessor :updated_at - - # The ID of the video the comment refers to, if any. - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - # The rating the viewer has given to this comment. For the time being this will - # never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may - # change in the future. - # Corresponds to the JSON property `viewerRating` - # @return [String] - attr_accessor :viewer_rating - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @author_channel_id = args[:author_channel_id] unless args[:author_channel_id].nil? - @author_channel_url = args[:author_channel_url] unless args[:author_channel_url].nil? - @author_display_name = args[:author_display_name] unless args[:author_display_name].nil? - @author_googleplus_profile_url = args[:author_googleplus_profile_url] unless args[:author_googleplus_profile_url].nil? - @author_profile_image_url = args[:author_profile_image_url] unless args[:author_profile_image_url].nil? - @can_rate = args[:can_rate] unless args[:can_rate].nil? - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @like_count = args[:like_count] unless args[:like_count].nil? - @moderation_status = args[:moderation_status] unless args[:moderation_status].nil? - @parent_id = args[:parent_id] unless args[:parent_id].nil? - @published_at = args[:published_at] unless args[:published_at].nil? - @text_display = args[:text_display] unless args[:text_display].nil? - @text_original = args[:text_original] unless args[:text_original].nil? - @updated_at = args[:updated_at] unless args[:updated_at].nil? - @video_id = args[:video_id] unless args[:video_id].nil? - @viewer_rating = args[:viewer_rating] unless args[:viewer_rating].nil? - end - end - - # A comment thread represents information that applies to a top level comment - # and all its replies. It can also include the top level comment itself and some - # of the replies. - class CommentThread - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the comment thread. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # commentThread". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Comments written in (direct or indirect) reply to the top level comment. - # Corresponds to the JSON property `replies` - # @return [Google::Apis::YoutubeV3::CommentThreadReplies] - attr_accessor :replies - - # Basic details about a comment thread. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::CommentThreadSnippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @replies = args[:replies] unless args[:replies].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # - class ListCommentThreadsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of comment threads that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # commentThreadListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Comments written in (direct or indirect) reply to the top level comment. - class CommentThreadReplies - include Google::Apis::Core::Hashable - - # A limited number of replies. Unless the number of replies returned equals - # total_reply_count in the snippet the returned replies are only a subset of the - # total number of replies. - # Corresponds to the JSON property `comments` - # @return [Array] - attr_accessor :comments - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @comments = args[:comments] unless args[:comments].nil? - end - end - - # Basic details about a comment thread. - class CommentThreadSnippet - include Google::Apis::Core::Hashable - - # Whether the current viewer of the thread can reply to it. This is viewer - # specific - other viewers may see a different value for this field. - # Corresponds to the JSON property `canReply` - # @return [Boolean] - attr_accessor :can_reply - alias_method :can_reply?, :can_reply - - # The YouTube channel the comments in the thread refer to or the channel with - # the video the comments refer to. If video_id isn't set the comments refer to - # the channel itself. - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # Whether the thread (and therefore all its comments) is visible to all YouTube - # users. - # Corresponds to the JSON property `isPublic` - # @return [Boolean] - attr_accessor :is_public - alias_method :is_public?, :is_public - - # A comment represents a single YouTube comment. - # Corresponds to the JSON property `topLevelComment` - # @return [Google::Apis::YoutubeV3::Comment] - attr_accessor :top_level_comment - - # The total number of replies (not including the top level comment). - # Corresponds to the JSON property `totalReplyCount` - # @return [Fixnum] - attr_accessor :total_reply_count - - # The ID of the video the comments refer to, if any. No video_id implies a - # channel discussion comment. - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @can_reply = args[:can_reply] unless args[:can_reply].nil? - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @is_public = args[:is_public] unless args[:is_public].nil? - @top_level_comment = args[:top_level_comment] unless args[:top_level_comment].nil? - @total_reply_count = args[:total_reply_count] unless args[:total_reply_count].nil? - @video_id = args[:video_id] unless args[:video_id].nil? - end - end - - # Ratings schemes. The country-specific ratings are mostly for movies and shows. - # NEXT_ID: 65 - class ContentRating - include Google::Apis::Core::Hashable - - # Rating system in Australia - Australian Classification Board - # Corresponds to the JSON property `acbRating` - # @return [String] - attr_accessor :acb_rating - - # Rating system for Italy - Autorit� per le Garanzie nelle Comunicazioni - # Corresponds to the JSON property `agcomRating` - # @return [String] - attr_accessor :agcom_rating - - # Rating system for Chile - Asociaci�n Nacional de Televisi�n - # Corresponds to the JSON property `anatelRating` - # @return [String] - attr_accessor :anatel_rating - - # British Board of Film Classification - # Corresponds to the JSON property `bbfcRating` - # @return [String] - attr_accessor :bbfc_rating - - # Rating system for Thailand - Board of Filmand Video Censors - # Corresponds to the JSON property `bfvcRating` - # @return [String] - attr_accessor :bfvc_rating - - # Rating system for Austria - Bundesministeriums f�r Unterricht, Kunst und - # Kultur! - # Corresponds to the JSON property `bmukkRating` - # @return [String] - attr_accessor :bmukk_rating - - # Rating system for Canadian TV - Canadian TV Classification System - # Corresponds to the JSON property `catvRating` - # @return [String] - attr_accessor :catv_rating - - # Rating system for French Canadian TV - Regie du cinema - # Corresponds to the JSON property `catvfrRating` - # @return [String] - attr_accessor :catvfr_rating - - # Rating system in India - Central Board of Film Certification - # Corresponds to the JSON property `cbfcRating` - # @return [String] - attr_accessor :cbfc_rating - - # Rating system for Chile - Consejo de Calificaci�n Cinematogr�fica - # Corresponds to the JSON property `cccRating` - # @return [String] - attr_accessor :ccc_rating - - # Rating system for Portugal - Comiss�o de Classifica��o de Espect�culos - # Corresponds to the JSON property `cceRating` - # @return [String] - attr_accessor :cce_rating - - # Rating system for Switzerland - Switzerland Rating System - # Corresponds to the JSON property `chfilmRating` - # @return [String] - attr_accessor :chfilm_rating - - # Canadian Home Video Rating System - # Corresponds to the JSON property `chvrsRating` - # @return [String] - attr_accessor :chvrs_rating - - # Rating system for Belgium - Belgium Rating System - # Corresponds to the JSON property `cicfRating` - # @return [String] - attr_accessor :cicf_rating - - # Rating system for Romania - CONSILIUL NATIONAL AL AUDIOVIZUALULUI - CNA - # Corresponds to the JSON property `cnaRating` - # @return [String] - attr_accessor :cna_rating - - # Rating system for France - Conseil sup�rieur de l?audiovisuel - # Corresponds to the JSON property `csaRating` - # @return [String] - attr_accessor :csa_rating - - # Rating system for Luxembourg - Commission de surveillance de la classification - # des films - # Corresponds to the JSON property `cscfRating` - # @return [String] - attr_accessor :cscf_rating - - # Rating system for Czech republic - Czech republic Rating System - # Corresponds to the JSON property `czfilmRating` - # @return [String] - attr_accessor :czfilm_rating - - # Rating system in Brazil - Department of Justice, Rating, Titles and - # Qualification - # Corresponds to the JSON property `djctqRating` - # @return [String] - attr_accessor :djctq_rating - - # - # Corresponds to the JSON property `djctqRatingReasons` - # @return [Array] - attr_accessor :djctq_rating_reasons - - # Rating system for Estonia - Estonia Rating System - # Corresponds to the JSON property `eefilmRating` - # @return [String] - attr_accessor :eefilm_rating - - # Rating system for Egypt - Egypt Rating System - # Corresponds to the JSON property `egfilmRating` - # @return [String] - attr_accessor :egfilm_rating - - # Rating system in Japan - Eiga Rinri Kanri Iinkai - # Corresponds to the JSON property `eirinRating` - # @return [String] - attr_accessor :eirin_rating - - # Rating system for Malaysia - Film Censorship Board of Malaysia - # Corresponds to the JSON property `fcbmRating` - # @return [String] - attr_accessor :fcbm_rating - - # Rating system for Hong kong - Office for Film, Newspaper and Article - # Administration - # Corresponds to the JSON property `fcoRating` - # @return [String] - attr_accessor :fco_rating - - # Rating system in France - French Minister of Culture - # Corresponds to the JSON property `fmocRating` - # @return [String] - attr_accessor :fmoc_rating - - # Rating system for South africa - Film & Publication Board - # Corresponds to the JSON property `fpbRating` - # @return [String] - attr_accessor :fpb_rating - - # Rating system in Germany - Voluntary Self Regulation of the Movie Industry - # Corresponds to the JSON property `fskRating` - # @return [String] - attr_accessor :fsk_rating - - # Rating system for Greece - Greece Rating System - # Corresponds to the JSON property `grfilmRating` - # @return [String] - attr_accessor :grfilm_rating - - # Rating system in Spain - Instituto de Cinematografia y de las Artes - # Audiovisuales - # Corresponds to the JSON property `icaaRating` - # @return [String] - attr_accessor :icaa_rating - - # Rating system in Ireland - Irish Film Classification Office - # Corresponds to the JSON property `ifcoRating` - # @return [String] - attr_accessor :ifco_rating - - # Rating system for Israel - Israel Rating System - # Corresponds to the JSON property `ilfilmRating` - # @return [String] - attr_accessor :ilfilm_rating - - # Rating system for Argentina - Instituto Nacional de Cine y Artes Audiovisuales - # Corresponds to the JSON property `incaaRating` - # @return [String] - attr_accessor :incaa_rating - - # Rating system for Kenya - Kenya Film Classification Board - # Corresponds to the JSON property `kfcbRating` - # @return [String] - attr_accessor :kfcb_rating - - # Rating system for Netherlands - Nederlands Instituut voor de Classificatie van - # Audiovisuele Media - # Corresponds to the JSON property `kijkwijzerRating` - # @return [String] - attr_accessor :kijkwijzer_rating - - # Rating system in South Korea - Korea Media Rating Board - # Corresponds to the JSON property `kmrbRating` - # @return [String] - attr_accessor :kmrb_rating - - # Rating system for Indonesia - Lembaga Sensor Film - # Corresponds to the JSON property `lsfRating` - # @return [String] - attr_accessor :lsf_rating - - # Rating system for Malta - Film Age-Classification Board - # Corresponds to the JSON property `mccaaRating` - # @return [String] - attr_accessor :mccaa_rating - - # Rating system for Denmark - The Media Council for Children and Young People - # Corresponds to the JSON property `mccypRating` - # @return [String] - attr_accessor :mccyp_rating - - # Rating system for Singapore - Media Development Authority - # Corresponds to the JSON property `mdaRating` - # @return [String] - attr_accessor :mda_rating - - # Rating system for Norway - Medietilsynet - # Corresponds to the JSON property `medietilsynetRating` - # @return [String] - attr_accessor :medietilsynet_rating - - # Rating system for Finland - Finnish Centre for Media Education and Audiovisual - # Media - # Corresponds to the JSON property `mekuRating` - # @return [String] - attr_accessor :meku_rating - - # Rating system in Italy - Ministero dei Beni e delle Attivita Culturali e del - # Turismo - # Corresponds to the JSON property `mibacRating` - # @return [String] - attr_accessor :mibac_rating - - # Rating system for Colombia - MoC - # Corresponds to the JSON property `mocRating` - # @return [String] - attr_accessor :moc_rating - - # Rating system for Taiwan - Ministry of Culture - Tawan - # Corresponds to the JSON property `moctwRating` - # @return [String] - attr_accessor :moctw_rating - - # Motion Picture Association of America rating for the content. - # Corresponds to the JSON property `mpaaRating` - # @return [String] - attr_accessor :mpaa_rating - - # Rating system for Philippines - MOVIE AND TELEVISION REVIEW AND CLASSIFICATION - # BOARD - # Corresponds to the JSON property `mtrcbRating` - # @return [String] - attr_accessor :mtrcb_rating - - # Rating system for Maldives - National Bureau of Classification - # Corresponds to the JSON property `nbcRating` - # @return [String] - attr_accessor :nbc_rating - - # Rating system for Poland - National Broadcasting Council - # Corresponds to the JSON property `nbcplRating` - # @return [String] - attr_accessor :nbcpl_rating - - # Rating system for Bulgaria - National Film Centre - # Corresponds to the JSON property `nfrcRating` - # @return [String] - attr_accessor :nfrc_rating - - # Rating system for Nigeria - National Film and Video Censors Board - # Corresponds to the JSON property `nfvcbRating` - # @return [String] - attr_accessor :nfvcb_rating - - # Rating system for Latvia - National Film Center of Latvia - # Corresponds to the JSON property `nkclvRating` - # @return [String] - attr_accessor :nkclv_rating - - # Rating system in New Zealand - Office of Film and Literature Classification - # Corresponds to the JSON property `oflcRating` - # @return [String] - attr_accessor :oflc_rating - - # Rating system for Peru - Peru Rating System - # Corresponds to the JSON property `pefilmRating` - # @return [String] - attr_accessor :pefilm_rating - - # Rating system for Hungary - Rating Committee of the National Office of Film - # Corresponds to the JSON property `rcnofRating` - # @return [String] - attr_accessor :rcnof_rating - - # Rating system for Venezuela - SiBCI - # Corresponds to the JSON property `resorteviolenciaRating` - # @return [String] - attr_accessor :resorteviolencia_rating - - # Rating system in Mexico - General Directorate of Radio, Television and - # Cinematography - # Corresponds to the JSON property `rtcRating` - # @return [String] - attr_accessor :rtc_rating - - # Rating system for Ireland - Raidi� Teilif�s �ireann - # Corresponds to the JSON property `rteRating` - # @return [String] - attr_accessor :rte_rating - - # Rating system in Russia - # Corresponds to the JSON property `russiaRating` - # @return [String] - attr_accessor :russia_rating - - # Rating system for Slovakia - Slovakia Rating System - # Corresponds to the JSON property `skfilmRating` - # @return [String] - attr_accessor :skfilm_rating - - # Rating system for Iceland - SMAIS - # Corresponds to the JSON property `smaisRating` - # @return [String] - attr_accessor :smais_rating - - # Rating system for Sweden - Statens medier�d (National Media Council) - # Corresponds to the JSON property `smsaRating` - # @return [String] - attr_accessor :smsa_rating - - # TV Parental Guidelines rating of the content. - # Corresponds to the JSON property `tvpgRating` - # @return [String] - attr_accessor :tvpg_rating - - # Internal YouTube rating. - # Corresponds to the JSON property `ytRating` - # @return [String] - attr_accessor :yt_rating - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @acb_rating = args[:acb_rating] unless args[:acb_rating].nil? - @agcom_rating = args[:agcom_rating] unless args[:agcom_rating].nil? - @anatel_rating = args[:anatel_rating] unless args[:anatel_rating].nil? - @bbfc_rating = args[:bbfc_rating] unless args[:bbfc_rating].nil? - @bfvc_rating = args[:bfvc_rating] unless args[:bfvc_rating].nil? - @bmukk_rating = args[:bmukk_rating] unless args[:bmukk_rating].nil? - @catv_rating = args[:catv_rating] unless args[:catv_rating].nil? - @catvfr_rating = args[:catvfr_rating] unless args[:catvfr_rating].nil? - @cbfc_rating = args[:cbfc_rating] unless args[:cbfc_rating].nil? - @ccc_rating = args[:ccc_rating] unless args[:ccc_rating].nil? - @cce_rating = args[:cce_rating] unless args[:cce_rating].nil? - @chfilm_rating = args[:chfilm_rating] unless args[:chfilm_rating].nil? - @chvrs_rating = args[:chvrs_rating] unless args[:chvrs_rating].nil? - @cicf_rating = args[:cicf_rating] unless args[:cicf_rating].nil? - @cna_rating = args[:cna_rating] unless args[:cna_rating].nil? - @csa_rating = args[:csa_rating] unless args[:csa_rating].nil? - @cscf_rating = args[:cscf_rating] unless args[:cscf_rating].nil? - @czfilm_rating = args[:czfilm_rating] unless args[:czfilm_rating].nil? - @djctq_rating = args[:djctq_rating] unless args[:djctq_rating].nil? - @djctq_rating_reasons = args[:djctq_rating_reasons] unless args[:djctq_rating_reasons].nil? - @eefilm_rating = args[:eefilm_rating] unless args[:eefilm_rating].nil? - @egfilm_rating = args[:egfilm_rating] unless args[:egfilm_rating].nil? - @eirin_rating = args[:eirin_rating] unless args[:eirin_rating].nil? - @fcbm_rating = args[:fcbm_rating] unless args[:fcbm_rating].nil? - @fco_rating = args[:fco_rating] unless args[:fco_rating].nil? - @fmoc_rating = args[:fmoc_rating] unless args[:fmoc_rating].nil? - @fpb_rating = args[:fpb_rating] unless args[:fpb_rating].nil? - @fsk_rating = args[:fsk_rating] unless args[:fsk_rating].nil? - @grfilm_rating = args[:grfilm_rating] unless args[:grfilm_rating].nil? - @icaa_rating = args[:icaa_rating] unless args[:icaa_rating].nil? - @ifco_rating = args[:ifco_rating] unless args[:ifco_rating].nil? - @ilfilm_rating = args[:ilfilm_rating] unless args[:ilfilm_rating].nil? - @incaa_rating = args[:incaa_rating] unless args[:incaa_rating].nil? - @kfcb_rating = args[:kfcb_rating] unless args[:kfcb_rating].nil? - @kijkwijzer_rating = args[:kijkwijzer_rating] unless args[:kijkwijzer_rating].nil? - @kmrb_rating = args[:kmrb_rating] unless args[:kmrb_rating].nil? - @lsf_rating = args[:lsf_rating] unless args[:lsf_rating].nil? - @mccaa_rating = args[:mccaa_rating] unless args[:mccaa_rating].nil? - @mccyp_rating = args[:mccyp_rating] unless args[:mccyp_rating].nil? - @mda_rating = args[:mda_rating] unless args[:mda_rating].nil? - @medietilsynet_rating = args[:medietilsynet_rating] unless args[:medietilsynet_rating].nil? - @meku_rating = args[:meku_rating] unless args[:meku_rating].nil? - @mibac_rating = args[:mibac_rating] unless args[:mibac_rating].nil? - @moc_rating = args[:moc_rating] unless args[:moc_rating].nil? - @moctw_rating = args[:moctw_rating] unless args[:moctw_rating].nil? - @mpaa_rating = args[:mpaa_rating] unless args[:mpaa_rating].nil? - @mtrcb_rating = args[:mtrcb_rating] unless args[:mtrcb_rating].nil? - @nbc_rating = args[:nbc_rating] unless args[:nbc_rating].nil? - @nbcpl_rating = args[:nbcpl_rating] unless args[:nbcpl_rating].nil? - @nfrc_rating = args[:nfrc_rating] unless args[:nfrc_rating].nil? - @nfvcb_rating = args[:nfvcb_rating] unless args[:nfvcb_rating].nil? - @nkclv_rating = args[:nkclv_rating] unless args[:nkclv_rating].nil? - @oflc_rating = args[:oflc_rating] unless args[:oflc_rating].nil? - @pefilm_rating = args[:pefilm_rating] unless args[:pefilm_rating].nil? - @rcnof_rating = args[:rcnof_rating] unless args[:rcnof_rating].nil? - @resorteviolencia_rating = args[:resorteviolencia_rating] unless args[:resorteviolencia_rating].nil? - @rtc_rating = args[:rtc_rating] unless args[:rtc_rating].nil? - @rte_rating = args[:rte_rating] unless args[:rte_rating].nil? - @russia_rating = args[:russia_rating] unless args[:russia_rating].nil? - @skfilm_rating = args[:skfilm_rating] unless args[:skfilm_rating].nil? - @smais_rating = args[:smais_rating] unless args[:smais_rating].nil? - @smsa_rating = args[:smsa_rating] unless args[:smsa_rating].nil? - @tvpg_rating = args[:tvpg_rating] unless args[:tvpg_rating].nil? - @yt_rating = args[:yt_rating] unless args[:yt_rating].nil? - end - end - - # Geographical coordinates of a point, in WGS84. - class GeoPoint - include Google::Apis::Core::Hashable - - # Altitude above the reference ellipsoid, in meters. - # Corresponds to the JSON property `altitude` - # @return [Float] - attr_accessor :altitude - - # Latitude in degrees. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # Longitude in degrees. - # 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) - @altitude = args[:altitude] unless args[:altitude].nil? - @latitude = args[:latitude] unless args[:latitude].nil? - @longitude = args[:longitude] unless args[:longitude].nil? - end - end - - # A guideCategory resource identifies a category that YouTube algorithmically - # assigns based on a channel's content or other indicators, such as the channel' - # s popularity. The list is similar to video categories, with the difference - # being that a video's uploader can assign a video category but only YouTube can - # assign a channel category. - class GuideCategory - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the guide category. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # guideCategory". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Basic details about a guide category. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::GuideCategorySnippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # - class ListGuideCategoriesResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of categories that can be associated with YouTube channels. In this map, - # the category ID is the map key, and its value is the corresponding - # guideCategory resource. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # guideCategoryListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # The token that can be used as the value of the pageToken parameter to retrieve - # the previous page in the result set. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Basic details about a guide category. - class GuideCategorySnippet - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # Description of the guide category. - # 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) - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # An i18nLanguage resource identifies a UI language currently supported by - # YouTube. - class I18nLanguage - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the i18n language. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # i18nLanguage". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Basic details about an i18n language, such as language code and human-readable - # name. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::I18nLanguageSnippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # - class ListI18nLanguagesResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of supported i18n languages. In this map, the i18n language ID is the - # map key, and its value is the corresponding i18nLanguage resource. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # i18nLanguageListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Basic details about an i18n language, such as language code and human-readable - # name. - class I18nLanguageSnippet - include Google::Apis::Core::Hashable - - # A short BCP-47 code that uniquely identifies a language. - # Corresponds to the JSON property `hl` - # @return [String] - attr_accessor :hl - - # The human-readable name of the language in the language itself. - # 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) - @hl = args[:hl] unless args[:hl].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # A i18nRegion resource identifies a region where YouTube is available. - class I18nRegion - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the i18n region. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # i18nRegion". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Basic details about an i18n region, such as region code and human-readable - # name. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::I18nRegionSnippet] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - end - end - - # - class ListI18nRegionsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of regions where YouTube is available. In this map, the i18n region ID - # is the map key, and its value is the corresponding i18nRegion resource. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # i18nRegionListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_id].nil? - @items = args[:items] unless args[:items].nil? - @kind = args[:kind] unless args[:kind].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Basic details about an i18n region, such as region code and human-readable - # name. - class I18nRegionSnippet - include Google::Apis::Core::Hashable - - # The region code as a 2-letter ISO country code. - # Corresponds to the JSON property `gl` - # @return [String] - attr_accessor :gl - - # The human-readable name of the region. - # 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) - @gl = args[:gl] unless args[:gl].nil? - @name = args[:name] unless args[:name].nil? - end - end - - # Branding properties for images associated with the channel. - class ImageSettings - include Google::Apis::Core::Hashable - - # The URL for the background image shown on the video watch page. The image - # should be 1200px by 615px, with a maximum file size of 128k. - # Corresponds to the JSON property `backgroundImageUrl` - # @return [Google::Apis::YoutubeV3::LocalizedProperty] - attr_accessor :background_image_url - - # This is used only in update requests; if it's set, we use this URL to generate - # all of the above banner URLs. - # Corresponds to the JSON property `bannerExternalUrl` - # @return [String] - attr_accessor :banner_external_url - - # Banner image. Desktop size (1060x175). - # Corresponds to the JSON property `bannerImageUrl` - # @return [String] - attr_accessor :banner_image_url - - # Banner image. Mobile size high resolution (1440x395). - # Corresponds to the JSON property `bannerMobileExtraHdImageUrl` - # @return [String] - attr_accessor :banner_mobile_extra_hd_image_url - - # Banner image. Mobile size high resolution (1280x360). - # Corresponds to the JSON property `bannerMobileHdImageUrl` - # @return [String] - attr_accessor :banner_mobile_hd_image_url - - # Banner image. Mobile size (640x175). - # Corresponds to the JSON property `bannerMobileImageUrl` - # @return [String] - attr_accessor :banner_mobile_image_url - - # Banner image. Mobile size low resolution (320x88). - # Corresponds to the JSON property `bannerMobileLowImageUrl` - # @return [String] - attr_accessor :banner_mobile_low_image_url - - # Banner image. Mobile size medium/high resolution (960x263). - # Corresponds to the JSON property `bannerMobileMediumHdImageUrl` - # @return [String] - attr_accessor :banner_mobile_medium_hd_image_url - - # Banner image. Tablet size extra high resolution (2560x424). - # Corresponds to the JSON property `bannerTabletExtraHdImageUrl` - # @return [String] - attr_accessor :banner_tablet_extra_hd_image_url - - # Banner image. Tablet size high resolution (2276x377). - # Corresponds to the JSON property `bannerTabletHdImageUrl` - # @return [String] - attr_accessor :banner_tablet_hd_image_url - - # Banner image. Tablet size (1707x283). - # Corresponds to the JSON property `bannerTabletImageUrl` - # @return [String] - attr_accessor :banner_tablet_image_url - - # Banner image. Tablet size low resolution (1138x188). - # Corresponds to the JSON property `bannerTabletLowImageUrl` - # @return [String] - attr_accessor :banner_tablet_low_image_url - - # Banner image. TV size high resolution (1920x1080). - # Corresponds to the JSON property `bannerTvHighImageUrl` - # @return [String] - attr_accessor :banner_tv_high_image_url - - # Banner image. TV size extra high resolution (2120x1192). - # Corresponds to the JSON property `bannerTvImageUrl` - # @return [String] - attr_accessor :banner_tv_image_url - - # Banner image. TV size low resolution (854x480). - # Corresponds to the JSON property `bannerTvLowImageUrl` - # @return [String] - attr_accessor :banner_tv_low_image_url - - # Banner image. TV size medium resolution (1280x720). - # Corresponds to the JSON property `bannerTvMediumImageUrl` - # @return [String] - attr_accessor :banner_tv_medium_image_url - - # The image map script for the large banner image. - # Corresponds to the JSON property `largeBrandedBannerImageImapScript` - # @return [Google::Apis::YoutubeV3::LocalizedProperty] - attr_accessor :large_branded_banner_image_imap_script - - # The URL for the 854px by 70px image that appears below the video player in the - # expanded video view of the video watch page. - # Corresponds to the JSON property `largeBrandedBannerImageUrl` - # @return [Google::Apis::YoutubeV3::LocalizedProperty] - attr_accessor :large_branded_banner_image_url - - # The image map script for the small banner image. - # Corresponds to the JSON property `smallBrandedBannerImageImapScript` - # @return [Google::Apis::YoutubeV3::LocalizedProperty] - attr_accessor :small_branded_banner_image_imap_script - - # The URL for the 640px by 70px banner image that appears below the video player - # in the default view of the video watch page. - # Corresponds to the JSON property `smallBrandedBannerImageUrl` - # @return [Google::Apis::YoutubeV3::LocalizedProperty] - attr_accessor :small_branded_banner_image_url - - # The URL for a 1px by 1px tracking pixel that can be used to collect statistics - # for views of the channel or video pages. - # Corresponds to the JSON property `trackingImageUrl` - # @return [String] - attr_accessor :tracking_image_url - - # The URL for the image that appears above the top-left corner of the video - # player. This is a 25-pixel-high image with a flexible width that cannot exceed - # 170 pixels. - # Corresponds to the JSON property `watchIconImageUrl` - # @return [String] - attr_accessor :watch_icon_image_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @background_image_url = args[:background_image_url] unless args[:background_image_url].nil? - @banner_external_url = args[:banner_external_url] unless args[:banner_external_url].nil? - @banner_image_url = args[:banner_image_url] unless args[:banner_image_url].nil? - @banner_mobile_extra_hd_image_url = args[:banner_mobile_extra_hd_image_url] unless args[:banner_mobile_extra_hd_image_url].nil? - @banner_mobile_hd_image_url = args[:banner_mobile_hd_image_url] unless args[:banner_mobile_hd_image_url].nil? - @banner_mobile_image_url = args[:banner_mobile_image_url] unless args[:banner_mobile_image_url].nil? - @banner_mobile_low_image_url = args[:banner_mobile_low_image_url] unless args[:banner_mobile_low_image_url].nil? - @banner_mobile_medium_hd_image_url = args[:banner_mobile_medium_hd_image_url] unless args[:banner_mobile_medium_hd_image_url].nil? - @banner_tablet_extra_hd_image_url = args[:banner_tablet_extra_hd_image_url] unless args[:banner_tablet_extra_hd_image_url].nil? - @banner_tablet_hd_image_url = args[:banner_tablet_hd_image_url] unless args[:banner_tablet_hd_image_url].nil? - @banner_tablet_image_url = args[:banner_tablet_image_url] unless args[:banner_tablet_image_url].nil? - @banner_tablet_low_image_url = args[:banner_tablet_low_image_url] unless args[:banner_tablet_low_image_url].nil? - @banner_tv_high_image_url = args[:banner_tv_high_image_url] unless args[:banner_tv_high_image_url].nil? - @banner_tv_image_url = args[:banner_tv_image_url] unless args[:banner_tv_image_url].nil? - @banner_tv_low_image_url = args[:banner_tv_low_image_url] unless args[:banner_tv_low_image_url].nil? - @banner_tv_medium_image_url = args[:banner_tv_medium_image_url] unless args[:banner_tv_medium_image_url].nil? - @large_branded_banner_image_imap_script = args[:large_branded_banner_image_imap_script] unless args[:large_branded_banner_image_imap_script].nil? - @large_branded_banner_image_url = args[:large_branded_banner_image_url] unless args[:large_branded_banner_image_url].nil? - @small_branded_banner_image_imap_script = args[:small_branded_banner_image_imap_script] unless args[:small_branded_banner_image_imap_script].nil? - @small_branded_banner_image_url = args[:small_branded_banner_image_url] unless args[:small_branded_banner_image_url].nil? - @tracking_image_url = args[:tracking_image_url] unless args[:tracking_image_url].nil? - @watch_icon_image_url = args[:watch_icon_image_url] unless args[:watch_icon_image_url].nil? - end - end - - # Describes information necessary for ingesting an RTMP or an HTTP stream. - class IngestionInfo - include Google::Apis::Core::Hashable - - # The backup ingestion URL that you should use to stream video to YouTube. You - # have the option of simultaneously streaming the content that you are sending - # to the ingestionAddress to this URL. - # Corresponds to the JSON property `backupIngestionAddress` - # @return [String] - attr_accessor :backup_ingestion_address - - # The primary ingestion URL that you should use to stream video to YouTube. You - # must stream video to this URL. - # Depending on which application or tool you use to encode your video stream, - # you may need to enter the stream URL and stream name separately or you may - # need to concatenate them in the following format: - # STREAM_URL/STREAM_NAME - # Corresponds to the JSON property `ingestionAddress` - # @return [String] - attr_accessor :ingestion_address - - # The HTTP or RTMP stream name that YouTube assigns to the video stream. - # Corresponds to the JSON property `streamName` - # @return [String] - attr_accessor :stream_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @backup_ingestion_address = args[:backup_ingestion_address] unless args[:backup_ingestion_address].nil? - @ingestion_address = args[:ingestion_address] unless args[:ingestion_address].nil? - @stream_name = args[:stream_name] unless args[:stream_name].nil? - end - end - - # - class InvideoBranding - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `imageBytes` - # @return [String] - attr_accessor :image_bytes - - # - # Corresponds to the JSON property `imageUrl` - # @return [String] - attr_accessor :image_url - - # Describes the spatial position of a visual widget inside a video. It is a - # union of various position types, out of which only will be set one. - # Corresponds to the JSON property `position` - # @return [Google::Apis::YoutubeV3::InvideoPosition] - attr_accessor :position - - # - # Corresponds to the JSON property `targetChannelId` - # @return [String] - attr_accessor :target_channel_id - - # Describes a temporal position of a visual widget inside a video. - # Corresponds to the JSON property `timing` - # @return [Google::Apis::YoutubeV3::InvideoTiming] - attr_accessor :timing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @image_bytes = args[:image_bytes] unless args[:image_bytes].nil? - @image_url = args[:image_url] unless args[:image_url].nil? - @position = args[:position] unless args[:position].nil? - @target_channel_id = args[:target_channel_id] unless args[:target_channel_id].nil? - @timing = args[:timing] unless args[:timing].nil? - end - end - - # Describes the spatial position of a visual widget inside a video. It is a - # union of various position types, out of which only will be set one. - class InvideoPosition - include Google::Apis::Core::Hashable - - # Describes in which corner of the video the visual widget will appear. - # Corresponds to the JSON property `cornerPosition` - # @return [String] - attr_accessor :corner_position - - # Defines the position 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) - @corner_position = args[:corner_position] unless args[:corner_position].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Describes an invideo promotion campaign consisting of multiple promoted items. - # A campaign belongs to a single channel_id. - class InvideoPromotion - include Google::Apis::Core::Hashable - - # Describes a temporal position of a visual widget inside a video. - # Corresponds to the JSON property `defaultTiming` - # @return [Google::Apis::YoutubeV3::InvideoTiming] - attr_accessor :default_timing - - # List of promoted items in decreasing priority. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Describes the spatial position of a visual widget inside a video. It is a - # union of various position types, out of which only will be set one. - # Corresponds to the JSON property `position` - # @return [Google::Apis::YoutubeV3::InvideoPosition] - attr_accessor :position - - # Indicates whether the channel's promotional campaign uses "smart timing." This - # feature attempts to show promotions at a point in the video when they are more - # likely to be clicked and less likely to disrupt the viewing experience. This - # feature also picks up a single promotion to show on each video. - # Corresponds to the JSON property `useSmartTiming` - # @return [Boolean] - attr_accessor :use_smart_timing - alias_method :use_smart_timing?, :use_smart_timing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default_timing = args[:default_timing] unless args[:default_timing].nil? - @items = args[:items] unless args[:items].nil? - @position = args[:position] unless args[:position].nil? - @use_smart_timing = args[:use_smart_timing] unless args[:use_smart_timing].nil? - end - end - - # Describes a temporal position of a visual widget inside a video. - class InvideoTiming - include Google::Apis::Core::Hashable - - # Defines the duration in milliseconds for which the promotion should be - # displayed. If missing, the client should use the default. - # Corresponds to the JSON property `durationMs` - # @return [String] - attr_accessor :duration_ms - - # Defines the time at which the promotion will appear. Depending on the value of - # type the value of the offsetMs field will represent a time offset from the - # start or from the end of the video, expressed in milliseconds. - # Corresponds to the JSON property `offsetMs` - # @return [String] - attr_accessor :offset_ms - - # Describes a timing type. If the value is offsetFromStart, then the offsetMs - # field represents an offset from the start of the video. If the value is - # offsetFromEnd, then the offsetMs field represents an offset from the end of - # the video. - # 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) - @duration_ms = args[:duration_ms] unless args[:duration_ms].nil? - @offset_ms = args[:offset_ms] unless args[:offset_ms].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # - class LanguageTag - include Google::Apis::Core::Hashable - - # - # 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) - @value = args[:value] unless args[:value].nil? - end - end - - # A liveBroadcast resource represents an event that will be streamed, via live - # video, on YouTube. - class LiveBroadcast - include Google::Apis::Core::Hashable - - # Detailed settings of a broadcast. - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeV3::LiveBroadcastContentDetails] - attr_accessor :content_details - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube assigns to uniquely identify the broadcast. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # liveBroadcast". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The snippet object contains basic details about the event, including its title, - # description, start time, and end time. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::LiveBroadcastSnippet] - attr_accessor :snippet - - # Statistics about the live broadcast. These represent a snapshot of the values - # at the time of the request. Statistics are only returned for live broadcasts. - # Corresponds to the JSON property `statistics` - # @return [Google::Apis::YoutubeV3::LiveBroadcastStatistics] - attr_accessor :statistics - - # The status object contains information about the event's status. - # Corresponds to the JSON property `status` - # @return [Google::Apis::YoutubeV3::LiveBroadcastStatus] - attr_accessor :status - - # - # Corresponds to the JSON property `topicDetails` - # @return [Google::Apis::YoutubeV3::LiveBroadcastTopicDetails] - attr_accessor :topic_details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_details = args[:content_details] unless args[:content_details].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @statistics = args[:statistics] unless args[:statistics].nil? - @status = args[:status] unless args[:status].nil? - @topic_details = args[:topic_details] unless args[:topic_details].nil? - end - end - - # Detailed settings of a broadcast. - class LiveBroadcastContentDetails - include Google::Apis::Core::Hashable - - # This value uniquely identifies the live stream bound to the broadcast. - # Corresponds to the JSON property `boundStreamId` - # @return [String] - attr_accessor :bound_stream_id - - # This setting indicates whether closed captioning is enabled for this broadcast. - # The ingestion URL of the closed captions is returned through the liveStreams - # API. - # Corresponds to the JSON property `enableClosedCaptions` - # @return [Boolean] - attr_accessor :enable_closed_captions - alias_method :enable_closed_captions?, :enable_closed_captions - - # This setting indicates whether YouTube should enable content encryption for - # the broadcast. - # Corresponds to the JSON property `enableContentEncryption` - # @return [Boolean] - attr_accessor :enable_content_encryption - alias_method :enable_content_encryption?, :enable_content_encryption - - # This setting determines whether viewers can access DVR controls while watching - # the video. DVR controls enable the viewer to control the video playback - # experience by pausing, rewinding, or fast forwarding content. The default - # value for this property is true. - # Important: You must set the value to true and also set the enableArchive - # property's value to true if you want to make playback available immediately - # after the broadcast ends. - # Corresponds to the JSON property `enableDvr` - # @return [Boolean] - attr_accessor :enable_dvr - alias_method :enable_dvr?, :enable_dvr - - # This setting indicates whether the broadcast video can be played in an - # embedded player. If you choose to archive the video (using the enableArchive - # property), this setting will also apply to the archived video. - # Corresponds to the JSON property `enableEmbed` - # @return [Boolean] - attr_accessor :enable_embed - alias_method :enable_embed?, :enable_embed - - # - # Corresponds to the JSON property `enableLowLatency` - # @return [Boolean] - attr_accessor :enable_low_latency - alias_method :enable_low_latency?, :enable_low_latency - - # Settings and Info of the monitor stream - # Corresponds to the JSON property `monitorStream` - # @return [Google::Apis::YoutubeV3::MonitorStreamInfo] - attr_accessor :monitor_stream - - # Automatically start recording after the event goes live. The default value for - # this property is true. - # Important: You must also set the enableDvr property's value to true if you - # want the playback to be available immediately after the broadcast ends. If you - # set this property's value to true but do not also set the enableDvr property - # to true, there may be a delay of around one day before the archived video will - # be available for playback. - # Corresponds to the JSON property `recordFromStart` - # @return [Boolean] - attr_accessor :record_from_start - alias_method :record_from_start?, :record_from_start - - # This setting indicates whether the broadcast should automatically begin with - # an in-stream slate when you update the broadcast's status to live. After - # updating the status, you then need to send a liveCuepoints.insert request that - # sets the cuepoint's eventState to end to remove the in-stream slate and make - # your broadcast stream visible to viewers. - # Corresponds to the JSON property `startWithSlate` - # @return [Boolean] - attr_accessor :start_with_slate - alias_method :start_with_slate?, :start_with_slate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bound_stream_id = args[:bound_stream_id] unless args[:bound_stream_id].nil? - @enable_closed_captions = args[:enable_closed_captions] unless args[:enable_closed_captions].nil? - @enable_content_encryption = args[:enable_content_encryption] unless args[:enable_content_encryption].nil? - @enable_dvr = args[:enable_dvr] unless args[:enable_dvr].nil? - @enable_embed = args[:enable_embed] unless args[:enable_embed].nil? - @enable_low_latency = args[:enable_low_latency] unless args[:enable_low_latency].nil? - @monitor_stream = args[:monitor_stream] unless args[:monitor_stream].nil? - @record_from_start = args[:record_from_start] unless args[:record_from_start].nil? - @start_with_slate = args[:start_with_slate] unless args[:start_with_slate].nil? - end - end - - # - class ListLiveBroadcastsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of broadcasts that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # liveBroadcastListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # The token that can be used as the value of the pageToken parameter to retrieve - # the previous page in the result set. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # - class LiveBroadcastSnippet - include Google::Apis::Core::Hashable - - # The date and time that the broadcast actually ended. This information is only - # available once the broadcast's state is complete. The value is specified in - # ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `actualEndTime` - # @return [DateTime] - attr_accessor :actual_end_time - - # The date and time that the broadcast actually started. This information is - # only available once the broadcast's state is live. The value is specified in - # ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `actualStartTime` - # @return [DateTime] - attr_accessor :actual_start_time - - # The ID that YouTube uses to uniquely identify the channel that is publishing - # the broadcast. - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # The broadcast's description. As with the title, you can set this field by - # modifying the broadcast resource or by setting the description field of the - # corresponding video resource. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # Corresponds to the JSON property `isDefaultBroadcast` - # @return [Boolean] - attr_accessor :is_default_broadcast - alias_method :is_default_broadcast?, :is_default_broadcast - - # The date and time that the broadcast was added to YouTube's live broadcast - # schedule. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `publishedAt` - # @return [DateTime] - attr_accessor :published_at - - # The date and time that the broadcast is scheduled to end. The value is - # specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `scheduledEndTime` - # @return [DateTime] - attr_accessor :scheduled_end_time - - # The date and time that the broadcast is scheduled to start. The value is - # specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `scheduledStartTime` - # @return [DateTime] - attr_accessor :scheduled_start_time - - # Internal representation of thumbnails for a YouTube resource. - # Corresponds to the JSON property `thumbnails` - # @return [Google::Apis::YoutubeV3::ThumbnailDetails] - attr_accessor :thumbnails - - # The broadcast's title. Note that the broadcast represents exactly one YouTube - # video. You can set this field by modifying the broadcast resource or by - # setting the title field of the corresponding video resource. - # 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) - @actual_end_time = args[:actual_end_time] unless args[:actual_end_time].nil? - @actual_start_time = args[:actual_start_time] unless args[:actual_start_time].nil? - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @description = args[:description] unless args[:description].nil? - @is_default_broadcast = args[:is_default_broadcast] unless args[:is_default_broadcast].nil? - @published_at = args[:published_at] unless args[:published_at].nil? - @scheduled_end_time = args[:scheduled_end_time] unless args[:scheduled_end_time].nil? - @scheduled_start_time = args[:scheduled_start_time] unless args[:scheduled_start_time].nil? - @thumbnails = args[:thumbnails] unless args[:thumbnails].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # Statistics about the live broadcast. These represent a snapshot of the values - # at the time of the request. Statistics are only returned for live broadcasts. - class LiveBroadcastStatistics - include Google::Apis::Core::Hashable - - # The number of viewers currently watching the broadcast. The property and its - # value will be present if the broadcast has current viewers and the broadcast - # owner has not hidden the viewcount for the video. Note that YouTube stops - # tracking the number of concurrent viewers for a broadcast when the broadcast - # ends. So, this property would not identify the number of viewers watching an - # archived video of a live broadcast that already ended. - # Corresponds to the JSON property `concurrentViewers` - # @return [String] - attr_accessor :concurrent_viewers - - # The total number of live chat messages currently on the broadcast. The - # property and its value will be present if the broadcast is public, has the - # live chat feature enabled, and has at least one message. Note that this field - # will not be filled after the broadcast ends. So this property would not - # identify the number of chat messages for an archived video of a completed live - # broadcast. - # Corresponds to the JSON property `totalChatCount` - # @return [String] - attr_accessor :total_chat_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @concurrent_viewers = args[:concurrent_viewers] unless args[:concurrent_viewers].nil? - @total_chat_count = args[:total_chat_count] unless args[:total_chat_count].nil? - end - end - - # - class LiveBroadcastStatus - include Google::Apis::Core::Hashable - - # The broadcast's status. The status can be updated using the API's - # liveBroadcasts.transition method. - # Corresponds to the JSON property `lifeCycleStatus` - # @return [String] - attr_accessor :life_cycle_status - - # Priority of the live broadcast event (internal state). - # Corresponds to the JSON property `liveBroadcastPriority` - # @return [String] - attr_accessor :live_broadcast_priority - - # The broadcast's privacy status. Note that the broadcast represents exactly one - # YouTube video, so the privacy settings are identical to those supported for - # videos. In addition, you can set this field by modifying the broadcast - # resource or by setting the privacyStatus field of the corresponding video - # resource. - # Corresponds to the JSON property `privacyStatus` - # @return [String] - attr_accessor :privacy_status - - # The broadcast's recording status. - # Corresponds to the JSON property `recordingStatus` - # @return [String] - attr_accessor :recording_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @life_cycle_status = args[:life_cycle_status] unless args[:life_cycle_status].nil? - @live_broadcast_priority = args[:live_broadcast_priority] unless args[:live_broadcast_priority].nil? - @privacy_status = args[:privacy_status] unless args[:privacy_status].nil? - @recording_status = args[:recording_status] unless args[:recording_status].nil? - end - end - - # - class LiveBroadcastTopic - include Google::Apis::Core::Hashable - - # Information about the topic matched. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::LiveBroadcastTopicSnippet] - attr_accessor :snippet - - # The type of the topic. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # If this flag is set it means that we have not been able to match the topic - # title and type provided to a known entity. - # Corresponds to the JSON property `unmatched` - # @return [Boolean] - attr_accessor :unmatched - alias_method :unmatched?, :unmatched - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @snippet = args[:snippet] unless args[:snippet].nil? - @type = args[:type] unless args[:type].nil? - @unmatched = args[:unmatched] unless args[:unmatched].nil? - end - end - - # - class LiveBroadcastTopicDetails - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `topics` - # @return [Array] - attr_accessor :topics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @topics = args[:topics] unless args[:topics].nil? - end - end - - # - class LiveBroadcastTopicSnippet - include Google::Apis::Core::Hashable - - # The name of the topic. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The date at which the topic was released. Filled for types: videoGame - # Corresponds to the JSON property `releaseDate` - # @return [String] - attr_accessor :release_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] unless args[:name].nil? - @release_date = args[:release_date] unless args[:release_date].nil? - end - end - - # A live stream describes a live ingestion point. - class LiveStream - include Google::Apis::Core::Hashable - - # Brief description of the live stream cdn settings. - # Corresponds to the JSON property `cdn` - # @return [Google::Apis::YoutubeV3::CdnSettings] - attr_accessor :cdn - - # Detailed settings of a stream. - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeV3::LiveStreamContentDetails] - attr_accessor :content_details - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube assigns to uniquely identify the stream. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # liveStream". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The snippet object contains basic details about the stream, including its - # channel, title, and description. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::LiveStreamSnippet] - attr_accessor :snippet - - # Brief description of the live stream status. - # Corresponds to the JSON property `status` - # @return [Google::Apis::YoutubeV3::LiveStreamStatus] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cdn = args[:cdn] unless args[:cdn].nil? - @content_details = args[:content_details] unless args[:content_details].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class LiveStreamConfigurationIssue - include Google::Apis::Core::Hashable - - # The long-form description of the issue and how to resolve it. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The short-form reason for this issue. - # Corresponds to the JSON property `reason` - # @return [String] - attr_accessor :reason - - # How severe this issue is to the stream. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # The kind of error happening. - # 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) - @description = args[:description] unless args[:description].nil? - @reason = args[:reason] unless args[:reason].nil? - @severity = args[:severity] unless args[:severity].nil? - @type = args[:type] unless args[:type].nil? - end - end - - # Detailed settings of a stream. - class LiveStreamContentDetails - include Google::Apis::Core::Hashable - - # The ingestion URL where the closed captions of this stream are sent. - # Corresponds to the JSON property `closedCaptionsIngestionUrl` - # @return [String] - attr_accessor :closed_captions_ingestion_url - - # Indicates whether the stream is reusable, which means that it can be bound to - # multiple broadcasts. It is common for broadcasters to reuse the same stream - # for many different broadcasts if those broadcasts occur at different times. - # If you set this value to false, then the stream will not be reusable, which - # means that it can only be bound to one broadcast. Non-reusable streams differ - # from reusable streams in the following ways: - # - A non-reusable stream can only be bound to one broadcast. - # - A non-reusable stream might be deleted by an automated process after the - # broadcast ends. - # - The liveStreams.list method does not list non-reusable streams if you call - # the method and set the mine parameter to true. The only way to use that method - # to retrieve the resource for a non-reusable stream is to use the id parameter - # to identify the stream. - # Corresponds to the JSON property `isReusable` - # @return [Boolean] - attr_accessor :is_reusable - alias_method :is_reusable?, :is_reusable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @closed_captions_ingestion_url = args[:closed_captions_ingestion_url] unless args[:closed_captions_ingestion_url].nil? - @is_reusable = args[:is_reusable] unless args[:is_reusable].nil? - end - end - - # - class LiveStreamHealthStatus - include Google::Apis::Core::Hashable - - # The configurations issues on this stream - # Corresponds to the JSON property `configurationIssues` - # @return [Array] - attr_accessor :configuration_issues - - # The last time this status was updated (in seconds) - # Corresponds to the JSON property `lastUpdateTimeS` - # @return [String] - attr_accessor :last_update_time_s - - # The status code of this stream - # 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) - @configuration_issues = args[:configuration_issues] unless args[:configuration_issues].nil? - @last_update_time_s = args[:last_update_time_s] unless args[:last_update_time_s].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class ListLiveStreamsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of live streams that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # liveStreamListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # The token that can be used as the value of the pageToken parameter to retrieve - # the previous page in the result set. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # - class LiveStreamSnippet - include Google::Apis::Core::Hashable - - # The ID that YouTube uses to uniquely identify the channel that is transmitting - # the stream. - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # The stream's description. The value cannot be longer than 10000 characters. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # Corresponds to the JSON property `isDefaultStream` - # @return [Boolean] - attr_accessor :is_default_stream - alias_method :is_default_stream?, :is_default_stream - - # The date and time that the stream was created. The value is specified in ISO - # 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `publishedAt` - # @return [DateTime] - attr_accessor :published_at - - # The stream's title. The value must be between 1 and 128 characters long. - # 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) - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @description = args[:description] unless args[:description].nil? - @is_default_stream = args[:is_default_stream] unless args[:is_default_stream].nil? - @published_at = args[:published_at] unless args[:published_at].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # Brief description of the live stream status. - class LiveStreamStatus - include Google::Apis::Core::Hashable - - # The health status of the stream. - # Corresponds to the JSON property `healthStatus` - # @return [Google::Apis::YoutubeV3::LiveStreamHealthStatus] - attr_accessor :health_status - - # - # Corresponds to the JSON property `streamStatus` - # @return [String] - attr_accessor :stream_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @health_status = args[:health_status] unless args[:health_status].nil? - @stream_status = args[:stream_status] unless args[:stream_status].nil? - end - end - - # - class LocalizedProperty - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `default` - # @return [String] - attr_accessor :default - - # The language of the default property. - # Corresponds to the JSON property `defaultLanguage` - # @return [Google::Apis::YoutubeV3::LanguageTag] - attr_accessor :default_language - - # - # Corresponds to the JSON property `localized` - # @return [Array] - attr_accessor :localized - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @default = args[:default] unless args[:default].nil? - @default_language = args[:default_language] unless args[:default_language].nil? - @localized = args[:localized] unless args[:localized].nil? - end - end - - # - class LocalizedString - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # - # 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) - @language = args[:language] unless args[:language].nil? - @value = args[:value] unless args[:value].nil? - end - end - - # Settings and Info of the monitor stream - class MonitorStreamInfo - include Google::Apis::Core::Hashable - - # If you have set the enableMonitorStream property to true, then this property - # determines the length of the live broadcast delay. - # Corresponds to the JSON property `broadcastStreamDelayMs` - # @return [Fixnum] - attr_accessor :broadcast_stream_delay_ms - - # HTML code that embeds a player that plays the monitor stream. - # Corresponds to the JSON property `embedHtml` - # @return [String] - attr_accessor :embed_html - - # This value determines whether the monitor stream is enabled for the broadcast. - # If the monitor stream is enabled, then YouTube will broadcast the event - # content on a special stream intended only for the broadcaster's consumption. - # The broadcaster can use the stream to review the event content and also to - # identify the optimal times to insert cuepoints. - # You need to set this value to true if you intend to have a broadcast delay for - # your event. - # Note: This property cannot be updated once the broadcast is in the testing or - # live state. - # Corresponds to the JSON property `enableMonitorStream` - # @return [Boolean] - attr_accessor :enable_monitor_stream - alias_method :enable_monitor_stream?, :enable_monitor_stream - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @broadcast_stream_delay_ms = args[:broadcast_stream_delay_ms] unless args[:broadcast_stream_delay_ms].nil? - @embed_html = args[:embed_html] unless args[:embed_html].nil? - @enable_monitor_stream = args[:enable_monitor_stream] unless args[:enable_monitor_stream].nil? - end - end - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - class PageInfo - include Google::Apis::Core::Hashable - - # The number of results included in the API response. - # Corresponds to the JSON property `resultsPerPage` - # @return [Fixnum] - attr_accessor :results_per_page - - # The total number of results in the result set. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @results_per_page = args[:results_per_page] unless args[:results_per_page].nil? - @total_results = args[:total_results] unless args[:total_results].nil? - end - end - - # A playlist resource represents a YouTube playlist. A playlist is a collection - # of videos that can be viewed sequentially and shared with other users. A - # playlist can contain up to 200 videos, and YouTube does not limit the number - # of playlists that each user creates. By default, playlists are publicly - # visible to other users, but playlists can be public or private. - # YouTube also uses playlists to identify special collections of videos for a - # channel, such as: - # - uploaded videos - # - favorite videos - # - positively rated (liked) videos - # - watch history - # - watch later To be more specific, these lists are associated with a channel, - # which is a collection of a person, group, or company's videos, playlists, and - # other YouTube information. You can retrieve the playlist IDs for each of these - # lists from the channel resource for a given channel. - # You can then use the playlistItems.list method to retrieve any of those - # lists. You can also add or remove items from those lists by calling the - # playlistItems.insert and playlistItems.delete methods. - class Playlist - include Google::Apis::Core::Hashable - - # The contentDetails object contains information like video count. - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeV3::PlaylistContentDetails] - attr_accessor :content_details - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the playlist. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # playlist". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Localizations for different languages - # Corresponds to the JSON property `localizations` - # @return [Hash] - attr_accessor :localizations - - # The player object contains information that you would use to play the playlist - # in an embedded player. - # Corresponds to the JSON property `player` - # @return [Google::Apis::YoutubeV3::PlaylistPlayer] - attr_accessor :player - - # Basic details about a playlist, including title, description and thumbnails. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::PlaylistSnippet] - attr_accessor :snippet - - # The status object contains status information for the playlist. - # Corresponds to the JSON property `status` - # @return [Google::Apis::YoutubeV3::PlaylistStatus] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_details = args[:content_details] unless args[:content_details].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @localizations = args[:localizations] unless args[:localizations].nil? - @player = args[:player] unless args[:player].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class PlaylistContentDetails - include Google::Apis::Core::Hashable - - # The number of videos in the playlist. - # Corresponds to the JSON property `itemCount` - # @return [Fixnum] - attr_accessor :item_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @item_count = args[:item_count] unless args[:item_count].nil? - end - end - - # A playlistItem resource identifies another resource, such as a video, that is - # included in a playlist. In addition, the playlistItem resource contains - # details about the included resource that pertain specifically to how that - # resource is used in that playlist. - # YouTube uses playlists to identify special collections of videos for a channel, - # such as: - # - uploaded videos - # - favorite videos - # - positively rated (liked) videos - # - watch history - # - watch later To be more specific, these lists are associated with a channel, - # which is a collection of a person, group, or company's videos, playlists, and - # other YouTube information. - # You can retrieve the playlist IDs for each of these lists from the channel - # resource for a given channel. You can then use the playlistItems.list - # method to retrieve any of those lists. You can also add or remove items from - # those lists by calling the playlistItems.insert and playlistItems.delete - # methods. For example, if a user gives a positive rating to a video, you would - # insert that video into the liked videos playlist for that user's channel. - class PlaylistItem - include Google::Apis::Core::Hashable - - # The contentDetails object is included in the resource if the included item is - # a YouTube video. The object contains additional information about the video. - # Corresponds to the JSON property `contentDetails` - # @return [Google::Apis::YoutubeV3::PlaylistItemContentDetails] - attr_accessor :content_details - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The ID that YouTube uses to uniquely identify the playlist item. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # playlistItem". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Basic details about a playlist, including title, description and thumbnails. - # Corresponds to the JSON property `snippet` - # @return [Google::Apis::YoutubeV3::PlaylistItemSnippet] - attr_accessor :snippet - - # Information about the playlist item's privacy status. - # Corresponds to the JSON property `status` - # @return [Google::Apis::YoutubeV3::PlaylistItemStatus] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_details = args[:content_details] unless args[:content_details].nil? - @etag = args[:etag] unless args[:etag].nil? - @id = args[:id] unless args[:id].nil? - @kind = args[:kind] unless args[:kind].nil? - @snippet = args[:snippet] unless args[:snippet].nil? - @status = args[:status] unless args[:status].nil? - end - end - - # - class PlaylistItemContentDetails - include Google::Apis::Core::Hashable - - # The time, measured in seconds from the start of the video, when the video - # should stop playing. (The playlist owner can specify the times when the video - # should start and stop playing when the video is played in the context of the - # playlist.) By default, assume that the video.endTime is the end of the video. - # Corresponds to the JSON property `endAt` - # @return [String] - attr_accessor :end_at - - # A user-generated note for this item. - # Corresponds to the JSON property `note` - # @return [String] - attr_accessor :note - - # The time, measured in seconds from the start of the video, when the video - # should start playing. (The playlist owner can specify the times when the video - # should start and stop playing when the video is played in the context of the - # playlist.) The default value is 0. - # Corresponds to the JSON property `startAt` - # @return [String] - attr_accessor :start_at - - # The ID that YouTube uses to uniquely identify a video. To retrieve the video - # resource, set the id query parameter to this value in your API request. - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_at = args[:end_at] unless args[:end_at].nil? - @note = args[:note] unless args[:note].nil? - @start_at = args[:start_at] unless args[:start_at].nil? - @video_id = args[:video_id] unless args[:video_id].nil? - end - end - - # - class ListPlaylistItemsResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of playlist items that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # playlistItemListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # The token that can be used as the value of the pageToken parameter to retrieve - # the previous page in the result set. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Basic details about a playlist, including title, description and thumbnails. - class PlaylistItemSnippet - include Google::Apis::Core::Hashable - - # The ID that YouTube uses to uniquely identify the user that added the item to - # the playlist. - # Corresponds to the JSON property `channelId` - # @return [String] - attr_accessor :channel_id - - # Channel title for the channel that the playlist item belongs to. - # Corresponds to the JSON property `channelTitle` - # @return [String] - attr_accessor :channel_title - - # The item's description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The ID that YouTube uses to uniquely identify the playlist that the playlist - # item is in. - # Corresponds to the JSON property `playlistId` - # @return [String] - attr_accessor :playlist_id - - # The order in which the item appears in the playlist. The value uses a zero- - # based index, so the first item has a position of 0, the second item has a - # position of 1, and so forth. - # Corresponds to the JSON property `position` - # @return [Fixnum] - attr_accessor :position - - # The date and time that the item was added to the playlist. The value is - # specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - # Corresponds to the JSON property `publishedAt` - # @return [DateTime] - attr_accessor :published_at - - # A resource id is a generic reference that points to another YouTube resource. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::YoutubeV3::ResourceId] - attr_accessor :resource_id - - # Internal representation of thumbnails for a YouTube resource. - # Corresponds to the JSON property `thumbnails` - # @return [Google::Apis::YoutubeV3::ThumbnailDetails] - attr_accessor :thumbnails - - # The item'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) - @channel_id = args[:channel_id] unless args[:channel_id].nil? - @channel_title = args[:channel_title] unless args[:channel_title].nil? - @description = args[:description] unless args[:description].nil? - @playlist_id = args[:playlist_id] unless args[:playlist_id].nil? - @position = args[:position] unless args[:position].nil? - @published_at = args[:published_at] unless args[:published_at].nil? - @resource_id = args[:resource_id] unless args[:resource_id].nil? - @thumbnails = args[:thumbnails] unless args[:thumbnails].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # Information about the playlist item's privacy status. - class PlaylistItemStatus - include Google::Apis::Core::Hashable - - # This resource's privacy status. - # Corresponds to the JSON property `privacyStatus` - # @return [String] - attr_accessor :privacy_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @privacy_status = args[:privacy_status] unless args[:privacy_status].nil? - end - end - - # - class ListPlaylistResponse - include Google::Apis::Core::Hashable - - # Etag of this resource. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Serialized EventId of the request which produced this response. - # Corresponds to the JSON property `eventId` - # @return [String] - attr_accessor :event_id - - # A list of playlists that match the request criteria. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # Identifies what kind of resource this is. Value: the fixed string "youtube# - # playlistListResponse". - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The token that can be used as the value of the pageToken parameter to retrieve - # the next page in the result set. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Paging details for lists of resources, including total number of items - # available and number of resources returned in a single page. - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::YoutubeV3::PageInfo] - attr_accessor :page_info - - # The token that can be used as the value of the pageToken parameter to retrieve - # the previous page in the result set. - # Corresponds to the JSON property `prevPageToken` - # @return [String] - attr_accessor :prev_page_token - - # Stub token pagination template to suppress results. - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::YoutubeV3::TokenPagination] - attr_accessor :token_pagination - - # The visitorId identifies the visitor. - # Corresponds to the JSON property `visitorId` - # @return [String] - attr_accessor :visitor_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] unless args[:etag].nil? - @event_id = args[:event_id] unless args[:event_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? - @page_info = args[:page_info] unless args[:page_info].nil? - @prev_page_token = args[:prev_page_token] unless args[:prev_page_token].nil? - @token_pagination = args[:token_pagination] unless args[:token_pagination].nil? - @visitor_id = args[:visitor_id] unless args[:visitor_id].nil? - end - end - - # Playlist localization setting - class PlaylistLocalization - include Google::Apis::Core::Hashable - - # The localized strings for playlist's description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The localized strings for playlist'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) - @description = args[:description] unless args[:description].nil? - @title = args[:title] unless args[:title].nil? - end - end - - # - class PlaylistPlayer - include Google::Apis::Core::Hashable - - # An