Autogenerated update (2018-06-02)
Delete: - photoslibrary_v1 Update: - cloudtasks_v2beta2 - monitoring_v3 - servicemanagement_v1 - serviceuser_v1
This commit is contained in:
parent
dfd1e66002
commit
c88b21f9a9
|
@ -62862,6 +62862,8 @@
|
|||
"/monitoring:v3/ListNotificationChannelsResponse/notificationChannels": notification_channels
|
||||
"/monitoring:v3/ListNotificationChannelsResponse/notificationChannels/notification_channel": notification_channel
|
||||
"/monitoring:v3/ListTimeSeriesResponse": list_time_series_response
|
||||
"/monitoring:v3/ListTimeSeriesResponse/executionErrors": execution_errors
|
||||
"/monitoring:v3/ListTimeSeriesResponse/executionErrors/execution_error": execution_error
|
||||
"/monitoring:v3/ListTimeSeriesResponse/nextPageToken": next_page_token
|
||||
"/monitoring:v3/ListTimeSeriesResponse/timeSeries": time_series
|
||||
"/monitoring:v3/ListTimeSeriesResponse/timeSeries/time_series": time_series
|
||||
|
@ -78267,6 +78269,66 @@
|
|||
"/toolresults:v1beta3firstparty/toolresults.projects.initializeSettings": initialize_project_settings
|
||||
"/toolresults:v1beta3firstparty/toolresults.projects.initializeSettings/projectId": project_id
|
||||
"/toolresults:v1beta3firstparty/userIp": user_ip
|
||||
"/tpu:v1/Empty": empty
|
||||
"/tpu:v1/ListLocationsResponse": list_locations_response
|
||||
"/tpu:v1/ListLocationsResponse/locations": locations
|
||||
"/tpu:v1/ListLocationsResponse/locations/location": location
|
||||
"/tpu:v1/ListLocationsResponse/nextPageToken": next_page_token
|
||||
"/tpu:v1/ListOperationsResponse": list_operations_response
|
||||
"/tpu:v1/ListOperationsResponse/nextPageToken": next_page_token
|
||||
"/tpu:v1/ListOperationsResponse/operations": operations
|
||||
"/tpu:v1/ListOperationsResponse/operations/operation": operation
|
||||
"/tpu:v1/Location": location
|
||||
"/tpu:v1/Location/displayName": display_name
|
||||
"/tpu:v1/Location/labels": labels
|
||||
"/tpu:v1/Location/labels/label": label
|
||||
"/tpu:v1/Location/locationId": location_id
|
||||
"/tpu:v1/Location/metadata": metadata
|
||||
"/tpu:v1/Location/metadata/metadatum": metadatum
|
||||
"/tpu:v1/Location/name": name
|
||||
"/tpu:v1/Operation": operation
|
||||
"/tpu:v1/Operation/done": done
|
||||
"/tpu:v1/Operation/error": error
|
||||
"/tpu:v1/Operation/metadata": metadata
|
||||
"/tpu:v1/Operation/metadata/metadatum": metadatum
|
||||
"/tpu:v1/Operation/name": name
|
||||
"/tpu:v1/Operation/response": response
|
||||
"/tpu:v1/Operation/response/response": response
|
||||
"/tpu:v1/OperationMetadata": operation_metadata
|
||||
"/tpu:v1/OperationMetadata/apiVersion": api_version
|
||||
"/tpu:v1/OperationMetadata/cancelRequested": cancel_requested
|
||||
"/tpu:v1/OperationMetadata/createTime": create_time
|
||||
"/tpu:v1/OperationMetadata/endTime": end_time
|
||||
"/tpu:v1/OperationMetadata/statusDetail": status_detail
|
||||
"/tpu:v1/OperationMetadata/target": target
|
||||
"/tpu:v1/OperationMetadata/verb": verb
|
||||
"/tpu:v1/Status": status
|
||||
"/tpu:v1/Status/code": code
|
||||
"/tpu:v1/Status/details": details
|
||||
"/tpu:v1/Status/details/detail": detail
|
||||
"/tpu:v1/Status/details/detail/detail": detail
|
||||
"/tpu:v1/Status/message": message
|
||||
"/tpu:v1/fields": fields
|
||||
"/tpu:v1/key": key
|
||||
"/tpu:v1/quotaUser": quota_user
|
||||
"/tpu:v1/tpu.projects.locations.get": get_project_location
|
||||
"/tpu:v1/tpu.projects.locations.get/name": name
|
||||
"/tpu:v1/tpu.projects.locations.list": list_project_locations
|
||||
"/tpu:v1/tpu.projects.locations.list/filter": filter
|
||||
"/tpu:v1/tpu.projects.locations.list/name": name
|
||||
"/tpu:v1/tpu.projects.locations.list/pageSize": page_size
|
||||
"/tpu:v1/tpu.projects.locations.list/pageToken": page_token
|
||||
"/tpu:v1/tpu.projects.locations.operations.cancel": cancel_project_location_operation
|
||||
"/tpu:v1/tpu.projects.locations.operations.cancel/name": name
|
||||
"/tpu:v1/tpu.projects.locations.operations.delete": delete_project_location_operation
|
||||
"/tpu:v1/tpu.projects.locations.operations.delete/name": name
|
||||
"/tpu:v1/tpu.projects.locations.operations.get": get_project_location_operation
|
||||
"/tpu:v1/tpu.projects.locations.operations.get/name": name
|
||||
"/tpu:v1/tpu.projects.locations.operations.list": list_project_location_operations
|
||||
"/tpu:v1/tpu.projects.locations.operations.list/filter": filter
|
||||
"/tpu:v1/tpu.projects.locations.operations.list/name": name
|
||||
"/tpu:v1/tpu.projects.locations.operations.list/pageSize": page_size
|
||||
"/tpu:v1/tpu.projects.locations.operations.list/pageToken": page_token
|
||||
"/tpu:v1alpha1/AcceleratorType": accelerator_type
|
||||
"/tpu:v1alpha1/AcceleratorType/name": name
|
||||
"/tpu:v1alpha1/AcceleratorType/type": type
|
||||
|
|
|
@ -26,7 +26,7 @@ module Google
|
|||
# @see https://cloud.google.com/cloud-tasks/
|
||||
module CloudtasksV2beta2
|
||||
VERSION = 'V2beta2'
|
||||
REVISION = '20180503'
|
||||
REVISION = '20180531'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -611,10 +611,6 @@ module Google
|
|||
# by a later LeaseTasks,
|
||||
# GetTask, or
|
||||
# ListTasks.
|
||||
# To acknowledge multiple tasks at the same time, use
|
||||
# [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
|
||||
# or the batching documentation for your client library, for example
|
||||
# https://developers.google.com/api-client-library/python/guide/batch.
|
||||
# @param [String] name
|
||||
# Required.
|
||||
# The task name. For example:
|
||||
|
@ -689,10 +685,6 @@ module Google
|
|||
end
|
||||
|
||||
# Creates a task and adds it to a queue.
|
||||
# To add multiple tasks at the same time, use
|
||||
# [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
|
||||
# or the batching documentation for your client library, for example
|
||||
# https://developers.google.com/api-client-library/python/guide/batch.
|
||||
# Tasks cannot be updated after creation; there is no UpdateTask command.
|
||||
# * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),
|
||||
# the maximum task size is 100KB.
|
||||
|
|
|
@ -27,7 +27,7 @@ module Google
|
|||
# @see https://cloud.google.com/monitoring/api/
|
||||
module MonitoringV3
|
||||
VERSION = 'V3'
|
||||
REVISION = '20180521'
|
||||
REVISION = '20180529'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -1485,6 +1485,12 @@ module Google
|
|||
class ListTimeSeriesResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Query execution errors that may have caused the time series data returned to
|
||||
# be incomplete.
|
||||
# Corresponds to the JSON property `executionErrors`
|
||||
# @return [Array<Google::Apis::MonitoringV3::Status>]
|
||||
attr_accessor :execution_errors
|
||||
|
||||
# If there are more results than have been returned, then this field is set to a
|
||||
# non-empty value. To see the additional results, use that value as pageToken in
|
||||
# the next call to this method.
|
||||
|
@ -1503,6 +1509,7 @@ module Google
|
|||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@execution_errors = args[:execution_errors] if args.key?(:execution_errors)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@time_series = args[:time_series] if args.key?(:time_series)
|
||||
end
|
||||
|
|
|
@ -749,6 +749,8 @@ module Google
|
|||
class ListTimeSeriesResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :execution_errors, as: 'executionErrors', class: Google::Apis::MonitoringV3::Status, decorator: Google::Apis::MonitoringV3::Status::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation
|
||||
|
||||
|
|
|
@ -1260,9 +1260,11 @@ module Google
|
|||
# Unsupported: must be left blank. The points in each time series are returned
|
||||
# in reverse time order.
|
||||
# @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.
|
||||
# A positive number that is the maximum number of results to return. If
|
||||
# page_size is empty or more than 100,000 results, the effective page_size is
|
||||
# 100,000 results. If view is set to FULL, this is the maximum number of Points
|
||||
# returned. If view is set to HEADERS, this is the maximum number of TimeSeries
|
||||
# returned.
|
||||
# @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
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/photoslibrary_v1/service.rb'
|
||||
require 'google/apis/photoslibrary_v1/classes.rb'
|
||||
require 'google/apis/photoslibrary_v1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Photos Library API
|
||||
#
|
||||
# Manage photos, videos, and albums in Google Photos
|
||||
#
|
||||
# @see https://developers.google.com/photos/
|
||||
module PhotoslibraryV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20180508'
|
||||
|
||||
# View the photos, videos and albums in your Google Photos
|
||||
AUTH_DRIVE_PHOTOS_READONLY = 'https://www.googleapis.com/auth/drive.photos.readonly'
|
||||
|
||||
# View and manage your Google Photos library
|
||||
AUTH_PHOTOSLIBRARY = 'https://www.googleapis.com/auth/photoslibrary'
|
||||
|
||||
# Add to your Google Photos library
|
||||
AUTH_PHOTOSLIBRARY_APPENDONLY = 'https://www.googleapis.com/auth/photoslibrary.appendonly'
|
||||
|
||||
# View your Google Photos library
|
||||
AUTH_PHOTOSLIBRARY_READONLY = 'https://www.googleapis.com/auth/photoslibrary.readonly'
|
||||
|
||||
# Manage photos added by this app
|
||||
AUTH_PHOTOSLIBRARY_READONLY_APPCREATEDDATA = 'https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata'
|
||||
|
||||
# Manage and add to shared albums on your behalf
|
||||
AUTH_PHOTOSLIBRARY_SHARING = 'https://www.googleapis.com/auth/photoslibrary.sharing'
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because it is too large
Load Diff
|
@ -1,625 +0,0 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES 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 PhotoslibraryV1
|
||||
|
||||
class AddEnrichmentToAlbumRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AddEnrichmentToAlbumResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Album
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AlbumPosition
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BatchCreateMediaItemsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BatchCreateMediaItemsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ContentFilter
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ContributorInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CreateAlbumRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Date
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DateFilter
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DateRange
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class EnrichmentItem
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Filters
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class JoinSharedAlbumRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class JoinSharedAlbumResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LatLng
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListAlbumsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListSharedAlbumsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Location
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class LocationEnrichment
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MapEnrichment
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MediaItem
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MediaMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class MediaTypeFilter
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NewEnrichmentItem
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NewMediaItem
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class NewMediaItemResult
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Photo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SearchMediaItemsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SearchMediaItemsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ShareAlbumRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ShareAlbumResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ShareInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SharedAlbumOptions
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SimpleMediaItem
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TextEnrichment
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Video
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AddEnrichmentToAlbumRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :album_position, as: 'albumPosition', class: Google::Apis::PhotoslibraryV1::AlbumPosition, decorator: Google::Apis::PhotoslibraryV1::AlbumPosition::Representation
|
||||
|
||||
property :new_enrichment_item, as: 'newEnrichmentItem', class: Google::Apis::PhotoslibraryV1::NewEnrichmentItem, decorator: Google::Apis::PhotoslibraryV1::NewEnrichmentItem::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class AddEnrichmentToAlbumResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :enrichment_item, as: 'enrichmentItem', class: Google::Apis::PhotoslibraryV1::EnrichmentItem, decorator: Google::Apis::PhotoslibraryV1::EnrichmentItem::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Album
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :cover_photo_base_url, as: 'coverPhotoBaseUrl'
|
||||
property :id, as: 'id'
|
||||
property :is_writeable, as: 'isWriteable'
|
||||
property :product_url, as: 'productUrl'
|
||||
property :share_info, as: 'shareInfo', class: Google::Apis::PhotoslibraryV1::ShareInfo, decorator: Google::Apis::PhotoslibraryV1::ShareInfo::Representation
|
||||
|
||||
property :title, as: 'title'
|
||||
property :total_media_items, :numeric_string => true, as: 'totalMediaItems'
|
||||
end
|
||||
end
|
||||
|
||||
class AlbumPosition
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :position, as: 'position'
|
||||
property :relative_enrichment_item_id, as: 'relativeEnrichmentItemId'
|
||||
property :relative_media_item_id, as: 'relativeMediaItemId'
|
||||
end
|
||||
end
|
||||
|
||||
class BatchCreateMediaItemsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :album_id, as: 'albumId'
|
||||
property :album_position, as: 'albumPosition', class: Google::Apis::PhotoslibraryV1::AlbumPosition, decorator: Google::Apis::PhotoslibraryV1::AlbumPosition::Representation
|
||||
|
||||
collection :new_media_items, as: 'newMediaItems', class: Google::Apis::PhotoslibraryV1::NewMediaItem, decorator: Google::Apis::PhotoslibraryV1::NewMediaItem::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class BatchCreateMediaItemsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :new_media_item_results, as: 'newMediaItemResults', class: Google::Apis::PhotoslibraryV1::NewMediaItemResult, decorator: Google::Apis::PhotoslibraryV1::NewMediaItemResult::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ContentFilter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :excluded_content_categories, as: 'excludedContentCategories'
|
||||
collection :included_content_categories, as: 'includedContentCategories'
|
||||
end
|
||||
end
|
||||
|
||||
class ContributorInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
property :profile_picture_base_url, as: 'profilePictureBaseUrl'
|
||||
end
|
||||
end
|
||||
|
||||
class CreateAlbumRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :album, as: 'album', class: Google::Apis::PhotoslibraryV1::Album, decorator: Google::Apis::PhotoslibraryV1::Album::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Date
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :day, as: 'day'
|
||||
property :month, as: 'month'
|
||||
property :year, as: 'year'
|
||||
end
|
||||
end
|
||||
|
||||
class DateFilter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :dates, as: 'dates', class: Google::Apis::PhotoslibraryV1::Date, decorator: Google::Apis::PhotoslibraryV1::Date::Representation
|
||||
|
||||
collection :ranges, as: 'ranges', class: Google::Apis::PhotoslibraryV1::DateRange, decorator: Google::Apis::PhotoslibraryV1::DateRange::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class DateRange
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :end_date, as: 'endDate', class: Google::Apis::PhotoslibraryV1::Date, decorator: Google::Apis::PhotoslibraryV1::Date::Representation
|
||||
|
||||
property :start_date, as: 'startDate', class: Google::Apis::PhotoslibraryV1::Date, decorator: Google::Apis::PhotoslibraryV1::Date::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class EnrichmentItem
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
end
|
||||
end
|
||||
|
||||
class Filters
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :content_filter, as: 'contentFilter', class: Google::Apis::PhotoslibraryV1::ContentFilter, decorator: Google::Apis::PhotoslibraryV1::ContentFilter::Representation
|
||||
|
||||
property :date_filter, as: 'dateFilter', class: Google::Apis::PhotoslibraryV1::DateFilter, decorator: Google::Apis::PhotoslibraryV1::DateFilter::Representation
|
||||
|
||||
property :include_archived_media, as: 'includeArchivedMedia'
|
||||
property :media_type_filter, as: 'mediaTypeFilter', class: Google::Apis::PhotoslibraryV1::MediaTypeFilter, decorator: Google::Apis::PhotoslibraryV1::MediaTypeFilter::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class JoinSharedAlbumRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :share_token, as: 'shareToken'
|
||||
end
|
||||
end
|
||||
|
||||
class JoinSharedAlbumResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class LatLng
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :latitude, as: 'latitude'
|
||||
property :longitude, as: 'longitude'
|
||||
end
|
||||
end
|
||||
|
||||
class ListAlbumsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :albums, as: 'albums', class: Google::Apis::PhotoslibraryV1::Album, decorator: Google::Apis::PhotoslibraryV1::Album::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListSharedAlbumsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :shared_albums, as: 'sharedAlbums', class: Google::Apis::PhotoslibraryV1::Album, decorator: Google::Apis::PhotoslibraryV1::Album::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Location
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :latlng, as: 'latlng', class: Google::Apis::PhotoslibraryV1::LatLng, decorator: Google::Apis::PhotoslibraryV1::LatLng::Representation
|
||||
|
||||
property :location_name, as: 'locationName'
|
||||
end
|
||||
end
|
||||
|
||||
class LocationEnrichment
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :location, as: 'location', class: Google::Apis::PhotoslibraryV1::Location, decorator: Google::Apis::PhotoslibraryV1::Location::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class MapEnrichment
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :destination, as: 'destination', class: Google::Apis::PhotoslibraryV1::Location, decorator: Google::Apis::PhotoslibraryV1::Location::Representation
|
||||
|
||||
property :origin, as: 'origin', class: Google::Apis::PhotoslibraryV1::Location, decorator: Google::Apis::PhotoslibraryV1::Location::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class MediaItem
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :base_url, as: 'baseUrl'
|
||||
property :contributor_info, as: 'contributorInfo', class: Google::Apis::PhotoslibraryV1::ContributorInfo, decorator: Google::Apis::PhotoslibraryV1::ContributorInfo::Representation
|
||||
|
||||
property :description, as: 'description'
|
||||
property :id, as: 'id'
|
||||
property :media_metadata, as: 'mediaMetadata', class: Google::Apis::PhotoslibraryV1::MediaMetadata, decorator: Google::Apis::PhotoslibraryV1::MediaMetadata::Representation
|
||||
|
||||
property :mime_type, as: 'mimeType'
|
||||
property :product_url, as: 'productUrl'
|
||||
end
|
||||
end
|
||||
|
||||
class MediaMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :creation_time, as: 'creationTime'
|
||||
property :height, :numeric_string => true, as: 'height'
|
||||
property :photo, as: 'photo', class: Google::Apis::PhotoslibraryV1::Photo, decorator: Google::Apis::PhotoslibraryV1::Photo::Representation
|
||||
|
||||
property :video, as: 'video', class: Google::Apis::PhotoslibraryV1::Video, decorator: Google::Apis::PhotoslibraryV1::Video::Representation
|
||||
|
||||
property :width, :numeric_string => true, as: 'width'
|
||||
end
|
||||
end
|
||||
|
||||
class MediaTypeFilter
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :media_types, as: 'mediaTypes'
|
||||
end
|
||||
end
|
||||
|
||||
class NewEnrichmentItem
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :location_enrichment, as: 'locationEnrichment', class: Google::Apis::PhotoslibraryV1::LocationEnrichment, decorator: Google::Apis::PhotoslibraryV1::LocationEnrichment::Representation
|
||||
|
||||
property :map_enrichment, as: 'mapEnrichment', class: Google::Apis::PhotoslibraryV1::MapEnrichment, decorator: Google::Apis::PhotoslibraryV1::MapEnrichment::Representation
|
||||
|
||||
property :text_enrichment, as: 'textEnrichment', class: Google::Apis::PhotoslibraryV1::TextEnrichment, decorator: Google::Apis::PhotoslibraryV1::TextEnrichment::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class NewMediaItem
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :description, as: 'description'
|
||||
property :simple_media_item, as: 'simpleMediaItem', class: Google::Apis::PhotoslibraryV1::SimpleMediaItem, decorator: Google::Apis::PhotoslibraryV1::SimpleMediaItem::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class NewMediaItemResult
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :media_item, as: 'mediaItem', class: Google::Apis::PhotoslibraryV1::MediaItem, decorator: Google::Apis::PhotoslibraryV1::MediaItem::Representation
|
||||
|
||||
property :status, as: 'status', class: Google::Apis::PhotoslibraryV1::Status, decorator: Google::Apis::PhotoslibraryV1::Status::Representation
|
||||
|
||||
property :upload_token, as: 'uploadToken'
|
||||
end
|
||||
end
|
||||
|
||||
class Photo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :aperture_f_number, as: 'apertureFNumber'
|
||||
property :camera_make, as: 'cameraMake'
|
||||
property :camera_model, as: 'cameraModel'
|
||||
property :exposure_time, as: 'exposureTime'
|
||||
property :focal_length, as: 'focalLength'
|
||||
property :iso_equivalent, as: 'isoEquivalent'
|
||||
end
|
||||
end
|
||||
|
||||
class SearchMediaItemsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :album_id, as: 'albumId'
|
||||
property :filters, as: 'filters', class: Google::Apis::PhotoslibraryV1::Filters, decorator: Google::Apis::PhotoslibraryV1::Filters::Representation
|
||||
|
||||
property :page_size, as: 'pageSize'
|
||||
property :page_token, as: 'pageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class SearchMediaItemsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :media_items, as: 'mediaItems', class: Google::Apis::PhotoslibraryV1::MediaItem, decorator: Google::Apis::PhotoslibraryV1::MediaItem::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ShareAlbumRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :shared_album_options, as: 'sharedAlbumOptions', class: Google::Apis::PhotoslibraryV1::SharedAlbumOptions, decorator: Google::Apis::PhotoslibraryV1::SharedAlbumOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ShareAlbumResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :share_info, as: 'shareInfo', class: Google::Apis::PhotoslibraryV1::ShareInfo, decorator: Google::Apis::PhotoslibraryV1::ShareInfo::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ShareInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :share_token, as: 'shareToken'
|
||||
property :shareable_url, as: 'shareableUrl'
|
||||
property :shared_album_options, as: 'sharedAlbumOptions', class: Google::Apis::PhotoslibraryV1::SharedAlbumOptions, decorator: Google::Apis::PhotoslibraryV1::SharedAlbumOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class SharedAlbumOptions
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :is_collaborative, as: 'isCollaborative'
|
||||
property :is_commentable, as: 'isCommentable'
|
||||
end
|
||||
end
|
||||
|
||||
class SimpleMediaItem
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :upload_token, as: 'uploadToken'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
|
||||
class TextEnrichment
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :text, as: 'text'
|
||||
end
|
||||
end
|
||||
|
||||
class Video
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :camera_make, as: 'cameraMake'
|
||||
property :camera_model, as: 'cameraModel'
|
||||
property :fps, as: 'fps'
|
||||
property :status, as: 'status'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,399 +0,0 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES 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 PhotoslibraryV1
|
||||
# Photos Library API
|
||||
#
|
||||
# Manage photos, videos, and albums in Google Photos
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/photoslibrary_v1'
|
||||
#
|
||||
# Photoslibrary = Google::Apis::PhotoslibraryV1 # Alias the module
|
||||
# service = Photoslibrary::PhotosLibraryService.new
|
||||
#
|
||||
# @see https://developers.google.com/photos/
|
||||
class PhotosLibraryService < 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://photoslibrary.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Adds an enrichment to a specified position in a defined album.
|
||||
# @param [String] album_id
|
||||
# Identifier of the album where the enrichment will be added.
|
||||
# @param [Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumRequest] add_enrichment_to_album_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def add_enrichment_to_album(album_id, add_enrichment_to_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/albums/{+albumId}:addEnrichment', options)
|
||||
command.request_representation = Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumRequest::Representation
|
||||
command.request_object = add_enrichment_to_album_request_object
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::AddEnrichmentToAlbumResponse
|
||||
command.params['albumId'] = album_id unless album_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates an album in a user's Google Photos library.
|
||||
# @param [Google::Apis::PhotoslibraryV1::CreateAlbumRequest] create_album_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::Album] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::Album]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_album(create_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/albums', options)
|
||||
command.request_representation = Google::Apis::PhotoslibraryV1::CreateAlbumRequest::Representation
|
||||
command.request_object = create_album_request_object
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::Album::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::Album
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns the album specified by the given album id.
|
||||
# @param [String] album_id
|
||||
# Identifier of the album to be requested.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::Album] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::Album]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_album(album_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/albums/{+albumId}', options)
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::Album::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::Album
|
||||
command.params['albumId'] = album_id unless album_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all albums shown to a user in the 'Albums' tab of the Google
|
||||
# Photos app.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of albums to return in the response. The default number of
|
||||
# albums to return at a time is 20. The maximum page size is 50.
|
||||
# @param [String] page_token
|
||||
# A continuation token to get the next page of the results. Adding this to
|
||||
# the request will return the rows after the pageToken. The pageToken should
|
||||
# be the value returned in the nextPageToken parameter in the response to the
|
||||
# listAlbums request.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::ListAlbumsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::ListAlbumsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_albums(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/albums', options)
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::ListAlbumsResponse::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::ListAlbumsResponse
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Marks an album as 'shared' and accessible to other users. This action can
|
||||
# only be performed on albums which were created by the developer via the
|
||||
# API.
|
||||
# @param [String] album_id
|
||||
# Identifier of the album to be shared. This album id must belong to an album
|
||||
# created by the developer.
|
||||
# .
|
||||
# @param [Google::Apis::PhotoslibraryV1::ShareAlbumRequest] share_album_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::ShareAlbumResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::ShareAlbumResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def share_album(album_id, share_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/albums/{+albumId}:share', options)
|
||||
command.request_representation = Google::Apis::PhotoslibraryV1::ShareAlbumRequest::Representation
|
||||
command.request_object = share_album_request_object
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::ShareAlbumResponse::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::ShareAlbumResponse
|
||||
command.params['albumId'] = album_id unless album_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates one or more media items in a user's Google Photos library.
|
||||
# If an album id is specified, the media item(s) are also added to the album.
|
||||
# By default the media item(s) will be added to the end of the library or
|
||||
# album.
|
||||
# If an album id and position are both defined, then the media items will
|
||||
# be added to the album at the specified position.
|
||||
# If multiple media items are given, they will be inserted at the specified
|
||||
# position.
|
||||
# @param [Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsRequest] batch_create_media_items_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def batch_create_media_items(batch_create_media_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/mediaItems:batchCreate', options)
|
||||
command.request_representation = Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsRequest::Representation
|
||||
command.request_object = batch_create_media_items_request_object
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::BatchCreateMediaItemsResponse
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns the media item specified based on a given media item id.
|
||||
# @param [String] media_item_id
|
||||
# Identifier of media item to be requested.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::MediaItem] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::MediaItem]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_media_item(media_item_id, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/mediaItems/{+mediaItemId}', options)
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::MediaItem::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::MediaItem
|
||||
command.params['mediaItemId'] = media_item_id unless media_item_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Searches for media items in a user's Google Photos library.
|
||||
# If no filters are set, then all media items in the user's library will be
|
||||
# returned.
|
||||
# If an album is set, all media items in the specified album will be
|
||||
# returned.
|
||||
# If filters are specified, anything that matches the filters from the user's
|
||||
# library will be listed.
|
||||
# If an album and filters are set, then this will result in an error.
|
||||
# @param [Google::Apis::PhotoslibraryV1::SearchMediaItemsRequest] search_media_items_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def search_media_items(search_media_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/mediaItems:search', options)
|
||||
command.request_representation = Google::Apis::PhotoslibraryV1::SearchMediaItemsRequest::Representation
|
||||
command.request_object = search_media_items_request_object
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::SearchMediaItemsResponse
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Joins a shared album on behalf of the Google Photos user.
|
||||
# @param [Google::Apis::PhotoslibraryV1::JoinSharedAlbumRequest] join_shared_album_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def join_shared_album(join_shared_album_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/sharedAlbums:join', options)
|
||||
command.request_representation = Google::Apis::PhotoslibraryV1::JoinSharedAlbumRequest::Representation
|
||||
command.request_object = join_shared_album_request_object
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::JoinSharedAlbumResponse
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all shared albums shown to a user in the 'Sharing' tab of the
|
||||
# Google Photos app.
|
||||
# @param [Fixnum] page_size
|
||||
# Maximum number of albums to return in the response. The default number of
|
||||
# albums to return at a time is 20. The maximum page size is 50.
|
||||
# @param [String] page_token
|
||||
# A continuation token to get the next page of the results. Adding this to
|
||||
# the request will return the rows after the pageToken. The pageToken should
|
||||
# be the value returned in the nextPageToken parameter in the response to the
|
||||
# listSharedAlbums request.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_shared_albums(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/sharedAlbums', options)
|
||||
command.response_representation = Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse::Representation
|
||||
command.response_class = Google::Apis::PhotoslibraryV1::ListSharedAlbumsResponse
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -27,7 +27,7 @@ module Google
|
|||
# @see https://cloud.google.com/service-management/
|
||||
module ServicemanagementV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20180420'
|
||||
REVISION = '20180525'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -409,11 +409,6 @@ module Google
|
|||
attr_accessor :allow_without_credential
|
||||
alias_method :allow_without_credential?, :allow_without_credential
|
||||
|
||||
# Configuration for a custom authentication provider.
|
||||
# Corresponds to the JSON property `customAuth`
|
||||
# @return [Google::Apis::ServicemanagementV1::CustomAuthRequirements]
|
||||
attr_accessor :custom_auth
|
||||
|
||||
# OAuth scopes are a way to define data and permissions on data. For example,
|
||||
# there are scopes defined for "Read-only access to Google Calendar" and
|
||||
# "Access to Cloud Platform". Users can consent to a scope for an application,
|
||||
|
@ -450,7 +445,6 @@ module Google
|
|||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential)
|
||||
@custom_auth = args[:custom_auth] if args.key?(:custom_auth)
|
||||
@oauth = args[:oauth] if args.key?(:oauth)
|
||||
@requirements = args[:requirements] if args.key?(:requirements)
|
||||
@selector = args[:selector] if args.key?(:selector)
|
||||
|
@ -931,27 +925,6 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Configuration for a custom authentication provider.
|
||||
class CustomAuthRequirements
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A configuration string containing connection information for the
|
||||
# authentication provider, typically formatted as a SmartService string
|
||||
# (go/smartservice).
|
||||
# Corresponds to the JSON property `provider`
|
||||
# @return [String]
|
||||
attr_accessor :provider
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@provider = args[:provider] if args.key?(:provider)
|
||||
end
|
||||
end
|
||||
|
||||
# Customize service error responses. For example, list any service
|
||||
# specific protobuf types that can appear in error detail lists of
|
||||
# error responses.
|
||||
|
|
|
@ -154,12 +154,6 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomAuthRequirements
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomError
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -618,8 +612,6 @@ module Google
|
|||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :allow_without_credential, as: 'allowWithoutCredential'
|
||||
property :custom_auth, as: 'customAuth', class: Google::Apis::ServicemanagementV1::CustomAuthRequirements, decorator: Google::Apis::ServicemanagementV1::CustomAuthRequirements::Representation
|
||||
|
||||
property :oauth, as: 'oauth', class: Google::Apis::ServicemanagementV1::OAuthRequirements, decorator: Google::Apis::ServicemanagementV1::OAuthRequirements::Representation
|
||||
|
||||
collection :requirements, as: 'requirements', class: Google::Apis::ServicemanagementV1::AuthRequirement, decorator: Google::Apis::ServicemanagementV1::AuthRequirement::Representation
|
||||
|
@ -748,13 +740,6 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class CustomAuthRequirements
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :provider, as: 'provider'
|
||||
end
|
||||
end
|
||||
|
||||
class CustomError
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -27,7 +27,7 @@ module Google
|
|||
# @see https://cloud.google.com/service-management/
|
||||
module ServiceuserV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20180330'
|
||||
REVISION = '20180525'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -272,11 +272,6 @@ module Google
|
|||
attr_accessor :allow_without_credential
|
||||
alias_method :allow_without_credential?, :allow_without_credential
|
||||
|
||||
# Configuration for a custom authentication provider.
|
||||
# Corresponds to the JSON property `customAuth`
|
||||
# @return [Google::Apis::ServiceuserV1::CustomAuthRequirements]
|
||||
attr_accessor :custom_auth
|
||||
|
||||
# OAuth scopes are a way to define data and permissions on data. For example,
|
||||
# there are scopes defined for "Read-only access to Google Calendar" and
|
||||
# "Access to Cloud Platform". Users can consent to a scope for an application,
|
||||
|
@ -313,7 +308,6 @@ module Google
|
|||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential)
|
||||
@custom_auth = args[:custom_auth] if args.key?(:custom_auth)
|
||||
@oauth = args[:oauth] if args.key?(:oauth)
|
||||
@requirements = args[:requirements] if args.key?(:requirements)
|
||||
@selector = args[:selector] if args.key?(:selector)
|
||||
|
@ -590,27 +584,6 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Configuration for a custom authentication provider.
|
||||
class CustomAuthRequirements
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A configuration string containing connection information for the
|
||||
# authentication provider, typically formatted as a SmartService string
|
||||
# (go/smartservice).
|
||||
# Corresponds to the JSON property `provider`
|
||||
# @return [String]
|
||||
attr_accessor :provider
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@provider = args[:provider] if args.key?(:provider)
|
||||
end
|
||||
end
|
||||
|
||||
# Customize service error responses. For example, list any service
|
||||
# specific protobuf types that can appear in error detail lists of
|
||||
# error responses.
|
||||
|
|
|
@ -100,12 +100,6 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomAuthRequirements
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CustomError
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -444,8 +438,6 @@ module Google
|
|||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :allow_without_credential, as: 'allowWithoutCredential'
|
||||
property :custom_auth, as: 'customAuth', class: Google::Apis::ServiceuserV1::CustomAuthRequirements, decorator: Google::Apis::ServiceuserV1::CustomAuthRequirements::Representation
|
||||
|
||||
property :oauth, as: 'oauth', class: Google::Apis::ServiceuserV1::OAuthRequirements, decorator: Google::Apis::ServiceuserV1::OAuthRequirements::Representation
|
||||
|
||||
collection :requirements, as: 'requirements', class: Google::Apis::ServiceuserV1::AuthRequirement, decorator: Google::Apis::ServiceuserV1::AuthRequirement::Representation
|
||||
|
@ -521,13 +513,6 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class CustomAuthRequirements
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :provider, as: 'provider'
|
||||
end
|
||||
end
|
||||
|
||||
class CustomError
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/tpu_v1/service.rb'
|
||||
require 'google/apis/tpu_v1/classes.rb'
|
||||
require 'google/apis/tpu_v1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Cloud TPU API
|
||||
#
|
||||
# TPU API provides customers with access to Google TPU technology.
|
||||
#
|
||||
# @see https://cloud.google.com/tpu/
|
||||
module TpuV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20180525'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,370 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES 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 TpuV1
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated
|
||||
# empty messages in your APIs. A typical example is to use it as the request
|
||||
# or the response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for `Empty` is empty JSON object ````.
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for Locations.ListLocations.
|
||||
class ListLocationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of locations that matches the specified filter in the request.
|
||||
# Corresponds to the JSON property `locations`
|
||||
# @return [Array<Google::Apis::TpuV1::Location>]
|
||||
attr_accessor :locations
|
||||
|
||||
# The standard List next-page token.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@locations = args[:locations] if args.key?(:locations)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for Operations.ListOperations.
|
||||
class ListOperationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The standard List next-page token.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# A list of operations that matches the specified filter in the request.
|
||||
# Corresponds to the JSON property `operations`
|
||||
# @return [Array<Google::Apis::TpuV1::Operation>]
|
||||
attr_accessor :operations
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@operations = args[:operations] if args.key?(:operations)
|
||||
end
|
||||
end
|
||||
|
||||
# A resource that represents Google Cloud Platform location.
|
||||
class Location
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The friendly name for this location, typically a nearby city name.
|
||||
# For example, "Tokyo".
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# Cross-service attributes for the location. For example
|
||||
# `"cloud.googleapis.com/region": "us-east1"`
|
||||
# Corresponds to the JSON property `labels`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :labels
|
||||
|
||||
# The canonical id for this location. For example: `"us-east1"`.
|
||||
# Corresponds to the JSON property `locationId`
|
||||
# @return [String]
|
||||
attr_accessor :location_id
|
||||
|
||||
# Service-specific metadata. For example the available capacity at the given
|
||||
# location.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# Resource name for the location, which may vary between implementations.
|
||||
# For example: `"projects/example-project/locations/us-east1"`
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@labels = args[:labels] if args.key?(:labels)
|
||||
@location_id = args[:location_id] if args.key?(:location_id)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# This resource represents a long-running operation that is the result of a
|
||||
# network API call.
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If the value is `false`, it means the operation is still in progress.
|
||||
# If `true`, the operation is completed, and either `error` or `response` is
|
||||
# available.
|
||||
# Corresponds to the JSON property `done`
|
||||
# @return [Boolean]
|
||||
attr_accessor :done
|
||||
alias_method :done?, :done
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by
|
||||
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
# - Simple to use and understand for most users
|
||||
# - Flexible enough to meet unexpected needs
|
||||
# # Overview
|
||||
# The `Status` message contains three pieces of data: error code, error message,
|
||||
# and error details. The error code should be an enum value of
|
||||
# google.rpc.Code, but it may accept additional error codes if needed. The
|
||||
# error message should be a developer-facing English message that helps
|
||||
# developers *understand* and *resolve* the error. If a localized user-facing
|
||||
# error message is needed, put the localized message in the error details or
|
||||
# localize it in the client. The optional error details may contain arbitrary
|
||||
# information about the error. There is a predefined set of error detail types
|
||||
# in the package `google.rpc` that can be used for common error conditions.
|
||||
# # Language mapping
|
||||
# The `Status` message is the logical representation of the error model, but it
|
||||
# is not necessarily the actual wire format. When the `Status` message is
|
||||
# exposed in different client libraries and different wire protocols, it can be
|
||||
# mapped differently. For example, it will likely be mapped to some exceptions
|
||||
# in Java, but more likely mapped to some error codes in C.
|
||||
# # Other uses
|
||||
# The error model and the `Status` message can be used in a variety of
|
||||
# environments, either with or without APIs, to provide a
|
||||
# consistent developer experience across different environments.
|
||||
# Example uses of this error model include:
|
||||
# - Partial errors. If a service needs to return partial errors to the client,
|
||||
# it may embed the `Status` in the normal response to indicate the partial
|
||||
# errors.
|
||||
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
||||
# have a `Status` message for error reporting.
|
||||
# - Batch operations. If a client uses batch request and batch response, the
|
||||
# `Status` message should be used directly inside batch response, one for
|
||||
# each error sub-response.
|
||||
# - Asynchronous operations. If an API call embeds asynchronous operation
|
||||
# results in its response, the status of those operations should be
|
||||
# represented directly using the `Status` message.
|
||||
# - Logging. If some API errors are stored in logs, the message `Status` could
|
||||
# be used directly after any stripping needed for security/privacy reasons.
|
||||
# Corresponds to the JSON property `error`
|
||||
# @return [Google::Apis::TpuV1::Status]
|
||||
attr_accessor :error
|
||||
|
||||
# Service-specific metadata associated with the operation. It typically
|
||||
# contains progress information and common metadata such as create time.
|
||||
# Some services might not provide such metadata. Any method that returns a
|
||||
# long-running operation should document the metadata type, if any.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# The server-assigned name, which is only unique within the same service that
|
||||
# originally returns it. If you use the default HTTP mapping, the
|
||||
# `name` should have the format of `operations/some/unique/name`.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# The normal response of the operation in case of success. If the original
|
||||
# method returns no data on success, such as `Delete`, the response is
|
||||
# `google.protobuf.Empty`. If the original method is standard
|
||||
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
||||
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
||||
# is the original method name. For example, if the original method name
|
||||
# is `TakeSnapshot()`, the inferred response type is
|
||||
# `TakeSnapshotResponse`.
|
||||
# Corresponds to the JSON property `response`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :response
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@done = args[:done] if args.key?(:done)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@response = args[:response] if args.key?(:response)
|
||||
end
|
||||
end
|
||||
|
||||
# Represents the metadata of the long-running operation.
|
||||
class OperationMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# [Output only] API version used to start the operation.
|
||||
# Corresponds to the JSON property `apiVersion`
|
||||
# @return [String]
|
||||
attr_accessor :api_version
|
||||
|
||||
# [Output only] Identifies whether the user has requested cancellation
|
||||
# of the operation. Operations that have successfully been cancelled
|
||||
# have Operation.error value with a google.rpc.Status.code of 1,
|
||||
# corresponding to `Code.CANCELLED`.
|
||||
# Corresponds to the JSON property `cancelRequested`
|
||||
# @return [Boolean]
|
||||
attr_accessor :cancel_requested
|
||||
alias_method :cancel_requested?, :cancel_requested
|
||||
|
||||
# [Output only] The time the operation was created.
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# [Output only] The time the operation finished running.
|
||||
# Corresponds to the JSON property `endTime`
|
||||
# @return [String]
|
||||
attr_accessor :end_time
|
||||
|
||||
# [Output only] Human-readable status of the operation, if any.
|
||||
# Corresponds to the JSON property `statusDetail`
|
||||
# @return [String]
|
||||
attr_accessor :status_detail
|
||||
|
||||
# [Output only] Server-defined resource path for the target of the operation.
|
||||
# Corresponds to the JSON property `target`
|
||||
# @return [String]
|
||||
attr_accessor :target
|
||||
|
||||
# [Output only] Name of the verb executed by the operation.
|
||||
# Corresponds to the JSON property `verb`
|
||||
# @return [String]
|
||||
attr_accessor :verb
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@api_version = args[:api_version] if args.key?(:api_version)
|
||||
@cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@end_time = args[:end_time] if args.key?(:end_time)
|
||||
@status_detail = args[:status_detail] if args.key?(:status_detail)
|
||||
@target = args[:target] if args.key?(:target)
|
||||
@verb = args[:verb] if args.key?(:verb)
|
||||
end
|
||||
end
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by
|
||||
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
# - Simple to use and understand for most users
|
||||
# - Flexible enough to meet unexpected needs
|
||||
# # Overview
|
||||
# The `Status` message contains three pieces of data: error code, error message,
|
||||
# and error details. The error code should be an enum value of
|
||||
# google.rpc.Code, but it may accept additional error codes if needed. The
|
||||
# error message should be a developer-facing English message that helps
|
||||
# developers *understand* and *resolve* the error. If a localized user-facing
|
||||
# error message is needed, put the localized message in the error details or
|
||||
# localize it in the client. The optional error details may contain arbitrary
|
||||
# information about the error. There is a predefined set of error detail types
|
||||
# in the package `google.rpc` that can be used for common error conditions.
|
||||
# # Language mapping
|
||||
# The `Status` message is the logical representation of the error model, but it
|
||||
# is not necessarily the actual wire format. When the `Status` message is
|
||||
# exposed in different client libraries and different wire protocols, it can be
|
||||
# mapped differently. For example, it will likely be mapped to some exceptions
|
||||
# in Java, but more likely mapped to some error codes in C.
|
||||
# # Other uses
|
||||
# The error model and the `Status` message can be used in a variety of
|
||||
# environments, either with or without APIs, to provide a
|
||||
# consistent developer experience across different environments.
|
||||
# Example uses of this error model include:
|
||||
# - Partial errors. If a service needs to return partial errors to the client,
|
||||
# it may embed the `Status` in the normal response to indicate the partial
|
||||
# errors.
|
||||
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
||||
# have a `Status` message for error reporting.
|
||||
# - Batch operations. If a client uses batch request and batch response, the
|
||||
# `Status` message should be used directly inside batch response, one for
|
||||
# each error sub-response.
|
||||
# - Asynchronous operations. If an API call embeds asynchronous operation
|
||||
# results in its response, the status of those operations should be
|
||||
# represented directly using the `Status` message.
|
||||
# - Logging. If some API errors are stored in logs, the message `Status` could
|
||||
# be used directly after any stripping needed for security/privacy reasons.
|
||||
class Status
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The status code, which should be an enum value of google.rpc.Code.
|
||||
# Corresponds to the JSON property `code`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :code
|
||||
|
||||
# A list of messages that carry the error details. There is a common set of
|
||||
# message types for APIs to use.
|
||||
# Corresponds to the JSON property `details`
|
||||
# @return [Array<Hash<String,Object>>]
|
||||
attr_accessor :details
|
||||
|
||||
# A developer-facing error message, which should be in English. Any
|
||||
# user-facing error message should be localized and sent in the
|
||||
# google.rpc.Status.details field, or localized by the client.
|
||||
# Corresponds to the JSON property `message`
|
||||
# @return [String]
|
||||
attr_accessor :message
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@code = args[:code] if args.key?(:code)
|
||||
@details = args[:details] if args.key?(:details)
|
||||
@message = args[:message] if args.key?(:message)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,137 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES 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 TpuV1
|
||||
|
||||
class Empty
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Location
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Operation
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Empty
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :locations, as: 'locations', class: Google::Apis::TpuV1::Location, decorator: Google::Apis::TpuV1::Location::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListOperationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :operations, as: 'operations', class: Google::Apis::TpuV1::Operation, decorator: Google::Apis::TpuV1::Operation::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Location
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
hash :labels, as: 'labels'
|
||||
property :location_id, as: 'locationId'
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
property :error, as: 'error', class: Google::Apis::TpuV1::Status, decorator: Google::Apis::TpuV1::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
class OperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :api_version, as: 'apiVersion'
|
||||
property :cancel_requested, as: 'cancelRequested'
|
||||
property :create_time, as: 'createTime'
|
||||
property :end_time, as: 'endTime'
|
||||
property :status_detail, as: 'statusDetail'
|
||||
property :target, as: 'target'
|
||||
property :verb, as: 'verb'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :code, as: 'code'
|
||||
collection :details, as: 'details'
|
||||
property :message, as: 'message'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,279 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES 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 TpuV1
|
||||
# Cloud TPU API
|
||||
#
|
||||
# TPU API provides customers with access to Google TPU technology.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/tpu_v1'
|
||||
#
|
||||
# Tpu = Google::Apis::TpuV1 # Alias the module
|
||||
# service = Tpu::TPUService.new
|
||||
#
|
||||
# @see https://cloud.google.com/tpu/
|
||||
class TPUService < 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://tpu.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Gets information about a location.
|
||||
# @param [String] name
|
||||
# Resource name for the location.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::TpuV1::Location] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::TpuV1::Location]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::TpuV1::Location::Representation
|
||||
command.response_class = Google::Apis::TpuV1::Location
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists information about the supported locations for this service.
|
||||
# @param [String] name
|
||||
# The resource that owns the locations collection, if applicable.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::TpuV1::ListLocationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::TpuV1::ListLocationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}/locations', options)
|
||||
command.response_representation = Google::Apis::TpuV1::ListLocationsResponse::Representation
|
||||
command.response_class = Google::Apis::TpuV1::ListLocationsResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Starts asynchronous cancellation on a long-running operation. The server
|
||||
# makes a best effort to cancel the operation, but success is not
|
||||
# guaranteed. If the server doesn't support this method, it returns
|
||||
# `google.rpc.Code.UNIMPLEMENTED`. Clients can use
|
||||
# Operations.GetOperation or
|
||||
# other methods to check whether the cancellation succeeded or whether the
|
||||
# operation completed despite cancellation. On successful cancellation,
|
||||
# the operation is not deleted; instead, it becomes an operation with
|
||||
# an Operation.error value with a google.rpc.Status.code of 1,
|
||||
# corresponding to `Code.CANCELLED`.
|
||||
# @param [String] name
|
||||
# The name of the operation resource to be cancelled.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::TpuV1::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::TpuV1::Empty]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
||||
command.response_representation = Google::Apis::TpuV1::Empty::Representation
|
||||
command.response_class = Google::Apis::TpuV1::Empty
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Deletes a long-running operation. This method indicates that the client is
|
||||
# no longer interested in the operation result. It does not cancel the
|
||||
# operation. If the server doesn't support this method, it returns
|
||||
# `google.rpc.Code.UNIMPLEMENTED`.
|
||||
# @param [String] name
|
||||
# The name of the operation resource to be deleted.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::TpuV1::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::TpuV1::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_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::TpuV1::Empty::Representation
|
||||
command.response_class = Google::Apis::TpuV1::Empty
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the latest state of a long-running operation. Clients can use this
|
||||
# method to poll the operation result at intervals as recommended by the API
|
||||
# service.
|
||||
# @param [String] name
|
||||
# The name of the operation resource.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::TpuV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::TpuV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::TpuV1::Operation::Representation
|
||||
command.response_class = Google::Apis::TpuV1::Operation
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists operations that match the specified filter in the request. If the
|
||||
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
||||
# NOTE: the `name` binding allows API services to override the binding
|
||||
# to use different resource name schemes, such as `users/*/operations`. To
|
||||
# override the binding, API services can add a binding such as
|
||||
# `"/v1/`name=users/*`/operations"` to their service configuration.
|
||||
# For backwards compatibility, the default name includes the operations
|
||||
# collection id, however overriding users must ensure the name binding
|
||||
# is the parent resource, without the operations collection id.
|
||||
# @param [String] name
|
||||
# The name of the operation's parent resource.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::TpuV1::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::TpuV1::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}/operations', options)
|
||||
command.response_representation = Google::Apis::TpuV1::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::TpuV1::ListOperationsResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue