diff --git a/api_names_out.yaml b/api_names_out.yaml index 8c55af895..fcd6a22f7 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -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 diff --git a/generated/google/apis/cloudtasks_v2beta2.rb b/generated/google/apis/cloudtasks_v2beta2.rb index 7898daa62..3773ec531 100644 --- a/generated/google/apis/cloudtasks_v2beta2.rb +++ b/generated/google/apis/cloudtasks_v2beta2.rb @@ -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' diff --git a/generated/google/apis/cloudtasks_v2beta2/service.rb b/generated/google/apis/cloudtasks_v2beta2/service.rb index b7077888c..db27c37a4 100644 --- a/generated/google/apis/cloudtasks_v2beta2/service.rb +++ b/generated/google/apis/cloudtasks_v2beta2/service.rb @@ -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. diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index 0fe59c68b..c0abb12be 100644 --- a/generated/google/apis/monitoring_v3.rb +++ b/generated/google/apis/monitoring_v3.rb @@ -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' diff --git a/generated/google/apis/monitoring_v3/classes.rb b/generated/google/apis/monitoring_v3/classes.rb index bda7e9fe5..a32990928 100644 --- a/generated/google/apis/monitoring_v3/classes.rb +++ b/generated/google/apis/monitoring_v3/classes.rb @@ -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] + 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 diff --git a/generated/google/apis/monitoring_v3/representations.rb b/generated/google/apis/monitoring_v3/representations.rb index b5a54841c..a87dc08cd 100644 --- a/generated/google/apis/monitoring_v3/representations.rb +++ b/generated/google/apis/monitoring_v3/representations.rb @@ -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 diff --git a/generated/google/apis/monitoring_v3/service.rb b/generated/google/apis/monitoring_v3/service.rb index 5e2647e13..8c373719f 100644 --- a/generated/google/apis/monitoring_v3/service.rb +++ b/generated/google/apis/monitoring_v3/service.rb @@ -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 diff --git a/generated/google/apis/photoslibrary_v1.rb b/generated/google/apis/photoslibrary_v1.rb deleted file mode 100644 index b170e4550..000000000 --- a/generated/google/apis/photoslibrary_v1.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/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 diff --git a/generated/google/apis/photoslibrary_v1/classes.rb b/generated/google/apis/photoslibrary_v1/classes.rb deleted file mode 100644 index 484078444..000000000 --- a/generated/google/apis/photoslibrary_v1/classes.rb +++ /dev/null @@ -1,1330 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES 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 - - # Request to add an enrichment to a specific album at a specific position. - class AddEnrichmentToAlbumRequest - include Google::Apis::Core::Hashable - - # Specifies a position in an album. - # Corresponds to the JSON property `albumPosition` - # @return [Google::Apis::PhotoslibraryV1::AlbumPosition] - attr_accessor :album_position - - # A new enrichment item to be added to an album, used by the - # AddEnrichmentToAlbum call. - # Corresponds to the JSON property `newEnrichmentItem` - # @return [Google::Apis::PhotoslibraryV1::NewEnrichmentItem] - attr_accessor :new_enrichment_item - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @album_position = args[:album_position] if args.key?(:album_position) - @new_enrichment_item = args[:new_enrichment_item] if args.key?(:new_enrichment_item) - end - end - - # - class AddEnrichmentToAlbumResponse - include Google::Apis::Core::Hashable - - # An enrichment item. - # Corresponds to the JSON property `enrichmentItem` - # @return [Google::Apis::PhotoslibraryV1::EnrichmentItem] - attr_accessor :enrichment_item - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @enrichment_item = args[:enrichment_item] if args.key?(:enrichment_item) - end - end - - # Representation of an album in Google Photos. - # Albums are a container for media items. They contain an additional - # shareInfo property if they have been shared by the application. - class Album - include Google::Apis::Core::Hashable - - # [Output only] A URL to the cover photo's bytes. This should not be used as - # is. Parameters should be appended to this URL before use. For example, - # '=w2048-h1024' will set the dimensions of the cover photo to have a width - # of 2048 px and height of 1024 px. - # Corresponds to the JSON property `coverPhotoBaseUrl` - # @return [String] - attr_accessor :cover_photo_base_url - - # [Ouput only] Identifier for the album. This is a persistent identifier that - # can be used between sessions to identify this album. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # [Output only] True if media items can be created in the album. - # This field is based on the scopes granted and permissions of the album. If - # the scopes are changed or permissions of the album are changed, this field - # will be updated. - # Corresponds to the JSON property `isWriteable` - # @return [Boolean] - attr_accessor :is_writeable - alias_method :is_writeable?, :is_writeable - - # [Output only] Google Photos URL for the album. The user needs to be signed - # in to their Google Photos account to access this link. - # Corresponds to the JSON property `productUrl` - # @return [String] - attr_accessor :product_url - - # Information about albums that are shared. Note that this - # information is only included if the album was created by you and you have the - # sharing scope. - # Corresponds to the JSON property `shareInfo` - # @return [Google::Apis::PhotoslibraryV1::ShareInfo] - attr_accessor :share_info - - # Name of the album displayed to the user in their Google Photos account. - # This string should not be more than 500 characters. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # [Output only] The number of media items in the album - # Corresponds to the JSON property `totalMediaItems` - # @return [Fixnum] - attr_accessor :total_media_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cover_photo_base_url = args[:cover_photo_base_url] if args.key?(:cover_photo_base_url) - @id = args[:id] if args.key?(:id) - @is_writeable = args[:is_writeable] if args.key?(:is_writeable) - @product_url = args[:product_url] if args.key?(:product_url) - @share_info = args[:share_info] if args.key?(:share_info) - @title = args[:title] if args.key?(:title) - @total_media_items = args[:total_media_items] if args.key?(:total_media_items) - end - end - - # Specifies a position in an album. - class AlbumPosition - include Google::Apis::Core::Hashable - - # Type of position, for a media or enrichment item. - # Corresponds to the JSON property `position` - # @return [String] - attr_accessor :position - - # The enrichment item to which the position is relative to. - # Only used when position type is AFTER_ENRICHMENT_ITEM. - # Corresponds to the JSON property `relativeEnrichmentItemId` - # @return [String] - attr_accessor :relative_enrichment_item_id - - # The media item to which the position is relative to. - # Only used when position type is AFTER_MEDIA_ITEM. - # Corresponds to the JSON property `relativeMediaItemId` - # @return [String] - attr_accessor :relative_media_item_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - @relative_enrichment_item_id = args[:relative_enrichment_item_id] if args.key?(:relative_enrichment_item_id) - @relative_media_item_id = args[:relative_media_item_id] if args.key?(:relative_media_item_id) - end - end - - # Request to create one or more media items in a user's Google Photos library. - # If an albumid is specified, the media items are also added to - # that album. albumPosition is optional and can only be specified - # if an albumId is set. - class BatchCreateMediaItemsRequest - include Google::Apis::Core::Hashable - - # Identifier of the album where the media item(s) will be added. They will - # also be added to the user's library. This is an optional field. - # Corresponds to the JSON property `albumId` - # @return [String] - attr_accessor :album_id - - # Specifies a position in an album. - # Corresponds to the JSON property `albumPosition` - # @return [Google::Apis::PhotoslibraryV1::AlbumPosition] - attr_accessor :album_position - - # List of media items to be created. - # Corresponds to the JSON property `newMediaItems` - # @return [Array] - attr_accessor :new_media_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @album_id = args[:album_id] if args.key?(:album_id) - @album_position = args[:album_position] if args.key?(:album_position) - @new_media_items = args[:new_media_items] if args.key?(:new_media_items) - end - end - - # - class BatchCreateMediaItemsResponse - include Google::Apis::Core::Hashable - - # [Output only] List of media items which were created. - # Corresponds to the JSON property `newMediaItemResults` - # @return [Array] - attr_accessor :new_media_item_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_media_item_results = args[:new_media_item_results] if args.key?(:new_media_item_results) - end - end - - # This filter is used to define which results to return based on the contents - # of the media item. - # It is possible to specify a list of categories to include, and/or a list of - # categories to exclude. Within each list, the categories are combined with an - # OR. For example, if the content filter looks like: - # included_content_categories: [c1, c2, c3] - # It would get media items that contain (c1 OR c2 OR c3). - # And if the content filter looks like: - # excluded_content_categories: [c1, c2, c3] - # It would get media items that contain NOT (c1 OR c2 OR c3). - # You can also include some categories while excluding others, as in this - # proto: - # included_content_categories: [c1, c2], - # excluded_content_category: [c3, c4] - # It would get media items that contain (c1 OR c2) AND NOT (c3 OR c4). - # A category that appears in includedContentategories must not - # appear in excludedContentCategories. - class ContentFilter - include Google::Apis::Core::Hashable - - # The set of categories that must NOT be present in the media items in the - # result. The items in the set are ORed. There is a maximum of 10 - # excludedContentCategories per request. - # Corresponds to the JSON property `excludedContentCategories` - # @return [Array] - attr_accessor :excluded_content_categories - - # The set of categories that must be present in the media items in the - # result. The items in the set are ORed. There is a maximum of 10 - # includedContentCategories per request. - # Corresponds to the JSON property `includedContentCategories` - # @return [Array] - attr_accessor :included_content_categories - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @excluded_content_categories = args[:excluded_content_categories] if args.key?(:excluded_content_categories) - @included_content_categories = args[:included_content_categories] if args.key?(:included_content_categories) - end - end - - # Information about a user who contributed the media item. Note that this - # information is only included if the album containing the media item is - # shared, was created by you and you have the sharing scope. - class ContributorInfo - include Google::Apis::Core::Hashable - - # Display name of the contributor. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # URL to the profile picture of the contributor. - # Corresponds to the JSON property `profilePictureBaseUrl` - # @return [String] - attr_accessor :profile_picture_base_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @profile_picture_base_url = args[:profile_picture_base_url] if args.key?(:profile_picture_base_url) - end - end - - # Request to create an album in Google Photos. - class CreateAlbumRequest - include Google::Apis::Core::Hashable - - # Representation of an album in Google Photos. - # Albums are a container for media items. They contain an additional - # shareInfo property if they have been shared by the application. - # Corresponds to the JSON property `album` - # @return [Google::Apis::PhotoslibraryV1::Album] - attr_accessor :album - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @album = args[:album] if args.key?(:album) - end - end - - # Represents a whole calendar date. The day may be 0 to represent a year and - # month where the day is not significant, e.g. a whole calendar month. The month - # may be 0 to represent a a day and a year where the month is not signficant, e. - # g. when you want to specify the same day in every month of a year or a - # specific year. The year may be 0 to represent a month and day independent of - # year, e.g. anniversary date. - class Date - include Google::Apis::Core::Hashable - - # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - # if specifying a year/month where the day is not significant. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day - - # Month of year. Must be from 1 to 12, or 0 if specifying a date without a - # month. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month - - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without - # a year. - # Corresponds to the JSON property `year` - # @return [Fixnum] - attr_accessor :year - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @day = args[:day] if args.key?(:day) - @month = args[:month] if args.key?(:month) - @year = args[:year] if args.key?(:year) - end - end - - # This filter defines the allowed dates or date ranges for the media returned. - # It is possible to pick a set of specific dates and a set of date ranges. - class DateFilter - include Google::Apis::Core::Hashable - - # List of dates that the media items must have been created on. There is a - # maximum of 5 dates that can be included per request. - # Corresponds to the JSON property `dates` - # @return [Array] - attr_accessor :dates - - # List of dates ranges that the media items must have been created in. There - # is a maximum of 5 dates ranges that can be included per request. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dates = args[:dates] if args.key?(:dates) - @ranges = args[:ranges] if args.key?(:ranges) - end - end - - # Defines a range of dates. Both dates must be of the same format (see Date - # definition for more). - class DateRange - include Google::Apis::Core::Hashable - - # Represents a whole calendar date. The day may be 0 to represent a year and - # month where the day is not significant, e.g. a whole calendar month. The month - # may be 0 to represent a a day and a year where the month is not signficant, e. - # g. when you want to specify the same day in every month of a year or a - # specific year. The year may be 0 to represent a month and day independent of - # year, e.g. anniversary date. - # Corresponds to the JSON property `endDate` - # @return [Google::Apis::PhotoslibraryV1::Date] - attr_accessor :end_date - - # Represents a whole calendar date. The day may be 0 to represent a year and - # month where the day is not significant, e.g. a whole calendar month. The month - # may be 0 to represent a a day and a year where the month is not signficant, e. - # g. when you want to specify the same day in every month of a year or a - # specific year. The year may be 0 to represent a month and day independent of - # year, e.g. anniversary date. - # Corresponds to the JSON property `startDate` - # @return [Google::Apis::PhotoslibraryV1::Date] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_date = args[:end_date] if args.key?(:end_date) - @start_date = args[:start_date] if args.key?(:start_date) - end - end - - # An enrichment item. - class EnrichmentItem - include Google::Apis::Core::Hashable - - # Identifier of the enrichment item. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - end - end - - # Filters that can be applied to a media item search. - # If multiple filter options are specified, they are treated as AND with each - # other. - class Filters - include Google::Apis::Core::Hashable - - # This filter is used to define which results to return based on the contents - # of the media item. - # It is possible to specify a list of categories to include, and/or a list of - # categories to exclude. Within each list, the categories are combined with an - # OR. For example, if the content filter looks like: - # included_content_categories: [c1, c2, c3] - # It would get media items that contain (c1 OR c2 OR c3). - # And if the content filter looks like: - # excluded_content_categories: [c1, c2, c3] - # It would get media items that contain NOT (c1 OR c2 OR c3). - # You can also include some categories while excluding others, as in this - # proto: - # included_content_categories: [c1, c2], - # excluded_content_category: [c3, c4] - # It would get media items that contain (c1 OR c2) AND NOT (c3 OR c4). - # A category that appears in includedContentategories must not - # appear in excludedContentCategories. - # Corresponds to the JSON property `contentFilter` - # @return [Google::Apis::PhotoslibraryV1::ContentFilter] - attr_accessor :content_filter - - # This filter defines the allowed dates or date ranges for the media returned. - # It is possible to pick a set of specific dates and a set of date ranges. - # Corresponds to the JSON property `dateFilter` - # @return [Google::Apis::PhotoslibraryV1::DateFilter] - attr_accessor :date_filter - - # If set, the results will include media items that the user has archived. - # Defaults to false (archived media items are not included). - # Corresponds to the JSON property `includeArchivedMedia` - # @return [Boolean] - attr_accessor :include_archived_media - alias_method :include_archived_media?, :include_archived_media - - # This filter defines the type of media items to be returned, for example - # videos or photos. All the specified media types are treated as an OR with - # each other. - # Corresponds to the JSON property `mediaTypeFilter` - # @return [Google::Apis::PhotoslibraryV1::MediaTypeFilter] - attr_accessor :media_type_filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_filter = args[:content_filter] if args.key?(:content_filter) - @date_filter = args[:date_filter] if args.key?(:date_filter) - @include_archived_media = args[:include_archived_media] if args.key?(:include_archived_media) - @media_type_filter = args[:media_type_filter] if args.key?(:media_type_filter) - end - end - - # Request to join a shared album on behalf of the user. This uses a shareToken - # which can be acquired via the shareAlbum or listSharedAlbums calls. - class JoinSharedAlbumRequest - include Google::Apis::Core::Hashable - - # Token indicating the shared album to join on behalf of the user. - # Corresponds to the JSON property `shareToken` - # @return [String] - attr_accessor :share_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @share_token = args[:share_token] if args.key?(:share_token) - end - end - - # Response to successfully joining the shared album on behalf of the user. - class JoinSharedAlbumResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - class LatLng - include Google::Apis::Core::Hashable - - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latitude = args[:latitude] if args.key?(:latitude) - @longitude = args[:longitude] if args.key?(:longitude) - end - end - - # - class ListAlbumsResponse - include Google::Apis::Core::Hashable - - # [Output only] List of albums that were created by the user. - # Corresponds to the JSON property `albums` - # @return [Array] - attr_accessor :albums - - # [Output only] Token to use to get the next set of albums. Populated if - # there are more albums to retrieve for this request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @albums = args[:albums] if args.key?(:albums) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # - class ListSharedAlbumsResponse - include Google::Apis::Core::Hashable - - # [Output only] Token to use to get the next set of shared albums. Populated - # if there are more shared albums to retrieve for this request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # [Output only] List of shared albums that were requested. - # Corresponds to the JSON property `sharedAlbums` - # @return [Array] - attr_accessor :shared_albums - - 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) - @shared_albums = args[:shared_albums] if args.key?(:shared_albums) - end - end - - # Represents a physical location. - class Location - include Google::Apis::Core::Hashable - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Corresponds to the JSON property `latlng` - # @return [Google::Apis::PhotoslibraryV1::LatLng] - attr_accessor :latlng - - # Name of the location to be displayed. - # Corresponds to the JSON property `locationName` - # @return [String] - attr_accessor :location_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latlng = args[:latlng] if args.key?(:latlng) - @location_name = args[:location_name] if args.key?(:location_name) - end - end - - # An enrichment containing a single location. - class LocationEnrichment - include Google::Apis::Core::Hashable - - # Represents a physical location. - # Corresponds to the JSON property `location` - # @return [Google::Apis::PhotoslibraryV1::Location] - attr_accessor :location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @location = args[:location] if args.key?(:location) - end - end - - # An enrichment containing a map, showing origin and destination locations. - class MapEnrichment - include Google::Apis::Core::Hashable - - # Represents a physical location. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::PhotoslibraryV1::Location] - attr_accessor :destination - - # Represents a physical location. - # Corresponds to the JSON property `origin` - # @return [Google::Apis::PhotoslibraryV1::Location] - attr_accessor :origin - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination = args[:destination] if args.key?(:destination) - @origin = args[:origin] if args.key?(:origin) - end - end - - # Representation of a media item (e.g. photo, video etc.) in Google Photos. - class MediaItem - include Google::Apis::Core::Hashable - - # A URL to the media item's bytes. This should not be used as is. - # For example, '=w2048-h1024' will set the dimensions of a media item of type - # photo to have a width of 2048 px and height of 1024 px. - # Corresponds to the JSON property `baseUrl` - # @return [String] - attr_accessor :base_url - - # Information about a user who contributed the media item. Note that this - # information is only included if the album containing the media item is - # shared, was created by you and you have the sharing scope. - # Corresponds to the JSON property `contributorInfo` - # @return [Google::Apis::PhotoslibraryV1::ContributorInfo] - attr_accessor :contributor_info - - # Description of the media item. This is shown to the user in the item's - # info section in the Google Photos app. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Identifier for the media item. This is a persistent identifier that can be - # used between sessions to identify this media item. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Metadata for a media item. - # Corresponds to the JSON property `mediaMetadata` - # @return [Google::Apis::PhotoslibraryV1::MediaMetadata] - attr_accessor :media_metadata - - # MIME type of the media item. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # Google Photos URL for the media item. This link will only be available to - # the user if they're signed in. - # Corresponds to the JSON property `productUrl` - # @return [String] - attr_accessor :product_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @base_url = args[:base_url] if args.key?(:base_url) - @contributor_info = args[:contributor_info] if args.key?(:contributor_info) - @description = args[:description] if args.key?(:description) - @id = args[:id] if args.key?(:id) - @media_metadata = args[:media_metadata] if args.key?(:media_metadata) - @mime_type = args[:mime_type] if args.key?(:mime_type) - @product_url = args[:product_url] if args.key?(:product_url) - end - end - - # Metadata for a media item. - class MediaMetadata - include Google::Apis::Core::Hashable - - # Time when the media item was first created (not when it was uploaded to - # Google Photos). - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Original height (in pixels) of the media item. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Metadata that is specific to a photo, for example, ISO, focal length and - # exposure time. Some of these fields may be null or not included. - # Corresponds to the JSON property `photo` - # @return [Google::Apis::PhotoslibraryV1::Photo] - attr_accessor :photo - - # Metadata that is specific to a video, for example, fps and processing status. - # Some of these fields may be null or not included. - # Corresponds to the JSON property `video` - # @return [Google::Apis::PhotoslibraryV1::Video] - attr_accessor :video - - # Original width (in pixels) of the media item. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @height = args[:height] if args.key?(:height) - @photo = args[:photo] if args.key?(:photo) - @video = args[:video] if args.key?(:video) - @width = args[:width] if args.key?(:width) - end - end - - # This filter defines the type of media items to be returned, for example - # videos or photos. All the specified media types are treated as an OR with - # each other. - class MediaTypeFilter - include Google::Apis::Core::Hashable - - # The types of media items to be included. This field should only be - # populated with one media type, multiple media types will result in an error - # response. - # Corresponds to the JSON property `mediaTypes` - # @return [Array] - attr_accessor :media_types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @media_types = args[:media_types] if args.key?(:media_types) - end - end - - # A new enrichment item to be added to an album, used by the - # AddEnrichmentToAlbum call. - class NewEnrichmentItem - include Google::Apis::Core::Hashable - - # An enrichment containing a single location. - # Corresponds to the JSON property `locationEnrichment` - # @return [Google::Apis::PhotoslibraryV1::LocationEnrichment] - attr_accessor :location_enrichment - - # An enrichment containing a map, showing origin and destination locations. - # Corresponds to the JSON property `mapEnrichment` - # @return [Google::Apis::PhotoslibraryV1::MapEnrichment] - attr_accessor :map_enrichment - - # An enrichment containing text. - # Corresponds to the JSON property `textEnrichment` - # @return [Google::Apis::PhotoslibraryV1::TextEnrichment] - attr_accessor :text_enrichment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @location_enrichment = args[:location_enrichment] if args.key?(:location_enrichment) - @map_enrichment = args[:map_enrichment] if args.key?(:map_enrichment) - @text_enrichment = args[:text_enrichment] if args.key?(:text_enrichment) - end - end - - # New media item that will be created in a user's Google Photos account. - class NewMediaItem - include Google::Apis::Core::Hashable - - # Description of the media item. This will be shown to the user in the item's - # info section in the Google Photos app. - # This string should not be more than 1000 characters. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A simple media item to be created in Google Photos via an upload token. - # Corresponds to the JSON property `simpleMediaItem` - # @return [Google::Apis::PhotoslibraryV1::SimpleMediaItem] - attr_accessor :simple_media_item - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @simple_media_item = args[:simple_media_item] if args.key?(:simple_media_item) - end - end - - # Result of creating a new media item. - class NewMediaItemResult - include Google::Apis::Core::Hashable - - # Representation of a media item (e.g. photo, video etc.) in Google Photos. - # Corresponds to the JSON property `mediaItem` - # @return [Google::Apis::PhotoslibraryV1::MediaItem] - attr_accessor :media_item - - # 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 `status` - # @return [Google::Apis::PhotoslibraryV1::Status] - attr_accessor :status - - # The upload token used to create this new media item. - # Corresponds to the JSON property `uploadToken` - # @return [String] - attr_accessor :upload_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @media_item = args[:media_item] if args.key?(:media_item) - @status = args[:status] if args.key?(:status) - @upload_token = args[:upload_token] if args.key?(:upload_token) - end - end - - # Metadata that is specific to a photo, for example, ISO, focal length and - # exposure time. Some of these fields may be null or not included. - class Photo - include Google::Apis::Core::Hashable - - # Apeture f number of the photo. - # Corresponds to the JSON property `apertureFNumber` - # @return [Float] - attr_accessor :aperture_f_number - - # Brand of the camera which took the photo. - # Corresponds to the JSON property `cameraMake` - # @return [String] - attr_accessor :camera_make - - # Model of the camera which took the photo. - # Corresponds to the JSON property `cameraModel` - # @return [String] - attr_accessor :camera_model - - # Exposure time of the photo. - # Corresponds to the JSON property `exposureTime` - # @return [String] - attr_accessor :exposure_time - - # Focal length of the photo. - # Corresponds to the JSON property `focalLength` - # @return [Float] - attr_accessor :focal_length - - # ISO of the photo. - # Corresponds to the JSON property `isoEquivalent` - # @return [Fixnum] - attr_accessor :iso_equivalent - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aperture_f_number = args[:aperture_f_number] if args.key?(:aperture_f_number) - @camera_make = args[:camera_make] if args.key?(:camera_make) - @camera_model = args[:camera_model] if args.key?(:camera_model) - @exposure_time = args[:exposure_time] if args.key?(:exposure_time) - @focal_length = args[:focal_length] if args.key?(:focal_length) - @iso_equivalent = args[:iso_equivalent] if args.key?(:iso_equivalent) - end - end - - # Request to search for media items in a user's library. - # If the album id is specified, this call will return the list of media items - # in the album. If neither filters nor album id are - # specified, this call will return all media items in a user's Google Photos - # library. - # If filters are specified, this call will return all media items in - # the user's library which fulfills the criteria based upon the filters. - # Filters and album id must not both be set, as this will result in an - # invalid request. - class SearchMediaItemsRequest - include Google::Apis::Core::Hashable - - # Identifier of an album. If populated will list all media items in - # specified album. Cannot be set in conjunction with any filters. - # Corresponds to the JSON property `albumId` - # @return [String] - attr_accessor :album_id - - # Filters that can be applied to a media item search. - # If multiple filter options are specified, they are treated as AND with each - # other. - # Corresponds to the JSON property `filters` - # @return [Google::Apis::PhotoslibraryV1::Filters] - attr_accessor :filters - - # Maximum number of media items to return in the response. The default number - # of media items to return at a time is 100. The maximum page size is 500. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # 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 - # searchMediaItems request. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @album_id = args[:album_id] if args.key?(:album_id) - @filters = args[:filters] if args.key?(:filters) - @page_size = args[:page_size] if args.key?(:page_size) - @page_token = args[:page_token] if args.key?(:page_token) - end - end - - # - class SearchMediaItemsResponse - include Google::Apis::Core::Hashable - - # [Output only] List of media items that match the search parameters. - # Corresponds to the JSON property `mediaItems` - # @return [Array] - attr_accessor :media_items - - # [Output only] Token to use to get the next set of media items. Its presence - # is the only reliable indicator of more media items being available in the - # next request. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @media_items = args[:media_items] if args.key?(:media_items) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Request to make an album shared in Google Photos. - class ShareAlbumRequest - include Google::Apis::Core::Hashable - - # Options that control the sharing of an album. - # Corresponds to the JSON property `sharedAlbumOptions` - # @return [Google::Apis::PhotoslibraryV1::SharedAlbumOptions] - attr_accessor :shared_album_options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @shared_album_options = args[:shared_album_options] if args.key?(:shared_album_options) - end - end - - # - class ShareAlbumResponse - include Google::Apis::Core::Hashable - - # Information about albums that are shared. Note that this - # information is only included if the album was created by you and you have the - # sharing scope. - # Corresponds to the JSON property `shareInfo` - # @return [Google::Apis::PhotoslibraryV1::ShareInfo] - attr_accessor :share_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @share_info = args[:share_info] if args.key?(:share_info) - end - end - - # Information about albums that are shared. Note that this - # information is only included if the album was created by you and you have the - # sharing scope. - class ShareInfo - include Google::Apis::Core::Hashable - - # A token which can be used to join this shared album on behalf of other - # users via the API. - # Corresponds to the JSON property `shareToken` - # @return [String] - attr_accessor :share_token - - # A link to the album that's now shared on the Google Photos website and app. - # Anyone with the link can access this shared album and see all of the items - # present in the album. - # Corresponds to the JSON property `shareableUrl` - # @return [String] - attr_accessor :shareable_url - - # Options that control the sharing of an album. - # Corresponds to the JSON property `sharedAlbumOptions` - # @return [Google::Apis::PhotoslibraryV1::SharedAlbumOptions] - attr_accessor :shared_album_options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @share_token = args[:share_token] if args.key?(:share_token) - @shareable_url = args[:shareable_url] if args.key?(:shareable_url) - @shared_album_options = args[:shared_album_options] if args.key?(:shared_album_options) - end - end - - # Options that control the sharing of an album. - class SharedAlbumOptions - include Google::Apis::Core::Hashable - - # True if the shared album allows collaborators (users who have joined - # the album) to add media items to it. Defaults to false. - # Corresponds to the JSON property `isCollaborative` - # @return [Boolean] - attr_accessor :is_collaborative - alias_method :is_collaborative?, :is_collaborative - - # True if the shared album allows the owner and the collaborators (users - # who have joined the album) to add comments to the album. Defaults to false. - # Corresponds to the JSON property `isCommentable` - # @return [Boolean] - attr_accessor :is_commentable - alias_method :is_commentable?, :is_commentable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_collaborative = args[:is_collaborative] if args.key?(:is_collaborative) - @is_commentable = args[:is_commentable] if args.key?(:is_commentable) - end - end - - # A simple media item to be created in Google Photos via an upload token. - class SimpleMediaItem - include Google::Apis::Core::Hashable - - # Token identifying the media bytes which have been uploaded to Google. - # Corresponds to the JSON property `uploadToken` - # @return [String] - attr_accessor :upload_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @upload_token = args[:upload_token] if args.key?(:upload_token) - 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>] - 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 - - # An enrichment containing text. - class TextEnrichment - include Google::Apis::Core::Hashable - - # Text for this text enrichment item. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] if args.key?(:text) - end - end - - # Metadata that is specific to a video, for example, fps and processing status. - # Some of these fields may be null or not included. - class Video - include Google::Apis::Core::Hashable - - # Brand of the camera which took the video. - # Corresponds to the JSON property `cameraMake` - # @return [String] - attr_accessor :camera_make - - # Model of the camera which took the video. - # Corresponds to the JSON property `cameraModel` - # @return [String] - attr_accessor :camera_model - - # Frame rate of the video. - # Corresponds to the JSON property `fps` - # @return [Float] - attr_accessor :fps - - # Processing status of the video. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @camera_make = args[:camera_make] if args.key?(:camera_make) - @camera_model = args[:camera_model] if args.key?(:camera_model) - @fps = args[:fps] if args.key?(:fps) - @status = args[:status] if args.key?(:status) - end - end - end - end -end diff --git a/generated/google/apis/photoslibrary_v1/representations.rb b/generated/google/apis/photoslibrary_v1/representations.rb deleted file mode 100644 index 535931571..000000000 --- a/generated/google/apis/photoslibrary_v1/representations.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/photoslibrary_v1/service.rb b/generated/google/apis/photoslibrary_v1/service.rb deleted file mode 100644 index 65e001dd3..000000000 --- a/generated/google/apis/photoslibrary_v1/service.rb +++ /dev/null @@ -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 diff --git a/generated/google/apis/servicemanagement_v1.rb b/generated/google/apis/servicemanagement_v1.rb index ba2e5cc32..7e614be49 100644 --- a/generated/google/apis/servicemanagement_v1.rb +++ b/generated/google/apis/servicemanagement_v1.rb @@ -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' diff --git a/generated/google/apis/servicemanagement_v1/classes.rb b/generated/google/apis/servicemanagement_v1/classes.rb index c43942df0..bd140313e 100644 --- a/generated/google/apis/servicemanagement_v1/classes.rb +++ b/generated/google/apis/servicemanagement_v1/classes.rb @@ -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. diff --git a/generated/google/apis/servicemanagement_v1/representations.rb b/generated/google/apis/servicemanagement_v1/representations.rb index f97f0ddf2..020b2fa1e 100644 --- a/generated/google/apis/servicemanagement_v1/representations.rb +++ b/generated/google/apis/servicemanagement_v1/representations.rb @@ -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 diff --git a/generated/google/apis/serviceuser_v1.rb b/generated/google/apis/serviceuser_v1.rb index 842af8a08..b76b3cea4 100644 --- a/generated/google/apis/serviceuser_v1.rb +++ b/generated/google/apis/serviceuser_v1.rb @@ -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' diff --git a/generated/google/apis/serviceuser_v1/classes.rb b/generated/google/apis/serviceuser_v1/classes.rb index 288a0fb85..773228246 100644 --- a/generated/google/apis/serviceuser_v1/classes.rb +++ b/generated/google/apis/serviceuser_v1/classes.rb @@ -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. diff --git a/generated/google/apis/serviceuser_v1/representations.rb b/generated/google/apis/serviceuser_v1/representations.rb index 9e9aeff5f..5bd7ad54e 100644 --- a/generated/google/apis/serviceuser_v1/representations.rb +++ b/generated/google/apis/serviceuser_v1/representations.rb @@ -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 diff --git a/generated/google/apis/tpu_v1.rb b/generated/google/apis/tpu_v1.rb new file mode 100644 index 000000000..c7606623c --- /dev/null +++ b/generated/google/apis/tpu_v1.rb @@ -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 diff --git a/generated/google/apis/tpu_v1/classes.rb b/generated/google/apis/tpu_v1/classes.rb new file mode 100644 index 000000000..94bfe7fc6 --- /dev/null +++ b/generated/google/apis/tpu_v1/classes.rb @@ -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] + 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] + 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] + 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] + 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] + 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] + 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>] + 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 diff --git a/generated/google/apis/tpu_v1/representations.rb b/generated/google/apis/tpu_v1/representations.rb new file mode 100644 index 000000000..a6b7fca8f --- /dev/null +++ b/generated/google/apis/tpu_v1/representations.rb @@ -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 diff --git a/generated/google/apis/tpu_v1/service.rb b/generated/google/apis/tpu_v1/service.rb new file mode 100644 index 000000000..62e400235 --- /dev/null +++ b/generated/google/apis/tpu_v1/service.rb @@ -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