Regenerate apis, add monitoring_v3

This commit is contained in:
Steve Bazyl committed 2016-06-09 13:22:21 -07:00
1 parent 8f941ff90f
commit daee54aacb
68 files changed
+5178 -162

No files matched your search

@@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/ad-exchange/buyer-rest
module AdexchangebuyerV1_4
VERSION = 'V1_4'
REVISION = '20160509'
REVISION = '20160606'
# Manage your Ad Exchange buyer account configuration
AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'
@@ -556,6 +556,12 @@ module Google
# @return [String]
attr_accessor :kind
# Detected languages for this creative. Read-only. This field should not be set
# in requests.
# Corresponds to the JSON property `languages`
# @return [Array<String>]
attr_accessor :languages
# If nativeAd is set, HTMLSnippet and videoURL should not be set.
# Corresponds to the JSON property `nativeAd`
# @return [Google::Apis::AdexchangebuyerV1_4::Creative::NativeAd]
@@ -638,6 +644,7 @@ module Google
@height = args[:height] if args.key?(:height)
@impression_tracking_url = args[:impression_tracking_url] if args.key?(:impression_tracking_url)
@kind = args[:kind] if args.key?(:kind)
@languages = args[:languages] if args.key?(:languages)
@native_ad = args[:native_ad] if args.key?(:native_ad)
@open_auction_status = args[:open_auction_status] if args.key?(:open_auction_status)
@product_categories = args[:product_categories] if args.key?(:product_categories)
@@ -654,6 +661,11 @@ module Google
class Correction
include Google::Apis::Core::Hashable
# All known serving contexts containing serving status information.
# Corresponds to the JSON property `contexts`
# @return [Array<Google::Apis::AdexchangebuyerV1_4::Creative::Correction::Context>]
attr_accessor :contexts
# Additional details about the correction.
# Corresponds to the JSON property `details`
# @return [Array<String>]
@@ -670,9 +682,50 @@ module Google
# Update properties of this object
def update!(**args)
@contexts = args[:contexts] if args.key?(:contexts)
@details = args[:details] if args.key?(:details)
@reason = args[:reason] if args.key?(:reason)
end
#
class Context
include Google::Apis::Core::Hashable
# Only set when contextType=AUCTION_TYPE. Represents the auction types this
# correction applies to.
# Corresponds to the JSON property `auctionType`
# @return [Array<String>]
attr_accessor :auction_type
# The type of context (e.g., location, platform, auction type, SSL-ness).
# Corresponds to the JSON property `contextType`
# @return [String]
attr_accessor :context_type
# Only set when contextType=LOCATION. Represents the geo criterias this
# correction applies to.
# Corresponds to the JSON property `geoCriteriaId`
# @return [Array<Fixnum>]
attr_accessor :geo_criteria_id
# Only set when contextType=PLATFORM. Represents the platforms this correction
# applies to.
# Corresponds to the JSON property `platform`
# @return [Array<String>]
attr_accessor :platform
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@auction_type = args[:auction_type] if args.key?(:auction_type)
@context_type = args[:context_type] if args.key?(:context_type)
@geo_criteria_id = args[:geo_criteria_id] if args.key?(:geo_criteria_id)
@platform = args[:platform] if args.key?(:platform)
end
end
end
# The filtering reasons for the creative. Read-only. This field should not be
@@ -1213,6 +1266,12 @@ module Google
# @return [String]
attr_accessor :currency_conversion_time_ms
# The DFP line item id associated with this deal. For features like CPD, buyers
# can retrieve the DFP line item for billing reconciliation.
# Corresponds to the JSON property `dfpLineItemId`
# @return [String]
attr_accessor :dfp_line_item_id
# The original contracted quantity (# impressions) for this deal. To ensure
# delivery, sometimes publisher will book the deal with a impression buffer,
# however clients are billed using the original contracted quantity.
@@ -1233,6 +1292,7 @@ module Google
# Update properties of this object
def update!(**args)
@currency_conversion_time_ms = args[:currency_conversion_time_ms] if args.key?(:currency_conversion_time_ms)
@dfp_line_item_id = args[:dfp_line_item_id] if args.key?(:dfp_line_item_id)
@original_contracted_quantity = args[:original_contracted_quantity] if args.key?(:original_contracted_quantity)
@price = args[:price] if args.key?(:price)
end
@@ -1438,11 +1498,19 @@ module Google
# @return [Fixnum]
attr_accessor :id
# Name of the dimension mainly for debugging purposes.
# Name of the dimension mainly for debugging purposes, except for the case of
# CREATIVE_SIZE. For CREATIVE_SIZE, strings are used instead of ids.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Percent of total impressions for a dimension type. e.g. `dimension_type: '
# GENDER', [`dimension_value: `id: 1, name: 'MALE', percentage: 60``]` Gender
# MALE is 60% of all impressions which have gender.
# Corresponds to the JSON property `percentage`
# @return [Fixnum]
attr_accessor :percentage
def initialize(**args)
update!(**args)
end
@@ -1451,6 +1519,7 @@ module Google
def update!(**args)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@percentage = args[:percentage] if args.key?(:percentage)
end
end
@@ -3138,6 +3207,11 @@ module Google
# @return [Google::Apis::AdexchangebuyerV1_4::TargetingValueSize]
attr_accessor :size
# The skippable ad type for video size.
# Corresponds to the JSON property `skippableAdType`
# @return [String]
attr_accessor :skippable_ad_type
def initialize(**args)
update!(**args)
end
@@ -3147,6 +3221,7 @@ module Google
@companion_sizes = args[:companion_sizes] if args.key?(:companion_sizes)
@creative_size_type = args[:creative_size_type] if args.key?(:creative_size_type)
@size = args[:size] if args.key?(:size)
@skippable_ad_type = args[:skippable_ad_type] if args.key?(:skippable_ad_type)
end
end
@@ -111,6 +111,12 @@ module Google
class Correction
class Representation < Google::Apis::Core::JsonRepresentation; end
class Context
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
@@ -614,6 +620,7 @@ module Google
property :height, as: 'height'
collection :impression_tracking_url, as: 'impressionTrackingUrl'
property :kind, as: 'kind'
collection :languages, as: 'languages'
property :native_ad, as: 'nativeAd', class: Google::Apis::AdexchangebuyerV1_4::Creative::NativeAd, decorator: Google::Apis::AdexchangebuyerV1_4::Creative::NativeAd::Representation
property :open_auction_status, as: 'openAuctionStatus'
@@ -631,9 +638,21 @@ module Google
class Correction
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :contexts, as: 'contexts', class: Google::Apis::AdexchangebuyerV1_4::Creative::Correction::Context, decorator: Google::Apis::AdexchangebuyerV1_4::Creative::Correction::Context::Representation
collection :details, as: 'details'
property :reason, as: 'reason'
end
class Context
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :auction_type, as: 'auctionType'
property :context_type, as: 'contextType'
collection :geo_criteria_id, as: 'geoCriteriaId'
collection :platform, as: 'platform'
end
end
end
class FilteringReasons
@@ -792,6 +811,7 @@ module Google
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :currency_conversion_time_ms, as: 'currencyConversionTimeMs'
property :dfp_line_item_id, as: 'dfpLineItemId'
property :original_contracted_quantity, as: 'originalContractedQuantity'
property :price, as: 'price', class: Google::Apis::AdexchangebuyerV1_4::Price, decorator: Google::Apis::AdexchangebuyerV1_4::Price::Representation
@@ -866,6 +886,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :name, as: 'name'
property :percentage, as: 'percentage'
end
end
@@ -1292,6 +1313,7 @@ module Google
property :creative_size_type, as: 'creativeSizeType'
property :size, as: 'size', class: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize, decorator: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize::Representation
property :skippable_ad_type, as: 'skippableAdType'
end
end
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/adsense/management/
module AdsenseV1_4
VERSION = 'V1_4'
REVISION = '20160523'
REVISION = '20160607'
# View and manage your AdSense data
AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense'
+1 -1
View File
@@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/adsense/host/
module AdsensehostV4_1
VERSION = 'V4_1'
REVISION = '20160523'
REVISION = '20160607'
# View and manage your AdSense host data and associated accounts
AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost'
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/analytics/devguides/reporting/core/v4/
module AnalyticsreportingV4
VERSION = 'V4'
REVISION = '20160512'
REVISION = '20160601'
# View your Google Analytics data
AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly'
@@ -407,22 +407,29 @@ module Google
# The `reportRequest.dateRanges` field should not be specified for cohorts
# or Lifetime value requests.
# If a date range is not provided, the default date range is (startDate:
# current date - 7 days, endDate: current date - 1 day)
# current date - 7 days, endDate: current date - 1 day). Every
# [ReportRequest](#ReportRequest) within a `batchGet` method must
# contain the same `dateRanges` definition.
# Corresponds to the JSON property `dateRanges`
# @return [Array<Google::Apis::AnalyticsreportingV4::DateRange>]
attr_accessor :date_ranges
# Segment the data returned for the request. A segment definition helps look
# at a subset of the segment request. A request can contain up to four
# segments. All requests should have the same segment definitions. Requests
# segments. Every [ReportRequest](#ReportRequest) within a
# `batchGet` method must contain the same `segments` definition. Requests
# with segments must have the `ga:segment` dimension.
# Corresponds to the JSON property `segments`
# @return [Array<Google::Apis::AnalyticsreportingV4::Segment>]
attr_accessor :segments
# The desired sampling level. If the sampling level is not specified the
# DEFAULT sampling level will be used. All requests should have same
# `samplingLevel`.
# The desired report
# [sample](https://support.google.com/analytics/answer/2637192) size.
# If the the `samplingLevel` field is unspecified the `DEFAULT` sampling
# level is used. Every [ReportRequest](#ReportRequest) within a
# `batchGet` method must contain the same `samplingLevel` definition. See
# [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
# for details.
# Corresponds to the JSON property `samplingLevel`
# @return [String]
attr_accessor :sampling_level
@@ -471,7 +478,10 @@ module Google
attr_accessor :hide_value_ranges
alias_method :hide_value_ranges?, :hide_value_ranges
# Unique View Id for retrieving Analytics data.
# The Analytics
# [view ID](https://support.google.com/analytics/answer/1009618)
# from which to retrieve data. Every [ReportRequest](#ReportRequest)
# within a `batchGet` method must contain the same `viewId`.
# Corresponds to the JSON property `viewId`
# @return [String]
attr_accessor :view_id
@@ -610,8 +620,13 @@ module Google
# @return [Fixnum]
attr_accessor :row_count
# If sampling was enabled, this returns the total number of samples
# present, one entry per date range.
# If the results are
# [sampled](https://support.google.com/analytics/answer/2637192),
# this returns the total number of
# samples present, one entry per date range. If the results are not sampled
# this field will not be defined. See
# [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
# for details.
# Corresponds to the JSON property `samplingSpaceSizes`
# @return [Array<String>]
attr_accessor :sampling_space_sizes
@@ -623,8 +638,12 @@ module Google
# @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
attr_accessor :maximums
# If sampling was enabled, this returns the total number of samples
# read, one entry per date range
# If the results are
# [sampled](https://support.google.com/analytics/answer/2637192),
# this returns the total number of samples read, one entry per date range.
# If the results are not sampled this field will not be defined. See
# [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
# for details.
# Corresponds to the JSON property `samplesReadCounts`
# @return [Array<String>]
attr_accessor :samples_read_counts
@@ -684,7 +703,7 @@ module Google
# Requests, each request will have a separate response.
# There can be a maximum of 5 requests. All requests should have the same
# `dateRange`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
# `dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
# Corresponds to the JSON property `reportRequests`
# @return [Array<Google::Apis::AnalyticsreportingV4::ReportRequest>]
attr_accessor :report_requests
@@ -880,8 +899,7 @@ module Google
class PivotHeaderEntry
include Google::Apis::Core::Hashable
# The name of the dimensions in the pivotDimensionValues field in the
# response.
# The name of the dimensions in the pivot response.
# Corresponds to the JSON property `dimensionNames`
# @return [Array<String>]
attr_accessor :dimension_names
@@ -1144,7 +1162,7 @@ module Google
# @return [Array<String>]
attr_accessor :dimensions
# List of metrics for each requested DateRange
# List of metrics for each requested DateRange.
# Corresponds to the JSON property `metrics`
# @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
attr_accessor :metrics
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/android/work/play/emm-api
module AndroidenterpriseV1
VERSION = 'V1'
REVISION = '20160519'
REVISION = '20160601'
# Manage corporate Android devices
AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise'
@@ -1463,7 +1463,7 @@ module Google
# @return [String]
attr_accessor :kind
# The user's primary email, e.g. "jsmith@example.com".
# The user's primary email address, e.g. "jsmith@example.com".
# Corresponds to the JSON property `primaryEmail`
# @return [String]
attr_accessor :primary_email
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/android-publisher
module AndroidpublisherV2
VERSION = 'V2'
REVISION = '20160516'
REVISION = '20160602'
# View and manage your Google Play Developer account
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services/web/api/states
module AppstateV1
VERSION = 'V1'
REVISION = '20160519'
REVISION = '20160531'
# View and manage your data for this application
AUTH_APPSTATE = 'https://www.googleapis.com/auth/appstate'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/bigquery/
module BigqueryV2
VERSION = 'V2'
REVISION = '20160511'
REVISION = '20160526'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
@@ -2760,6 +2760,15 @@ module Google
# @return [String]
attr_accessor :query
# [Experimental] Specifies whether to use BigQuery's legacy SQL for this view.
# The default value is true. If set to false, the view will use BigQuery's
# standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and
# views that reference this view must use the same flag value.
# Corresponds to the JSON property `useLegacySql`
# @return [Boolean]
attr_accessor :use_legacy_sql
alias_method :use_legacy_sql?, :use_legacy_sql
# [Experimental] Describes user-defined function resources used in the query.
# Corresponds to the JSON property `userDefinedFunctionResources`
# @return [Array<Google::Apis::BigqueryV2::UserDefinedFunctionResource>]
@@ -2772,6 +2781,7 @@ module Google
# Update properties of this object
def update!(**args)
@query = args[:query] if args.key?(:query)
@use_legacy_sql = args[:use_legacy_sql] if args.key?(:use_legacy_sql)
@user_defined_function_resources = args[:user_defined_function_resources] if args.key?(:user_defined_function_resources)
end
end
@@ -994,6 +994,7 @@ module Google
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :query, as: 'query'
property :use_legacy_sql, as: 'useLegacySql'
collection :user_defined_function_resources, as: 'userDefinedFunctionResources', class: Google::Apis::BigqueryV2::UserDefinedFunctionResource, decorator: Google::Apis::BigqueryV2::UserDefinedFunctionResource::Representation
end
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/google-apps/calendar/firstapp
module CalendarV3
VERSION = 'V3'
REVISION = '20160517'
REVISION = '20160605'
# Manage your calendars
AUTH_CALENDAR = 'https://www.googleapis.com/auth/calendar'
+1 -1
View File
@@ -26,7 +26,7 @@ module Google
# @see https://cloud.google.com/tools/cloud-debugger
module ClouddebuggerV2
VERSION = 'V2'
REVISION = '20160309'
REVISION = '20160602'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -29,10 +29,10 @@ module Google
# require 'google/apis/clouddebugger_v2'
#
# Clouddebugger = Google::Apis::ClouddebuggerV2 # Alias the module
# service = Clouddebugger::ClouddebuggerService.new
# service = Clouddebugger::CloudDebuggerService.new
#
# @see https://cloud.google.com/tools/cloud-debugger
class ClouddebuggerService < Google::Apis::Core::BaseService
class CloudDebuggerService < 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.
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/compute/docs/reference/latest/
module ComputeBeta
VERSION = 'Beta'
REVISION = '20160519'
REVISION = '20160525'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
+28 -5
View File
@@ -1020,6 +1020,13 @@ module Google
class BackendService
include Google::Apis::Core::Hashable
# Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set
# to 0, the cookie is non-persistent and lasts only until the end of the browser
# session (or equivalent). The maximum allowed value for TTL is one day.
# Corresponds to the JSON property `affinityCookieTtlSec`
# @return [Fixnum]
attr_accessor :affinity_cookie_ttl_sec
# The list of backends that serve this BackendService.
# Corresponds to the JSON property `backends`
# @return [Array<Google::Apis::ComputeBeta::Backend>]
@@ -1108,6 +1115,11 @@ module Google
# @return [String]
attr_accessor :self_link
# Type of session affinity to use.
# Corresponds to the JSON property `sessionAffinity`
# @return [String]
attr_accessor :session_affinity
# How many seconds to wait for the backend before considering it a failed
# request. Default is 30 seconds.
# Corresponds to the JSON property `timeoutSec`
@@ -1120,6 +1132,7 @@ module Google
# Update properties of this object
def update!(**args)
@affinity_cookie_ttl_sec = args[:affinity_cookie_ttl_sec] if args.key?(:affinity_cookie_ttl_sec)
@backends = args[:backends] if args.key?(:backends)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@@ -1134,6 +1147,7 @@ module Google
@protocol = args[:protocol] if args.key?(:protocol)
@region = args[:region] if args.key?(:region)
@self_link = args[:self_link] if args.key?(:self_link)
@session_affinity = args[:session_affinity] if args.key?(:session_affinity)
@timeout_sec = args[:timeout_sec] if args.key?(:timeout_sec)
end
end
@@ -3340,13 +3354,14 @@ module Google
# 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.
# Service Accounts for more information.
# Corresponds to the JSON property `serviceAccounts`
# @return [Array<Google::Apis::ComputeBeta::ServiceAccount>]
attr_accessor :service_accounts
# [Output Only] The status of the instance. One of the following values:
# PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
# PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDED, SUSPENDING, and
# TERMINATED.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
@@ -4574,8 +4589,8 @@ module Google
# IP addresses other than their own and receive packets with destination IP
# addresses other than their own. If these instances will be used as an IP
# gateway or it will be set as the next-hop in a Route resource, specify true.
# If unsure, leave this set to false. See the canIpForward documentation for
# more information.
# If unsure, leave this set to false. See the Enable IP forwarding for instances
# documentation for more information.
# Corresponds to the JSON property `canIpForward`
# @return [Boolean]
attr_accessor :can_ip_forward
@@ -7092,7 +7107,7 @@ module Google
class RouterStatus
include Google::Apis::Core::Hashable
# Best routes for this router.
# Best routes for this router's network.
# Corresponds to the JSON property `bestRoutes`
# @return [Array<Google::Apis::ComputeBeta::Route>]
attr_accessor :best_routes
@@ -9732,6 +9747,13 @@ module Google
# @return [String]
attr_accessor :region
# Remote traffic selectors 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 `remoteTrafficSelector`
# @return [Array<String>]
attr_accessor :remote_traffic_selector
# URL of router resource to be used for dynamic routing.
# Corresponds to the JSON property `router`
# @return [String]
@@ -9780,6 +9802,7 @@ module Google
@name = args[:name] if args.key?(:name)
@peer_ip = args[:peer_ip] if args.key?(:peer_ip)
@region = args[:region] if args.key?(:region)
@remote_traffic_selector = args[:remote_traffic_selector] if args.key?(:remote_traffic_selector)
@router = args[:router] if args.key?(:router)
@self_link = args[:self_link] if args.key?(:self_link)
@shared_secret = args[:shared_secret] if args.key?(:shared_secret)
@@ -1551,6 +1551,7 @@ module Google
class BackendService
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :affinity_cookie_ttl_sec, as: 'affinityCookieTtlSec'
collection :backends, as: 'backends', class: Google::Apis::ComputeBeta::Backend, decorator: Google::Apis::ComputeBeta::Backend::Representation
property :creation_timestamp, as: 'creationTimestamp'
@@ -1566,6 +1567,7 @@ module Google
property :protocol, as: 'protocol'
property :region, as: 'region'
property :self_link, as: 'selfLink'
property :session_affinity, as: 'sessionAffinity'
property :timeout_sec, as: 'timeoutSec'
end
end
@@ -3682,6 +3684,7 @@ module Google
property :name, as: 'name'
property :peer_ip, as: 'peerIp'
property :region, as: 'region'
collection :remote_traffic_selector, as: 'remoteTrafficSelector'
property :router, as: 'router'
property :self_link, as: 'selfLink'
property :shared_secret, as: 'sharedSecret'
@@ -4122,10 +4122,9 @@ module Google
# Retrieves the list of private images available to the specified project.
# Private images are images you create that belong to your project. This method
# does not get any images that belong to other projects, including publicly-
# available images, like Debian 7. If you want to get a list of publicly-
# available images, like Debian 8. If you want to get a list of publicly-
# available images, use this method to make a request to the respective image
# project, such as debian-cloud or windows-cloud.
# See Accessing images for more information.
# @param [String] project
# Project ID for this request.
# @param [String] filter
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/compute/docs/reference/latest/
module ComputeV1
VERSION = 'V1'
REVISION = '20160519'
REVISION = '20160525'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
+680 -4
View File
@@ -365,6 +365,11 @@ module Google
# @return [String]
attr_accessor :device_name
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `diskEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :disk_encryption_key
# 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
@@ -429,6 +434,7 @@ module Google
@auto_delete = args[:auto_delete] if args.key?(:auto_delete)
@boot = args[:boot] if args.key?(:boot)
@device_name = args[:device_name] if args.key?(:device_name)
@disk_encryption_key = args[:disk_encryption_key] if args.key?(:disk_encryption_key)
@index = args[:index] if args.key?(:index)
@initialize_params = args[:initialize_params] if args.key?(:initialize_params)
@interface = args[:interface] if args.key?(:interface)
@@ -493,6 +499,11 @@ module Google
# @return [String]
attr_accessor :source_image
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `sourceImageEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :source_image_encryption_key
def initialize(**args)
update!(**args)
end
@@ -503,6 +514,7 @@ module Google
@disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
@disk_type = args[:disk_type] if args.key?(:disk_type)
@source_image = args[:source_image] if args.key?(:source_image)
@source_image_encryption_key = args[:source_image_encryption_key] if args.key?(:source_image_encryption_key)
end
end
@@ -1188,6 +1200,59 @@ module Google
end
end
# Represents a customer-supplied encryption key
class CustomerEncryptionKey
include Google::Apis::Core::Hashable
# Specifies a 256-bit customer-supplied encryption key, encoded in base64 to
# either encrypt or decrypt this resource.
# Corresponds to the JSON property `rawKey`
# @return [String]
attr_accessor :raw_key
# [Output only] The base64 encoded SHA-256 hash of the customer-supplied
# encryption key that protects this resource.
# Corresponds to the JSON property `sha256`
# @return [String]
attr_accessor :sha256
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@raw_key = args[:raw_key] if args.key?(:raw_key)
@sha256 = args[:sha256] if args.key?(:sha256)
end
end
#
class CustomerEncryptionKeyProtectedDisk
include Google::Apis::Core::Hashable
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `diskEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :disk_encryption_key
# 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@disk_encryption_key = args[:disk_encryption_key] if args.key?(:disk_encryption_key)
@source = args[:source] if args.key?(:source)
end
end
# Deprecation status for a public resource.
class DeprecationStatus
include Google::Apis::Core::Hashable
@@ -1255,6 +1320,11 @@ module Google
# @return [String]
attr_accessor :description
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `diskEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :disk_encryption_key
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
@@ -1330,6 +1400,11 @@ module Google
# @return [String]
attr_accessor :source_image
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `sourceImageEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :source_image_encryption_key
# [Output Only] 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
@@ -1350,6 +1425,11 @@ module Google
# @return [String]
attr_accessor :source_snapshot
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `sourceSnapshotEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :source_snapshot_encryption_key
# [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
@@ -1390,6 +1470,7 @@ module Google
def update!(**args)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@disk_encryption_key = args[:disk_encryption_key] if args.key?(:disk_encryption_key)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@last_attach_timestamp = args[:last_attach_timestamp] if args.key?(:last_attach_timestamp)
@@ -1400,8 +1481,10 @@ module Google
@self_link = args[:self_link] if args.key?(:self_link)
@size_gb = args[:size_gb] if args.key?(:size_gb)
@source_image = args[:source_image] if args.key?(:source_image)
@source_image_encryption_key = args[:source_image_encryption_key] if args.key?(:source_image_encryption_key)
@source_image_id = args[:source_image_id] if args.key?(:source_image_id)
@source_snapshot = args[:source_snapshot] if args.key?(:source_snapshot)
@source_snapshot_encryption_key = args[:source_snapshot_encryption_key] if args.key?(:source_snapshot_encryption_key)
@source_snapshot_id = args[:source_snapshot_id] if args.key?(:source_snapshot_id)
@status = args[:status] if args.key?(:status)
@type = args[:type] if args.key?(:type)
@@ -2837,6 +2920,11 @@ module Google
# @return [String]
attr_accessor :id
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `imageEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :image_encryption_key
# [Output Only] Type of the resource. Always compute#image for images.
# Corresponds to the JSON property `kind`
# @return [String]
@@ -2878,6 +2966,11 @@ module Google
# @return [String]
attr_accessor :source_disk
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `sourceDiskEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :source_disk_encryption_key
# 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.
@@ -2912,12 +3005,14 @@ module Google
@disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
@family = args[:family] if args.key?(:family)
@id = args[:id] if args.key?(:id)
@image_encryption_key = args[:image_encryption_key] if args.key?(:image_encryption_key)
@kind = args[:kind] if args.key?(:kind)
@licenses = args[:licenses] if args.key?(:licenses)
@name = args[:name] if args.key?(:name)
@raw_disk = args[:raw_disk] if args.key?(:raw_disk)
@self_link = args[:self_link] if args.key?(:self_link)
@source_disk = args[:source_disk] if args.key?(:source_disk)
@source_disk_encryption_key = args[:source_disk_encryption_key] if args.key?(:source_disk_encryption_key)
@source_disk_id = args[:source_disk_id] if args.key?(:source_disk_id)
@source_type = args[:source_type] if args.key?(:source_type)
@status = args[:status] if args.key?(:status)
@@ -3104,13 +3199,14 @@ module Google
# 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.
# Service Accounts for more information.
# Corresponds to the JSON property `serviceAccounts`
# @return [Array<Google::Apis::ComputeV1::ServiceAccount>]
attr_accessor :service_accounts
# [Output Only] The status of the instance. One of the following values:
# PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
# PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDED, SUSPENDING, and
# TERMINATED.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
@@ -4232,8 +4328,8 @@ module Google
# IP addresses other than their own and receive packets with destination IP
# addresses other than their own. If these instances will be used as an IP
# gateway or it will be set as the next-hop in a Route resource, specify true.
# If unsure, leave this set to false. See the canIpForward documentation for
# more information.
# If unsure, leave this set to false. See the Enable IP forwarding for instances
# documentation for more information.
# Corresponds to the JSON property `canIpForward`
# @return [Boolean]
attr_accessor :can_ip_forward
@@ -4577,6 +4673,30 @@ module Google
end
end
#
class InstancesStartWithEncryptionKeyRequest
include Google::Apis::Core::Hashable
# Array of disks associated with this instance that are protected with a
# customer-supplied encryption key.
# In order to start the instance, the disk url and its corresponding key must be
# provided.
# If the disk is not protected with a customer-supplied encryption key it should
# not be specified.
# Corresponds to the JSON property `disks`
# @return [Array<Google::Apis::ComputeV1::CustomerEncryptionKeyProtectedDisk>]
attr_accessor :disks
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@disks = args[:disks] if args.key?(:disks)
end
end
# A license resource.
class License
include Google::Apis::Core::Hashable
@@ -4653,6 +4773,13 @@ module Google
# @return [Fixnum]
attr_accessor :image_space_gb
# [Output Only] Whether this machine type has a shared CPU. See Shared-core
# machine types for more information.
# Corresponds to the JSON property `isSharedCpu`
# @return [Boolean]
attr_accessor :is_shared_cpu
alias_method :is_shared_cpu?, :is_shared_cpu
# [Output Only] The type of the resource. Always compute#machineType for machine
# types.
# Corresponds to the JSON property `kind`
@@ -4708,6 +4835,7 @@ module Google
@guest_cpus = args[:guest_cpus] if args.key?(:guest_cpus)
@id = args[:id] if args.key?(:id)
@image_space_gb = args[:image_space_gb] if args.key?(:image_space_gb)
@is_shared_cpu = args[:is_shared_cpu] if args.key?(:is_shared_cpu)
@kind = args[:kind] if args.key?(:kind)
@maximum_persistent_disks = args[:maximum_persistent_disks] if args.key?(:maximum_persistent_disks)
@maximum_persistent_disks_size_gb = args[:maximum_persistent_disks_size_gb] if args.key?(:maximum_persistent_disks_size_gb)
@@ -5927,6 +6055,11 @@ module Google
# @return [String]
attr_accessor :creation_timestamp
# [Output Only] Default service account used by VMs running in this project.
# Corresponds to the JSON property `defaultServiceAccount`
# @return [String]
attr_accessor :default_service_account
# An optional textual description of the resource.
# Corresponds to the JSON property `description`
# @return [String]
@@ -5979,6 +6112,7 @@ module Google
def update!(**args)
@common_instance_metadata = args[:common_instance_metadata] if args.key?(:common_instance_metadata)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@default_service_account = args[:default_service_account] if args.key?(:default_service_account)
@description = args[:description] if args.key?(:description)
@enabled_features = args[:enabled_features] if args.key?(:enabled_features)
@id = args[:id] if args.key?(:id)
@@ -6411,6 +6545,522 @@ module Google
end
end
# Router resource.
class Router
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `bgp`
# @return [Google::Apis::ComputeV1::RouterBgp]
attr_accessor :bgp
#
# Corresponds to the JSON property `bgpPeers`
# @return [Array<Google::Apis::ComputeV1::RouterBgpPeer>]
attr_accessor :bgp_peers
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional description of this resource. Provide this property when you
# create the resource.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `interfaces`
# @return [Array<Google::Apis::ComputeV1::RouterInterface>]
attr_accessor :interfaces
# [Output Only] Type of resource. Always compute#router for routers.
# 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
# URI of the network to which this router belongs.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
# [Output Only] URI of the region where the router 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@bgp = args[:bgp] if args.key?(:bgp)
@bgp_peers = args[:bgp_peers] if args.key?(:bgp_peers)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@id = args[:id] if args.key?(:id)
@interfaces = args[:interfaces] if args.key?(:interfaces)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@network = args[:network] if args.key?(:network)
@region = args[:region] if args.key?(:region)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
# Contains a list of routers.
class RouterAggregatedList
include Google::Apis::Core::Hashable
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# A map of scoped router lists.
# Corresponds to the JSON property `items`
# @return [Hash<String,Google::Apis::ComputeV1::RoutersScopedList>]
attr_accessor :items
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] This token allows you to get the next page of results for list
# requests. If the number of results is larger than maxResults, use the
# nextPageToken as a value for the query parameter pageToken in the next list
# request. Subsequent list requests will have their own nextPageToken to
# continue paging through the results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# [Output Only] Server-defined URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
#
class RouterBgp
include Google::Apis::Core::Hashable
# Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN,
# either 16-bit or 32-bit. The value will be fixed for this router resource. All
# VPN tunnels that link to this router will have the same local ASN.
# Corresponds to the JSON property `asn`
# @return [Fixnum]
attr_accessor :asn
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@asn = args[:asn] if args.key?(:asn)
end
end
# BGP information that needs to be configured into the routing stack to
# establish the BGP peering. It must specify peer ASN and either interface name,
# IP, or peer IP. Reference: https://tools.ietf.org/html/rfc4273
class RouterBgpPeer
include Google::Apis::Core::Hashable
# The priority of routes advertised to this BGP peer. In the case where there is
# more than one matching route of maximum length, the routes with lowest
# priority value win.
# Corresponds to the JSON property `advertisedRoutePriority`
# @return [Fixnum]
attr_accessor :advertised_route_priority
# Name of the interface the BGP peer is associated with.
# Corresponds to the JSON property `interfaceName`
# @return [String]
attr_accessor :interface_name
# IP address of the interface inside Google Cloud Platform.
# Corresponds to the JSON property `ipAddress`
# @return [String]
attr_accessor :ip_address
# Name of this BGP peer. The name must be 1-63 characters long and comply with
# RFC1035.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Peer BGP Autonomous System Number (ASN). For VPN use case, this value can be
# different for every tunnel.
# Corresponds to the JSON property `peerAsn`
# @return [Fixnum]
attr_accessor :peer_asn
# IP address of the BGP interface outside Google cloud.
# Corresponds to the JSON property `peerIpAddress`
# @return [String]
attr_accessor :peer_ip_address
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@advertised_route_priority = args[:advertised_route_priority] if args.key?(:advertised_route_priority)
@interface_name = args[:interface_name] if args.key?(:interface_name)
@ip_address = args[:ip_address] if args.key?(:ip_address)
@name = args[:name] if args.key?(:name)
@peer_asn = args[:peer_asn] if args.key?(:peer_asn)
@peer_ip_address = args[:peer_ip_address] if args.key?(:peer_ip_address)
end
end
# Router interfaces. Each interface requires either one linked resource (e.g.
# linked_vpn_tunnel) or IP address + range (specified in ip_range).
class RouterInterface
include Google::Apis::Core::Hashable
# IP address and range of the interface. The IP range must be in the RFC3927
# link-local IP space. The value must be a CIDR-formatted string, for example:
# 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP
# address of the interface.
# Corresponds to the JSON property `ipRange`
# @return [String]
attr_accessor :ip_range
# URI of linked VPN tunnel. It must be in the same region as the router. Each
# interface can have at most one linked resource.
# Corresponds to the JSON property `linkedVpnTunnel`
# @return [String]
attr_accessor :linked_vpn_tunnel
# Name of this interface entry. The name must be 1-63 characters long and comply
# with RFC1035.
# 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)
@ip_range = args[:ip_range] if args.key?(:ip_range)
@linked_vpn_tunnel = args[:linked_vpn_tunnel] if args.key?(:linked_vpn_tunnel)
@name = args[:name] if args.key?(:name)
end
end
# Contains a list of Router resources.
class RouterList
include Google::Apis::Core::Hashable
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# A list of Router resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ComputeV1::Router>]
attr_accessor :items
# [Output Only] Type of resource. Always compute#router for routers.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] This token allows you to get the next page of results for list
# requests. If the number of results is larger than maxResults, use the
# nextPageToken as a value for the query parameter pageToken in the next list
# request. Subsequent list requests will have their own nextPageToken to
# continue paging through the results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# [Output Only] Server-defined URL for 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] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
#
class RouterStatus
include Google::Apis::Core::Hashable
# Best routes for this router's network.
# Corresponds to the JSON property `bestRoutes`
# @return [Array<Google::Apis::ComputeV1::Route>]
attr_accessor :best_routes
#
# Corresponds to the JSON property `bgpPeerStatus`
# @return [Array<Google::Apis::ComputeV1::RouterStatusBgpPeerStatus>]
attr_accessor :bgp_peer_status
# URI of the network to which this router belongs.
# Corresponds to the JSON property `network`
# @return [String]
attr_accessor :network
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@best_routes = args[:best_routes] if args.key?(:best_routes)
@bgp_peer_status = args[:bgp_peer_status] if args.key?(:bgp_peer_status)
@network = args[:network] if args.key?(:network)
end
end
#
class RouterStatusBgpPeerStatus
include Google::Apis::Core::Hashable
# Routes that were advertised to the remote BGP peer
# Corresponds to the JSON property `advertisedRoutes`
# @return [Array<Google::Apis::ComputeV1::Route>]
attr_accessor :advertised_routes
# IP address of the local BGP interface.
# Corresponds to the JSON property `ipAddress`
# @return [String]
attr_accessor :ip_address
# URL of the VPN tunnel that this BGP peer controls.
# Corresponds to the JSON property `linkedVpnTunnel`
# @return [String]
attr_accessor :linked_vpn_tunnel
# Name of this BGP peer. Unique within the Routers resource.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Number of routes learned from the remote BGP Peer.
# Corresponds to the JSON property `numLearnedRoutes`
# @return [Fixnum]
attr_accessor :num_learned_routes
# IP address of the remote BGP interface.
# Corresponds to the JSON property `peerIpAddress`
# @return [String]
attr_accessor :peer_ip_address
# BGP state as specified in RFC1771.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# Status of the BGP peer: `UP, DOWN`
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours,
# 59 minutes, 59 seconds
# Corresponds to the JSON property `uptime`
# @return [String]
attr_accessor :uptime
# Time this session has been up, in seconds. Format: 145
# Corresponds to the JSON property `uptimeSeconds`
# @return [String]
attr_accessor :uptime_seconds
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@advertised_routes = args[:advertised_routes] if args.key?(:advertised_routes)
@ip_address = args[:ip_address] if args.key?(:ip_address)
@linked_vpn_tunnel = args[:linked_vpn_tunnel] if args.key?(:linked_vpn_tunnel)
@name = args[:name] if args.key?(:name)
@num_learned_routes = args[:num_learned_routes] if args.key?(:num_learned_routes)
@peer_ip_address = args[:peer_ip_address] if args.key?(:peer_ip_address)
@state = args[:state] if args.key?(:state)
@status = args[:status] if args.key?(:status)
@uptime = args[:uptime] if args.key?(:uptime)
@uptime_seconds = args[:uptime_seconds] if args.key?(:uptime_seconds)
end
end
#
class RouterStatusResponse
include Google::Apis::Core::Hashable
# Type of resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
#
# Corresponds to the JSON property `result`
# @return [Google::Apis::ComputeV1::RouterStatus]
attr_accessor :result
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@result = args[:result] if args.key?(:result)
end
end
#
class RoutersScopedList
include Google::Apis::Core::Hashable
# List of routers contained in this scope.
# Corresponds to the JSON property `routers`
# @return [Array<Google::Apis::ComputeV1::Router>]
attr_accessor :routers
# Informational warning which replaces the list of routers when the list is
# empty.
# Corresponds to the JSON property `warning`
# @return [Google::Apis::ComputeV1::RoutersScopedList::Warning]
attr_accessor :warning
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@routers = args[:routers] if args.key?(:routers)
@warning = args[:warning] if args.key?(:warning)
end
# Informational warning which replaces the list of routers when the list is
# empty.
class Warning
include Google::Apis::Core::Hashable
# [Output Only] A warning code, if applicable. For example, Compute Engine
# returns NO_RESULTS_ON_PAGE if there are no results in the response.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# [Output Only] Metadata about this warning in key: value format. For example:
# "data": [ ` "key": "scope", "value": "zones/us-east1-d" `
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::ComputeV1::RoutersScopedList::Warning::Datum>]
attr_accessor :data
# [Output Only] A human-readable description of the warning code.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@code = args[:code] if args.key?(:code)
@data = args[:data] if args.key?(:data)
@message = args[:message] if args.key?(:message)
end
#
class Datum
include Google::Apis::Core::Hashable
# [Output Only] A key that provides more detail on the warning being returned.
# For example, for warnings where there are no results in a list request for a
# particular zone, this key might be scope and the key value might be the zone
# name. Other examples might be a key indicating a deprecated resource and a
# suggested replacement, or a warning about invalid network settings (for
# example, if an instance attempts to perform IP forwarding but is not enabled
# for IP forwarding).
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# [Output Only] A warning data value corresponding to the key.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] if args.key?(:key)
@value = args[:value] if args.key?(:value)
end
end
end
end
# Sets the scheduling options for an Instance.
class Scheduling
include Google::Apis::Core::Hashable
@@ -6561,11 +7211,21 @@ module Google
# @return [String]
attr_accessor :self_link
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `snapshotEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :snapshot_encryption_key
# [Output Only] The source disk used to create this snapshot.
# Corresponds to the JSON property `sourceDisk`
# @return [String]
attr_accessor :source_disk
# Represents a customer-supplied encryption key
# Corresponds to the JSON property `sourceDiskEncryptionKey`
# @return [Google::Apis::ComputeV1::CustomerEncryptionKey]
attr_accessor :source_disk_encryption_key
# [Output Only] 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.
@@ -6608,7 +7268,9 @@ module Google
@licenses = args[:licenses] if args.key?(:licenses)
@name = args[:name] if args.key?(:name)
@self_link = args[:self_link] if args.key?(:self_link)
@snapshot_encryption_key = args[:snapshot_encryption_key] if args.key?(:snapshot_encryption_key)
@source_disk = args[:source_disk] if args.key?(:source_disk)
@source_disk_encryption_key = args[:source_disk_encryption_key] if args.key?(:source_disk_encryption_key)
@source_disk_id = args[:source_disk_id] if args.key?(:source_disk_id)
@status = args[:status] if args.key?(:status)
@storage_bytes = args[:storage_bytes] if args.key?(:storage_bytes)
@@ -8748,6 +9410,18 @@ module Google
# @return [String]
attr_accessor :region
# Remote traffic selectors 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 `remoteTrafficSelector`
# @return [Array<String>]
attr_accessor :remote_traffic_selector
# URL of router resource to be used for dynamic routing.
# Corresponds to the JSON property `router`
# @return [String]
attr_accessor :router
# [Output Only] Server-defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
@@ -8791,6 +9465,8 @@ module Google
@name = args[:name] if args.key?(:name)
@peer_ip = args[:peer_ip] if args.key?(:peer_ip)
@region = args[:region] if args.key?(:region)
@remote_traffic_selector = args[:remote_traffic_selector] if args.key?(:remote_traffic_selector)
@router = args[:router] if args.key?(:router)
@self_link = args[:self_link] if args.key?(:self_link)
@shared_secret = args[:shared_secret] if args.key?(:shared_secret)
@shared_secret_hash = args[:shared_secret_hash] if args.key?(:shared_secret_hash)
@@ -160,6 +160,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class CustomerEncryptionKey
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CustomerEncryptionKeyProtectedDisk
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class DeprecationStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -586,6 +598,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class InstancesStartWithEncryptionKeyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class License
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -820,6 +838,78 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Router
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterAggregatedList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterBgp
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterBgpPeer
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterInterface
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterList
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterStatusBgpPeerStatus
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RouterStatusResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class RoutersScopedList
class Representation < Google::Apis::Core::JsonRepresentation; end
class Warning
class Representation < Google::Apis::Core::JsonRepresentation; end
class Datum
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
include Google::Apis::Core::JsonObjectSupport
end
class Scheduling
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -1264,6 +1354,8 @@ module Google
property :auto_delete, as: 'autoDelete'
property :boot, as: 'boot'
property :device_name, as: 'deviceName'
property :disk_encryption_key, as: 'diskEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :index, as: 'index'
property :initialize_params, as: 'initializeParams', class: Google::Apis::ComputeV1::AttachedDiskInitializeParams, decorator: Google::Apis::ComputeV1::AttachedDiskInitializeParams::Representation
@@ -1283,6 +1375,8 @@ module Google
property :disk_size_gb, as: 'diskSizeGb'
property :disk_type, as: 'diskType'
property :source_image, as: 'sourceImage'
property :source_image_encryption_key, as: 'sourceImageEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
end
end
@@ -1447,6 +1541,23 @@ module Google
end
end
class CustomerEncryptionKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :raw_key, as: 'rawKey'
property :sha256, as: 'sha256'
end
end
class CustomerEncryptionKeyProtectedDisk
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :disk_encryption_key, as: 'diskEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :source, as: 'source'
end
end
class DeprecationStatus
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -1463,6 +1574,8 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :disk_encryption_key, as: 'diskEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :id, as: 'id'
property :kind, as: 'kind'
property :last_attach_timestamp, as: 'lastAttachTimestamp'
@@ -1473,8 +1586,12 @@ module Google
property :self_link, as: 'selfLink'
property :size_gb, as: 'sizeGb'
property :source_image, as: 'sourceImage'
property :source_image_encryption_key, as: 'sourceImageEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :source_image_id, as: 'sourceImageId'
property :source_snapshot, as: 'sourceSnapshot'
property :source_snapshot_encryption_key, as: 'sourceSnapshotEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :source_snapshot_id, as: 'sourceSnapshotId'
property :status, as: 'status'
property :type, as: 'type'
@@ -1825,6 +1942,8 @@ module Google
property :disk_size_gb, as: 'diskSizeGb'
property :family, as: 'family'
property :id, as: 'id'
property :image_encryption_key, as: 'imageEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :kind, as: 'kind'
collection :licenses, as: 'licenses'
property :name, as: 'name'
@@ -1832,6 +1951,8 @@ module Google
property :self_link, as: 'selfLink'
property :source_disk, as: 'sourceDisk'
property :source_disk_encryption_key, as: 'sourceDiskEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :source_disk_id, as: 'sourceDiskId'
property :source_type, as: 'sourceType'
property :status, as: 'status'
@@ -2267,6 +2388,14 @@ module Google
end
end
class InstancesStartWithEncryptionKeyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :disks, as: 'disks', class: Google::Apis::ComputeV1::CustomerEncryptionKeyProtectedDisk, decorator: Google::Apis::ComputeV1::CustomerEncryptionKeyProtectedDisk::Representation
end
end
class License
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -2287,6 +2416,7 @@ module Google
property :guest_cpus, as: 'guestCpus'
property :id, as: 'id'
property :image_space_gb, as: 'imageSpaceGb'
property :is_shared_cpu, as: 'isSharedCpu'
property :kind, as: 'kind'
property :maximum_persistent_disks, as: 'maximumPersistentDisks'
property :maximum_persistent_disks_size_gb, as: 'maximumPersistentDisksSizeGb'
@@ -2604,6 +2734,7 @@ module Google
property :common_instance_metadata, as: 'commonInstanceMetadata', class: Google::Apis::ComputeV1::Metadata, decorator: Google::Apis::ComputeV1::Metadata::Representation
property :creation_timestamp, as: 'creationTimestamp'
property :default_service_account, as: 'defaultServiceAccount'
property :description, as: 'description'
collection :enabled_features, as: 'enabledFeatures'
property :id, as: 'id'
@@ -2716,6 +2847,143 @@ module Google
end
end
class Router
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bgp, as: 'bgp', class: Google::Apis::ComputeV1::RouterBgp, decorator: Google::Apis::ComputeV1::RouterBgp::Representation
collection :bgp_peers, as: 'bgpPeers', class: Google::Apis::ComputeV1::RouterBgpPeer, decorator: Google::Apis::ComputeV1::RouterBgpPeer::Representation
property :creation_timestamp, as: 'creationTimestamp'
property :description, as: 'description'
property :id, as: 'id'
collection :interfaces, as: 'interfaces', class: Google::Apis::ComputeV1::RouterInterface, decorator: Google::Apis::ComputeV1::RouterInterface::Representation
property :kind, as: 'kind'
property :name, as: 'name'
property :network, as: 'network'
property :region, as: 'region'
property :self_link, as: 'selfLink'
end
end
class RouterAggregatedList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
hash :items, as: 'items', class: Google::Apis::ComputeV1::RoutersScopedList, decorator: Google::Apis::ComputeV1::RoutersScopedList::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class RouterBgp
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :asn, as: 'asn'
end
end
class RouterBgpPeer
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :advertised_route_priority, as: 'advertisedRoutePriority'
property :interface_name, as: 'interfaceName'
property :ip_address, as: 'ipAddress'
property :name, as: 'name'
property :peer_asn, as: 'peerAsn'
property :peer_ip_address, as: 'peerIpAddress'
end
end
class RouterInterface
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :ip_range, as: 'ipRange'
property :linked_vpn_tunnel, as: 'linkedVpnTunnel'
property :name, as: 'name'
end
end
class RouterList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::ComputeV1::Router, decorator: Google::Apis::ComputeV1::Router::Representation
property :kind, as: 'kind'
property :next_page_token, as: 'nextPageToken'
property :self_link, as: 'selfLink'
end
end
class RouterStatus
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :best_routes, as: 'bestRoutes', class: Google::Apis::ComputeV1::Route, decorator: Google::Apis::ComputeV1::Route::Representation
collection :bgp_peer_status, as: 'bgpPeerStatus', class: Google::Apis::ComputeV1::RouterStatusBgpPeerStatus, decorator: Google::Apis::ComputeV1::RouterStatusBgpPeerStatus::Representation
property :network, as: 'network'
end
end
class RouterStatusBgpPeerStatus
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :advertised_routes, as: 'advertisedRoutes', class: Google::Apis::ComputeV1::Route, decorator: Google::Apis::ComputeV1::Route::Representation
property :ip_address, as: 'ipAddress'
property :linked_vpn_tunnel, as: 'linkedVpnTunnel'
property :name, as: 'name'
property :num_learned_routes, as: 'numLearnedRoutes'
property :peer_ip_address, as: 'peerIpAddress'
property :state, as: 'state'
property :status, as: 'status'
property :uptime, as: 'uptime'
property :uptime_seconds, as: 'uptimeSeconds'
end
end
class RouterStatusResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :result, as: 'result', class: Google::Apis::ComputeV1::RouterStatus, decorator: Google::Apis::ComputeV1::RouterStatus::Representation
end
end
class RoutersScopedList
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :routers, as: 'routers', class: Google::Apis::ComputeV1::Router, decorator: Google::Apis::ComputeV1::Router::Representation
property :warning, as: 'warning', class: Google::Apis::ComputeV1::RoutersScopedList::Warning, decorator: Google::Apis::ComputeV1::RoutersScopedList::Warning::Representation
end
class Warning
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :data, as: 'data', class: Google::Apis::ComputeV1::RoutersScopedList::Warning::Datum, decorator: Google::Apis::ComputeV1::RoutersScopedList::Warning::Datum::Representation
property :message, as: 'message'
end
class Datum
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :key, as: 'key'
property :value, as: 'value'
end
end
end
end
class Scheduling
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -2753,7 +3021,11 @@ module Google
collection :licenses, as: 'licenses'
property :name, as: 'name'
property :self_link, as: 'selfLink'
property :snapshot_encryption_key, as: 'snapshotEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :source_disk, as: 'sourceDisk'
property :source_disk_encryption_key, as: 'sourceDiskEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation
property :source_disk_id, as: 'sourceDiskId'
property :status, as: 'status'
property :storage_bytes, as: 'storageBytes'
@@ -3294,6 +3566,8 @@ module Google
property :name, as: 'name'
property :peer_ip, as: 'peerIp'
property :region, as: 'region'
collection :remote_traffic_selector, as: 'remoteTrafficSelector'
property :router, as: 'router'
property :self_link, as: 'selfLink'
property :shared_secret, as: 'sharedSecret'
property :shared_secret_hash, as: 'sharedSecretHash'
+442 -2
View File
@@ -3475,10 +3475,9 @@ module Google
# Retrieves the list of private images available to the specified project.
# Private images are images you create that belong to your project. This method
# does not get any images that belong to other projects, including publicly-
# available images, like Debian 7. If you want to get a list of publicly-
# available images, like Debian 8. If you want to get a list of publicly-
# available images, use this method to make a request to the respective image
# project, such as debian-cloud or windows-cloud.
# See Accessing images for more information.
# @param [String] project
# Project ID for this request.
# @param [String] filter
@@ -5635,6 +5634,51 @@ module Google
execute_or_queue_command(command, &block)
end
# 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 [Google::Apis::ComputeV1::InstancesStartWithEncryptionKeyRequest] instances_start_with_encryption_key_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 start_instance_with_encryption_key(project, zone, instance, instances_start_with_encryption_key_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey', options)
command.request_representation = Google::Apis::ComputeV1::InstancesStartWithEncryptionKeyRequest::Representation
command.request_object = instances_start_with_encryption_key_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['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
# 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
@@ -6538,6 +6582,402 @@ module Google
execute_or_queue_command(command, &block)
end
# Retrieves an aggregated list of routers.
# @param [String] project
# Project ID for this request.
# @param [String] filter
# Sets a filter expression for filtering listed resources, in the form filter=`
# expression`. Your `expression` must be in the format: field_name
# comparison_string literal_string.
# The field_name is the name of the field you want to compare. Only atomic field
# types are supported (string, number, boolean). The comparison_string must be
# either eq (equals) or ne (not equals). The literal_string is the string value
# to filter to. The literal value must be valid for the type of field you are
# filtering by (string, number, boolean). For string fields, the literal value
# is interpreted as a regular expression using RE2 syntax. The literal value
# must match the entire field.
# For example, to filter for instances that do not have a name of example-
# instance, you would use filter=name ne example-instance.
# Compute Engine Beta API Only: When filtering in the Beta API, you can also
# filter on nested fields. For example, you could filter on instances that have
# set the scheduling.automaticRestart field to true. Use filtering on nested
# fields to take advantage of labels to organize and search for results based on
# label values.
# The Beta API also supports filtering on multiple expressions by providing each
# separate expression within parentheses. For example, (scheduling.
# automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are
# treated as AND expressions, meaning that resources must match all expressions
# to pass the filters.
# @param [Fixnum] max_results
# The maximum number of results per page that should be returned. If the number
# of available results is larger than maxResults, Compute Engine returns a
# nextPageToken that can be used to get the next page of results in subsequent
# list requests.
# @param [String] page_token
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
# a previous list request to get the next page of results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeV1::RouterAggregatedList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::RouterAggregatedList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def aggregated_router_list(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/aggregated/routers', options)
command.response_representation = Google::Apis::ComputeV1::RouterAggregatedList::Representation
command.response_class = Google::Apis::ComputeV1::RouterAggregatedList
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 Router resource.
# @param [String] project
# Project ID for this request.
# @param [String] region
# Name of the region for this request.
# @param [String] router
# Name of the Router 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_router(project, region, router, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{project}/regions/{region}/routers/{router}', 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['router'] = router unless router.nil?
command.query['fields'] = fields unless fields.nil?
command.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 Router resource. Get a list of available routers by
# making a list() request.
# @param [String] project
# Project ID for this request.
# @param [String] region
# Name of the region for this request.
# @param [String] router
# Name of the Router 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::Router] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::Router]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_router(project, region, router, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/regions/{region}/routers/{router}', options)
command.response_representation = Google::Apis::ComputeV1::Router::Representation
command.response_class = Google::Apis::ComputeV1::Router
command.params['project'] = project unless project.nil?
command.params['region'] = region unless region.nil?
command.params['router'] = router unless router.nil?
command.query['fields'] = fields unless fields.nil?
command.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 runtime information of the specified router.
# @param [String] project
# Project ID for this request.
# @param [String] region
# Name of the region for this request.
# @param [String] router
# Name of the Router resource 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::ComputeV1::RouterStatusResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::RouterStatusResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_router_router_status(project, region, router, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/regions/{region}/routers/{router}/getRouterStatus', options)
command.response_representation = Google::Apis::ComputeV1::RouterStatusResponse::Representation
command.response_class = Google::Apis::ComputeV1::RouterStatusResponse
command.params['project'] = project unless project.nil?
command.params['region'] = region unless region.nil?
command.params['router'] = router unless router.nil?
command.query['fields'] = fields unless fields.nil?
command.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 Router 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
# Name of the region for this request.
# @param [Google::Apis::ComputeV1::Router] router_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# 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_router(project, region, router_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{project}/regions/{region}/routers', options)
command.request_representation = Google::Apis::ComputeV1::Router::Representation
command.request_object = router_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 a list of Router resources available to the specified project.
# @param [String] project
# Project ID for this request.
# @param [String] region
# Name of the region for this request.
# @param [String] filter
# Sets a filter expression for filtering listed resources, in the form filter=`
# expression`. Your `expression` must be in the format: field_name
# comparison_string literal_string.
# The field_name is the name of the field you want to compare. Only atomic field
# types are supported (string, number, boolean). The comparison_string must be
# either eq (equals) or ne (not equals). The literal_string is the string value
# to filter to. The literal value must be valid for the type of field you are
# filtering by (string, number, boolean). For string fields, the literal value
# is interpreted as a regular expression using RE2 syntax. The literal value
# must match the entire field.
# For example, to filter for instances that do not have a name of example-
# instance, you would use filter=name ne example-instance.
# Compute Engine Beta API Only: When filtering in the Beta API, you can also
# filter on nested fields. For example, you could filter on instances that have
# set the scheduling.automaticRestart field to true. Use filtering on nested
# fields to take advantage of labels to organize and search for results based on
# label values.
# The Beta API also supports filtering on multiple expressions by providing each
# separate expression within parentheses. For example, (scheduling.
# automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are
# treated as AND expressions, meaning that resources must match all expressions
# to pass the filters.
# @param [Fixnum] max_results
# The maximum number of results per page that should be returned. If the number
# of available results is larger than maxResults, Compute Engine returns a
# nextPageToken that can be used to get the next page of results in subsequent
# list requests.
# @param [String] page_token
# Specifies a page token to use. Set pageToken to the nextPageToken returned by
# a previous list request to get the next page of results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ComputeV1::RouterList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ComputeV1::RouterList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_routers(project, region, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{project}/regions/{region}/routers', options)
command.response_representation = Google::Apis::ComputeV1::RouterList::Representation
command.response_class = Google::Apis::ComputeV1::RouterList
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
# Updates the entire content of the Router resource. This method supports patch
# semantics.
# @param [String] project
# Project ID for this request.
# @param [String] region
# Name of the region for this request.
# @param [String] router
# Name of the Router resource to update.
# @param [Google::Apis::ComputeV1::Router] router_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# 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_router(project, region, router, router_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, '{project}/regions/{region}/routers/{router}', options)
command.request_representation = Google::Apis::ComputeV1::Router::Representation
command.request_object = router_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['router'] = router unless router.nil?
command.query['fields'] = fields unless fields.nil?
command.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 entire content of the Router resource.
# @param [String] project
# Project ID for this request.
# @param [String] region
# Name of the region for this request.
# @param [String] router
# Name of the Router resource to update.
# @param [Google::Apis::ComputeV1::Router] router_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# 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_router(project, region, router, router_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, '{project}/regions/{region}/routers/{router}', options)
command.request_representation = Google::Apis::ComputeV1::Router::Representation
command.request_object = router_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['router'] = router unless router.nil?
command.query['fields'] = fields unless fields.nil?
command.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
# Project ID for this request.
@@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/deployment-manager/
module DeploymentmanagerV2
VERSION = 'V2'
REVISION = '20160426'
REVISION = '20160603'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/cloud-dns
module DnsV1
VERSION = 'V1'
REVISION = '20160513'
REVISION = '20160601'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/doubleclick-search/
module DoubleclicksearchV2
VERSION = 'V2'
REVISION = '20160519'
REVISION = '20160601'
# View and manage your advertising data in DoubleClick Search
AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch'
+1 -1
View File
@@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/drive/
module DriveV2
VERSION = 'V2'
REVISION = '20160520'
REVISION = '20160602'
# View and manage the files in your Google Drive
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
@@ -2093,6 +2093,11 @@ module Google
# @return [String]
attr_accessor :etag
# The time at which this permission will expire (RFC 3339 date-time).
# Corresponds to the JSON property `expirationDate`
# @return [DateTime]
attr_accessor :expiration_date
# 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.
@@ -2161,6 +2166,7 @@ module Google
@domain = args[:domain] if args.key?(:domain)
@email_address = args[:email_address] if args.key?(:email_address)
@etag = args[:etag] if args.key?(:etag)
@expiration_date = args[:expiration_date] if args.key?(:expiration_date)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@@ -764,6 +764,8 @@ module Google
property :domain, as: 'domain'
property :email_address, as: 'emailAddress'
property :etag, as: 'etag'
property :expiration_date, as: 'expirationDate', type: DateTime
property :id, as: 'id'
property :kind, as: 'kind'
property :name, as: 'name'
+8 -2
View File
@@ -1853,6 +1853,8 @@ module Google
# @param [String] permission_id
# The ID for the permission.
# @param [Google::Apis::DriveV2::Permission] permission_object
# @param [Boolean] remove_expiration
# Whether to remove the expiration date.
# @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'.
@@ -1877,7 +1879,7 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
def patch_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
command.request_representation = Google::Apis::DriveV2::Permission::Representation
command.request_object = permission_object
@@ -1885,6 +1887,7 @@ module Google
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['removeExpiration'] = remove_expiration unless remove_expiration.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?
@@ -1898,6 +1901,8 @@ module Google
# @param [String] permission_id
# The ID for the permission.
# @param [Google::Apis::DriveV2::Permission] permission_object
# @param [Boolean] remove_expiration
# Whether to remove the expiration date.
# @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'.
@@ -1922,7 +1927,7 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, 'files/{fileId}/permissions/{permissionId}', options)
command.request_representation = Google::Apis::DriveV2::Permission::Representation
command.request_object = permission_object
@@ -1930,6 +1935,7 @@ module Google
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['removeExpiration'] = remove_expiration unless remove_expiration.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?
+1 -1
View File
@@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/drive/
module DriveV3
VERSION = 'V3'
REVISION = '20160520'
REVISION = '20160602'
# View and manage the files in your Google Drive
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
@@ -1164,6 +1164,11 @@ module Google
# @return [String]
attr_accessor :email_address
# The time at which this permission will expire (RFC 3339 date-time).
# Corresponds to the JSON property `expirationTime`
# @return [DateTime]
attr_accessor :expiration_time
# The ID of this permission. This is a unique identifier for the grantee, and is
# published in User resources as permissionId.
# Corresponds to the JSON property `id`
@@ -1208,6 +1213,7 @@ module Google
@display_name = args[:display_name] if args.key?(:display_name)
@domain = args[:domain] if args.key?(:domain)
@email_address = args[:email_address] if args.key?(:email_address)
@expiration_time = args[:expiration_time] if args.key?(:expiration_time)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@photo_link = args[:photo_link] if args.key?(:photo_link)
@@ -451,6 +451,8 @@ module Google
property :display_name, as: 'displayName'
property :domain, as: 'domain'
property :email_address, as: 'emailAddress'
property :expiration_time, as: 'expirationTime', type: DateTime
property :id, as: 'id'
property :kind, as: 'kind'
property :photo_link, as: 'photoLink'
+4 -1
View File
@@ -1110,6 +1110,8 @@ module Google
# @param [String] permission_id
# The ID of the permission.
# @param [Google::Apis::DriveV3::Permission] permission_object
# @param [Boolean] remove_expiration
# Whether to remove the expiration date.
# @param [Boolean] transfer_ownership
# Whether to transfer ownership to the specified user and downgrade the current
# owner to a writer. This parameter is required as an acknowledgement of the
@@ -1135,7 +1137,7 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
def update_permission(file_id, permission_id, permission_object = nil, remove_expiration: nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
command.request_representation = Google::Apis::DriveV3::Permission::Representation
command.request_object = permission_object
@@ -1143,6 +1145,7 @@ module Google
command.response_class = Google::Apis::DriveV3::Permission
command.params['fileId'] = file_id unless file_id.nil?
command.params['permissionId'] = permission_id unless permission_id.nil?
command.query['removeExpiration'] = remove_expiration unless remove_expiration.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?
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/fusiontables
module FusiontablesV2
VERSION = 'V2'
REVISION = '20160317'
REVISION = '20160526'
# Manage your Fusion Tables
AUTH_FUSIONTABLES = 'https://www.googleapis.com/auth/fusiontables'
@@ -123,9 +123,10 @@ module Google
# 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
# images as tall as four lines of text STRING_JSON_TEXTAllows editing of text as
# JSON in UI STRING_JSON_LISTAllows editing of text as a JSON list 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]
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services
module GamesConfigurationV1configuration
VERSION = 'V1configuration'
REVISION = '20160519'
REVISION = '20160530'
# View and manage your Google Play Developer account
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services
module GamesManagementV1management
VERSION = 'V1management'
REVISION = '20160519'
REVISION = '20160530'
# Share your Google+ profile information and view and manage your game activity
AUTH_GAMES = 'https://www.googleapis.com/auth/games'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/games/services/
module GamesV1
VERSION = 'V1'
REVISION = '20160519'
REVISION = '20160530'
# View and manage its own configuration data in your Google Drive
AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
+1 -1
View File
@@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/genomics/
module GenomicsV1
VERSION = 'V1'
REVISION = '20160524'
REVISION = '20160607'
# View and manage your data in Google BigQuery
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
@@ -3329,6 +3329,11 @@ module Google
# @return [Array<Google::Apis::GenomicsV1::OperationEvent>]
attr_accessor :events
# Runtime metadata on this Operation.
# Corresponds to the JSON property `runtimeMetadata`
# @return [Hash<String,Object>]
attr_accessor :runtime_metadata
def initialize(**args)
update!(**args)
end
@@ -3340,6 +3345,7 @@ module Google
@end_time = args[:end_time] if args.key?(:end_time)
@request = args[:request] if args.key?(:request)
@events = args[:events] if args.key?(:events)
@runtime_metadata = args[:runtime_metadata] if args.key?(:runtime_metadata)
end
end
@@ -3361,6 +3367,63 @@ module Google
@description = args[:description] if args.key?(:description)
end
end
# Runtime metadata that will be populated in the runtimeMetadata field of the
# Operation associated with a RunPipeline execution.
class RuntimeMetadata
include Google::Apis::Core::Hashable
# Describes a GCE resource that is being managed by a running pipeline.
# Corresponds to the JSON property `gce`
# @return [Google::Apis::GenomicsV1::Gce]
attr_accessor :gce
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@gce = args[:gce] if args.key?(:gce)
end
end
# Describes a GCE resource that is being managed by a running pipeline.
class Gce
include Google::Apis::Core::Hashable
# The instance on which the operation is running.
# Corresponds to the JSON property `instanceName`
# @return [String]
attr_accessor :instance_name
# The availability zone in which the instance resides.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
# The machine type of the instance.
# Corresponds to the JSON property `machineType`
# @return [String]
attr_accessor :machine_type
# The names of the disks that were created for this pipeline.
# Corresponds to the JSON property `diskNames`
# @return [Array<String>]
attr_accessor :disk_names
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@instance_name = args[:instance_name] if args.key?(:instance_name)
@zone = args[:zone] if args.key?(:zone)
@machine_type = args[:machine_type] if args.key?(:machine_type)
@disk_names = args[:disk_names] if args.key?(:disk_names)
end
end
end
end
end
@@ -478,6 +478,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class RuntimeMetadata
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Gce
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AnnotationSet
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -1298,6 +1310,7 @@ module Google
hash :request, as: 'request'
collection :events, as: 'events', class: Google::Apis::GenomicsV1::OperationEvent, decorator: Google::Apis::GenomicsV1::OperationEvent::Representation
hash :runtime_metadata, as: 'runtimeMetadata'
end
end
@@ -1307,6 +1320,24 @@ module Google
property :description, as: 'description'
end
end
class RuntimeMetadata
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :gce, as: 'gce', class: Google::Apis::GenomicsV1::Gce, decorator: Google::Apis::GenomicsV1::Gce::Representation
end
end
class Gce
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :instance_name, as: 'instanceName'
property :zone, as: 'zone'
property :machine_type, as: 'machineType'
collection :disk_names, as: 'diskNames'
end
end
end
end
end
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/gmail/api/
module GmailV1
VERSION = 'V1'
REVISION = '20160522'
REVISION = '20160526'
# View and manage your mail
AUTH_SCOPE = 'https://mail.google.com/'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/google-apps/groups-settings/get_started
module GroupssettingsV1
VERSION = 'V1'
REVISION = '20160323'
REVISION = '20160525'
# View and manage the settings of a Google Apps Group
AUTH_APPS_GROUPS_SETTINGS = 'https://www.googleapis.com/auth/apps.groups.settings'
@@ -46,6 +46,11 @@ module Google
# @return [String]
attr_accessor :archive_only
# Custom footer text.
# Corresponds to the JSON property `customFooterText`
# @return [String]
attr_accessor :custom_footer_text
# Default email to which reply to any message should go.
# Corresponds to the JSON property `customReplyTo`
# @return [String]
@@ -66,6 +71,11 @@ module Google
# @return [String]
attr_accessor :email
# Whether to include custom footer.
# Corresponds to the JSON property `includeCustomFooter`
# @return [String]
attr_accessor :include_custom_footer
# If this groups should be included in global address list or not.
# Corresponds to the JSON property `includeInGlobalAddressList`
# @return [String]
@@ -196,10 +206,12 @@ module Google
@allow_google_communication = args[:allow_google_communication] if args.key?(:allow_google_communication)
@allow_web_posting = args[:allow_web_posting] if args.key?(:allow_web_posting)
@archive_only = args[:archive_only] if args.key?(:archive_only)
@custom_footer_text = args[:custom_footer_text] if args.key?(:custom_footer_text)
@custom_reply_to = args[:custom_reply_to] if args.key?(:custom_reply_to)
@default_message_deny_notification_text = args[:default_message_deny_notification_text] if args.key?(:default_message_deny_notification_text)
@description = args[:description] if args.key?(:description)
@email = args[:email] if args.key?(:email)
@include_custom_footer = args[:include_custom_footer] if args.key?(:include_custom_footer)
@include_in_global_address_list = args[:include_in_global_address_list] if args.key?(:include_in_global_address_list)
@is_archived = args[:is_archived] if args.key?(:is_archived)
@kind = args[:kind] if args.key?(:kind)
@@ -35,10 +35,12 @@ module Google
property :allow_google_communication, as: 'allowGoogleCommunication'
property :allow_web_posting, as: 'allowWebPosting'
property :archive_only, as: 'archiveOnly'
property :custom_footer_text, as: 'customFooterText'
property :custom_reply_to, as: 'customReplyTo'
property :default_message_deny_notification_text, as: 'defaultMessageDenyNotificationText'
property :description, as: 'description'
property :email, as: 'email'
property :include_custom_footer, as: 'includeCustomFooter'
property :include_in_global_address_list, as: 'includeInGlobalAddressList'
property :is_archived, as: 'isArchived'
property :kind, as: 'kind'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/identity-toolkit/v3/
module IdentitytoolkitV3
VERSION = 'V3'
REVISION = '20160510'
REVISION = '20160603'
end
end
end
@@ -587,6 +587,11 @@ module Google
# @return [String]
attr_accessor :captcha_response
# The timestamp when the account is created.
# Corresponds to the JSON property `createdAt`
# @return [String]
attr_accessor :created_at
# GCP project number of the requesting delegated app. Currently only intended
# for Firebase V1 migration.
# Corresponds to the JSON property `delegatedProjectNumber`
@@ -635,6 +640,11 @@ module Google
# @return [String]
attr_accessor :instance_id
# Last login timestamp.
# Corresponds to the JSON property `lastLoginAt`
# @return [String]
attr_accessor :last_login_at
# The local ID of the user.
# Corresponds to the JSON property `localId`
# @return [String]
@@ -685,6 +695,7 @@ module Google
def update!(**args)
@captcha_challenge = args[:captcha_challenge] if args.key?(:captcha_challenge)
@captcha_response = args[:captcha_response] if args.key?(:captcha_response)
@created_at = args[:created_at] if args.key?(:created_at)
@delegated_project_number = args[:delegated_project_number] if args.key?(:delegated_project_number)
@delete_attribute = args[:delete_attribute] if args.key?(:delete_attribute)
@delete_provider = args[:delete_provider] if args.key?(:delete_provider)
@@ -694,6 +705,7 @@ module Google
@email_verified = args[:email_verified] if args.key?(:email_verified)
@id_token = args[:id_token] if args.key?(:id_token)
@instance_id = args[:instance_id] if args.key?(:instance_id)
@last_login_at = args[:last_login_at] if args.key?(:last_login_at)
@local_id = args[:local_id] if args.key?(:local_id)
@oob_code = args[:oob_code] if args.key?(:oob_code)
@password = args[:password] if args.key?(:password)
@@ -1171,6 +1183,11 @@ module Google
# @return [String]
attr_accessor :secret
# Whitelisted client IDs for audience check.
# Corresponds to the JSON property `whitelistedAudiences`
# @return [Array<String>]
attr_accessor :whitelisted_audiences
def initialize(**args)
update!(**args)
end
@@ -1182,6 +1199,7 @@ module Google
@experiment_percent = args[:experiment_percent] if args.key?(:experiment_percent)
@provider = args[:provider] if args.key?(:provider)
@secret = args[:secret] if args.key?(:secret)
@whitelisted_audiences = args[:whitelisted_audiences] if args.key?(:whitelisted_audiences)
end
end
@@ -1501,6 +1519,11 @@ module Google
class UserInfo
include Google::Apis::Core::Hashable
# User creation timestamp.
# Corresponds to the JSON property `createdAt`
# @return [String]
attr_accessor :created_at
# Whether the user is disabled.
# Corresponds to the JSON property `disabled`
# @return [Boolean]
@@ -1523,6 +1546,11 @@ module Google
attr_accessor :email_verified
alias_method :email_verified?, :email_verified
# last login timestamp.
# Corresponds to the JSON property `lastLoginAt`
# @return [String]
attr_accessor :last_login_at
# The local ID of the user.
# Corresponds to the JSON property `localId`
# @return [String]
@@ -1569,10 +1597,12 @@ module Google
# Update properties of this object
def update!(**args)
@created_at = args[:created_at] if args.key?(:created_at)
@disabled = args[:disabled] if args.key?(:disabled)
@display_name = args[:display_name] if args.key?(:display_name)
@email = args[:email] if args.key?(:email)
@email_verified = args[:email_verified] if args.key?(:email_verified)
@last_login_at = args[:last_login_at] if args.key?(:last_login_at)
@local_id = args[:local_id] if args.key?(:local_id)
@password_hash = args[:password_hash] if args.key?(:password_hash)
@password_updated_at = args[:password_updated_at] if args.key?(:password_updated_at)
@@ -389,6 +389,7 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
property :captcha_challenge, as: 'captchaChallenge'
property :captcha_response, as: 'captchaResponse'
property :created_at, as: 'createdAt'
property :delegated_project_number, as: 'delegatedProjectNumber'
collection :delete_attribute, as: 'deleteAttribute'
collection :delete_provider, as: 'deleteProvider'
@@ -398,6 +399,7 @@ module Google
property :email_verified, as: 'emailVerified'
property :id_token, as: 'idToken'
property :instance_id, as: 'instanceId'
property :last_login_at, as: 'lastLoginAt'
property :local_id, as: 'localId'
property :oob_code, as: 'oobCode'
property :password, as: 'password'
@@ -528,6 +530,7 @@ module Google
property :experiment_percent, as: 'experimentPercent'
property :provider, as: 'provider'
property :secret, as: 'secret'
collection :whitelisted_audiences, as: 'whitelistedAudiences'
end
end
@@ -614,10 +617,12 @@ module Google
class UserInfo
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :created_at, as: 'createdAt'
property :disabled, as: 'disabled'
property :display_name, as: 'displayName'
property :email, as: 'email'
property :email_verified, as: 'emailVerified'
property :last_login_at, as: 'lastLoginAt'
property :local_id, as: 'localId'
property :password_hash, :base64 => true, as: 'passwordHash'
property :password_updated_at, as: 'passwordUpdatedAt'
+45
View File
@@ -0,0 +1,45 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES 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/monitoring_v3/service.rb'
require 'google/apis/monitoring_v3/classes.rb'
require 'google/apis/monitoring_v3/representations.rb'
module Google
module Apis
# Google Monitoring API
#
# Manages your Stackdriver Monitoring data and configurations. Most projects
# must be associated with a Stackdriver account, with a few exceptions as noted
# on the individual method pages.
#
# @see https://cloud.google.com/monitoring/api/
module MonitoringV3
VERSION = 'V3'
REVISION = '20160606'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
# View monitoring data for all of your Google Cloud and third-party projects
AUTH_MONITORING_READ = 'https://www.googleapis.com/auth/monitoring.read'
# Publish metric data to your Google Cloud projects
AUTH_MONITORING_WRITE = 'https://www.googleapis.com/auth/monitoring.write'
# 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
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,533 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES 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 MonitoringV3
class Metric
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListGroupMembersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TimeInterval
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Group
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListTimeSeriesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Point
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CollectdValue
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TimeSeries
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MetricDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Exponential
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Explicit
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Linear
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CollectdPayload
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListMetricDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Distribution
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MonitoredResource
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LabelDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MonitoredResourceDescriptor
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class TypedValue
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListMonitoredResourceDescriptorsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Field
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Option
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Empty
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SourceContext
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Range
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CreateTimeSeriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BucketOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class CreateCollectdTimeSeriesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Type
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Exemplar
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListGroupsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Metric
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels'
property :type, as: 'type'
end
end
class ListGroupMembersResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :members, as: 'members', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation
property :next_page_token, as: 'nextPageToken'
property :total_size, as: 'totalSize'
end
end
class TimeInterval
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end_time, as: 'endTime'
property :start_time, as: 'startTime'
end
end
class Group
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :parent_name, as: 'parentName'
property :is_cluster, as: 'isCluster'
property :filter, as: 'filter'
property :name, as: 'name'
end
end
class ListTimeSeriesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class Point
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation
property :interval, as: 'interval', class: Google::Apis::MonitoringV3::TimeInterval, decorator: Google::Apis::MonitoringV3::TimeInterval::Representation
end
end
class CollectdValue
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation
property :data_source_name, as: 'dataSourceName'
property :data_source_type, as: 'dataSourceType'
end
end
class TimeSeries
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric, as: 'metric', class: Google::Apis::MonitoringV3::Metric, decorator: Google::Apis::MonitoringV3::Metric::Representation
collection :points, as: 'points', class: Google::Apis::MonitoringV3::Point, decorator: Google::Apis::MonitoringV3::Point::Representation
property :value_type, as: 'valueType'
property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation
property :metric_kind, as: 'metricKind'
end
end
class MetricDescriptor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :unit, as: 'unit'
collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation
property :metric_kind, as: 'metricKind'
property :value_type, as: 'valueType'
property :display_name, as: 'displayName'
property :name, as: 'name'
property :type, as: 'type'
end
end
class Exponential
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :growth_factor, as: 'growthFactor'
property :scale, as: 'scale'
property :num_finite_buckets, as: 'numFiniteBuckets'
end
end
class Explicit
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :bounds, as: 'bounds'
end
end
class Linear
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :width, as: 'width'
property :offset, as: 'offset'
property :num_finite_buckets, as: 'numFiniteBuckets'
end
end
class CollectdPayload
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :end_time, as: 'endTime'
hash :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation
collection :values, as: 'values', class: Google::Apis::MonitoringV3::CollectdValue, decorator: Google::Apis::MonitoringV3::CollectdValue::Representation
property :plugin_instance, as: 'pluginInstance'
property :start_time, as: 'startTime'
property :type_instance, as: 'typeInstance'
property :type, as: 'type'
property :plugin, as: 'plugin'
end
end
class ListMetricDescriptorsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :metric_descriptors, as: 'metricDescriptors', class: Google::Apis::MonitoringV3::MetricDescriptor, decorator: Google::Apis::MonitoringV3::MetricDescriptor::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class Distribution
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :bucket_counts, as: 'bucketCounts'
property :bucket_options, as: 'bucketOptions', class: Google::Apis::MonitoringV3::BucketOptions, decorator: Google::Apis::MonitoringV3::BucketOptions::Representation
property :count, as: 'count'
property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation'
property :mean, as: 'mean'
property :range, as: 'range', class: Google::Apis::MonitoringV3::Range, decorator: Google::Apis::MonitoringV3::Range::Representation
collection :exemplars, as: 'exemplars', class: Google::Apis::MonitoringV3::Exemplar, decorator: Google::Apis::MonitoringV3::Exemplar::Representation
end
end
class MonitoredResource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :labels, as: 'labels'
property :type, as: 'type'
end
end
class LabelDescriptor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :value_type, as: 'valueType'
property :key, as: 'key'
end
end
class MonitoredResourceDescriptor
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :description, as: 'description'
collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation
property :type, as: 'type'
property :name, as: 'name'
end
end
class TypedValue
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :bool_value, as: 'boolValue'
property :string_value, as: 'stringValue'
property :int64_value, as: 'int64Value'
property :double_value, as: 'doubleValue'
property :distribution_value, as: 'distributionValue', class: Google::Apis::MonitoringV3::Distribution, decorator: Google::Apis::MonitoringV3::Distribution::Representation
end
end
class ListMonitoredResourceDescriptorsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :next_page_token, as: 'nextPageToken'
collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::MonitoringV3::MonitoredResourceDescriptor, decorator: Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation
end
end
class Field
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :default_value, as: 'defaultValue'
property :json_name, as: 'jsonName'
collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation
property :oneof_index, as: 'oneofIndex'
property :cardinality, as: 'cardinality'
property :type_url, as: 'typeUrl'
property :name, as: 'name'
property :packed, as: 'packed'
property :number, as: 'number'
property :kind, as: 'kind'
end
end
class Option
# @private
class Representation < Google::Apis::Core::JsonRepresentation
hash :value, as: 'value'
property :name, as: 'name'
end
end
class Empty
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class SourceContext
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :file_name, as: 'fileName'
end
end
class Range
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :max, as: 'max'
property :min, as: 'min'
end
end
class CreateTimeSeriesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation
end
end
class BucketOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :explicit_buckets, as: 'explicitBuckets', class: Google::Apis::MonitoringV3::Explicit, decorator: Google::Apis::MonitoringV3::Explicit::Representation
property :exponential_buckets, as: 'exponentialBuckets', class: Google::Apis::MonitoringV3::Exponential, decorator: Google::Apis::MonitoringV3::Exponential::Representation
property :linear_buckets, as: 'linearBuckets', class: Google::Apis::MonitoringV3::Linear, decorator: Google::Apis::MonitoringV3::Linear::Representation
end
end
class CreateCollectdTimeSeriesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :collectd_payloads, as: 'collectdPayloads', class: Google::Apis::MonitoringV3::CollectdPayload, decorator: Google::Apis::MonitoringV3::CollectdPayload::Representation
property :collectd_version, as: 'collectdVersion'
property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation
end
end
class Type
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :oneofs, as: 'oneofs'
collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation
property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation
collection :fields, as: 'fields', class: Google::Apis::MonitoringV3::Field, decorator: Google::Apis::MonitoringV3::Field::Representation
property :name, as: 'name'
property :syntax, as: 'syntax'
end
end
class Exemplar
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :value, as: 'value'
collection :attachments, as: 'attachments'
property :timestamp, as: 'timestamp'
end
end
class ListGroupsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :group, as: 'group', class: Google::Apis::MonitoringV3::Group, decorator: Google::Apis::MonitoringV3::Group::Representation
property :next_page_token, as: 'nextPageToken'
end
end
end
end
end
@@ -0,0 +1,743 @@
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES 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 MonitoringV3
# Google Monitoring API
#
# Manages your Stackdriver Monitoring data and configurations. Most projects
# must be associated with a Stackdriver account, with a few exceptions as noted
# on the individual method pages.
#
# @example
# require 'google/apis/monitoring_v3'
#
# Monitoring = Google::Apis::MonitoringV3 # Alias the module
# service = Monitoring::MonitoringService.new
#
# @see https://cloud.google.com/monitoring/api/
class MonitoringService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super('https://monitoring.googleapis.com/', '')
end
# **Stackdriver Monitoring Agent only:** Creates a new time series.
# <aside class="caution">This method is only for use by the Google Monitoring
# Agent.
# Use projects.timeSeries.create
# instead.</aside>
# @param [String] name
# The project in which to create the time series. The format is
# `"projects/PROJECT_ID_OR_NUMBER"`.
# @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_request_object
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options)
command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation
command.request_object = create_collectd_time_series_request_object
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::Empty
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing group.
# You can change any group attributes except `name`.
# @param [String] name
# The name of this group.
# The format is
# `"projects/`project_id_or_number`/groups/`group_id`"`.
# When creating a group, this field is ignored and a new name is created
# consisting of the project specified in the call to `CreateGroup`
# and a unique ``group_id`` that is generated automatically.
# @OutputOnly
# @param [Google::Apis::MonitoringV3::Group] group_object
# @param [Boolean] validate_only
# If true, validate this request but do not update the existing group.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:put, 'v3/{+name}', options)
command.request_representation = Google::Apis::MonitoringV3::Group::Representation
command.request_object = group_object
command.response_representation = Google::Apis::MonitoringV3::Group::Representation
command.response_class = Google::Apis::MonitoringV3::Group
command.params['name'] = name unless name.nil?
command.query['validateOnly'] = validate_only unless validate_only.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a single group.
# @param [String] name
# The group to retrieve. The format is
# `"projects/`project_id_or_number`/groups/`group_id`"`.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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_project_group(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::Group::Representation
command.response_class = Google::Apis::MonitoringV3::Group
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates a new group.
# @param [String] name
# The project in which to create the group. The format is
# `"projects/`project_id_or_number`"`.
# @param [Google::Apis::MonitoringV3::Group] group_object
# @param [Boolean] validate_only
# If true, validate this request but do not create the group.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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 create_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/groups', options)
command.request_representation = Google::Apis::MonitoringV3::Group::Representation
command.request_object = group_object
command.response_representation = Google::Apis::MonitoringV3::Group::Representation
command.response_class = Google::Apis::MonitoringV3::Group
command.params['name'] = name unless name.nil?
command.query['validateOnly'] = validate_only unless validate_only.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists the existing groups.
# @param [String] name
# The project whose groups are to be listed. The format is
# `"projects/`project_id_or_number`"`.
# @param [String] descendants_of_group
# A group name: `"projects/`project_id_or_number`/groups/`group_id`"`.
# Returns the descendants of the specified group. This is a superset of
# the results returned by the `childrenOfGroup` filter, and includes
# children-of-children, and so forth.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @param [String] children_of_group
# A group name: `"projects/`project_id_or_number`/groups/`group_id`"`.
# Returns groups whose `parentName` field contains the group
# name. If no groups have this parent, the results are empty.
# @param [String] ancestors_of_group
# A group name: `"projects/`project_id_or_number`/groups/`group_id`"`.
# Returns groups that are ancestors of the specified group.
# The groups are returned in order, starting with the immediate parent and
# ending with the most distant ancestor. If the specified group has no
# immediate parent, the results are empty.
# @param [String] page_token
# If this field is not empty then it must contain the `nextPageToken` value
# returned by a previous call to this method. Using this field causes the
# method to return additional results from the previous method call.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::ListGroupsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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_project_groups(name, descendants_of_group: nil, page_size: nil, children_of_group: nil, ancestors_of_group: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/groups', options)
command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse
command.params['name'] = name unless name.nil?
command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil?
command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes an existing group.
# @param [String] name
# The group to delete. The format is
# `"projects/`project_id_or_number`/groups/`group_id`"`.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_group(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::Empty
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists the monitored resources that are members of a group.
# @param [String] name
# The group whose members are listed. The format is
# `"projects/`project_id_or_number`/groups/`group_id`"`.
# @param [String] filter
# An optional [list filter](/monitoring/api/learn_more#filtering) describing
# the members to be returned. The filter may reference the type, labels, and
# metadata of monitored resources that comprise the group.
# For example, to return only resources representing Compute Engine VM
# instances, use this filter:
# resource.type = "gce_instance"
# @param [String] interval_end_time
# Required. The end of the interval. The interval includes this
# time.
# @param [String] interval_start_time
# If this value is omitted, the interval is a point in time,
# `endTime`. If `startTime` is present, it must be earlier than
# (less than) `endTime`. The interval begins after
# `startTime`&mdash;it does not include `startTime`.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @param [String] page_token
# If this field is not empty then it must contain the `nextPageToken` value
# returned by a previous call to this method. Using this field causes the
# method to return additional results from the previous method call.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::ListGroupMembersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::ListGroupMembersResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_group_members(name, filter: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/members', options)
command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a single metric descriptor. This method does not require a Stackdriver
# account.
# @param [String] name
# The metric descriptor on which to execute the request. The format is
# `"projects/`project_id_or_number`/metricDescriptors/`metric_id`"`.
# An example value of ``metric_id`` is
# `"compute.googleapis.com/instance/disk/read_bytes_count"`.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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 get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
command.response_class = Google::Apis::MonitoringV3::MetricDescriptor
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates a new metric descriptor.
# User-created metric descriptors define
# [custom metrics](/monitoring/custom-metrics).
# @param [String] name
# The project on which to execute the request. The format is
# `"projects/`project_id_or_number`"`.
# @param [Google::Apis::MonitoringV3::MetricDescriptor] metric_descriptor_object
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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_project_metric_descriptor(name, metric_descriptor_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', options)
command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
command.request_object = metric_descriptor_object
command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation
command.response_class = Google::Apis::MonitoringV3::MetricDescriptor
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists metric descriptors that match a filter. This method does not require a
# Stackdriver account.
# @param [String] name
# The project on which to execute the request. The format is
# `"projects/`project_id_or_number`"`.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @param [String] filter
# If this field is empty, all custom and
# system-defined metric descriptors are returned.
# Otherwise, the [filter](/monitoring/api/v3/filters)
# specifies which metric descriptors are to be
# returned. For example, the following filter matches all
# [custom metrics](/monitoring/custom-metrics):
# metric.type = starts_with("custom.googleapis.com/")
# @param [String] page_token
# If this field is not empty then it must contain the `nextPageToken` value
# returned by a previous call to this method. Using this field causes the
# method to return additional results from the previous method call.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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_project_metric_descriptors(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options)
command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse
command.params['name'] = name unless name.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Deletes a metric descriptor. Only user-created
# [custom metrics](/monitoring/custom-metrics) can be deleted.
# @param [String] name
# The metric descriptor on which to execute the request. The format is
# `"projects/`project_id_or_number`/metricDescriptors/`metric_id`"`.
# An example of ``metric_id`` is:
# `"custom.googleapis.com/my_test_metric"`.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:delete, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::Empty
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Creates or adds data to one or more time series.
# The response is empty if all time series in the request were written.
# If any time series could not be written, a corresponding failure message is
# included in the error response.
# @param [String] name
# The project on which to execute the request. The format is
# `"projects/`project_id_or_number`"`.
# @param [Google::Apis::MonitoringV3::CreateTimeSeriesRequest] create_time_series_request_object
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_time_series(name, create_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:post, 'v3/{+name}/timeSeries', options)
command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation
command.request_object = create_time_series_request_object
command.response_representation = Google::Apis::MonitoringV3::Empty::Representation
command.response_class = Google::Apis::MonitoringV3::Empty
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists time series that match a filter. This method does not require a
# Stackdriver account.
# @param [String] name
# The project on which to execute the request. The format is
# "projects/`project_id_or_number`".
# @param [String] filter
# A [monitoring filter](/monitoring/api/v3/filters) that specifies which time
# series should be returned. The filter must specify a single metric type,
# and can additionally specify metric labels and other information. For
# example:
# metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
# metric.label.instance_name = "my-instance-name"
# @param [Array<String>, String] aggregation_group_by_fields
# The set of fields to preserve when `crossSeriesReducer` is
# specified. The `groupByFields` determine how the time series
# are partitioned into subsets prior to applying the aggregation
# function. Each subset contains time series that have the same
# value for each of the grouping fields. Each individual time
# series is a member of exactly one subset. The
# `crossSeriesReducer` is applied to each subset of time series.
# Fields not specified in `groupByFields` are aggregated away.
# If `groupByFields` is not specified, the time series are
# aggregated into a single output time series. If
# `crossSeriesReducer` is not defined, this field is ignored.
# @param [String] aggregation_cross_series_reducer
# The approach to be used to combine time series. Not all reducer
# functions may be applied to all time series, depending on the
# metric type and the value type of the original time
# series. Reduction may change the metric type of value type of the
# time series.
# Time series data must be aligned in order to perform cross-time
# series reduction. If `crossSeriesReducer` is specified, then
# `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
# and `alignmentPeriod` must be specified; otherwise, an error is
# returned.
# @param [String] interval_end_time
# Required. The end of the interval. The interval includes this
# time.
# @param [String] interval_start_time
# If this value is omitted, the interval is a point in time,
# `endTime`. If `startTime` is present, it must be earlier than
# (less than) `endTime`. The interval begins after
# `startTime`&mdash;it does not include `startTime`.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# When `view` field sets to `FULL`, it limits the number of `Points` server
# will return; if `view` field is `HEADERS`, it limits the number of
# `TimeSeries` server will return.
# @param [String] view
# Specifies which information is returned about the time series.
# @param [String] aggregation_alignment_period
# The alignment period for per-time series
# alignment. If present, `alignmentPeriod` must be at least 60
# seconds. After per-time series alignment, each time series will
# contain data points only on the period boundaries. If
# `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then
# this field is ignored. If `perSeriesAligner` is specified and
# does not equal `ALIGN_NONE`, then this field must be defined;
# otherwise an error is returned.
# @param [String] aggregation_per_series_aligner
# The approach to be used to align individual time series. Not all
# alignment functions may be applied to all time series, depending
# on the metric type and value type of the original time
# series. Alignment may change the metric type or the value type of
# the time series.
# Time series data must be aligned in order to perform cross-time
# series reduction. If `crossSeriesReducer` is specified, then
# `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
# and `alignmentPeriod` must be specified; otherwise, an error is
# returned.
# @param [String] order_by
# Specifies the order in which the points of the time series should
# be returned. By default, results are not ordered. Currently,
# this field must be left blank.
# @param [String] page_token
# If this field is not empty then it must contain the `nextPageToken` value
# returned by a previous call to this method. Using this field causes the
# method to return additional results from the previous method call.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::ListTimeSeriesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::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_project_time_series(name, filter: nil, aggregation_group_by_fields: nil, aggregation_cross_series_reducer: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, view: nil, aggregation_alignment_period: nil, aggregation_per_series_aligner: nil, order_by: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/timeSeries', options)
command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse
command.params['name'] = name unless name.nil?
command.query['filter'] = filter unless filter.nil?
command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil?
command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil?
command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil?
command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['view'] = view unless view.nil?
command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil?
command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Gets a single monitored resource descriptor. This method does not require a
# Stackdriver account.
# @param [String] name
# The monitored resource descriptor to get. The format is
# `"projects/`project_id_or_number`/monitoredResourceDescriptors/`resource_type`"
# `.
# The ``resource_type`` is a predefined type, such as
# `cloudsql_database`.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}', options)
command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation
command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor
command.params['name'] = name unless name.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
# Lists monitored resource descriptors that match a filter. This method does not
# require a Stackdriver account.
# @param [String] name
# The project on which to execute the request. The format is
# `"projects/`project_id_or_number`"`.
# @param [Fixnum] page_size
# A positive number that is the maximum number of results to return.
# @param [String] filter
# An optional [filter](/monitoring/api/v3/filters) describing
# the descriptors to be returned. The filter can reference
# the descriptor's type and labels. For example, the
# following filter returns only Google Compute Engine descriptors
# that have an `id` label:
# resource.type = starts_with("gce_") AND resource.label:id
# @param [String] page_token
# If this field is not empty then it must contain the `nextPageToken` value
# returned by a previous call to this method. Using this field causes the
# method to return additional results from the previous method call.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_monitored_resource_descriptors(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options)
command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation
command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse
command.params['name'] = name unless name.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
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
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/accounts/docs/OAuth2
module Oauth2V2
VERSION = 'V2'
REVISION = '20160330'
REVISION = '20160602'
# Know the list of people in your circles, your age range, and language
AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/+/domains/
module PlusDomainsV1
VERSION = 'V1'
REVISION = '20160523'
REVISION = '20160607'
# View your circles and the people and pages in them
AUTH_PLUS_CIRCLES_READ = 'https://www.googleapis.com/auth/plus.circles.read'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/+/api/
module PlusV1
VERSION = 'V1'
REVISION = '20160523'
REVISION = '20160607'
# Know the list of people in your circles, your age range, and language
AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login'
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/sheets/
module SheetsV4
VERSION = 'V4'
REVISION = '20160519'
REVISION = '20160603'
# View the files in your Google Drive
AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'
+1 -1
View File
@@ -27,7 +27,7 @@ module Google
# @see https://cloud.google.com/vision/
module VisionV1
VERSION = 'V1'
REVISION = '20160519'
REVISION = '20160606'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
+10 -9
View File
@@ -668,15 +668,14 @@ module Google
attr_accessor :lat_long_rect
# List of languages to use for TEXT_DETECTION. In most cases, an empty value
# will yield the best results as it will allow text detection to
# automatically detect the text language. For languages based on the latin
# alphabet a hint is not needed. In rare cases, when the language of
# the text in the image is known in advance, setting this hint will help get
# better results (although it will hurt a great deal if the hint is wrong).
# Text detection will return an error if one or more of the languages
# specified here are not supported. The exact list of supported languages are
# specified here:
# https://cloud.google.com/translate/v2/using_rest#language-params
# yields the best results since it enables automatic language detection. For
# languages based on the Latin alphabet, setting `language_hints` is not
# needed. In rare cases, when the language of the text in the image is known,
# setting a hint will help get better results (although it will be a
# significant hindrance if the hint is wrong). Text detection returns an
# error if one or more of the specified languages is not one of the
# [supported
# languages](/translate/v2/translate-reference#supported_languages).
# Corresponds to the JSON property `languageHints`
# @return [Array<String>]
attr_accessor :language_hints
@@ -1064,6 +1063,8 @@ module Google
attr_accessor :source
# Image content, represented as a stream of bytes.
# Note: as with all `bytes` fields, protobuffers use a pure binary
# representation, whereas JSON representations use base64.
# Corresponds to the JSON property `content`
# @return [String]
attr_accessor :content
+1 -1
View File
@@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/youtube/partner/
module YoutubePartnerV1
VERSION = 'V1'
REVISION = '20160510'
REVISION = '20160608'
# View and manage your assets and associated content on YouTube
AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner'
+1 -1
View File
@@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/youtube/v3
module YoutubeV3
VERSION = 'V3'
REVISION = '20160509'
REVISION = '20160606'
# Manage your YouTube account
AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube'
+155
View File
@@ -4533,6 +4533,26 @@ module Google
# @return [Google::Apis::YoutubeV3::LiveChatMessageRetractedDetails]
attr_accessor :message_retracted_details
#
# Corresponds to the JSON property `pollClosedDetails`
# @return [Google::Apis::YoutubeV3::LiveChatPollClosedDetails]
attr_accessor :poll_closed_details
#
# Corresponds to the JSON property `pollEditedDetails`
# @return [Google::Apis::YoutubeV3::LiveChatPollEditedDetails]
attr_accessor :poll_edited_details
#
# Corresponds to the JSON property `pollOpenedDetails`
# @return [Google::Apis::YoutubeV3::LiveChatPollOpenedDetails]
attr_accessor :poll_opened_details
#
# Corresponds to the JSON property `pollVotedDetails`
# @return [Google::Apis::YoutubeV3::LiveChatPollVotedDetails]
attr_accessor :poll_voted_details
# The date and time when the message was orignally published. The value is
# specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
# Corresponds to the JSON property `publishedAt`
@@ -4569,6 +4589,10 @@ module Google
@live_chat_id = args[:live_chat_id] if args.key?(:live_chat_id)
@message_deleted_details = args[:message_deleted_details] if args.key?(:message_deleted_details)
@message_retracted_details = args[:message_retracted_details] if args.key?(:message_retracted_details)
@poll_closed_details = args[:poll_closed_details] if args.key?(:poll_closed_details)
@poll_edited_details = args[:poll_edited_details] if args.key?(:poll_edited_details)
@poll_opened_details = args[:poll_opened_details] if args.key?(:poll_opened_details)
@poll_voted_details = args[:poll_voted_details] if args.key?(:poll_voted_details)
@published_at = args[:published_at] if args.key?(:published_at)
@text_message_details = args[:text_message_details] if args.key?(:text_message_details)
@type = args[:type] if args.key?(:type)
@@ -4712,6 +4736,137 @@ module Google
end
end
#
class LiveChatPollClosedDetails
include Google::Apis::Core::Hashable
# The id of the poll that was closed.
# Corresponds to the JSON property `pollId`
# @return [String]
attr_accessor :poll_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@poll_id = args[:poll_id] if args.key?(:poll_id)
end
end
#
class LiveChatPollEditedDetails
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::YoutubeV3::LiveChatPollItem>]
attr_accessor :items
#
# Corresponds to the JSON property `prompt`
# @return [String]
attr_accessor :prompt
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@prompt = args[:prompt] if args.key?(:prompt)
end
end
#
class LiveChatPollItem
include Google::Apis::Core::Hashable
# Plain text description of the item.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
#
# Corresponds to the JSON property `itemId`
# @return [String]
attr_accessor :item_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
@item_id = args[:item_id] if args.key?(:item_id)
end
end
#
class LiveChatPollOpenedDetails
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::YoutubeV3::LiveChatPollItem>]
attr_accessor :items
#
# Corresponds to the JSON property `prompt`
# @return [String]
attr_accessor :prompt
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@prompt = args[:prompt] if args.key?(:prompt)
end
end
#
class LiveChatPollVotedDetails
include Google::Apis::Core::Hashable
# The poll item the user chose.
# Corresponds to the JSON property `itemId`
# @return [String]
attr_accessor :item_id
# The poll the user voted on.
# Corresponds to the JSON property `pollId`
# @return [String]
attr_accessor :poll_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@item_id = args[:item_id] if args.key?(:item_id)
@poll_id = args[:poll_id] if args.key?(:poll_id)
end
end
#
class LiveChatTextMessageDetails
include Google::Apis::Core::Hashable
@@ -574,6 +574,36 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class LiveChatPollClosedDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveChatPollEditedDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveChatPollItem
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveChatPollOpenedDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveChatPollVotedDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LiveChatTextMessageDetails
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -2202,6 +2232,14 @@ module Google
property :message_retracted_details, as: 'messageRetractedDetails', class: Google::Apis::YoutubeV3::LiveChatMessageRetractedDetails, decorator: Google::Apis::YoutubeV3::LiveChatMessageRetractedDetails::Representation
property :poll_closed_details, as: 'pollClosedDetails', class: Google::Apis::YoutubeV3::LiveChatPollClosedDetails, decorator: Google::Apis::YoutubeV3::LiveChatPollClosedDetails::Representation
property :poll_edited_details, as: 'pollEditedDetails', class: Google::Apis::YoutubeV3::LiveChatPollEditedDetails, decorator: Google::Apis::YoutubeV3::LiveChatPollEditedDetails::Representation
property :poll_opened_details, as: 'pollOpenedDetails', class: Google::Apis::YoutubeV3::LiveChatPollOpenedDetails, decorator: Google::Apis::YoutubeV3::LiveChatPollOpenedDetails::Representation
property :poll_voted_details, as: 'pollVotedDetails', class: Google::Apis::YoutubeV3::LiveChatPollVotedDetails, decorator: Google::Apis::YoutubeV3::LiveChatPollVotedDetails::Representation
property :published_at, as: 'publishedAt', type: DateTime
property :text_message_details, as: 'textMessageDetails', class: Google::Apis::YoutubeV3::LiveChatTextMessageDetails, decorator: Google::Apis::YoutubeV3::LiveChatTextMessageDetails::Representation
@@ -2250,6 +2288,49 @@ module Google
end
end
class LiveChatPollClosedDetails
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :poll_id, as: 'pollId'
end
end
class LiveChatPollEditedDetails
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::YoutubeV3::LiveChatPollItem, decorator: Google::Apis::YoutubeV3::LiveChatPollItem::Representation
property :prompt, as: 'prompt'
end
end
class LiveChatPollItem
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
property :item_id, as: 'itemId'
end
end
class LiveChatPollOpenedDetails
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
collection :items, as: 'items', class: Google::Apis::YoutubeV3::LiveChatPollItem, decorator: Google::Apis::YoutubeV3::LiveChatPollItem::Representation
property :prompt, as: 'prompt'
end
end
class LiveChatPollVotedDetails
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :item_id, as: 'itemId'
property :poll_id, as: 'pollId'
end
end
class LiveChatTextMessageDetails
# @private
class Representation < Google::Apis::Core::JsonRepresentation
+6 -2
View File
@@ -3622,9 +3622,12 @@ module Google
# @param [Boolean] mine
# Set this parameter's value to true to retrieve a feed of the authenticated
# user's subscriptions.
# @param [Boolean] my_recent_subscribers
# Set this parameter's value to true to retrieve a feed of the subscribers of
# the authenticated user in reverse chronological order (newest first).
# @param [Boolean] my_subscribers
# Set this parameter's value to true to retrieve a feed of the subscribers of
# the authenticated user.
# the authenticated user in no particular order.
# @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
@@ -3679,7 +3682,7 @@ module Google
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_subscriptions(part, channel_id: nil, for_channel_id: nil, id: nil, max_results: nil, mine: nil, my_subscribers: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, order: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
def list_subscriptions(part, channel_id: nil, for_channel_id: nil, id: nil, max_results: nil, mine: nil, my_recent_subscribers: nil, my_subscribers: nil, on_behalf_of_content_owner: nil, on_behalf_of_content_owner_channel: nil, order: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'subscriptions', options)
command.response_representation = Google::Apis::YoutubeV3::ListSubscriptionResponse::Representation
command.response_class = Google::Apis::YoutubeV3::ListSubscriptionResponse
@@ -3688,6 +3691,7 @@ module Google
command.query['id'] = id unless id.nil?
command.query['maxResults'] = max_results unless max_results.nil?
command.query['mine'] = mine unless mine.nil?
command.query['myRecentSubscribers'] = my_recent_subscribers unless my_recent_subscribers.nil?
command.query['mySubscribers'] = my_subscribers unless my_subscribers.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['onBehalfOfContentOwnerChannel'] = on_behalf_of_content_owner_channel unless on_behalf_of_content_owner_channel.nil?