From 8e384f5509243b4e73da36cfd54df57084fab4f1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 01:20:50 +0000 Subject: [PATCH] feat: Automated regeneration of Games client --- .../google_api/games/v1/api/achievements.ex | 4 +- .../lib/google_api/games/v1/api/players.ex | 69 +++++ .../lib/google_api/games/v1/api/recall.ex | 264 ++++++++++++++++++ .../lib/google_api/games/v1/api/revisions.ex | 2 +- .../lib/google_api/games/v1/api/scores.ex | 6 +- .../lib/google_api/games/v1/connection.ex | 3 + .../games/lib/google_api/games/v1/metadata.ex | 2 +- .../games/v1/model/application_player_id.ex | 49 ++++ ...ultiple_application_player_ids_response.ex | 46 +++ .../games/v1/model/link_persona_request.ex | 64 +++++ .../games/v1/model/link_persona_response.ex | 46 +++ .../google_api/games/v1/model/recall_token.ex | 52 ++++ .../games/v1/model/reset_persona_request.ex | 46 +++ .../games/v1/model/reset_persona_response.ex | 46 +++ .../model/retrieve_player_tokens_response.ex | 46 +++ .../games/v1/model/unlink_persona_request.ex | 52 ++++ .../games/v1/model/unlink_persona_response.ex | 46 +++ 17 files changed, 836 insertions(+), 7 deletions(-) create mode 100644 clients/games/lib/google_api/games/v1/api/recall.ex create mode 100644 clients/games/lib/google_api/games/v1/model/application_player_id.ex create mode 100644 clients/games/lib/google_api/games/v1/model/get_multiple_application_player_ids_response.ex create mode 100644 clients/games/lib/google_api/games/v1/model/link_persona_request.ex create mode 100644 clients/games/lib/google_api/games/v1/model/link_persona_response.ex create mode 100644 clients/games/lib/google_api/games/v1/model/recall_token.ex create mode 100644 clients/games/lib/google_api/games/v1/model/reset_persona_request.ex create mode 100644 clients/games/lib/google_api/games/v1/model/reset_persona_response.ex create mode 100644 clients/games/lib/google_api/games/v1/model/retrieve_player_tokens_response.ex create mode 100644 clients/games/lib/google_api/games/v1/model/unlink_persona_request.ex create mode 100644 clients/games/lib/google_api/games/v1/model/unlink_persona_response.ex diff --git a/clients/games/lib/google_api/games/v1/api/achievements.ex b/clients/games/lib/google_api/games/v1/api/achievements.ex index be7b0b94e8..dba3351567 100644 --- a/clients/games/lib/google_api/games/v1/api/achievements.ex +++ b/clients/games/lib/google_api/games/v1/api/achievements.ex @@ -32,7 +32,7 @@ defmodule GoogleApi.Games.V1.Api.Achievements do * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server * `achievement_id` (*type:* `String.t`) - The ID of the achievement used by this method. - * `steps_to_increment` (*type:* `integer()`) - The number of steps to increment. + * `steps_to_increment` (*type:* `integer()`) - Required. The number of steps to increment. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -238,7 +238,7 @@ defmodule GoogleApi.Games.V1.Api.Achievements do * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server * `achievement_id` (*type:* `String.t`) - The ID of the achievement used by this method. - * `steps` (*type:* `integer()`) - The minimum value to set the steps to. + * `steps` (*type:* `integer()`) - Required. The minimum value to set the steps to. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. diff --git a/clients/games/lib/google_api/games/v1/api/players.ex b/clients/games/lib/google_api/games/v1/api/players.ex index 34f8d21113..513e8b02f2 100644 --- a/clients/games/lib/google_api/games/v1/api/players.ex +++ b/clients/games/lib/google_api/games/v1/api/players.ex @@ -89,6 +89,75 @@ defmodule GoogleApi.Games.V1.Api.Players do |> Response.decode(opts ++ [struct: %GoogleApi.Games.V1.Model.Player{}]) end + @doc """ + Get the application player ids for the currently authenticated player across all requested games by the same developer as the calling application. This will only return ids for players that actually have an id (scoped or otherwise) with that game. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - 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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:applicationIds` (*type:* `list(String.t)`) - Required. The application IDs from the Google Play developer console for the games to return scoped ids for. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Games.V1.Model.GetMultipleApplicationPlayerIdsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec games_players_get_multiple_application_player_ids( + Tesla.Env.client(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Games.V1.Model.GetMultipleApplicationPlayerIdsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def games_players_get_multiple_application_player_ids( + connection, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :applicationIds => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/games/v1/players/me/multipleApplicationPlayerIds", %{}) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Games.V1.Model.GetMultipleApplicationPlayerIdsResponse{}] + ) + end + @doc """ Retrieves scoped player identifiers for currently authenticated user. diff --git a/clients/games/lib/google_api/games/v1/api/recall.ex b/clients/games/lib/google_api/games/v1/api/recall.ex new file mode 100644 index 0000000000..3f74e9cda3 --- /dev/null +++ b/clients/games/lib/google_api/games/v1/api/recall.ex @@ -0,0 +1,264 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Api.Recall do + @moduledoc """ + API calls for all endpoints tagged `Recall`. + """ + + alias GoogleApi.Games.V1.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Associate the PGS Player principal encoded in the provided recall session id with an in-game account + + ## Parameters + + * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - 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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Games.V1.Model.LinkPersonaRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Games.V1.Model.LinkPersonaResponse{}}` on success + * `{:error, info}` on failure + """ + @spec games_recall_link_persona(Tesla.Env.client(), keyword(), keyword()) :: + {:ok, GoogleApi.Games.V1.Model.LinkPersonaResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def games_recall_link_persona(connection, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/games/v1/recall:linkPersona", %{}) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Games.V1.Model.LinkPersonaResponse{}]) + end + + @doc """ + Delete all Recall tokens linking the given persona to any player (with or without a profile). + + ## Parameters + + * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - 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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Games.V1.Model.ResetPersonaRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Games.V1.Model.ResetPersonaResponse{}}` on success + * `{:error, info}` on failure + """ + @spec games_recall_reset_persona(Tesla.Env.client(), keyword(), keyword()) :: + {:ok, GoogleApi.Games.V1.Model.ResetPersonaResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def games_recall_reset_persona(connection, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/games/v1/recall:resetPersona", %{}) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Games.V1.Model.ResetPersonaResponse{}]) + end + + @doc """ + Retrieve all Recall tokens associated with the PGS Player principal encoded in the provided recall session id. The API is only available for users that have active PGS Player profile. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server + * `session_id` (*type:* `String.t`) - Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - 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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Games.V1.Model.RetrievePlayerTokensResponse{}}` on success + * `{:error, info}` on failure + """ + @spec games_recall_retrieve_tokens(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.Games.V1.Model.RetrievePlayerTokensResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def games_recall_retrieve_tokens(connection, session_id, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/games/v1/recall/tokens/{sessionId}", %{ + "sessionId" => URI.encode(session_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Games.V1.Model.RetrievePlayerTokensResponse{}]) + end + + @doc """ + Delete a Recall token linking the PGS Player principal identified by the Recall session and an in-game account identified either by the 'persona' or by the token value. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - 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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Games.V1.Model.UnlinkPersonaRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Games.V1.Model.UnlinkPersonaResponse{}}` on success + * `{:error, info}` on failure + """ + @spec games_recall_unlink_persona(Tesla.Env.client(), keyword(), keyword()) :: + {:ok, GoogleApi.Games.V1.Model.UnlinkPersonaResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def games_recall_unlink_persona(connection, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/games/v1/recall:unlinkPersona", %{}) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Games.V1.Model.UnlinkPersonaResponse{}]) + end +end diff --git a/clients/games/lib/google_api/games/v1/api/revisions.ex b/clients/games/lib/google_api/games/v1/api/revisions.ex index e5cfe09958..9df2e0efa6 100644 --- a/clients/games/lib/google_api/games/v1/api/revisions.ex +++ b/clients/games/lib/google_api/games/v1/api/revisions.ex @@ -31,7 +31,7 @@ defmodule GoogleApi.Games.V1.Api.Revisions do ## Parameters * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server - * `client_revision` (*type:* `String.t`) - The revision of the client SDK used by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running as a Web App. + * `client_revision` (*type:* `String.t`) - Required. The revision of the client SDK used by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running as a Web App. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. diff --git a/clients/games/lib/google_api/games/v1/api/scores.ex b/clients/games/lib/google_api/games/v1/api/scores.ex index 3526fd6010..eead5e52ba 100644 --- a/clients/games/lib/google_api/games/v1/api/scores.ex +++ b/clients/games/lib/google_api/games/v1/api/scores.ex @@ -124,7 +124,7 @@ defmodule GoogleApi.Games.V1.Api.Scores do * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server * `leaderboard_id` (*type:* `String.t`) - The ID of the leaderboard. * `collection` (*type:* `String.t`) - The collection of scores you're requesting. - * `time_span` (*type:* `String.t`) - The time span for the scores and ranks you're requesting. + * `time_span` (*type:* `String.t`) - Required. The time span for the scores and ranks you're requesting. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -208,7 +208,7 @@ defmodule GoogleApi.Games.V1.Api.Scores do * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server * `leaderboard_id` (*type:* `String.t`) - The ID of the leaderboard. * `collection` (*type:* `String.t`) - The collection of scores you're requesting. - * `time_span` (*type:* `String.t`) - The time span for the scores and ranks you're requesting. + * `time_span` (*type:* `String.t`) - Required. The time span for the scores and ranks you're requesting. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -295,7 +295,7 @@ defmodule GoogleApi.Games.V1.Api.Scores do * `connection` (*type:* `GoogleApi.Games.V1.Connection.t`) - Connection to server * `leaderboard_id` (*type:* `String.t`) - The ID of the leaderboard. - * `score` (*type:* `String.t`) - The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. + * `score` (*type:* `String.t`) - Required. The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. diff --git a/clients/games/lib/google_api/games/v1/connection.ex b/clients/games/lib/google_api/games/v1/connection.ex index c6d6c5bba3..0414cdf71b 100644 --- a/clients/games/lib/google_api/games/v1/connection.ex +++ b/clients/games/lib/google_api/games/v1/connection.ex @@ -24,6 +24,9 @@ defmodule GoogleApi.Games.V1.Connection do use GoogleApi.Gax.Connection, scopes: [ + # View and manage your Google Play Developer account + "https://www.googleapis.com/auth/androidpublisher", + # See, create, and delete its own configuration data in your Google Drive "https://www.googleapis.com/auth/drive.appdata", diff --git a/clients/games/lib/google_api/games/v1/metadata.ex b/clients/games/lib/google_api/games/v1/metadata.ex index 4955ef34e9..fc015fdb58 100644 --- a/clients/games/lib/google_api/games/v1/metadata.ex +++ b/clients/games/lib/google_api/games/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Games.V1 do API client metadata for GoogleApi.Games.V1. """ - @discovery_revision "20220525" + @discovery_revision "20240306" def discovery_revision(), do: @discovery_revision end diff --git a/clients/games/lib/google_api/games/v1/model/application_player_id.ex b/clients/games/lib/google_api/games/v1/model/application_player_id.ex new file mode 100644 index 0000000000..1f7e90ee36 --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/application_player_id.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.ApplicationPlayerId do + @moduledoc """ + Primary scoped player identifier for an application. + + ## Attributes + + * `applicationId` (*type:* `String.t`, *default:* `nil`) - The application that this player identifier is for. + * `playerId` (*type:* `String.t`, *default:* `nil`) - The player identifier for the application. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :applicationId => String.t() | nil, + :playerId => String.t() | nil + } + + field(:applicationId) + field(:playerId) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.ApplicationPlayerId do + def decode(value, options) do + GoogleApi.Games.V1.Model.ApplicationPlayerId.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.ApplicationPlayerId do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/get_multiple_application_player_ids_response.ex b/clients/games/lib/google_api/games/v1/model/get_multiple_application_player_ids_response.ex new file mode 100644 index 0000000000..57a2b0bc84 --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/get_multiple_application_player_ids_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.GetMultipleApplicationPlayerIdsResponse do + @moduledoc """ + Response message for GetMultipleApplicationPlayerIds rpc. + + ## Attributes + + * `playerIds` (*type:* `list(GoogleApi.Games.V1.Model.ApplicationPlayerId.t)`, *default:* `nil`) - Output only. The requested applications along with the scoped ids for tha player, if that player has an id for the application. If not, the application is not included in the response. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :playerIds => list(GoogleApi.Games.V1.Model.ApplicationPlayerId.t()) | nil + } + + field(:playerIds, as: GoogleApi.Games.V1.Model.ApplicationPlayerId, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.GetMultipleApplicationPlayerIdsResponse do + def decode(value, options) do + GoogleApi.Games.V1.Model.GetMultipleApplicationPlayerIdsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.GetMultipleApplicationPlayerIdsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/link_persona_request.ex b/clients/games/lib/google_api/games/v1/model/link_persona_request.ex new file mode 100644 index 0000000000..000b55da1e --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/link_persona_request.ex @@ -0,0 +1,64 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.LinkPersonaRequest do + @moduledoc """ + Request to link an in-game account with a PGS principal (encoded in the session id). + + ## Attributes + + * `cardinalityConstraint` (*type:* `String.t`, *default:* `nil`) - Required. Cardinality constraint to observe when linking a persona to a player in the scope of a game. + * `conflictingLinksResolutionPolicy` (*type:* `String.t`, *default:* `nil`) - Required. Resolution policy to apply when the linking of a persona to a player would result in violating the specified cardinality constraint. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Input only. Optional expiration time. + * `persona` (*type:* `String.t`, *default:* `nil`) - Required. Stable identifier of the in-game account. Please refrain from re-using the same persona for different games. + * `sessionId` (*type:* `String.t`, *default:* `nil`) - Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application. + * `token` (*type:* `String.t`, *default:* `nil`) - Required. Value of the token to create. Opaque to Play Games and assumed to be non-stable (encrypted with key rotation). + * `ttl` (*type:* `String.t`, *default:* `nil`) - Input only. Optional time-to-live. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cardinalityConstraint => String.t() | nil, + :conflictingLinksResolutionPolicy => String.t() | nil, + :expireTime => DateTime.t() | nil, + :persona => String.t() | nil, + :sessionId => String.t() | nil, + :token => String.t() | nil, + :ttl => String.t() | nil + } + + field(:cardinalityConstraint) + field(:conflictingLinksResolutionPolicy) + field(:expireTime, as: DateTime) + field(:persona) + field(:sessionId) + field(:token) + field(:ttl) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.LinkPersonaRequest do + def decode(value, options) do + GoogleApi.Games.V1.Model.LinkPersonaRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.LinkPersonaRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/link_persona_response.ex b/clients/games/lib/google_api/games/v1/model/link_persona_response.ex new file mode 100644 index 0000000000..409200813c --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/link_persona_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.LinkPersonaResponse do + @moduledoc """ + Outcome of a persona linking attempt. + + ## Attributes + + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of a persona linking attempt. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :state => String.t() | nil + } + + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.LinkPersonaResponse do + def decode(value, options) do + GoogleApi.Games.V1.Model.LinkPersonaResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.LinkPersonaResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/recall_token.ex b/clients/games/lib/google_api/games/v1/model/recall_token.ex new file mode 100644 index 0000000000..d9ce63d0a1 --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/recall_token.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.RecallToken do + @moduledoc """ + Recall token data returned from RetrievePlayerTokens RPC + + ## Attributes + + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Optional expiration time of the token + * `multiPlayerPersona` (*type:* `boolean()`, *default:* `nil`) - Required. Whether the persona identified by the token is linked to multiple PGS Players + * `token` (*type:* `String.t`, *default:* `nil`) - Required. Value of the Recall token as it is provided by the client via LinkPersona RPC + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :expireTime => DateTime.t() | nil, + :multiPlayerPersona => boolean() | nil, + :token => String.t() | nil + } + + field(:expireTime, as: DateTime) + field(:multiPlayerPersona) + field(:token) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.RecallToken do + def decode(value, options) do + GoogleApi.Games.V1.Model.RecallToken.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.RecallToken do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/reset_persona_request.ex b/clients/games/lib/google_api/games/v1/model/reset_persona_request.ex new file mode 100644 index 0000000000..9381bfe583 --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/reset_persona_request.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.ResetPersonaRequest do + @moduledoc """ + Request to remove all Recall tokens associated with a persona for an app. + + ## Attributes + + * `persona` (*type:* `String.t`, *default:* `nil`) - Value of the 'persona' field as it was provided by the client in LinkPersona RPC + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :persona => String.t() | nil + } + + field(:persona) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.ResetPersonaRequest do + def decode(value, options) do + GoogleApi.Games.V1.Model.ResetPersonaRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.ResetPersonaRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/reset_persona_response.ex b/clients/games/lib/google_api/games/v1/model/reset_persona_response.ex new file mode 100644 index 0000000000..7428c3ade7 --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/reset_persona_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.ResetPersonaResponse do + @moduledoc """ + Response for the ResetPersona RPC + + ## Attributes + + * `unlinked` (*type:* `boolean()`, *default:* `nil`) - Required. Whether any tokens were unlinked as a result of this request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :unlinked => boolean() | nil + } + + field(:unlinked) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.ResetPersonaResponse do + def decode(value, options) do + GoogleApi.Games.V1.Model.ResetPersonaResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.ResetPersonaResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/retrieve_player_tokens_response.ex b/clients/games/lib/google_api/games/v1/model/retrieve_player_tokens_response.ex new file mode 100644 index 0000000000..90e12a530f --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/retrieve_player_tokens_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.RetrievePlayerTokensResponse do + @moduledoc """ + Response for the RetrievePlayerTokens RPC + + ## Attributes + + * `tokens` (*type:* `list(GoogleApi.Games.V1.Model.RecallToken.t)`, *default:* `nil`) - Required. Recall tokens associated with the requested PGS Player principal + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :tokens => list(GoogleApi.Games.V1.Model.RecallToken.t()) | nil + } + + field(:tokens, as: GoogleApi.Games.V1.Model.RecallToken, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.RetrievePlayerTokensResponse do + def decode(value, options) do + GoogleApi.Games.V1.Model.RetrievePlayerTokensResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.RetrievePlayerTokensResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/unlink_persona_request.ex b/clients/games/lib/google_api/games/v1/model/unlink_persona_request.ex new file mode 100644 index 0000000000..ed51e9986d --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/unlink_persona_request.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.UnlinkPersonaRequest do + @moduledoc """ + Request to remove a Recall token linking PGS principal and an in-game account + + ## Attributes + + * `persona` (*type:* `String.t`, *default:* `nil`) - Value of the 'persona' field as it was provided by the client in LinkPersona RPC + * `sessionId` (*type:* `String.t`, *default:* `nil`) - Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application. + * `token` (*type:* `String.t`, *default:* `nil`) - Value of the Recall token as it was provided by the client in LinkPersona RPC + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :persona => String.t() | nil, + :sessionId => String.t() | nil, + :token => String.t() | nil + } + + field(:persona) + field(:sessionId) + field(:token) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.UnlinkPersonaRequest do + def decode(value, options) do + GoogleApi.Games.V1.Model.UnlinkPersonaRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.UnlinkPersonaRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/games/lib/google_api/games/v1/model/unlink_persona_response.ex b/clients/games/lib/google_api/games/v1/model/unlink_persona_response.ex new file mode 100644 index 0000000000..31cf02f9f1 --- /dev/null +++ b/clients/games/lib/google_api/games/v1/model/unlink_persona_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Games.V1.Model.UnlinkPersonaResponse do + @moduledoc """ + Response for the UnlinkPersona RPC + + ## Attributes + + * `unlinked` (*type:* `boolean()`, *default:* `nil`) - Required. Whether a Recall token specified by the request was deleted. Can be 'false' when there were no Recall tokens satisfied the criteria from the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :unlinked => boolean() | nil + } + + field(:unlinked) +end + +defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.UnlinkPersonaResponse do + def decode(value, options) do + GoogleApi.Games.V1.Model.UnlinkPersonaResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.UnlinkPersonaResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end