From bdfbfd2776e0f16f7a35c3486c21eeefd5b7dbcc Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 11 Mar 2024 18:44:31 -0700 Subject: [PATCH] feat: Automated regeneration of FirebaseAppCheck client (#10863) Auto-created at 2024-03-12 01:28:14 +0000 using the toys pull request generator. --- .../firebase_app_check/v1/metadata.ex | 2 +- ...1_exchange_app_attest_assertion_request.ex | 5 +- ...exchange_app_attest_attestation_request.ex | 5 +- ...pcheck_v1_exchange_custom_token_request.ex | 5 +- ...ppcheck_v1_exchange_debug_token_request.ex | 5 +- ..._v1_exchange_device_check_token_request.ex | 5 +- ...1_exchange_play_integrity_token_request.ex | 3 + ...ange_recaptcha_enterprise_token_request.ex | 3 + ..._v1_exchange_recaptcha_v3_token_request.ex | 3 + .../v1beta/api/oauth_clients.ex | 343 +++++++++++ .../firebase_app_check/v1beta/api/projects.ex | 566 +++++++++++++++++- .../firebase_app_check/v1beta/metadata.ex | 2 +- ..._batch_update_resource_policies_request.ex | 65 ++ ...batch_update_resource_policies_response.ex | 60 ++ ...a_exchange_app_attest_assertion_request.ex | 5 +- ...exchange_app_attest_attestation_request.ex | 5 +- ...ck_v1beta_exchange_custom_token_request.ex | 5 +- ...eck_v1beta_exchange_debug_token_request.ex | 5 +- ...eta_exchange_device_check_token_request.ex | 5 +- ...a_exchange_play_integrity_token_request.ex | 3 + ...ange_recaptcha_enterprise_token_request.ex | 3 + ...eta_exchange_recaptcha_v3_token_request.ex | 3 + ..._v1beta_list_resource_policies_response.ex | 64 ++ ...irebase_appcheck_v1beta_resource_policy.ex | 63 ++ ...google_firebase_appcheck_v1beta_service.ex | 10 +- ...k_v1beta_update_resource_policy_request.ex | 61 ++ ..._appcheck_v1beta_update_service_request.ex | 2 +- ...k_v1beta_verify_app_check_token_request.ex | 53 ++ ..._v1beta_verify_app_check_token_response.ex | 53 ++ 29 files changed, 1390 insertions(+), 22 deletions(-) create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/oauth_clients.ex create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_request.ex create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_response.ex create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_list_resource_policies_response.ex create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_resource_policy.ex create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_resource_policy_request.ex create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_request.ex create mode 100644 clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_response.ex diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/metadata.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/metadata.ex index b84bcb784d..28eafd49e2 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/metadata.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1 do API client metadata for GoogleApi.FirebaseAppCheck.V1. """ - @discovery_revision "20220708" + @discovery_revision "20240304" def discovery_revision(), do: @discovery_revision end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_assertion_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_assertion_request.ex index c3d1be62f4..aaf9bfe386 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_assertion_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_assertion_request.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeAp * `artifact` (*type:* `String.t`, *default:* `nil`) - Required. The artifact returned by a previous call to ExchangeAppAttestAttestation. * `assertion` (*type:* `String.t`, *default:* `nil`) - Required. The CBOR-encoded assertion returned by the client-side App Attest API. * `challenge` (*type:* `String.t`, *default:* `nil`) - Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeAp @type t :: %__MODULE__{ :artifact => String.t() | nil, :assertion => String.t() | nil, - :challenge => String.t() | nil + :challenge => String.t() | nil, + :limitedUse => boolean() | nil } field(:artifact) field(:assertion) field(:challenge) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_attestation_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_attestation_request.ex index 3641c34af2..ec7c0b56f4 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_attestation_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_app_attest_attestation_request.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeAp * `attestationStatement` (*type:* `String.t`, *default:* `nil`) - Required. The App Attest statement returned by the client-side App Attest API. This is a base64url encoded CBOR object in the JSON response. * `challenge` (*type:* `String.t`, *default:* `nil`) - Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. * `keyId` (*type:* `String.t`, *default:* `nil`) - Required. The key ID generated by App Attest for the client app. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeAp @type t :: %__MODULE__{ :attestationStatement => String.t() | nil, :challenge => String.t() | nil, - :keyId => String.t() | nil + :keyId => String.t() | nil, + :limitedUse => boolean() | nil } field(:attestationStatement) field(:challenge) field(:keyId) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_custom_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_custom_token_request.ex index edb21b704e..80fdc7c017 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_custom_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_custom_token_request.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeCu ## Attributes * `customToken` (*type:* `String.t`, *default:* `nil`) - Required. A custom token signed using your project's Admin SDK service account credentials. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :customToken => String.t() | nil + :customToken => String.t() | nil, + :limitedUse => boolean() | nil } field(:customToken) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_debug_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_debug_token_request.ex index c7ea77dee7..8eb0f8599a 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_debug_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_debug_token_request.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeDe ## Attributes * `debugToken` (*type:* `String.t`, *default:* `nil`) - Required. A debug token secret. This string must match a debug token secret previously created using CreateDebugToken. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :debugToken => String.t() | nil + :debugToken => String.t() | nil, + :limitedUse => boolean() | nil } field(:debugToken) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_device_check_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_device_check_token_request.ex index bd9f3bf330..7114480820 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_device_check_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_device_check_token_request.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeDe ## Attributes * `deviceToken` (*type:* `String.t`, *default:* `nil`) - Required. The `device_token` as returned by Apple's client-side [DeviceCheck API](https://developer.apple.com/documentation/devicecheck/dcdevice). This is the base64 encoded `Data` (Swift) or `NSData` (ObjC) object. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :deviceToken => String.t() | nil + :deviceToken => String.t() | nil, + :limitedUse => boolean() | nil } field(:deviceToken) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_play_integrity_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_play_integrity_token_request.ex index 6376349026..f6e76e97c8 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_play_integrity_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_play_integrity_token_request.ex @@ -21,15 +21,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangePl ## Attributes + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. * `playIntegrityToken` (*type:* `String.t`, *default:* `nil`) - Required. The [integrity verdict response token from Play Integrity](https://developer.android.com/google/play/integrity/verdict#decrypt-verify) issued to your app. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :limitedUse => boolean() | nil, :playIntegrityToken => String.t() | nil } + field(:limitedUse) field(:playIntegrityToken) end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_enterprise_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_enterprise_token_request.ex index 59e6bf6059..d94d69085c 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_enterprise_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_enterprise_token_request.ex @@ -21,15 +21,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeRe ## Attributes + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. * `recaptchaEnterpriseToken` (*type:* `String.t`, *default:* `nil`) - Required. The reCAPTCHA token as returned by the [reCAPTCHA Enterprise JavaScript API](https://cloud.google.com/recaptcha-enterprise/docs/instrument-web-pages). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :limitedUse => boolean() | nil, :recaptchaEnterpriseToken => String.t() | nil } + field(:limitedUse) field(:recaptchaEnterpriseToken) end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_v3_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_v3_token_request.ex index 10913a7fb0..c0acb7f2d4 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_v3_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1/model/google_firebase_appcheck_v1_exchange_recaptcha_v3_token_request.ex @@ -21,15 +21,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1.Model.GoogleFirebaseAppcheckV1ExchangeRe ## Attributes + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. * `recaptchaV3Token` (*type:* `String.t`, *default:* `nil`) - Required. The reCAPTCHA token as returned by the [reCAPTCHA v3 JavaScript API](https://developers.google.com/recaptcha/docs/v3). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :limitedUse => boolean() | nil, :recaptchaV3Token => String.t() | nil } + field(:limitedUse) field(:recaptchaV3Token) end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/oauth_clients.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/oauth_clients.ex new file mode 100644 index 0000000000..6143307158 --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/oauth_clients.ex @@ -0,0 +1,343 @@ +# 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.FirebaseAppCheck.V1beta.Api.OauthClients do + @moduledoc """ + API calls for all endpoints tagged `OauthClients`. + """ + + alias GoogleApi.FirebaseAppCheck.V1beta.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Accepts an App Attest assertion and an artifact previously obtained from ExchangeAppAttestAttestation and verifies those with Apple. If valid, returns an AppCheckToken. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaExchangeAppAttestAssertionRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaAppCheckToken{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_oauth_clients_exchange_app_attest_assertion( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaAppCheckToken.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_oauth_clients_exchange_app_attest_assertion( + connection, + app, + 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("/v1beta/{+app}:exchangeAppAttestAssertion", %{ + "app" => URI.encode(app, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaAppCheckToken{} + ] + ) + end + + @doc """ + Accepts an App Attest CBOR attestation and verifies it with Apple using your preconfigured team and bundle IDs. If valid, returns an attestation artifact that can later be exchanged for an AppCheckToken using ExchangeAppAttestAssertion. For convenience and performance, this method's response object will also contain an AppCheckToken (if the verification is successful). + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_oauth_clients_exchange_app_attest_attestation( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_oauth_clients_exchange_app_attest_attestation( + connection, + app, + 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("/v1beta/{+app}:exchangeAppAttestAttestation", %{ + "app" => URI.encode(app, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse{} + ] + ) + end + + @doc """ + Validates a debug token secret that you have previously created using CreateDebugToken. If valid, returns an AppCheckToken. Note that a restrictive quota is enforced on this method to prevent accidental exposure of the app to abuse. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `app` (*type:* `String.t`) - Required. The relative resource name of the app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaExchangeDebugTokenRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaAppCheckToken{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_oauth_clients_exchange_debug_token( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaAppCheckToken.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_oauth_clients_exchange_debug_token( + connection, + app, + 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("/v1beta/{+app}:exchangeDebugToken", %{ + "app" => URI.encode(app, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaAppCheckToken{} + ] + ) + end + + @doc """ + Generates a challenge that protects the integrity of an immediately following call to ExchangeAppAttestAttestation or ExchangeAppAttestAssertion. A challenge should not be reused for multiple calls. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaGenerateAppAttestChallengeRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaGenerateAppAttestChallengeResponse{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_oauth_clients_generate_app_attest_challenge( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaGenerateAppAttestChallengeResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_oauth_clients_generate_app_attest_challenge( + connection, + app, + 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("/v1beta/{+app}:generateAppAttestChallenge", %{ + "app" => URI.encode(app, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaGenerateAppAttestChallengeResponse{} + ] + ) + end +end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/projects.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/projects.ex index b3823205f9..c1cbf939cc 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/projects.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/api/projects.ex @@ -25,13 +25,92 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do @library_version Mix.Project.config() |> Keyword.get(:version, "") + @doc """ + Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check). + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `project` (*type:* `String.t`) - Required. The relative resource name of the project for which the token was minted, in the format: ``` projects/{project_number} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_projects_verify_app_check_token( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_projects_verify_app_check_token( + connection, + project, + 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("/v1beta/{+project}:verifyAppCheckToken", %{ + "project" => URI.encode(project, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse{} + ] + ) + end + @doc """ Accepts an App Attest assertion and an artifact previously obtained from ExchangeAppAttestAttestation and verifies those with Apple. If valid, returns an AppCheckToken. ## Parameters * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server - * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. + * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -110,7 +189,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server - * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. + * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -268,7 +347,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server - * `app` (*type:* `String.t`) - Required. The relative resource name of the app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. + * `app` (*type:* `String.t`) - Required. The relative resource name of the app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -821,7 +900,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server - * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. + * `app` (*type:* `String.t`) - Required. The relative resource name of the iOS app, in the format: ``` projects/{project_number}/apps/{app_id} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Alternatively, if this method is being called for an OAuth client protected by App Check, this field can also be in the format: ``` oauthClients/{oauth_client_id} ``` You can view the OAuth client ID for your OAuth clients in the Google Cloud console. Note that only iOS OAuth clients are supported at this time, and they must be linked to corresponding iOS Firebase apps. Please see [the documentation](https://developers.google.com/identity/sign-in/ios/appcheck/get-started#project-setup) for more information. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -3107,7 +3186,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The relative resource name of the Service to retrieve, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) + * `name` (*type:* `String.t`) - Required. The relative resource name of the Service to retrieve, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) * `identitytoolkit.googleapis.com` (Firebase Authentication with Identity Platform) * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -3188,7 +3267,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do * `: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"). - * `:pageSize` (*type:* `integer()`) - The maximum number of Services to return in the response. Only explicitly configured services are returned. The server may return fewer than this at its own discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. + * `:pageSize` (*type:* `integer()`) - The maximum number of Services to return in the response. Only explicitly configured services are returned. The server may return fewer than this at its own discretion. If no value is specified or set to zero (or too large a value is specified), the server will impose its own limit. * `:pageToken` (*type:* `String.t`) - Token returned from a previous call to ListServices indicating where in the set of Services to resume listing. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListServices must match the call that provided the page token; if they do not match, the result is undefined. * `opts` (*type:* `keyword()`) - Call options @@ -3256,7 +3335,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The relative resource name of the service configuration object, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) + * `name` (*type:* `String.t`) - Required. The relative resource name of the service configuration object, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) * `identitytoolkit.googleapis.com` (Firebase Authentication with Identity Platform) * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -3326,4 +3405,477 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Api.Projects do [struct: %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaService{}] ) end + + @doc """ + Atomically updates the specified ResourcePolicy configurations. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent project name and the service, in the format ``` projects/{project_number}/services/{service_id} ``` The parent collection in the `name` field of any resource being updated must match this field, or the entire batch fails. + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_projects_services_resource_policies_batch_update( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_projects_services_resource_policies_batch_update( + connection, + parent, + 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("/v1beta/{+parent}/resourcePolicies:batchUpdate", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesResponse{} + ] + ) + end + + @doc """ + Creates the specified ResourcePolicy configuration. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The relative resource name of the parent service in which the specified ResourcePolicy will be created, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `oauth2.googleapis.com` (Google Identity for iOS) + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_projects_services_resource_policies_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_projects_services_resource_policies_create( + connection, + parent, + 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("/v1beta/{+parent}/resourcePolicies", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy{} + ] + ) + end + + @doc """ + Deletes the specified ResourcePolicy configuration. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The relative resource name of the ResourcePolicy to delete, in the format: ``` projects/{project_number}/services/{service_id}/resourcePolicies/{resource_name} ``` + * `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"). + * `:etag` (*type:* `String.t`) - The checksum to be validated against the current ResourcePolicy, to ensure the client has an up-to-date value before proceeding. The user can obtain this from the ResourcePolicy object that they last received. This etag is strongly validated. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleProtobufEmpty{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_projects_services_resource_policies_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleProtobufEmpty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_projects_services_resource_policies_delete( + connection, + name, + 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, + :etag => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleProtobufEmpty{}] + ) + end + + @doc """ + Gets the requested ResourcePolicy configuration. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The relative resource name of the ResourcePolicy to retrieve, in the format: ``` projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID used as the resource ID for the policy. + * `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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_projects_services_resource_policies_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_projects_services_resource_policies_get( + connection, + name, + 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("/v1beta/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy{} + ] + ) + end + + @doc """ + Lists all ResourcePolicy configurations for the specified project and service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The relative resource name of the parent project and service for which to list each associated ResourcePolicy, in the format: ``` projects/{project_number}/services/{service_name} ``` + * `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"). + * `:filter` (*type:* `String.t`) - Optional. Filters the results by the specified rule. For the exact syntax of this field, please consult the [AIP-160](https://google.aip.dev/160) standard. Currently, since the only fields in the ResourcePolicy resource are the scalar fields `enforcement_mode` and `target_resource`, this method does not support the traversal operator (`.`) or the has operator (`:`). Here are some examples of valid filters: * `enforcement_mode = ENFORCED` * `target_resource = "//oauth2.googleapis.com/projects/12345/oauthClients/"` * `enforcement_mode = ENFORCED AND target_resource = "//oauth2.googleapis.com/projects/12345/oauthClients/"` + * `:pageSize` (*type:* `integer()`) - The maximum number of ResourcePolicys to return in the response. Only explicitly configured policies are returned. The server may return fewer than this at its own discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. + * `:pageToken` (*type:* `String.t`) - Token returned from a previous call to ListResourcePolicies indicating where in the set of ResourcePolicys to resume listing. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListResourcePolicies must match the call that provided the page token; if they do not match, the result is undefined. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaListResourcePoliciesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_projects_services_resource_policies_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaListResourcePoliciesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_projects_services_resource_policies_list( + connection, + parent, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/resourcePolicies", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaListResourcePoliciesResponse{} + ] + ) + end + + @doc """ + Updates the specified ResourcePolicy configuration. + + ## Parameters + + * `connection` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The relative name of the resource configuration object, in the format: ``` projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID used as the resource ID for the policy. + * `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"). + * `:updateMask` (*type:* `String.t`) - Required. A comma-separated list of names of fields in the ResourcePolicy to update. Example: `enforcement_mode`. + * `:body` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy{}}` on success + * `{:error, info}` on failure + """ + @spec firebaseappcheck_projects_services_resource_policies_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def firebaseappcheck_projects_services_resource_policies_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy{} + ] + ) + end end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/metadata.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/metadata.ex index 0fe56f1171..09cbdc4c83 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/metadata.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta do API client metadata for GoogleApi.FirebaseAppCheck.V1beta. """ - @discovery_revision "20220708" + @discovery_revision "20240304" def discovery_revision(), do: @discovery_revision end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_request.ex new file mode 100644 index 0000000000..1ff85a5589 --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_request.ex @@ -0,0 +1,65 @@ +# 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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesRequest do + @moduledoc """ + Request message for the BatchUpdateResourcePolicies method. + + ## Attributes + + * `requests` (*type:* `list(GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUpdateResourcePolicyRequest.t)`, *default:* `nil`) - Required. The request messages specifying the ResourcePolicys to update. A maximum of 100 objects can be updated in a batch. + * `updateMask` (*type:* `String.t`, *default:* `nil`) - Optional. A comma-separated list of names of fields in the ResourcePolicy objects to update. Example: `enforcement_mode`. If this field is present, the `update_mask` field in the UpdateResourcePolicyRequest messages must all match this field, or the entire batch fails and no updates will be committed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :requests => + list( + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUpdateResourcePolicyRequest.t() + ) + | nil, + :updateMask => String.t() | nil + } + + field(:requests, + as: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUpdateResourcePolicyRequest, + type: :list + ) + + field(:updateMask) +end + +defimpl Poison.Decoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesRequest do + def decode(value, options) do + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_response.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_response.ex new file mode 100644 index 0000000000..b7a00d02af --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_batch_update_resource_policies_response.ex @@ -0,0 +1,60 @@ +# 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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesResponse do + @moduledoc """ + Response message for the BatchUpdateResourcePolicies method. + + ## Attributes + + * `resourcePolicies` (*type:* `list(GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t)`, *default:* `nil`) - ResourcePolicy objects after the updates have been applied. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :resourcePolicies => + list( + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t() + ) + | nil + } + + field(:resourcePolicies, + as: GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesResponse do + def decode(value, options) do + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaBatchUpdateResourcePoliciesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_assertion_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_assertion_request.ex index 50ef7e87d2..4b4a151a09 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_assertion_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_assertion_request.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx * `artifact` (*type:* `String.t`, *default:* `nil`) - Required. The artifact returned by a previous call to ExchangeAppAttestAttestation. * `assertion` (*type:* `String.t`, *default:* `nil`) - Required. The CBOR-encoded assertion returned by the client-side App Attest API. * `challenge` (*type:* `String.t`, *default:* `nil`) - Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx @type t :: %__MODULE__{ :artifact => String.t() | nil, :assertion => String.t() | nil, - :challenge => String.t() | nil + :challenge => String.t() | nil, + :limitedUse => boolean() | nil } field(:artifact) field(:assertion) field(:challenge) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_attestation_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_attestation_request.ex index 787005f596..b9e1578186 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_attestation_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_app_attest_attestation_request.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx * `attestationStatement` (*type:* `String.t`, *default:* `nil`) - Required. The App Attest statement returned by the client-side App Attest API. This is a base64url encoded CBOR object in the JSON response. * `challenge` (*type:* `String.t`, *default:* `nil`) - Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. * `keyId` (*type:* `String.t`, *default:* `nil`) - Required. The key ID generated by App Attest for the client app. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx @type t :: %__MODULE__{ :attestationStatement => String.t() | nil, :challenge => String.t() | nil, - :keyId => String.t() | nil + :keyId => String.t() | nil, + :limitedUse => boolean() | nil } field(:attestationStatement) field(:challenge) field(:keyId) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_custom_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_custom_token_request.ex index fcf1eae3be..2ef2716858 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_custom_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_custom_token_request.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx ## Attributes * `customToken` (*type:* `String.t`, *default:* `nil`) - Required. A custom token signed using your project's Admin SDK service account credentials. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :customToken => String.t() | nil + :customToken => String.t() | nil, + :limitedUse => boolean() | nil } field(:customToken) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_debug_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_debug_token_request.ex index ffe6fd16b9..09a3eb7dc4 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_debug_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_debug_token_request.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx ## Attributes * `debugToken` (*type:* `String.t`, *default:* `nil`) - Required. A debug token secret. This string must match a debug token secret previously created using CreateDebugToken. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :debugToken => String.t() | nil + :debugToken => String.t() | nil, + :limitedUse => boolean() | nil } field(:debugToken) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_device_check_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_device_check_token_request.ex index a22b504b82..6022643c4b 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_device_check_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_device_check_token_request.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx ## Attributes * `deviceToken` (*type:* `String.t`, *default:* `nil`) - Required. The `device_token` as returned by Apple's client-side [DeviceCheck API](https://developer.apple.com/documentation/devicecheck/dcdevice). This is the base64 encoded `Data` (Swift) or `NSData` (ObjC) object. + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :deviceToken => String.t() | nil + :deviceToken => String.t() | nil, + :limitedUse => boolean() | nil } field(:deviceToken) + field(:limitedUse) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_play_integrity_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_play_integrity_token_request.ex index bf9fa0589b..ab514510ac 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_play_integrity_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_play_integrity_token_request.ex @@ -21,15 +21,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx ## Attributes + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. * `playIntegrityToken` (*type:* `String.t`, *default:* `nil`) - Required. The [integrity verdict response token from Play Integrity](https://developer.android.com/google/play/integrity/verdict#decrypt-verify) issued to your app. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :limitedUse => boolean() | nil, :playIntegrityToken => String.t() | nil } + field(:limitedUse) field(:playIntegrityToken) end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_enterprise_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_enterprise_token_request.ex index 8ce0cb7ad4..65d10c4d18 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_enterprise_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_enterprise_token_request.ex @@ -21,15 +21,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx ## Attributes + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. * `recaptchaEnterpriseToken` (*type:* `String.t`, *default:* `nil`) - Required. The reCAPTCHA token as returned by the [reCAPTCHA Enterprise JavaScript API](https://cloud.google.com/recaptcha-enterprise/docs/instrument-web-pages). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :limitedUse => boolean() | nil, :recaptchaEnterpriseToken => String.t() | nil } + field(:limitedUse) field(:recaptchaEnterpriseToken) end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_v3_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_v3_token_request.ex index 4639bbf45c..c8947f8b1b 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_v3_token_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_exchange_recaptcha_v3_token_request.ex @@ -21,15 +21,18 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaEx ## Attributes + * `limitedUse` (*type:* `boolean()`, *default:* `nil`) - Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. * `recaptchaV3Token` (*type:* `String.t`, *default:* `nil`) - Required. The reCAPTCHA token as returned by the [reCAPTCHA v3 JavaScript API](https://developers.google.com/recaptcha/docs/v3). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :limitedUse => boolean() | nil, :recaptchaV3Token => String.t() | nil } + field(:limitedUse) field(:recaptchaV3Token) end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_list_resource_policies_response.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_list_resource_policies_response.ex new file mode 100644 index 0000000000..9cac14653b --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_list_resource_policies_response.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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaListResourcePoliciesResponse do + @moduledoc """ + Response message for the ListResourcePolicies method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If the result list is too large to fit in a single response, then a token is returned. If the string is empty or omitted, then this response is the last page of results. This token can be used in a subsequent call to ListResourcePolicies to find the next group of ResourcePolicy objects. Page tokens are short-lived and should not be persisted. + * `resourcePolicies` (*type:* `list(GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t)`, *default:* `nil`) - The ResourcePolicys retrieved. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :resourcePolicies => + list( + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t() + ) + | nil + } + + field(:nextPageToken) + + field(:resourcePolicies, + as: GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaListResourcePoliciesResponse do + def decode(value, options) do + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaListResourcePoliciesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaListResourcePoliciesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_resource_policy.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_resource_policy.ex new file mode 100644 index 0000000000..721f056797 --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_resource_policy.ex @@ -0,0 +1,63 @@ +# 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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy do + @moduledoc """ + App Check enforcement policy for a specific resource of a Firebase service supported by App Check. Note that this policy will override the Service level enforcement mode configuration. + + ## Attributes + + * `enforcementMode` (*type:* `String.t`, *default:* `nil`) - Required. The App Check enforcement mode for this resource. This will override the EnforcementMode setting on the service. For new resources that you are creating, you should consider setting an override and enable enforcement on the resource immediately, if there are no outdated clients that can use it. + * `etag` (*type:* `String.t`, *default:* `nil`) - This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The relative name of the resource configuration object, in the format: ``` projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID used as the resource ID for the policy. + * `targetResource` (*type:* `String.t`, *default:* `nil`) - Required. Service specific name of the resource object to which this policy applies, in the format: * `//oauth2.googleapis.com/projects/{project}/oauthClients/{oauth_client_id}` (Google Identity for iOS) NOTE that the resource must belong to the service specified in the `name` and be from the same project as this policy, but it may or may not exist at the time of creation of the policy. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this service configuration object was most recently updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enforcementMode => String.t() | nil, + :etag => String.t() | nil, + :name => String.t() | nil, + :targetResource => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:enforcementMode) + field(:etag) + field(:name) + field(:targetResource) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy do + def decode(value, options) do + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_service.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_service.ex index 172b30d44a..a619103987 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_service.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_service.ex @@ -22,18 +22,24 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaSe ## Attributes * `enforcementMode` (*type:* `String.t`, *default:* `nil`) - Required. The App Check enforcement mode for this service. - * `name` (*type:* `String.t`, *default:* `nil`) - Required. The relative resource name of the service configuration object, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) + * `etag` (*type:* `String.t`, *default:* `nil`) - This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The relative resource name of the service configuration object, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) * `identitytoolkit.googleapis.com` (Firebase Authentication with Identity Platform) + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this service configuration object was most recently updated. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :enforcementMode => String.t() | nil, - :name => String.t() | nil + :etag => String.t() | nil, + :name => String.t() | nil, + :updateTime => DateTime.t() | nil } field(:enforcementMode) + field(:etag) field(:name) + field(:updateTime, as: DateTime) end defimpl Poison.Decoder, diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_resource_policy_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_resource_policy_request.ex new file mode 100644 index 0000000000..b62e66a9af --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_resource_policy_request.ex @@ -0,0 +1,61 @@ +# 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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUpdateResourcePolicyRequest do + @moduledoc """ + Request message for the UpdateResourcePolicy method as well as an individual update message for the BatchUpdateResourcePolicies method. + + ## Attributes + + * `resourcePolicy` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t`, *default:* `nil`) - Required. The ResourcePolicy to update. The ResourcePolicy's `name` field is used to identify the ResourcePolicy to be updated, in the format: ``` projects/{project_number}/services/{service_id}/resourcePolicies/{resource_name} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `oauth2.googleapis.com` (Google Identity for iOS) Only the top-level resources are supported for each of the services. The resources must belong to the service specified and `resource_name` should be formatted as: * `oauthClients/{oauth_client_id}` (Google Identity for iOS) + * `updateMask` (*type:* `String.t`, *default:* `nil`) - Required. A comma-separated list of names of fields in the ResourcePolicy to update. Example: `enforcement_mode`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :resourcePolicy => + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy.t() + | nil, + :updateMask => String.t() | nil + } + + field(:resourcePolicy, + as: GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaResourcePolicy + ) + + field(:updateMask) +end + +defimpl Poison.Decoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUpdateResourcePolicyRequest do + def decode(value, options) do + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUpdateResourcePolicyRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUpdateResourcePolicyRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_service_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_service_request.ex index 29e2a1e77b..e604980a9e 100644 --- a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_service_request.ex +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_update_service_request.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaUp ## Attributes - * `service` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaService.t`, *default:* `nil`) - Required. The Service to update. The Service's `name` field is used to identify the Service to be updated, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) + * `service` (*type:* `GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaService.t`, *default:* `nil`) - Required. The Service to update. The Service's `name` field is used to identify the Service to be updated, in the format: ``` projects/{project_number}/services/{service_id} ``` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: * `firebasestorage.googleapis.com` (Cloud Storage for Firebase) * `firebasedatabase.googleapis.com` (Firebase Realtime Database) * `firestore.googleapis.com` (Cloud Firestore) * `identitytoolkit.googleapis.com` (Firebase Authentication with Identity Platform) For Firebase Authentication to work with App Check, you must first upgrade to [Firebase Authentication with Identity Platform](https://firebase.google.com/docs/auth#identity-platform). * `updateMask` (*type:* `String.t`, *default:* `nil`) - Required. A comma-separated list of names of fields in the Service to update. Example: `enforcement_mode`. """ diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_request.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_request.ex new file mode 100644 index 0000000000..3c7341c086 --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_request.ex @@ -0,0 +1,53 @@ +# 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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest do + @moduledoc """ + Request message for the VerifyAppCheckToken method. + + ## Attributes + + * `appCheckToken` (*type:* `String.t`, *default:* `nil`) - Required. The App Check token to verify. App Check tokens exchanged from the SafetyNet provider are not supported; an HTTP 400 error will be returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :appCheckToken => String.t() | nil + } + + field(:appCheckToken) +end + +defimpl Poison.Decoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest do + def decode(value, options) do + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_response.ex b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_response.ex new file mode 100644 index 0000000000..9caf91bc3e --- /dev/null +++ b/clients/firebase_app_check/lib/google_api/firebase_app_check/v1beta/model/google_firebase_appcheck_v1beta_verify_app_check_token_response.ex @@ -0,0 +1,53 @@ +# 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.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse do + @moduledoc """ + Response message for the VerifyAppCheckToken method. + + ## Attributes + + * `alreadyConsumed` (*type:* `boolean()`, *default:* `nil`) - Whether this token was already consumed. If this is the first time this method has seen the given App Check token, this field will be omitted from the response. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response containing this field, regardless whether the token was already consumed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :alreadyConsumed => boolean() | nil + } + + field(:alreadyConsumed) +end + +defimpl Poison.Decoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse do + def decode(value, options) do + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.FirebaseAppCheck.V1beta.Model.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end