From 6d72b0b1836b4799bcef2a9faf79ebb396881aa0 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:16:29 -0700 Subject: [PATCH] feat: Automated regeneration of Checks client (#12436) Auto-created at 2024-10-30 13:14:22 +0000 using the toys pull request generator. --- clients/checks/README.md | 2 +- .../google_api/checks/v1alpha/api/aisafety.ex | 93 +++++++++++++++++++ .../lib/google_api/checks/v1alpha/metadata.ex | 2 +- ...safety_v1alpha_classify_content_request.ex | 80 ++++++++++++++++ ...1alpha_classify_content_request_context.ex | 51 ++++++++++ ..._classify_content_request_input_content.ex | 54 +++++++++++ ..._classify_content_request_policy_config.ex | 56 +++++++++++ ...afety_v1alpha_classify_content_response.ex | 59 ++++++++++++ ...classify_content_response_policy_result.ex | 59 ++++++++++++ ...ogle_checks_aisafety_v1alpha_text_input.ex | 49 ++++++++++ clients/checks/mix.exs | 2 +- 11 files changed, 504 insertions(+), 3 deletions(-) create mode 100644 clients/checks/lib/google_api/checks/v1alpha/api/aisafety.ex create mode 100644 clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request.ex create mode 100644 clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_context.ex create mode 100644 clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_input_content.ex create mode 100644 clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_policy_config.ex create mode 100644 clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response.ex create mode 100644 clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response_policy_result.ex create mode 100644 clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_text_input.ex diff --git a/clients/checks/README.md b/clients/checks/README.md index a559397738..a600cf83cb 100644 --- a/clients/checks/README.md +++ b/clients/checks/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_checks, "~> 0.4"}] + [{:google_api_checks, "~> 0.5"}] end ``` diff --git a/clients/checks/lib/google_api/checks/v1alpha/api/aisafety.ex b/clients/checks/lib/google_api/checks/v1alpha/api/aisafety.ex new file mode 100644 index 0000000000..33acd8263f --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/api/aisafety.ex @@ -0,0 +1,93 @@ +# 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.Checks.V1alpha.Api.Aisafety do + @moduledoc """ + API calls for all endpoints tagged `Aisafety`. + """ + + alias GoogleApi.Checks.V1alpha.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Analyze a piece of content with the provided set of policies. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Checks.V1alpha.Connection.t`) - Connection to server + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponse{}}` on success + * `{:error, info}` on failure + """ + @spec checks_aisafety_classify_content(Tesla.Env.client(), keyword(), keyword()) :: + {:ok, + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def checks_aisafety_classify_content(connection, optional_params \\ [], opts \\ []) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1alpha/aisafety:classifyContent", %{}) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponse{} + ] + ) + end +end diff --git a/clients/checks/lib/google_api/checks/v1alpha/metadata.ex b/clients/checks/lib/google_api/checks/v1alpha/metadata.ex index 18265a5d96..bd36132a45 100644 --- a/clients/checks/lib/google_api/checks/v1alpha/metadata.ex +++ b/clients/checks/lib/google_api/checks/v1alpha/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Checks.V1alpha do API client metadata for GoogleApi.Checks.V1alpha. """ - @discovery_revision "20240904" + @discovery_revision "20241029" def discovery_revision(), do: @discovery_revision end diff --git a/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request.ex b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request.ex new file mode 100644 index 0000000000..91b40b20ee --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request.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.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequest do + @moduledoc """ + Request proto for ClassifyContent RPC. + + ## Attributes + + * `classifierVersion` (*type:* `String.t`, *default:* `nil`) - Optional. Version of the classifier to use. If not specified, the latest version will be used. + * `context` (*type:* `GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestContext.t`, *default:* `nil`) - Optional. Context about the input that will be used to help on the classification. + * `input` (*type:* `GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent.t`, *default:* `nil`) - Required. Content to be classified. + * `policies` (*type:* `list(GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig.t)`, *default:* `nil`) - Required. List of policies to classify against. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :classifierVersion => String.t() | nil, + :context => + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestContext.t() + | nil, + :input => + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent.t() + | nil, + :policies => + list( + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig.t() + ) + | nil + } + + field(:classifierVersion) + + field(:context, + as: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestContext + ) + + field(:input, + as: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent + ) + + field(:policies, + as: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequest do + def decode(value, options) do + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_context.ex b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_context.ex new file mode 100644 index 0000000000..277243b6d1 --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_context.ex @@ -0,0 +1,51 @@ +# 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.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestContext do + @moduledoc """ + Context about the input that will be used to help on the classification. + + ## Attributes + + * `prompt` (*type:* `String.t`, *default:* `nil`) - Optional. Prompt that generated the model response. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :prompt => String.t() | nil + } + + field(:prompt) +end + +defimpl Poison.Decoder, + for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestContext do + def decode(value, options) do + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestContext.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestContext do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_input_content.ex b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_input_content.ex new file mode 100644 index 0000000000..0a8720b85a --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_input_content.ex @@ -0,0 +1,54 @@ +# 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.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent do + @moduledoc """ + Content to be classified. + + ## Attributes + + * `textInput` (*type:* `GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaTextInput.t`, *default:* `nil`) - Content in text format. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :textInput => + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaTextInput.t() | nil + } + + field(:textInput, as: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaTextInput) +end + +defimpl Poison.Decoder, + for: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent do + def decode(value, options) do + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_policy_config.ex b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_policy_config.ex new file mode 100644 index 0000000000..564bf5e310 --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_request_policy_config.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.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig do + @moduledoc """ + List of policies to classify against. + + ## Attributes + + * `policyType` (*type:* `String.t`, *default:* `nil`) - Required. Type of the policy. + * `threshold` (*type:* `number()`, *default:* `nil`) - Optional. Score threshold to use when deciding if the content is violative or non-violative. If not specified, the default 0.5 threshold for the policy will be used. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :policyType => String.t() | nil, + :threshold => number() | nil + } + + field(:policyType) + field(:threshold) +end + +defimpl Poison.Decoder, + for: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig do + def decode(value, options) do + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response.ex b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response.ex new file mode 100644 index 0000000000..8d5f4a0b86 --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response.ex @@ -0,0 +1,59 @@ +# 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.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponse do + @moduledoc """ + Response proto for ClassifyContent RPC. + + ## Attributes + + * `policyResults` (*type:* `list(GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult.t)`, *default:* `nil`) - Results of the classification for each policy. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :policyResults => + list( + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult.t() + ) + | nil + } + + field(:policyResults, + as: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponse do + def decode(value, options) do + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response_policy_result.ex b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response_policy_result.ex new file mode 100644 index 0000000000..3eab09f3fb --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_classify_content_response_policy_result.ex @@ -0,0 +1,59 @@ +# 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.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult do + @moduledoc """ + Result for one policy against the corresponding input. + + ## Attributes + + * `policyType` (*type:* `String.t`, *default:* `nil`) - Type of the policy. + * `score` (*type:* `number()`, *default:* `nil`) - Final score for the results of this policy. + * `violationResult` (*type:* `String.t`, *default:* `nil`) - Result of the classification for the policy. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :policyType => String.t() | nil, + :score => number() | nil, + :violationResult => String.t() | nil + } + + field(:policyType) + field(:score) + field(:violationResult) +end + +defimpl Poison.Decoder, + for: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult do + def decode(value, options) do + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_text_input.ex b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_text_input.ex new file mode 100644 index 0000000000..88b1196b0e --- /dev/null +++ b/clients/checks/lib/google_api/checks/v1alpha/model/google_checks_aisafety_v1alpha_text_input.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaTextInput do + @moduledoc """ + Text input to be classified. + + ## Attributes + + * `content` (*type:* `String.t`, *default:* `nil`) - Actual piece of text to be classified. + * `languageCode` (*type:* `String.t`, *default:* `nil`) - Optional. Language of the text in ISO 639-1 format. If the language is invalid or not specified, the system will try to detect it. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :content => String.t() | nil, + :languageCode => String.t() | nil + } + + field(:content) + field(:languageCode) +end + +defimpl Poison.Decoder, for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaTextInput do + def decode(value, options) do + GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaTextInput.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Checks.V1alpha.Model.GoogleChecksAisafetyV1alphaTextInput do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/checks/mix.exs b/clients/checks/mix.exs index bdf34cddcc..70eaad45d7 100644 --- a/clients/checks/mix.exs +++ b/clients/checks/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Checks.Mixfile do use Mix.Project - @version "0.4.0" + @version "0.5.0" def project() do [