diff --git a/clients/recaptcha_enterprise/README.md b/clients/recaptcha_enterprise/README.md index 1ba797cbdb..3949f95dbd 100644 --- a/clients/recaptcha_enterprise/README.md +++ b/clients/recaptcha_enterprise/README.md @@ -2,7 +2,7 @@ reCAPTCHA Enterprise API client library. - +Help protect your website from fraudulent activity, spam, and abuse without creating friction. ## Installation diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/api/projects.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/api/projects.ex index 6d8263bbb4..6ac22ed36c 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/api/projects.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/api/projects.ex @@ -31,7 +31,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". + * `name` (*type:* `String.t`) - Required. The resource name of the Assessment, in the format `projects/{project}/assessments/{assessment}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -110,7 +110,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `parent` (*type:* `String.t`) - Required. The name of the project in which the assessment will be created, in the format "projects/{project}". + * `parent` (*type:* `String.t`) - Required. The name of the project in which the assessment will be created, in the format `projects/{project}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -183,13 +183,482 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ) end + @doc """ + Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA Enterprise actions can be executed. A project may have a maximum of 1000 policies. + + ## Parameters + + * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The name of the project this policy will apply to, in the format `projects/{project}`. + * `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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy{}}` on success + * `{:error, info}` on failure + """ + @spec recaptchaenterprise_projects_firewallpolicies_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def recaptchaenterprise_projects_firewallpolicies_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("/v1/{+parent}/firewallpolicies", %{ + "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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy{} + ] + ) + end + + @doc """ + Deletes the specified firewall policy. + + ## Parameters + + * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the policy to be deleted, in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * `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.RecaptchaEnterprise.V1.Model.GoogleProtobufEmpty{}}` on success + * `{:error, info}` on failure + """ + @spec recaptchaenterprise_projects_firewallpolicies_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.RecaptchaEnterprise.V1.Model.GoogleProtobufEmpty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def recaptchaenterprise_projects_firewallpolicies_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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/{+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.RecaptchaEnterprise.V1.Model.GoogleProtobufEmpty{}] + ) + end + + @doc """ + Returns the specified firewall policy. + + ## Parameters + + * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the requested policy, in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * `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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy{}}` on success + * `{:error, info}` on failure + """ + @spec recaptchaenterprise_projects_firewallpolicies_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def recaptchaenterprise_projects_firewallpolicies_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("/v1/{+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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy{} + ] + ) + end + + @doc """ + Returns the list of all firewall policies that belong to a project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The name of the project to list the policies for, in the format `projects/{project}`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of policies to return. Default is 10. Max limit is 1000. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous. ListFirewallPoliciesRequest, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec recaptchaenterprise_projects_firewallpolicies_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def recaptchaenterprise_projects_firewallpolicies_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/firewallpolicies", %{ + "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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse{} + ] + ) + end + + @doc """ + Updates the specified firewall policy. + + ## Parameters + + * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Identifier. The resource name for the FirewallPolicy in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * `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`) - Optional. The mask to control which fields of the policy get updated. If the mask is not present, all fields will be updated. + * `:body` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy{}}` on success + * `{:error, info}` on failure + """ + @spec recaptchaenterprise_projects_firewallpolicies_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def recaptchaenterprise_projects_firewallpolicies_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("/v1/{+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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy{} + ] + ) + end + + @doc """ + Reorders all firewall policies. + + ## Parameters + + * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The name of the project to list the policies for, in the format `projects/{project}`. + * `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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec recaptchaenterprise_projects_firewallpolicies_reorder( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def recaptchaenterprise_projects_firewallpolicies_reorder( + 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("/v1/{+parent}/firewallpolicies:reorder", %{ + "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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse{} + ] + ) + end + @doc """ Creates a new reCAPTCHA Enterprise key. ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `parent` (*type:* `String.t`) - Required. The name of the project in which the key will be created, in the format "projects/{project}". + * `parent` (*type:* `String.t`) - Required. The name of the project in which the key will be created, in the format `projects/{project}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -264,7 +733,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The name of the key to be deleted, in the format "projects/{project}/keys/{key}". + * `name` (*type:* `String.t`) - Required. The name of the key to be deleted, in the format `projects/{project}/keys/{key}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -336,7 +805,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The name of the requested key, in the format "projects/{project}/keys/{key}". + * `name` (*type:* `String.t`) - Required. The name of the requested key, in the format `projects/{project}/keys/{key}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -404,7 +873,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". + * `name` (*type:* `String.t`) - Required. The name of the requested metrics, in the format `projects/{project}/keys/{key}/metrics`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -481,7 +950,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `parent` (*type:* `String.t`) - Required. The name of the project that contains the keys that will be listed, in the format "projects/{project}". + * `parent` (*type:* `String.t`) - Required. The name of the project that contains the keys that will be listed, in the format `projects/{project}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -557,12 +1026,12 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do end @doc """ - Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project. + Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project. ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The name of the key to be migrated, in the format "projects/{project}/keys/{key}". + * `name` (*type:* `String.t`) - Required. The name of the key to be migrated, in the format `projects/{project}/keys/{key}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -637,7 +1106,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - The resource name for the Key in the format "projects/{project}/keys/{key}". + * `name` (*type:* `String.t`) - Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -709,7 +1178,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `key` (*type:* `String.t`) - Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". + * `key` (*type:* `String.t`) - Required. The public key name linked to the requested secret key in the format `projects/{project}/keys/{key}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -786,7 +1255,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `project` (*type:* `String.t`) - Required. The name of the project to search related account group memberships from. Specify the project name in the following format: "projects/{project}". + * `project` (*type:* `String.t`) - Required. The name of the project to search related account group memberships from. Specify the project name in the following format: `projects/{project}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -865,7 +1334,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Connection.t`) - Connection to server - * `parent` (*type:* `String.t`) - Required. The name of the project to list related account groups from, in the format "projects/{project}". + * `parent` (*type:* `String.t`) - Required. The name of the project to list related account groups from, in the format `projects/{project}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/metadata.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/metadata.ex index e93c57f356..7ed6260fcf 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/metadata.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1 do API client metadata for GoogleApi.RecaptchaEnterprise.V1. """ - @discovery_revision "20221106" + @discovery_revision "20240303" def discovery_revision(), do: @discovery_revision end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_account_defender_assessment.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_account_defender_assessment.ex index 89cdc01f17..b8ea3cca3e 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_account_defender_assessment.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_account_defender_assessment.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `labels` (*type:* `list(String.t)`, *default:* `nil`) - Labels for this request. + * `labels` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Labels for this request. """ use GoogleApi.Gax.ModelBase diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_account_verification_info.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_account_verification_info.ex new file mode 100644 index 0000000000..e8224e9dfe --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_account_verification_info.ex @@ -0,0 +1,71 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo do + @moduledoc """ + Information about account verification, used for identity verification. + + ## Attributes + + * `endpoints` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo.t)`, *default:* `nil`) - Optional. Endpoints that can be used for identity verification. + * `languageCode` (*type:* `String.t`, *default:* `nil`) - Optional. Language code preference for the verification message, set as a IETF BCP 47 language code. + * `latestVerificationResult` (*type:* `String.t`, *default:* `nil`) - Output only. Result of the latest account verification challenge. + * `username` (*type:* `String.t`, *default:* `nil`) - Username of the account that is being verified. Deprecated. Customers should now provide the `account_id` field in `event.user_info`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endpoints => + list( + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo.t() + ) + | nil, + :languageCode => String.t() | nil, + :latestVerificationResult => String.t() | nil, + :username => String.t() | nil + } + + field(:endpoints, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo, + type: :list + ) + + field(:languageCode) + field(:latestVerificationResult) + field(:username) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_android_key_settings.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_android_key_settings.ex index a0284764b1..dcd7101aec 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_android_key_settings.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_android_key_settings.ex @@ -21,19 +21,22 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `allowAllPackageNames` (*type:* `boolean()`, *default:* `nil`) - If set to true, allowed_package_names are not enforced. - * `allowedPackageNames` (*type:* `list(String.t)`, *default:* `nil`) - Android package names of apps allowed to use the key. Example: 'com.companyname.appname' + * `allowAllPackageNames` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, allowed_package_names are not enforced. + * `allowedPackageNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' + * `supportNonGoogleAppStoreDistribution` (*type:* `boolean()`, *default:* `nil`) - Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :allowAllPackageNames => boolean() | nil, - :allowedPackageNames => list(String.t()) | nil + :allowedPackageNames => list(String.t()) | nil, + :supportNonGoogleAppStoreDistribution => boolean() | nil } field(:allowAllPackageNames) field(:allowedPackageNames, type: :list) + field(:supportNonGoogleAppStoreDistribution) end defimpl Poison.Decoder, diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_annotate_assessment_request.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_annotate_assessment_request.ex index 01352ee6be..b1ef328930 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_annotate_assessment_request.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_annotate_assessment_request.ex @@ -21,22 +21,33 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes + * `accountId` (*type:* `String.t`, *default:* `nil`) - Optional. A stable account identifier to apply to the assessment. This is an alternative to setting `account_id` in `CreateAssessment`, for example when a stable account identifier is not yet known in the initial request. * `annotation` (*type:* `String.t`, *default:* `nil`) - Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. - * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. Unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret. - * `reasons` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Optional reasons for the annotation that will be assigned to the Event. + * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. A stable hashed account identifier to apply to the assessment. This is an alternative to setting `hashed_account_id` in `CreateAssessment`, for example when a stable account identifier is not yet known in the initial request. + * `reasons` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Reasons for the annotation that are assigned to the event. + * `transactionEvent` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionEvent.t`, *default:* `nil`) - Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :accountId => String.t() | nil, :annotation => String.t() | nil, :hashedAccountId => String.t() | nil, - :reasons => list(String.t()) | nil + :reasons => list(String.t()) | nil, + :transactionEvent => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionEvent.t() + | nil } + field(:accountId) field(:annotation) field(:hashedAccountId) field(:reasons, type: :list) + + field(:transactionEvent, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionEvent + ) end defimpl Poison.Decoder, diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_apple_developer_id.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_apple_developer_id.ex new file mode 100644 index 0000000000..c1f2dca5eb --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_apple_developer_id.ex @@ -0,0 +1,57 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AppleDeveloperId do + @moduledoc """ + Contains fields that are required to perform Apple-specific integrity checks. + + ## Attributes + + * `keyId` (*type:* `String.t`, *default:* `nil`) - Required. The Apple developer key ID (10-character string). + * `privateKey` (*type:* `String.t`, *default:* `nil`) - Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key. + * `teamId` (*type:* `String.t`, *default:* `nil`) - Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :keyId => String.t() | nil, + :privateKey => String.t() | nil, + :teamId => String.t() | nil + } + + field(:keyId) + field(:privateKey) + field(:teamId) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AppleDeveloperId do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AppleDeveloperId.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AppleDeveloperId do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_assessment.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_assessment.ex index a81f8fb2a1..4138813f5b 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_assessment.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_assessment.ex @@ -17,14 +17,18 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Assessment do @moduledoc """ - A recaptcha assessment resource. + A reCAPTCHA Enterprise assessment resource. ## Attributes - * `accountDefenderAssessment` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment.t`, *default:* `nil`) - Assessment returned by account defender when a hashed_account_id is provided. - * `event` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event.t`, *default:* `nil`) - The event being assessed. - * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name for the Assessment in the format "projects/{project}/assessments/{assessment}". - * `privatePasswordLeakVerification` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification.t`, *default:* `nil`) - The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials. + * `accountDefenderAssessment` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment.t`, *default:* `nil`) - Output only. Assessment returned by account defender when an account identifier is provided. + * `accountVerification` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo.t`, *default:* `nil`) - Optional. Account verification information for identity verification. The assessment event must include a token and site key to use this feature. + * `event` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event.t`, *default:* `nil`) - Optional. The event being assessed. + * `firewallPolicyAssessment` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment.t`, *default:* `nil`) - Output only. Assessment returned when firewall policies belonging to the project are evaluated using the field firewall_policy_evaluation. + * `fraudPreventionAssessment` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment.t`, *default:* `nil`) - Output only. Assessment returned by Fraud Prevention when TransactionData is provided. + * `fraudSignals` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignals.t`, *default:* `nil`) - Output only. Fraud Signals specific to the users involved in a payment transaction. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Identifier. The resource name for the Assessment in the format `projects/{project}/assessments/{assessment}`. + * `privatePasswordLeakVerification` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification.t`, *default:* `nil`) - Optional. The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials. * `riskAnalysis` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1RiskAnalysis.t`, *default:* `nil`) - Output only. The risk analysis result for the event being assessed. * `tokenProperties` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TokenProperties.t`, *default:* `nil`) - Output only. Properties of the provided event token. """ @@ -35,8 +39,20 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV :accountDefenderAssessment => GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment.t() | nil, + :accountVerification => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo.t() + | nil, :event => GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event.t() | nil, + :firewallPolicyAssessment => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment.t() + | nil, + :fraudPreventionAssessment => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment.t() + | nil, + :fraudSignals => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignals.t() + | nil, :name => String.t() | nil, :privatePasswordLeakVerification => GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification.t() @@ -54,7 +70,27 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment ) + field(:accountVerification, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo + ) + field(:event, as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event) + + field(:firewallPolicyAssessment, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment + ) + + field(:fraudPreventionAssessment, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment + ) + + field(:fraudSignals, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignals + ) + field(:name) field(:privatePasswordLeakVerification, diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_endpoint_verification_info.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_endpoint_verification_info.ex new file mode 100644 index 0000000000..3777e2f1b2 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_endpoint_verification_info.ex @@ -0,0 +1,62 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo do + @moduledoc """ + Information about a verification endpoint that can be used for 2FA. + + ## Attributes + + * `emailAddress` (*type:* `String.t`, *default:* `nil`) - Email address for which to trigger a verification request. + * `lastVerificationTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the last successful verification for the endpoint, if any. + * `phoneNumber` (*type:* `String.t`, *default:* `nil`) - Phone number for which to trigger a verification request. Should be given in E.164 format. + * `requestToken` (*type:* `String.t`, *default:* `nil`) - Output only. Token to provide to the client to trigger endpoint verification. It must be used within 15 minutes. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :emailAddress => String.t() | nil, + :lastVerificationTime => DateTime.t() | nil, + :phoneNumber => String.t() | nil, + :requestToken => String.t() | nil + } + + field(:emailAddress) + field(:lastVerificationTime, as: DateTime) + field(:phoneNumber) + field(:requestToken) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_event.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_event.ex index 2b1e0017d2..ae1b9be79a 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_event.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_event.ex @@ -17,35 +17,71 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event do @moduledoc """ - + The event being assessed. ## Attributes * `expectedAction` (*type:* `String.t`, *default:* `nil`) - Optional. The expected action for this type of event. This should be the same action provided at token generation time on client-side platforms already integrated with recaptcha enterprise. - * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret. - * `siteKey` (*type:* `String.t`, *default:* `nil`) - Optional. The site key that was used to invoke reCAPTCHA on your site and generate the token. - * `token` (*type:* `String.t`, *default:* `nil`) - Optional. The user response token provided by the reCAPTCHA client-side integration on your site. + * `express` (*type:* `boolean()`, *default:* `nil`) - Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, `site_key` must reference a SCORE key with WAF feature set to EXPRESS. + * `firewallPolicyEvaluation` (*type:* `boolean()`, *default:* `nil`) - Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the firewall policy will be evaluated and a suggested firewall action will be returned in the response. + * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. Deprecated: use `user_info.account_id` instead. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret. + * `headers` (*type:* `list(String.t)`, *default:* `nil`) - Optional. HTTP header information about the request. + * `ja3` (*type:* `String.t`, *default:* `nil`) - Optional. JA3 fingerprint for SSL clients. + * `requestedUri` (*type:* `String.t`, *default:* `nil`) - Optional. The URI resource the user requested that triggered an assessment. + * `siteKey` (*type:* `String.t`, *default:* `nil`) - Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token. + * `token` (*type:* `String.t`, *default:* `nil`) - Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site. + * `transactionData` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionData.t`, *default:* `nil`) - Optional. Data describing a payment transaction to be assessed. Sending this data enables reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the response. * `userAgent` (*type:* `String.t`, *default:* `nil`) - Optional. The user agent present in the request from the user's device related to this event. + * `userInfo` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserInfo.t`, *default:* `nil`) - Optional. Information about the user that generates this event, when they can be identified. They are often identified through the use of an account for logged-in requests or login/registration requests, or by providing user identifiers for guest actions like checkout. * `userIpAddress` (*type:* `String.t`, *default:* `nil`) - Optional. The IP address in the request from the user's device related to this event. + * `wafTokenAssessment` (*type:* `boolean()`, *default:* `nil`) - Optional. Flag for running WAF token assessment. If enabled, the token must be specified, and have been created by a WAF-enabled key. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :expectedAction => String.t() | nil, + :express => boolean() | nil, + :firewallPolicyEvaluation => boolean() | nil, :hashedAccountId => String.t() | nil, + :headers => list(String.t()) | nil, + :ja3 => String.t() | nil, + :requestedUri => String.t() | nil, :siteKey => String.t() | nil, :token => String.t() | nil, + :transactionData => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionData.t() + | nil, :userAgent => String.t() | nil, - :userIpAddress => String.t() | nil + :userInfo => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserInfo.t() + | nil, + :userIpAddress => String.t() | nil, + :wafTokenAssessment => boolean() | nil } field(:expectedAction) + field(:express) + field(:firewallPolicyEvaluation) field(:hashedAccountId) + field(:headers, type: :list) + field(:ja3) + field(:requestedUri) field(:siteKey) field(:token) + + field(:transactionData, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionData + ) + field(:userAgent) + + field(:userInfo, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserInfo + ) + field(:userIpAddress) + field(:wafTokenAssessment) end defimpl Poison.Decoder, diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action.ex new file mode 100644 index 0000000000..9b5ad87940 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action.ex @@ -0,0 +1,101 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallAction do + @moduledoc """ + An individual action. Each action represents what to do if a policy matches. + + ## Attributes + + * `allow` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction.t`, *default:* `nil`) - The user request did not match any policy and should be allowed access to the requested resource. + * `block` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction.t`, *default:* `nil`) - This action will deny access to a given page. The user will get an HTTP error code. + * `includeRecaptchaScript` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction.t`, *default:* `nil`) - This action will inject reCAPTCHA JavaScript code into the HTML page returned by the site backend. + * `redirect` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction.t`, *default:* `nil`) - This action will redirect the request to a ReCaptcha interstitial to attach a token. + * `setHeader` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction.t`, *default:* `nil`) - This action will set a custom header but allow the request to continue to the customer backend. + * `substitute` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction.t`, *default:* `nil`) - This action will transparently serve a different page to an offending user. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :allow => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction.t() + | nil, + :block => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction.t() + | nil, + :includeRecaptchaScript => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction.t() + | nil, + :redirect => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction.t() + | nil, + :setHeader => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction.t() + | nil, + :substitute => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction.t() + | nil + } + + field(:allow, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction + ) + + field(:block, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction + ) + + field(:includeRecaptchaScript, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction + ) + + field(:redirect, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction + ) + + field(:setHeader, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction + ) + + field(:substitute, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallAction do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_allow_action.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_allow_action.ex new file mode 100644 index 0000000000..e18c22d1a5 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_allow_action.ex @@ -0,0 +1,48 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction do + @moduledoc """ + An allow action continues processing a request unimpeded. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_block_action.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_block_action.ex new file mode 100644 index 0000000000..d9e361ba85 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_block_action.ex @@ -0,0 +1,48 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction do + @moduledoc """ + A block action serves an HTTP error code a prevents the request from hitting the backend. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_include_recaptcha_script_action.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_include_recaptcha_script_action.ex new file mode 100644 index 0000000000..2e00b14481 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_include_recaptcha_script_action.ex @@ -0,0 +1,48 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction do + @moduledoc """ + An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript code into the HTML returned by the site backend. This reCAPTCHA script is tasked with collecting user signals on the requested web page, issuing tokens as a cookie within the site domain, and enabling their utilization in subsequent page requests. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_redirect_action.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_redirect_action.ex new file mode 100644 index 0000000000..6986371667 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_redirect_action.ex @@ -0,0 +1,48 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction do + @moduledoc """ + A redirect action returns a 307 (temporary redirect) response, pointing the user to a ReCaptcha interstitial page to attach a token. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_set_header_action.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_set_header_action.ex new file mode 100644 index 0000000000..3697acd112 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_set_header_action.ex @@ -0,0 +1,56 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction do + @moduledoc """ + A set header action sets a header and forwards the request to the backend. This can be used to trigger custom protection implemented on the backend. + + ## Attributes + + * `key` (*type:* `String.t`, *default:* `nil`) - Optional. The header key to set in the request to the backend server. + * `value` (*type:* `String.t`, *default:* `nil`) - Optional. The header value to set in the request to the backend server. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :key => String.t() | nil, + :value => String.t() | nil + } + + field(:key) + field(:value) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_substitute_action.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_substitute_action.ex new file mode 100644 index 0000000000..5733044f49 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_action_substitute_action.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction do + @moduledoc """ + A substitute action transparently serves a different page than the one requested. + + ## Attributes + + * `path` (*type:* `String.t`, *default:* `nil`) - Optional. The address to redirect to. The target is a relative path in the current host. Example: "/blog/404.html". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :path => String.t() | nil + } + + field(:path) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_policy.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_policy.ex new file mode 100644 index 0000000000..db7666581b --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_policy.ex @@ -0,0 +1,71 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy do + @moduledoc """ + A FirewallPolicy represents a single matching pattern and resulting actions to take. + + ## Attributes + + * `actions` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallAction.t)`, *default:* `nil`) - Optional. The actions that the caller should take regarding user access. There should be at most one terminal action. A terminal action is any action that forces a response, such as `AllowAction`, `BlockAction` or `SubstituteAction`. Zero or more non-terminal actions such as `SetHeader` might be specified. A single policy can contain up to 16 actions. + * `condition` (*type:* `String.t`, *default:* `nil`) - Optional. A CEL (Common Expression Language) conditional expression that specifies if this policy applies to an incoming user request. If this condition evaluates to true and the requested path matched the path pattern, the associated actions should be executed by the caller. The condition string is checked for CEL syntax correctness on creation. For more information, see the [CEL spec](https://github.com/google/cel-spec) and its [language definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). A condition has a max length of 500 characters. + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. A description of what this policy aims to achieve, for convenience purposes. The description can at most include 256 UTF-8 characters. + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name for the FirewallPolicy in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + * `path` (*type:* `String.t`, *default:* `nil`) - Optional. The path for which this policy applies, specified as a glob pattern. For more information on glob, see the [manual page](https://man7.org/linux/man-pages/man7/glob.7.html). A path has a max length of 200 characters. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :actions => + list( + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallAction.t() + ) + | nil, + :condition => String.t() | nil, + :description => String.t() | nil, + :name => String.t() | nil, + :path => String.t() | nil + } + + field(:actions, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallAction, + type: :list + ) + + field(:condition) + field(:description) + field(:name) + field(:path) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_policy_assessment.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_policy_assessment.ex new file mode 100644 index 0000000000..e0eef33f09 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_firewall_policy_assessment.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment do + @moduledoc """ + Policy config assessment. + + ## Attributes + + * `error` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - Output only. If the processing of a policy config fails, an error will be populated and the firewall_policy will be left empty. + * `firewallPolicy` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t`, *default:* `nil`) - Output only. The policy that matched the request. If more than one policy may match, this is the first match. If no policy matches the incoming request, the policy field will be left empty. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => GoogleApi.RecaptchaEnterprise.V1.Model.GoogleRpcStatus.t() | nil, + :firewallPolicy => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t() + | nil + } + + field(:error, as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleRpcStatus) + + field(:firewallPolicy, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment.ex new file mode 100644 index 0000000000..82b50e72ef --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment.ex @@ -0,0 +1,80 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment do + @moduledoc """ + Assessment for Fraud Prevention. + + ## Attributes + + * `behavioralTrustVerdict` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict.t`, *default:* `nil`) - Output only. Assessment of this transaction for behavioral trust. + * `cardTestingVerdict` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict.t`, *default:* `nil`) - Output only. Assessment of this transaction for risk of being part of a card testing attack. + * `stolenInstrumentVerdict` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict.t`, *default:* `nil`) - Output only. Assessment of this transaction for risk of a stolen instrument. + * `transactionRisk` (*type:* `number()`, *default:* `nil`) - Output only. Probability of this transaction being fraudulent. Summarizes the combined risk of attack vectors below. Values are from 0.0 (lowest) to 1.0 (highest). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :behavioralTrustVerdict => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict.t() + | nil, + :cardTestingVerdict => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict.t() + | nil, + :stolenInstrumentVerdict => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict.t() + | nil, + :transactionRisk => number() | nil + } + + field(:behavioralTrustVerdict, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict + ) + + field(:cardTestingVerdict, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict + ) + + field(:stolenInstrumentVerdict, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict + ) + + field(:transactionRisk) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_behavioral_trust_verdict.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_behavioral_trust_verdict.ex new file mode 100644 index 0000000000..f6dd682105 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_behavioral_trust_verdict.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict do + @moduledoc """ + Information about behavioral trust of the transaction. + + ## Attributes + + * `trust` (*type:* `number()`, *default:* `nil`) - Output only. Probability of this transaction attempt being executed in a behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 (highest). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :trust => number() | nil + } + + field(:trust) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_card_testing_verdict.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_card_testing_verdict.ex new file mode 100644 index 0000000000..ad192615e9 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_card_testing_verdict.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict do + @moduledoc """ + Information about card testing fraud, where an adversary is testing fraudulently obtained cards or brute forcing their details. + + ## Attributes + + * `risk` (*type:* `number()`, *default:* `nil`) - Output only. Probability of this transaction attempt being part of a card testing attack. Values are from 0.0 (lowest) to 1.0 (highest). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :risk => number() | nil + } + + field(:risk) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_stolen_instrument_verdict.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_stolen_instrument_verdict.ex new file mode 100644 index 0000000000..c5bd9ca069 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_prevention_assessment_stolen_instrument_verdict.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict do + @moduledoc """ + Information about stolen instrument fraud, where the user is not the legitimate owner of the instrument being used for the purchase. + + ## Attributes + + * `risk` (*type:* `number()`, *default:* `nil`) - Output only. Probability of this transaction being executed with a stolen instrument. Values are from 0.0 (lowest) to 1.0 (highest). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :risk => number() | nil + } + + field(:risk) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals.ex new file mode 100644 index 0000000000..a82265cf89 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignals do + @moduledoc """ + Fraud signals describing users and cards involved in the transaction. + + ## Attributes + + * `cardSignals` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals.t`, *default:* `nil`) - Output only. Signals describing the payment card or cards used in this transaction. + * `userSignals` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals.t`, *default:* `nil`) - Output only. Signals describing the end user in this transaction. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cardSignals => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals.t() + | nil, + :userSignals => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals.t() + | nil + } + + field(:cardSignals, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals + ) + + field(:userSignals, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignals do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignals.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignals do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals_card_signals.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals_card_signals.ex new file mode 100644 index 0000000000..200b054514 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals_card_signals.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals do + @moduledoc """ + Signals describing the payment card used in this transaction. + + ## Attributes + + * `cardLabels` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The labels for the payment card in this transaction. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cardLabels => list(String.t()) | nil + } + + field(:cardLabels, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals_user_signals.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals_user_signals.ex new file mode 100644 index 0000000000..ed00fab76d --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_fraud_signals_user_signals.ex @@ -0,0 +1,56 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals do + @moduledoc """ + Signals describing the user involved in this transaction. + + ## Attributes + + * `activeDaysLowerBound` (*type:* `integer()`, *default:* `nil`) - Output only. This user (based on email, phone, and other identifiers) has been seen on the internet for at least this number of days. + * `syntheticRisk` (*type:* `number()`, *default:* `nil`) - Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic components in their identity, such as a randomly generated email address, temporary phone number, or fake shipping address. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :activeDaysLowerBound => integer() | nil, + :syntheticRisk => number() | nil + } + + field(:activeDaysLowerBound) + field(:syntheticRisk) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_ios_key_settings.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_ios_key_settings.ex index f2cc1a09d1..30a4267e33 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_ios_key_settings.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_ios_key_settings.ex @@ -21,19 +21,27 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `allowAllBundleIds` (*type:* `boolean()`, *default:* `nil`) - If set to true, allowed_bundle_ids are not enforced. - * `allowedBundleIds` (*type:* `list(String.t)`, *default:* `nil`) - iOS bundle ids of apps allowed to use the key. Example: 'com.companyname.productname.appname' + * `allowAllBundleIds` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, allowed_bundle_ids are not enforced. + * `allowedBundleIds` (*type:* `list(String.t)`, *default:* `nil`) - Optional. iOS bundle ids of apps allowed to use the key. Example: 'com.companyname.productname.appname' + * `appleDeveloperId` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AppleDeveloperId.t`, *default:* `nil`) - Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA Enterprise to get a better assessment of the integrity of your app. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :allowAllBundleIds => boolean() | nil, - :allowedBundleIds => list(String.t()) | nil + :allowedBundleIds => list(String.t()) | nil, + :appleDeveloperId => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AppleDeveloperId.t() + | nil } field(:allowAllBundleIds) field(:allowedBundleIds, type: :list) + + field(:appleDeveloperId, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AppleDeveloperId + ) end defimpl Poison.Decoder, diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_key.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_key.ex index 071e90f765..9ce0cea4f8 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_key.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_key.ex @@ -22,13 +22,13 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes * `androidSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AndroidKeySettings.t`, *default:* `nil`) - Settings for keys that can be used by Android apps. - * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp corresponding to the creation of this Key. - * `displayName` (*type:* `String.t`, *default:* `nil`) - Human-readable display name of this key. Modifiable by user. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp corresponding to the creation of this key. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Human-readable display name of this key. Modifiable by user. * `iosSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1IOSKeySettings.t`, *default:* `nil`) - Settings for keys that can be used by iOS apps. - * `labels` (*type:* `map()`, *default:* `nil`) - See Creating and managing labels. - * `name` (*type:* `String.t`, *default:* `nil`) - The resource name for the Key in the format "projects/{project}/keys/{key}". - * `testingOptions` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TestingOptions.t`, *default:* `nil`) - Options for user acceptance testing. - * `wafSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WafSettings.t`, *default:* `nil`) - Settings for WAF + * `labels` (*type:* `map()`, *default:* `nil`) - Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha-enterprise/docs/labels). + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`. + * `testingOptions` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TestingOptions.t`, *default:* `nil`) - Optional. Options for user acceptance testing. + * `wafSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WafSettings.t`, *default:* `nil`) - Optional. Settings for WAF * `webSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WebKeySettings.t`, *default:* `nil`) - Settings for keys that can be used by websites. """ diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_list_firewall_policies_response.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_list_firewall_policies_response.ex new file mode 100644 index 0000000000..6b4a116e01 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_list_firewall_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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse do + @moduledoc """ + Response to request to list firewall policies belonging to a key. + + ## Attributes + + * `firewallPolicies` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t)`, *default:* `nil`) - Policy details. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Token to retrieve the next page of results. It is set to empty if no policies remain in results. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :firewallPolicies => + list( + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy.t() + ) + | nil, + :nextPageToken => String.t() | nil + } + + field(:firewallPolicies, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1FirewallPolicy, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_metrics.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_metrics.ex index f5e4106a72..dafd14c443 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_metrics.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_metrics.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes * `challengeMetrics` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ChallengeMetrics.t)`, *default:* `nil`) - Metrics will be continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have challenge-based data. - * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the metrics, in the format "projects/{project}/keys/{key}/metrics". + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Identifier. The name of the metrics, in the format `projects/{project}/keys/{key}/metrics`. * `scoreMetrics` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ScoreMetrics.t)`, *default:* `nil`) - Metrics will be continuous and in order by dates, and in the granularity of day. All Key types should have score-based data. * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Inclusive start time aligned to a day (UTC). """ diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_migrate_key_request.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_migrate_key_request.ex index ef9fc4f216..f8d48b42d9 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_migrate_key_request.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_migrate_key_request.ex @@ -21,11 +21,16 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes + * `skipBillingCheck` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, skips the billing check. A reCAPTCHA Enterprise key or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha-enterprise/docs/billing-information. """ use GoogleApi.Gax.ModelBase - @type t :: %__MODULE__{} + @type t :: %__MODULE__{ + :skipBillingCheck => boolean() | nil + } + + field(:skipBillingCheck) end defimpl Poison.Decoder, diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_private_password_leak_verification.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_private_password_leak_verification.ex index 3ded2d0c00..a9c866b7fc 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_private_password_leak_verification.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_private_password_leak_verification.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV * `encryptedLeakMatchPrefixes` (*type:* `list(String.t)`, *default:* `nil`) - Output only. List of prefixes of the encrypted potential password leaks that matched the given parameters. They must be compared with the client-side decryption prefix of `reencrypted_user_credentials_hash` * `encryptedUserCredentialsHash` (*type:* `String.t`, *default:* `nil`) - Optional. Encrypted Scrypt hash of the canonicalized username+password. It is re-encrypted by the server and returned through `reencrypted_user_credentials_hash`. - * `lookupHashPrefix` (*type:* `String.t`, *default:* `nil`) - Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It is used to look up password leaks associated with that hash prefix. + * `lookupHashPrefix` (*type:* `String.t`, *default:* `nil`) - Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It is used to look up password leaks associated with that hash prefix. * `reencryptedUserCredentialsHash` (*type:* `String.t`, *default:* `nil`) - Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash` field. It is used to match potential password leaks within `encrypted_leak_match_prefixes`. """ diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group.ex index b5fc3340a7..8a712fdae9 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name for the related account group in the format `projects/{project}/relatedaccountgroups/{related_account_group}`. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. Identifier. The resource name for the related account group in the format `projects/{project}/relatedaccountgroups/{related_account_group}`. """ use GoogleApi.Gax.ModelBase diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group_membership.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group_membership.ex index 1c7a5ba408..d54e448700 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group_membership.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_related_account_group_membership.ex @@ -21,17 +21,20 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - The unique stable hashed user identifier of the member. The identifier corresponds to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. - * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name for this membership in the format `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. + * `accountId` (*type:* `String.t`, *default:* `nil`) - The unique stable account identifier of the member. The identifier corresponds to an `account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Deprecated: use `account_id` instead. The unique stable hashed account identifier of the member. The identifier corresponds to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. Identifier. The resource name for this membership in the format `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :accountId => String.t() | nil, :hashedAccountId => String.t() | nil, :name => String.t() | nil } + field(:accountId) field(:hashedAccountId) field(:name) end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_reorder_firewall_policies_request.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_reorder_firewall_policies_request.ex new file mode 100644 index 0000000000..b93aea1120 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_reorder_firewall_policies_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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest do + @moduledoc """ + The reorder firewall policies request message. + + ## Attributes + + * `names` (*type:* `list(String.t)`, *default:* `nil`) - Required. A list containing all policy names, in the new order. Each name is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :names => list(String.t()) | nil + } + + field(:names, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_reorder_firewall_policies_response.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_reorder_firewall_policies_response.ex new file mode 100644 index 0000000000..6a099d3b4c --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_reorder_firewall_policies_response.ex @@ -0,0 +1,48 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse do + @moduledoc """ + The reorder firewall policies response message. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_risk_analysis.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_risk_analysis.ex index b4c5ec6f14..a0c244bb16 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_risk_analysis.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_risk_analysis.ex @@ -21,17 +21,20 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `reasons` (*type:* `list(String.t)`, *default:* `nil`) - Reasons contributing to the risk analysis verdict. - * `score` (*type:* `number()`, *default:* `nil`) - Legitimate event score from 0.0 to 1.0. (1.0 means very likely legitimate traffic while 0.0 means very likely non-legitimate traffic). + * `extendedVerdictReasons` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Extended verdict reasons to be used for experimentation only. The set of possible reasons is subject to change. + * `reasons` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Reasons contributing to the risk analysis verdict. + * `score` (*type:* `number()`, *default:* `nil`) - Output only. Legitimate event score from 0.0 to 1.0. (1.0 means very likely legitimate traffic while 0.0 means very likely non-legitimate traffic). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :extendedVerdictReasons => list(String.t()) | nil, :reasons => list(String.t()) | nil, :score => number() | nil } + field(:extendedVerdictReasons, type: :list) field(:reasons, type: :list) field(:score) end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_search_related_account_group_memberships_request.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_search_related_account_group_memberships_request.ex index 78d1f876cc..4cb61d697f 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_search_related_account_group_memberships_request.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_search_related_account_group_memberships_request.ex @@ -21,7 +21,8 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. The unique stable hashed user identifier we should search connections to. The identifier should correspond to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. + * `accountId` (*type:* `String.t`, *default:* `nil`) - Optional. The unique stable account identifier used to search connections. The identifier should correspond to an `account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id or account_id must be set, but not both. + * `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. Deprecated: use `account_id` instead. The unique stable hashed account identifier used to search connections. The identifier should correspond to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id or account_id must be set, but not both. * `pageSize` (*type:* `integer()`, *default:* `nil`) - Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000. * `pageToken` (*type:* `String.t`, *default:* `nil`) - Optional. A page token, received from a previous `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchRelatedAccountGroupMemberships` must match the call that provided the page token. """ @@ -29,11 +30,13 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :accountId => String.t() | nil, :hashedAccountId => String.t() | nil, :pageSize => integer() | nil, :pageToken => String.t() | nil } + field(:accountId) field(:hashedAccountId) field(:pageSize) field(:pageToken) diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_testing_options.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_testing_options.ex index b6978a00b0..8a22b1f6b0 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_testing_options.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_testing_options.ex @@ -21,8 +21,8 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `testingChallenge` (*type:* `String.t`, *default:* `nil`) - For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE. - * `testingScore` (*type:* `number()`, *default:* `nil`) - All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive. + * `testingChallenge` (*type:* `String.t`, *default:* `nil`) - Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE. + * `testingScore` (*type:* `number()`, *default:* `nil`) - Optional. All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive. """ use GoogleApi.Gax.ModelBase diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_token_properties.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_token_properties.ex index b915951b75..a9d81acc50 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_token_properties.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_token_properties.ex @@ -17,17 +17,17 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TokenProperties do @moduledoc """ - + Properties of the provided event token. ## Attributes - * `action` (*type:* `String.t`, *default:* `nil`) - Action name provided at token generation. - * `androidPackageName` (*type:* `String.t`, *default:* `nil`) - The name of the Android package with which the token was generated (Android keys only). - * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp corresponding to the generation of the token. - * `hostname` (*type:* `String.t`, *default:* `nil`) - The hostname of the page on which the token was generated (Web keys only). - * `invalidReason` (*type:* `String.t`, *default:* `nil`) - Reason associated with the response when valid = false. - * `iosBundleId` (*type:* `String.t`, *default:* `nil`) - The ID of the iOS bundle with which the token was generated (iOS keys only). - * `valid` (*type:* `boolean()`, *default:* `nil`) - Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment). + * `action` (*type:* `String.t`, *default:* `nil`) - Output only. Action name provided at token generation. + * `androidPackageName` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the Android package with which the token was generated (Android keys only). + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp corresponding to the generation of the token. + * `hostname` (*type:* `String.t`, *default:* `nil`) - Output only. The hostname of the page on which the token was generated (Web keys only). + * `invalidReason` (*type:* `String.t`, *default:* `nil`) - Output only. Reason associated with the response when valid = false. + * `iosBundleId` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the iOS bundle with which the token was generated (iOS keys only). + * `valid` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment). """ use GoogleApi.Gax.ModelBase diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data.ex new file mode 100644 index 0000000000..ffcc839769 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data.ex @@ -0,0 +1,131 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionData do + @moduledoc """ + Transaction data associated with a payment protected by reCAPTCHA Enterprise. + + ## Attributes + + * `billingAddress` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress.t`, *default:* `nil`) - Optional. Address associated with the payment method when applicable. + * `cardBin` (*type:* `String.t`, *default:* `nil`) - Optional. The Bank Identification Number - generally the first 6 or 8 digits of the card. + * `cardLastFour` (*type:* `String.t`, *default:* `nil`) - Optional. The last four digits of the card. + * `currencyCode` (*type:* `String.t`, *default:* `nil`) - Optional. The currency code in ISO-4217 format. + * `gatewayInfo` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo.t`, *default:* `nil`) - Optional. Information about the payment gateway's response to the transaction. + * `items` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataItem.t)`, *default:* `nil`) - Optional. Items purchased in this transaction. + * `merchants` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser.t)`, *default:* `nil`) - Optional. Information about the user or users fulfilling the transaction. + * `paymentMethod` (*type:* `String.t`, *default:* `nil`) - Optional. The payment method for the transaction. The allowed values are: * credit-card * debit-card * gift-card * processor-{name} (If a third-party is used, for example, processor-paypal) * custom-{name} (If an alternative method is used, for example, custom-crypto) + * `shippingAddress` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress.t`, *default:* `nil`) - Optional. Destination address if this transaction involves shipping a physical item. + * `shippingValue` (*type:* `float()`, *default:* `nil`) - Optional. The value of shipping in the specified currency. 0 for free or no shipping. + * `transactionId` (*type:* `String.t`, *default:* `nil`) - Unique identifier for the transaction. This custom identifier can be used to reference this transaction in the future, for example, labeling a refund or chargeback event. Two attempts at the same transaction should use the same transaction id. + * `user` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser.t`, *default:* `nil`) - Optional. Information about the user paying/initiating the transaction. + * `value` (*type:* `float()`, *default:* `nil`) - Optional. The decimal value of the transaction in the specified currency. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :billingAddress => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress.t() + | nil, + :cardBin => String.t() | nil, + :cardLastFour => String.t() | nil, + :currencyCode => String.t() | nil, + :gatewayInfo => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo.t() + | nil, + :items => + list( + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataItem.t() + ) + | nil, + :merchants => + list( + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser.t() + ) + | nil, + :paymentMethod => String.t() | nil, + :shippingAddress => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress.t() + | nil, + :shippingValue => float() | nil, + :transactionId => String.t() | nil, + :user => + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser.t() + | nil, + :value => float() | nil + } + + field(:billingAddress, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress + ) + + field(:cardBin) + field(:cardLastFour) + field(:currencyCode) + + field(:gatewayInfo, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo + ) + + field(:items, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataItem, + type: :list + ) + + field(:merchants, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser, + type: :list + ) + + field(:paymentMethod) + + field(:shippingAddress, + as: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress + ) + + field(:shippingValue) + field(:transactionId) + + field(:user, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser + ) + + field(:value) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionData do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionData.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_address.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_address.ex new file mode 100644 index 0000000000..a89b4f1963 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_address.ex @@ -0,0 +1,68 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress do + @moduledoc """ + Structured address format for billing and shipping addresses. + + ## Attributes + + * `address` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The first lines of the address. The first line generally contains the street name and number, and further lines may include information such as an apartment number. + * `administrativeArea` (*type:* `String.t`, *default:* `nil`) - Optional. The state, province, or otherwise administrative area of the address. + * `locality` (*type:* `String.t`, *default:* `nil`) - Optional. The town/city of the address. + * `postalCode` (*type:* `String.t`, *default:* `nil`) - Optional. The postal or ZIP code of the address. + * `recipient` (*type:* `String.t`, *default:* `nil`) - Optional. The recipient name, potentially including information such as "care of". + * `regionCode` (*type:* `String.t`, *default:* `nil`) - Optional. The CLDR country/region of the address. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :address => list(String.t()) | nil, + :administrativeArea => String.t() | nil, + :locality => String.t() | nil, + :postalCode => String.t() | nil, + :recipient => String.t() | nil, + :regionCode => String.t() | nil + } + + field(:address, type: :list) + field(:administrativeArea) + field(:locality) + field(:postalCode) + field(:recipient) + field(:regionCode) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataAddress do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_gateway_info.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_gateway_info.ex new file mode 100644 index 0000000000..d616c7c479 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_gateway_info.ex @@ -0,0 +1,62 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo do + @moduledoc """ + Details about the transaction from the gateway. + + ## Attributes + + * `avsResponseCode` (*type:* `String.t`, *default:* `nil`) - Optional. AVS response code from the gateway (available only when reCAPTCHA Enterprise is called after authorization). + * `cvvResponseCode` (*type:* `String.t`, *default:* `nil`) - Optional. CVV response code from the gateway (available only when reCAPTCHA Enterprise is called after authorization). + * `gatewayResponseCode` (*type:* `String.t`, *default:* `nil`) - Optional. Gateway response code describing the state of the transaction. + * `name` (*type:* `String.t`, *default:* `nil`) - Optional. Name of the gateway service (for example, stripe, square, paypal). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :avsResponseCode => String.t() | nil, + :cvvResponseCode => String.t() | nil, + :gatewayResponseCode => String.t() | nil, + :name => String.t() | nil + } + + field(:avsResponseCode) + field(:cvvResponseCode) + field(:gatewayResponseCode) + field(:name) +end + +defimpl Poison.Decoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_item.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_item.ex new file mode 100644 index 0000000000..5191319e9f --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_item.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataItem do + @moduledoc """ + Line items being purchased in this transaction. + + ## Attributes + + * `merchantAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. When a merchant is specified, its corresponding account_id. Necessary to populate marketplace-style transactions. + * `name` (*type:* `String.t`, *default:* `nil`) - Optional. The full name of the item. + * `quantity` (*type:* `String.t`, *default:* `nil`) - Optional. The quantity of this item that is being purchased. + * `value` (*type:* `float()`, *default:* `nil`) - Optional. The value per item that the user is paying, in the transaction currency, after discounts. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :merchantAccountId => String.t() | nil, + :name => String.t() | nil, + :quantity => String.t() | nil, + :value => float() | nil + } + + field(:merchantAccountId) + field(:name) + field(:quantity) + field(:value) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataItem do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataItem.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataItem do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_user.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_user.ex new file mode 100644 index 0000000000..ef2f845902 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_data_user.ex @@ -0,0 +1,66 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser do + @moduledoc """ + Details about a user's account involved in the transaction. + + ## Attributes + + * `accountId` (*type:* `String.t`, *default:* `nil`) - Optional. Unique account identifier for this user. If using account defender, this should match the hashed_account_id field. Otherwise, a unique and persistent identifier for this account. + * `creationMs` (*type:* `String.t`, *default:* `nil`) - Optional. The epoch milliseconds of the user's account creation. + * `email` (*type:* `String.t`, *default:* `nil`) - Optional. The email address of the user. + * `emailVerified` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the email has been verified to be accessible by the user (OTP or similar). + * `phoneNumber` (*type:* `String.t`, *default:* `nil`) - Optional. The phone number of the user, with country code. + * `phoneVerified` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the phone number has been verified to be accessible by the user (OTP or similar). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accountId => String.t() | nil, + :creationMs => String.t() | nil, + :email => String.t() | nil, + :emailVerified => boolean() | nil, + :phoneNumber => String.t() | nil, + :phoneVerified => boolean() | nil + } + + field(:accountId) + field(:creationMs) + field(:email) + field(:emailVerified) + field(:phoneNumber) + field(:phoneVerified) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionDataUser do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_event.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_event.ex new file mode 100644 index 0000000000..965c0fa864 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_transaction_event.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionEvent do + @moduledoc """ + Describes an event in the lifecycle of a payment transaction. + + ## Attributes + + * `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Timestamp when this transaction event occurred; otherwise assumed to be the time of the API call. + * `eventType` (*type:* `String.t`, *default:* `nil`) - Optional. The type of this transaction event. + * `reason` (*type:* `String.t`, *default:* `nil`) - Optional. The reason or standardized code that corresponds with this transaction event, if one exists. For example, a CHARGEBACK event with code 6005. + * `value` (*type:* `float()`, *default:* `nil`) - Optional. The value that corresponds with this transaction event, if one exists. For example, a refund event where $5.00 was refunded. Currency is obtained from the original transaction data. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :eventTime => DateTime.t() | nil, + :eventType => String.t() | nil, + :reason => String.t() | nil, + :value => float() | nil + } + + field(:eventTime, as: DateTime) + field(:eventType) + field(:reason) + field(:value) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionEvent do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionEvent.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TransactionEvent do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_user_id.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_user_id.ex new file mode 100644 index 0000000000..f61f525a58 --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_user_id.ex @@ -0,0 +1,57 @@ +# 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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserId do + @moduledoc """ + An identifier associated with a user. + + ## Attributes + + * `email` (*type:* `String.t`, *default:* `nil`) - Optional. An email address. + * `phoneNumber` (*type:* `String.t`, *default:* `nil`) - Optional. A phone number. Should use the E.164 format. + * `username` (*type:* `String.t`, *default:* `nil`) - Optional. A unique username, if different from all the other identifiers and `account_id` that are provided. Can be a unique login handle or display name for a user. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :email => String.t() | nil, + :phoneNumber => String.t() | nil, + :username => String.t() | nil + } + + field(:email) + field(:phoneNumber) + field(:username) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserId do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserId.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserId do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_user_info.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_user_info.ex new file mode 100644 index 0000000000..1a79cbed8b --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_user_info.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.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserInfo do + @moduledoc """ + User information associated with a request protected by reCAPTCHA Enterprise. + + ## Attributes + + * `accountId` (*type:* `String.t`, *default:* `nil`) - Optional. For logged-in requests or login/registration requests, the unique account identifier associated with this user. You can use the username if it is stable (meaning it is the same for every request associated with the same user), or any stable user ID of your choice. Leave blank for non logged-in actions or guest checkout. + * `createAccountTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. Creation time for this account associated with this user. Leave blank for non logged-in actions, guest checkout, or when there is no account associated with the current user. + * `userIds` (*type:* `list(GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserId.t)`, *default:* `nil`) - Optional. Identifiers associated with this user or request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accountId => String.t() | nil, + :createAccountTime => DateTime.t() | nil, + :userIds => + list( + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserId.t() + ) + | nil + } + + field(:accountId) + field(:createAccountTime, as: DateTime) + + field(:userIds, + as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserId, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserInfo do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1UserInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_web_key_settings.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_web_key_settings.ex index 9cc1c9a025..85e8bc6d18 100644 --- a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_web_key_settings.ex +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_web_key_settings.ex @@ -21,10 +21,10 @@ defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV ## Attributes - * `allowAllDomains` (*type:* `boolean()`, *default:* `nil`) - If set to true, it means allowed_domains will not be enforced. - * `allowAmpTraffic` (*type:* `boolean()`, *default:* `nil`) - If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type. - * `allowedDomains` (*type:* `list(String.t)`, *default:* `nil`) - Domains or subdomains of websites allowed to use the key. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' - * `challengeSecurityPreference` (*type:* `String.t`, *default:* `nil`) - Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE. + * `allowAllDomains` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, it means allowed_domains will not be enforced. + * `allowAmpTraffic` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type. + * `allowedDomains` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Domains or subdomains of websites allowed to use the key. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' + * `challengeSecurityPreference` (*type:* `String.t`, *default:* `nil`) - Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE. * `integrationType` (*type:* `String.t`, *default:* `nil`) - Required. Describes how this key is integrated with the website. """ diff --git a/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_rpc_status.ex b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_rpc_status.ex new file mode 100644 index 0000000000..2897c4334e --- /dev/null +++ b/clients/recaptcha_enterprise/lib/google_api/recaptcha_enterprise/v1/model/google_rpc_status.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleRpcStatus do + @moduledoc """ + The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + + ## Attributes + + * `code` (*type:* `integer()`, *default:* `nil`) - The status code, which should be an enum value of google.rpc.Code. + * `details` (*type:* `list(map())`, *default:* `nil`) - A list of messages that carry the error details. There is a common set of message types for APIs to use. + * `message` (*type:* `String.t`, *default:* `nil`) - A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => integer() | nil, + :details => list(map()) | nil, + :message => String.t() | nil + } + + field(:code) + field(:details, type: :list) + field(:message) +end + +defimpl Poison.Decoder, for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleRpcStatus do + def decode(value, options) do + GoogleApi.RecaptchaEnterprise.V1.Model.GoogleRpcStatus.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleRpcStatus do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/recaptcha_enterprise/mix.exs b/clients/recaptcha_enterprise/mix.exs index 2b2029bbc0..e046873be4 100644 --- a/clients/recaptcha_enterprise/mix.exs +++ b/clients/recaptcha_enterprise/mix.exs @@ -48,7 +48,7 @@ defmodule GoogleApi.RecaptchaEnterprise.Mixfile do defp description() do """ - reCAPTCHA Enterprise API client library. + reCAPTCHA Enterprise API client library. Help protect your website from fraudulent activity, spam, and abuse without creating friction. """ end