From 8c087d1968c21d8a147ebf3a28d641701f304d7a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Oct 2020 07:06:03 -0700 Subject: [PATCH] feat: Automated regeneration of games v1 client (#1299) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-10-28 02:35:43,530 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py. On branch autosynth-games-v1 nothing to commit, working tree clean 2020-10-28 02:35:43,568 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth games v1 DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth games v1 bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 11.3.0 Installing rake 11.3.0 Fetching concurrent-ruby 1.1.7 Installing concurrent-ruby 1.1.7 Fetching i18n 1.8.5 Installing i18n 1.8.5 Fetching minitest 5.14.2 Installing minitest 5.14.2 Fetching thread_safe 0.3.6 Installing thread_safe 0.3.6 Fetching tzinfo 1.2.7 Installing tzinfo 1.2.7 Fetching activesupport 5.0.7.2 Installing activesupport 5.0.7.2 Fetching public_suffix 4.0.6 Installing public_suffix 4.0.6 Fetching addressable 2.7.0 Installing addressable 2.7.0 Fetching ast 2.4.1 Installing ast 2.4.1 Using bundler 2.1.4 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Fetching coderay 1.1.3 Installing coderay 1.1.3 Fetching json 2.3.1 Installing json 2.3.1 with native extensions Fetching docile 1.3.2 Installing docile 1.3.2 Fetching simplecov-html 0.10.2 Installing simplecov-html 0.10.2 Fetching simplecov 0.16.1 Installing simplecov 0.16.1 Using sync 0.5.0 Fetching tins 1.26.0 Installing tins 1.26.0 Fetching term-ansicolor 1.7.1 Installing term-ansicolor 1.7.1 Fetching thor 0.20.3 Installing thor 0.20.3 Fetching coveralls 0.8.23 Installing coveralls 0.8.23 Fetching crack 0.4.4 Installing crack 0.4.4 Fetching declarative 0.0.20 Installing declarative 0.0.20 Fetching declarative-option 0.1.0 Installing declarative-option 0.1.0 Fetching diff-lcs 1.4.4 Installing diff-lcs 1.4.4 Fetching dotenv 2.7.6 Installing dotenv 2.7.6 Fetching fakefs 0.20.1 Installing fakefs 0.20.1 Fetching multipart-post 2.1.1 Installing multipart-post 2.1.1 Fetching ruby2_keywords 0.0.2 Installing ruby2_keywords 0.0.2 Fetching faraday 1.1.0 Installing faraday 1.1.0 Fetching gems 1.2.0 Installing gems 1.2.0 Fetching github-markup 1.7.0 Installing github-markup 1.7.0 Fetching jwt 2.2.2 Installing jwt 2.2.2 Fetching memoist 0.16.2 Installing memoist 0.16.2 Fetching multi_json 1.15.0 Installing multi_json 1.15.0 Fetching os 0.9.6 Installing os 0.9.6 Fetching signet 0.14.0 Installing signet 0.14.0 Fetching googleauth 0.14.0 Installing googleauth 0.14.0 Fetching httpclient 2.8.3 Installing httpclient 2.8.3 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Fetching uber 0.1.0 Installing uber 0.1.0 Fetching representable 3.0.4 Installing representable 3.0.4 Fetching retriable 3.1.2 Installing retriable 3.1.2 Fetching rexml 3.2.4 Installing rexml 3.2.4 Using google-api-client 0.47.0 from source at `.` Fetching google-id-token 1.4.2 Installing google-id-token 1.4.2 Fetching hashdiff 1.0.1 Installing hashdiff 1.0.1 Fetching mime-types-data 3.2020.0512 Installing mime-types-data 3.2020.0512 Fetching mime-types 3.3.1 Installing mime-types 3.3.1 Fetching multi_xml 0.6.0 Installing multi_xml 0.6.0 Fetching httparty 0.18.1 Installing httparty 0.18.1 Fetching rspec-support 3.9.4 Installing rspec-support 3.9.4 Fetching rspec-core 3.9.3 Installing rspec-core 3.9.3 Fetching rspec-expectations 3.9.3 Installing rspec-expectations 3.9.3 Fetching rspec-mocks 3.9.1 Installing rspec-mocks 3.9.1 Fetching rspec 3.9.0 Installing rspec 3.9.0 Fetching json_spec 1.1.5 Installing json_spec 1.1.5 Fetching launchy 2.5.0 Installing launchy 2.5.0 Fetching little-plugger 1.1.4 Installing little-plugger 1.1.4 Fetching logging 2.3.0 Installing logging 2.3.0 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching opencensus 0.5.0 Installing opencensus 0.5.0 Fetching parallel 1.19.2 Installing parallel 1.19.2 Fetching parser 2.7.2.0 Installing parser 2.7.2.0 Fetching powerpack 0.1.2 Installing powerpack 0.1.2 Fetching pry 0.13.1 Installing pry 0.13.1 Fetching pry-byebug 3.9.0 Installing pry-byebug 3.9.0 Fetching yard 0.9.25 Installing yard 0.9.25 Fetching pry-doc 0.13.5 Installing pry-doc 0.13.5 Fetching rainbow 2.2.2 Installing rainbow 2.2.2 with native extensions Fetching redcarpet 3.5.0 Installing redcarpet 3.5.0 with native extensions Fetching redis 3.3.5 Installing redis 3.3.5 Fetching rmail 1.1.4 Installing rmail 1.1.4 Fetching ruby-progressbar 1.10.1 Installing ruby-progressbar 1.10.1 Fetching unicode-display_width 1.7.0 Installing unicode-display_width 1.7.0 Fetching rubocop 0.49.1 Installing rubocop 0.49.1 Fetching webmock 2.3.2 Installing webmock 2.3.2 Bundle complete! 31 Gemfile dependencies, 78 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from httparty: When you HTTParty, you must party hard! echo a | bundle exec bin/generate-api gen generated --api=games.v1 --names-out=/workspace/api_names_out.yaml Loading games, version v1 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/games.v1.json conflict google/apis/games_v1.rb Wrote metadata to generated/google/apis/games_v1/synth.metadata. DEBUG:synthtool:Wrote metadata to generated/google/apis/games_v1/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/fc014795-ecad-4bb9-a08f-f26793ec33cc/targets - [ ] To automatically regenerate this PR, check this box. --- api_names_out.yaml | 36 +++ generated/google/apis/games_v1.rb | 2 +- generated/google/apis/games_v1/classes.rb | 300 ++++++++++++++++++ .../google/apis/games_v1/representations.rb | 116 +++++++ generated/google/apis/games_v1/service.rb | 34 ++ generated/google/apis/games_v1/synth.metadata | 2 +- 6 files changed, 488 insertions(+), 2 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 10c8954b8..0e89b3d40 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -103153,6 +103153,10 @@ "/games:v1/QuestMilestone/id": id "/games:v1/QuestMilestone/kind": kind "/games:v1/QuestMilestone/state": state +"/games:v1/ResolveSnapshotHeadRequest": resolve_snapshot_head_request +"/games:v1/ResolveSnapshotHeadRequest/resolutionPolicy": resolution_policy +"/games:v1/ResolveSnapshotHeadResponse": resolve_snapshot_head_response +"/games:v1/ResolveSnapshotHeadResponse/snapshot": snapshot "/games:v1/RevisionCheckResponse": check_revision_response "/games:v1/RevisionCheckResponse/apiVersion": api_version "/games:v1/RevisionCheckResponse/kind": kind @@ -103273,6 +103277,24 @@ "/games:v1/Snapshot/title": title "/games:v1/Snapshot/type": type "/games:v1/Snapshot/uniqueName": unique_name +"/games:v1/SnapshotCoverImageResource": snapshot_cover_image_resource +"/games:v1/SnapshotCoverImageResource/contentHash": content_hash +"/games:v1/SnapshotCoverImageResource/downloadUrl": download_url +"/games:v1/SnapshotCoverImageResource/height": height +"/games:v1/SnapshotCoverImageResource/mimeType": mime_type +"/games:v1/SnapshotCoverImageResource/resourceId": resource_id +"/games:v1/SnapshotCoverImageResource/width": width +"/games:v1/SnapshotDataResource": snapshot_data_resource +"/games:v1/SnapshotDataResource/contentHash": content_hash +"/games:v1/SnapshotDataResource/downloadUrl": download_url +"/games:v1/SnapshotDataResource/resourceId": resource_id +"/games:v1/SnapshotDataResource/size": size +"/games:v1/SnapshotExtended": snapshot_extended +"/games:v1/SnapshotExtended/conflictingRevisions": conflicting_revisions +"/games:v1/SnapshotExtended/conflictingRevisions/conflicting_revision": conflicting_revision +"/games:v1/SnapshotExtended/hasConflictingRevisions": has_conflicting_revisions +"/games:v1/SnapshotExtended/headRevision": head_revision +"/games:v1/SnapshotExtended/name": name "/games:v1/SnapshotImage": snapshot_image "/games:v1/SnapshotImage/height": height "/games:v1/SnapshotImage/kind": kind @@ -103284,6 +103306,18 @@ "/games:v1/SnapshotListResponse/items/item": item "/games:v1/SnapshotListResponse/kind": kind "/games:v1/SnapshotListResponse/nextPageToken": next_page_token +"/games:v1/SnapshotMetadata": snapshot_metadata +"/games:v1/SnapshotMetadata/description": description +"/games:v1/SnapshotMetadata/deviceName": device_name +"/games:v1/SnapshotMetadata/duration": duration +"/games:v1/SnapshotMetadata/lastModifyTime": last_modify_time +"/games:v1/SnapshotMetadata/progressValue": progress_value +"/games:v1/SnapshotMetadata/title": title +"/games:v1/SnapshotRevision": snapshot_revision +"/games:v1/SnapshotRevision/blob": blob +"/games:v1/SnapshotRevision/coverImage": cover_image +"/games:v1/SnapshotRevision/id": id +"/games:v1/SnapshotRevision/metadata": metadata "/games:v1/StatsResponse": stats_response "/games:v1/StatsResponse/avg_session_length_minutes": avg_session_length_minutes "/games:v1/StatsResponse/churn_probability": churn_probability @@ -103560,6 +103594,8 @@ "/games:v1/games.snapshots.list/maxResults": max_results "/games:v1/games.snapshots.list/pageToken": page_token "/games:v1/games.snapshots.list/playerId": player_id +"/games:v1/games.snapshotsExtended.resolveSnapshotHead": resolve_snapshots_extended_snapshot_head +"/games:v1/games.snapshotsExtended.resolveSnapshotHead/snapshotName": snapshot_name "/games:v1/games.stats.get": get_stat "/games:v1/games.turnBasedMatches.cancel": cancel_turn_based_match "/games:v1/games.turnBasedMatches.cancel/consistencyToken": consistency_token diff --git a/generated/google/apis/games_v1.rb b/generated/google/apis/games_v1.rb index 4b910c88b..985915e71 100644 --- a/generated/google/apis/games_v1.rb +++ b/generated/google/apis/games_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/games/ module GamesV1 VERSION = 'V1' - REVISION = '20201016' + REVISION = '20201022' # View and manage its own configuration data in your Google Drive AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata' diff --git a/generated/google/apis/games_v1/classes.rb b/generated/google/apis/games_v1/classes.rb index c2b0952e7..5a4092787 100644 --- a/generated/google/apis/games_v1/classes.rb +++ b/generated/google/apis/games_v1/classes.rb @@ -2287,6 +2287,53 @@ module Google end end + # Request for ResolveSnapshotHead RPC. + class ResolveSnapshotHeadRequest + include Google::Apis::Core::Hashable + + # Required. The automatic resolution policy. All conflicts are resolved in + # chronological order, starting from the/ least recent. If the comparison metric + # is equal for the tentative head and the conflict, the head wins. + # Corresponds to the JSON property `resolutionPolicy` + # @return [String] + attr_accessor :resolution_policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resolution_policy = args[:resolution_policy] if args.key?(:resolution_policy) + end + end + + # Response for ResolveSnapshotHead RPC. + class ResolveSnapshotHeadResponse + include Google::Apis::Core::Hashable + + # A snapshot represents a saved game state referred to using the developer- + # provided snapshot_id (think of it as a file's path). The set of attributes and + # binary data for a specific state is called a revision. Each revision is itself + # immutable, and referred to by a snapshot_revision_id. At any time, a snapshot + # has a "head" revision, and updates are made against that revision. If a + # snapshot update is received that isn't against the current head revision, then + # instead of changing the head revision it will result in a conflicting revision + # that must be specifically resolved. + # Corresponds to the JSON property `snapshot` + # @return [Google::Apis::GamesV1::SnapshotExtended] + attr_accessor :snapshot + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @snapshot = args[:snapshot] if args.key?(:snapshot) + end + end + # A third party checking a revision response. class CheckRevisionResponse include Google::Apis::Core::Hashable @@ -2449,6 +2496,168 @@ module Google end end + # Identifies a snapshot cover image resource. The image is provided by the game. + class SnapshotCoverImageResource + include Google::Apis::Core::Hashable + + # Output only. Hash-like weak identifier of the uploaded image bytes, consistent + # per player per application. Within the context of a single player/application, + # it's guaranteed that two identical blobs coming from two different uploads + # will have the same content hash. It's extremely likely, though not guaranteed, + # that if two content hashes are equal, the images are identical. + # Corresponds to the JSON property `contentHash` + # @return [String] + attr_accessor :content_hash + + # Output only. A URL the client can use to download the image. May vary across + # requests, and only guaranteed to be valid for a short time after it is + # returned. + # Corresponds to the JSON property `downloadUrl` + # @return [String] + attr_accessor :download_url + + # Output only. The height of the image in pixels. + # Corresponds to the JSON property `height` + # @return [Fixnum] + attr_accessor :height + + # Output only. The MIME type of the image. + # Corresponds to the JSON property `mimeType` + # @return [String] + attr_accessor :mime_type + + # The ID of the image resource. It's guaranteed that if two IDs are equal then + # the contents are equal as well. It's not guaranteed that two identical blobs + # coming from separate uploads have the same ID. The resource ID can only be + # used within the application, user and resource type it was originally returned + # for. For example, it's not possible to use SnapshotDataResource's resource ID + # as the resource_id of a SnapshotCoverImageResource, even if the blob is a + # valid image file. + # Corresponds to the JSON property `resourceId` + # @return [String] + attr_accessor :resource_id + + # Output only. The width of the image in pixels. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content_hash = args[:content_hash] if args.key?(:content_hash) + @download_url = args[:download_url] if args.key?(:download_url) + @height = args[:height] if args.key?(:height) + @mime_type = args[:mime_type] if args.key?(:mime_type) + @resource_id = args[:resource_id] if args.key?(:resource_id) + @width = args[:width] if args.key?(:width) + end + end + + # Identifies a snapshot data resource. The data is provided by the game. + class SnapshotDataResource + include Google::Apis::Core::Hashable + + # Output only. Hash-like weak identifier of the uploaded blob, consistent per + # player per application. Within the context of a single player/application, it' + # s guaranteed that two identical blobs coming from two different uploads will + # have the same content hash. It's extremely likely, though not guaranteed, that + # if two content hashes are equal, the blobs are identical. + # Corresponds to the JSON property `contentHash` + # @return [String] + attr_accessor :content_hash + + # Output only. A URL that the client can use to download the blob. May vary + # across requests, and only guaranteed to be valid for a short time after it is + # returned. + # Corresponds to the JSON property `downloadUrl` + # @return [String] + attr_accessor :download_url + + # The ID of the blob resource. It's guaranteed that if two IDs are equal then + # the contents are equal as well. It's not guaranteed that two identical blobs + # coming from separate uploads have the same resource ID. The resource ID can + # only be used within the application, user and resource type it was originally + # returned for. For example, it's not possible to use SnapshotDataResource's + # resource ID as the resource_id of a SnapshotCoverImageResource, even if the + # blob is a valid image file. + # Corresponds to the JSON property `resourceId` + # @return [String] + attr_accessor :resource_id + + # Size of the saved game blob in bytes. + # Corresponds to the JSON property `size` + # @return [Fixnum] + attr_accessor :size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content_hash = args[:content_hash] if args.key?(:content_hash) + @download_url = args[:download_url] if args.key?(:download_url) + @resource_id = args[:resource_id] if args.key?(:resource_id) + @size = args[:size] if args.key?(:size) + end + end + + # A snapshot represents a saved game state referred to using the developer- + # provided snapshot_id (think of it as a file's path). The set of attributes and + # binary data for a specific state is called a revision. Each revision is itself + # immutable, and referred to by a snapshot_revision_id. At any time, a snapshot + # has a "head" revision, and updates are made against that revision. If a + # snapshot update is received that isn't against the current head revision, then + # instead of changing the head revision it will result in a conflicting revision + # that must be specifically resolved. + class SnapshotExtended + include Google::Apis::Core::Hashable + + # A list of conflicting revisions. Only set if explicitly requested (e.g. using + # a field mask or a request flag), or if the RPC guarantees that this field is + # set. The conflicting revisions are sorted chronologically by their server + # creation time (oldest first). If there are too many conflicting revisions to + # return all of them in a single request this will only contain the first batch. + # In such case, the presented conflicting revisions must be resolved first in + # order to fetch the next batch. + # Corresponds to the JSON property `conflictingRevisions` + # @return [Array] + attr_accessor :conflicting_revisions + + # An indicator whether the snapshot has any conflicting revisions or not. Always + # set. + # Corresponds to the JSON property `hasConflictingRevisions` + # @return [Boolean] + attr_accessor :has_conflicting_revisions + alias_method :has_conflicting_revisions?, :has_conflicting_revisions + + # A Snapshot revision resource. Snapshot revisions are immutable. + # Corresponds to the JSON property `headRevision` + # @return [Google::Apis::GamesV1::SnapshotRevision] + attr_accessor :head_revision + + # An identifier of the snapshot,developer-specified. + # 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) + @conflicting_revisions = args[:conflicting_revisions] if args.key?(:conflicting_revisions) + @has_conflicting_revisions = args[:has_conflicting_revisions] if args.key?(:has_conflicting_revisions) + @head_revision = args[:head_revision] if args.key?(:head_revision) + @name = args[:name] if args.key?(:name) + end + end + # An image of a snapshot. class SnapshotImage include Google::Apis::Core::Hashable @@ -2527,6 +2736,97 @@ module Google end end + # Metadata about a snapshot revision. Snapshot metadata is immutable - a + # metadata change corresponds to a new snapshot revision. + class SnapshotMetadata + include Google::Apis::Core::Hashable + + # The description of this snapshot. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The device that created the current revision. + # Corresponds to the JSON property `deviceName` + # @return [String] + attr_accessor :device_name + + # The duration associated with this snapshot. Values with sub-millisecond + # precision can be rounded or trimmed to the closest millisecond. + # Corresponds to the JSON property `duration` + # @return [String] + attr_accessor :duration + + # The timestamp of the last modification to this snapshot. Values with sub- + # millisecond precision can be rounded or trimmed to the closest millisecond. + # Corresponds to the JSON property `lastModifyTime` + # @return [String] + attr_accessor :last_modify_time + + # The progress value (64-bit integer set by developer) associated with this + # snapshot. + # Corresponds to the JSON property `progressValue` + # @return [Fixnum] + attr_accessor :progress_value + + # The title of this snapshot. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @device_name = args[:device_name] if args.key?(:device_name) + @duration = args[:duration] if args.key?(:duration) + @last_modify_time = args[:last_modify_time] if args.key?(:last_modify_time) + @progress_value = args[:progress_value] if args.key?(:progress_value) + @title = args[:title] if args.key?(:title) + end + end + + # A Snapshot revision resource. Snapshot revisions are immutable. + class SnapshotRevision + include Google::Apis::Core::Hashable + + # Identifies a snapshot data resource. The data is provided by the game. + # Corresponds to the JSON property `blob` + # @return [Google::Apis::GamesV1::SnapshotDataResource] + attr_accessor :blob + + # Identifies a snapshot cover image resource. The image is provided by the game. + # Corresponds to the JSON property `coverImage` + # @return [Google::Apis::GamesV1::SnapshotCoverImageResource] + attr_accessor :cover_image + + # Output only. A server generated identifier of the snapshot revision. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Metadata about a snapshot revision. Snapshot metadata is immutable - a + # metadata change corresponds to a new snapshot revision. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::GamesV1::SnapshotMetadata] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @blob = args[:blob] if args.key?(:blob) + @cover_image = args[:cover_image] if args.key?(:cover_image) + @id = args[:id] if args.key?(:id) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + # A third party stats resource. class StatsResponse include Google::Apis::Core::Hashable diff --git a/generated/google/apis/games_v1/representations.rb b/generated/google/apis/games_v1/representations.rb index d5b5cf1c2..daaf22de5 100644 --- a/generated/google/apis/games_v1/representations.rb +++ b/generated/google/apis/games_v1/representations.rb @@ -346,6 +346,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ResolveSnapshotHeadRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResolveSnapshotHeadResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CheckRevisionResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -364,6 +376,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SnapshotCoverImageResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SnapshotDataResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SnapshotExtended + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SnapshotImage class Representation < Google::Apis::Core::JsonRepresentation; end @@ -376,6 +406,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SnapshotMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SnapshotRevision + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class StatsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -991,6 +1033,21 @@ module Google end end + class ResolveSnapshotHeadRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resolution_policy, as: 'resolutionPolicy' + end + end + + class ResolveSnapshotHeadResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :snapshot, as: 'snapshot', class: Google::Apis::GamesV1::SnapshotExtended, decorator: Google::Apis::GamesV1::SnapshotExtended::Representation + + end + end + class CheckRevisionResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1029,6 +1086,40 @@ module Google end end + class SnapshotCoverImageResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_hash, as: 'contentHash' + property :download_url, as: 'downloadUrl' + property :height, as: 'height' + property :mime_type, as: 'mimeType' + property :resource_id, as: 'resourceId' + property :width, as: 'width' + end + end + + class SnapshotDataResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_hash, as: 'contentHash' + property :download_url, as: 'downloadUrl' + property :resource_id, as: 'resourceId' + property :size, :numeric_string => true, as: 'size' + end + end + + class SnapshotExtended + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :conflicting_revisions, as: 'conflictingRevisions', class: Google::Apis::GamesV1::SnapshotRevision, decorator: Google::Apis::GamesV1::SnapshotRevision::Representation + + property :has_conflicting_revisions, as: 'hasConflictingRevisions' + property :head_revision, as: 'headRevision', class: Google::Apis::GamesV1::SnapshotRevision, decorator: Google::Apis::GamesV1::SnapshotRevision::Representation + + property :name, as: 'name' + end + end + class SnapshotImage # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1050,6 +1141,31 @@ module Google end end + class SnapshotMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :device_name, as: 'deviceName' + property :duration, as: 'duration' + property :last_modify_time, as: 'lastModifyTime' + property :progress_value, :numeric_string => true, as: 'progressValue' + property :title, as: 'title' + end + end + + class SnapshotRevision + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :blob, as: 'blob', class: Google::Apis::GamesV1::SnapshotDataResource, decorator: Google::Apis::GamesV1::SnapshotDataResource::Representation + + property :cover_image, as: 'coverImage', class: Google::Apis::GamesV1::SnapshotCoverImageResource, decorator: Google::Apis::GamesV1::SnapshotCoverImageResource::Representation + + property :id, as: 'id' + property :metadata, as: 'metadata', class: Google::Apis::GamesV1::SnapshotMetadata, decorator: Google::Apis::GamesV1::SnapshotMetadata::Representation + + end + end + class StatsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/games_v1/service.rb b/generated/google/apis/games_v1/service.rb index 202346b34..dcf67c434 100644 --- a/generated/google/apis/games_v1/service.rb +++ b/generated/google/apis/games_v1/service.rb @@ -1072,6 +1072,40 @@ module Google execute_or_queue_command(command, &block) end + # Resolves any potential conflicts according to the resolution policy specified + # in the request and returns the snapshot head after the resolution. + # @param [String] snapshot_name + # Required. Name of the snapshot. + # @param [Google::Apis::GamesV1::ResolveSnapshotHeadRequest] resolve_snapshot_head_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::GamesV1::ResolveSnapshotHeadResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::ResolveSnapshotHeadResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def resolve_snapshots_extended_snapshot_head(snapshot_name, resolve_snapshot_head_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'games/v1/snapshotsExtended/{snapshotName}:resolveHead', options) + command.request_representation = Google::Apis::GamesV1::ResolveSnapshotHeadRequest::Representation + command.request_object = resolve_snapshot_head_request_object + command.response_representation = Google::Apis::GamesV1::ResolveSnapshotHeadResponse::Representation + command.response_class = Google::Apis::GamesV1::ResolveSnapshotHeadResponse + command.params['snapshotName'] = snapshot_name unless snapshot_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 + # Returns engagement and spend statistics in this application for the currently # authenticated user. # @param [String] fields diff --git a/generated/google/apis/games_v1/synth.metadata b/generated/google/apis/games_v1/synth.metadata index 8ba18e27d..fb5a74b21 100644 --- a/generated/google/apis/games_v1/synth.metadata +++ b/generated/google/apis/games_v1/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "cb0c5bf94e2b1c915107eec83041d4409c900155" + "sha": "9840c481849200572321532ecc3b128bebbc1583" } } ]