From 3d680eba25dd1f58e0be3495181267de173a3341 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 02:28:48 +0000 Subject: [PATCH] feat: Automated regeneration of TextToSpeech client --- clients/text_to_speech/README.md | 2 +- .../text_to_speech/v1/api/operations.ex | 149 +++++++++++ .../text_to_speech/v1/api/projects.ex | 247 ++++++++++++++++++ .../google_api/text_to_speech/v1/metadata.ex | 2 +- .../v1/model/cancel_operation_request.ex | 41 +++ .../v1/model/custom_voice_params.ex | 2 +- .../text_to_speech/v1/model/empty.ex | 41 +++ ...peech_v1_synthesize_long_audio_metadata.ex | 57 ++++ .../v1/model/list_operations_response.ex | 49 ++++ .../text_to_speech/v1/model/operation.ex | 58 ++++ .../text_to_speech/v1/model/status.ex | 52 ++++ .../model/synthesize_long_audio_metadata.ex | 52 ++++ .../v1/model/synthesize_long_audio_request.ex | 55 ++++ .../text_to_speech/v1beta1/api/projects.ex | 247 ++++++++++++++++++ .../text_to_speech/v1beta1/metadata.ex | 2 +- .../v1beta1/model/custom_voice_params.ex | 2 +- ..._v1beta1_synthesize_long_audio_metadata.ex | 59 +++++ .../v1beta1/model/list_operations_response.ex | 49 ++++ .../text_to_speech/v1beta1/model/operation.ex | 58 ++++ .../text_to_speech/v1beta1/model/status.ex | 52 ++++ .../model/synthesize_long_audio_metadata.ex | 52 ++++ .../model/synthesize_long_audio_request.ex | 55 ++++ clients/text_to_speech/mix.exs | 2 +- 23 files changed, 1379 insertions(+), 6 deletions(-) create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/api/operations.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/api/projects.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/cancel_operation_request.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/empty.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/google_cloud_texttospeech_v1_synthesize_long_audio_metadata.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/list_operations_response.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/operation.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/status.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_metadata.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_request.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/api/projects.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/google_cloud_texttospeech_v1beta1_synthesize_long_audio_metadata.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/list_operations_response.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/operation.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/status.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_metadata.ex create mode 100644 clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_request.ex diff --git a/clients/text_to_speech/README.md b/clients/text_to_speech/README.md index a995bdba4c..2b60263856 100644 --- a/clients/text_to_speech/README.md +++ b/clients/text_to_speech/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_text_to_speech, "~> 0.15"}] + [{:google_api_text_to_speech, "~> 0.16"}] end ``` diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/api/operations.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/api/operations.ex new file mode 100644 index 0000000000..2635c2f24f --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/api/operations.ex @@ -0,0 +1,149 @@ +# 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.TextToSpeech.V1.Api.Operations do + @moduledoc """ + API calls for all endpoints tagged `Operations`. + """ + + alias GoogleApi.TextToSpeech.V1.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource to be cancelled. + * `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.TextToSpeech.V1.Model.CancelOperationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TextToSpeech.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_operations_cancel(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TextToSpeech.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_operations_cancel(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, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+name}:cancel", %{ + "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.TextToSpeech.V1.Model.Empty{}]) + end + + @doc """ + Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource to be deleted. + * `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.TextToSpeech.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_operations_delete(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.TextToSpeech.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_operations_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.TextToSpeech.V1.Model.Empty{}]) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/api/projects.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/api/projects.ex new file mode 100644 index 0000000000..96fcd93755 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/api/projects.ex @@ -0,0 +1,247 @@ +# 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.TextToSpeech.V1.Api.Projects do + @moduledoc """ + API calls for all endpoints tagged `Projects`. + """ + + alias GoogleApi.TextToSpeech.V1.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Synthesizes long form text asynchronously. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - The resource states of the request in the form of `projects/*/locations/*`. + * `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.TextToSpeech.V1.Model.SynthesizeLongAudioRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TextToSpeech.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_projects_locations_synthesize_long_audio( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TextToSpeech.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_projects_locations_synthesize_long_audio( + 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}:synthesizeLongAudio", %{ + "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.TextToSpeech.V1.Model.Operation{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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.TextToSpeech.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_projects_locations_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TextToSpeech.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_projects_locations_operations_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.TextToSpeech.V1.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TextToSpeech.V1.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_projects_locations_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TextToSpeech.V1.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_projects_locations_operations_list( + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}/operations", %{ + "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.TextToSpeech.V1.Model.ListOperationsResponse{}] + ) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex index 53afd731d5..f840bb4a07 100644 --- a/clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.TextToSpeech.V1 do API client metadata for GoogleApi.TextToSpeech.V1. """ - @discovery_revision "20221109" + @discovery_revision "20240228" def discovery_revision(), do: @discovery_revision end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/cancel_operation_request.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/cancel_operation_request.ex new file mode 100644 index 0000000000..6bef5712dd --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/cancel_operation_request.ex @@ -0,0 +1,41 @@ +# 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.TextToSpeech.V1.Model.CancelOperationRequest do + @moduledoc """ + The request message for Operations.CancelOperation. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1.Model.CancelOperationRequest do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.CancelOperationRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1.Model.CancelOperationRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/custom_voice_params.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/custom_voice_params.ex index 96aa3eca20..129c5827e0 100644 --- a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/custom_voice_params.ex +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/custom_voice_params.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.TextToSpeech.V1.Model.CustomVoiceParams do ## Attributes * `model` (*type:* `String.t`, *default:* `nil`) - Required. The name of the AutoML model that synthesizes the custom voice. - * `reportedUsage` (*type:* `String.t`, *default:* `nil`) - Optional. The usage of the synthesized audio to be reported. + * `reportedUsage` (*type:* `String.t`, *default:* `nil`) - Optional. Deprecated. The usage of the synthesized audio to be reported. """ use GoogleApi.Gax.ModelBase diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/empty.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/empty.ex new file mode 100644 index 0000000000..5d01968a5e --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/empty.ex @@ -0,0 +1,41 @@ +# 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.TextToSpeech.V1.Model.Empty do + @moduledoc """ + A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1.Model.Empty do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.Empty.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1.Model.Empty do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/google_cloud_texttospeech_v1_synthesize_long_audio_metadata.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/google_cloud_texttospeech_v1_synthesize_long_audio_metadata.ex new file mode 100644 index 0000000000..1ef8c3bbe7 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/google_cloud_texttospeech_v1_synthesize_long_audio_metadata.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.TextToSpeech.V1.Model.GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata do + @moduledoc """ + Metadata for response returned by the `SynthesizeLongAudio` method. + + ## Attributes + + * `lastUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - Deprecated. Do not use. + * `progressPercentage` (*type:* `float()`, *default:* `nil`) - The progress of the most recent processing update in percentage, ie. 70.0%. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the request was received. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :lastUpdateTime => DateTime.t() | nil, + :progressPercentage => float() | nil, + :startTime => DateTime.t() | nil + } + + field(:lastUpdateTime, as: DateTime) + field(:progressPercentage) + field(:startTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.TextToSpeech.V1.Model.GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.TextToSpeech.V1.Model.GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/list_operations_response.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/list_operations_response.ex new file mode 100644 index 0000000000..f834b36065 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/list_operations_response.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.TextToSpeech.V1.Model.ListOperationsResponse do + @moduledoc """ + The response message for Operations.ListOperations. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. + * `operations` (*type:* `list(GoogleApi.TextToSpeech.V1.Model.Operation.t)`, *default:* `nil`) - A list of operations that matches the specified filter in the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :operations => list(GoogleApi.TextToSpeech.V1.Model.Operation.t()) | nil + } + + field(:nextPageToken) + field(:operations, as: GoogleApi.TextToSpeech.V1.Model.Operation, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1.Model.ListOperationsResponse do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.ListOperationsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1.Model.ListOperationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/operation.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/operation.ex new file mode 100644 index 0000000000..a3f5918962 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/operation.ex @@ -0,0 +1,58 @@ +# 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.TextToSpeech.V1.Model.Operation do + @moduledoc """ + This resource represents a long-running operation that is the result of a network API call. + + ## Attributes + + * `done` (*type:* `boolean()`, *default:* `nil`) - If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + * `error` (*type:* `GoogleApi.TextToSpeech.V1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. + * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :done => boolean() | nil, + :error => GoogleApi.TextToSpeech.V1.Model.Status.t() | nil, + :metadata => map() | nil, + :name => String.t() | nil, + :response => map() | nil + } + + field(:done) + field(:error, as: GoogleApi.TextToSpeech.V1.Model.Status) + field(:metadata, type: :map) + field(:name) + field(:response, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1.Model.Operation do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.Operation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1.Model.Operation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/status.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/status.ex new file mode 100644 index 0000000000..617ade121f --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/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.TextToSpeech.V1.Model.Status 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.TextToSpeech.V1.Model.Status do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.Status.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1.Model.Status do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_metadata.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_metadata.ex new file mode 100644 index 0000000000..3389b55c80 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_metadata.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.TextToSpeech.V1.Model.SynthesizeLongAudioMetadata do + @moduledoc """ + Metadata for response returned by the `SynthesizeLongAudio` method. + + ## Attributes + + * `lastUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - Deprecated. Do not use. + * `progressPercentage` (*type:* `float()`, *default:* `nil`) - The progress of the most recent processing update in percentage, ie. 70.0%. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the request was received. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :lastUpdateTime => DateTime.t() | nil, + :progressPercentage => float() | nil, + :startTime => DateTime.t() | nil + } + + field(:lastUpdateTime, as: DateTime) + field(:progressPercentage) + field(:startTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1.Model.SynthesizeLongAudioMetadata do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.SynthesizeLongAudioMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1.Model.SynthesizeLongAudioMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_request.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_request.ex new file mode 100644 index 0000000000..2067245327 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1/model/synthesize_long_audio_request.ex @@ -0,0 +1,55 @@ +# 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.TextToSpeech.V1.Model.SynthesizeLongAudioRequest do + @moduledoc """ + The top-level message sent by the client for the `SynthesizeLongAudio` method. + + ## Attributes + + * `audioConfig` (*type:* `GoogleApi.TextToSpeech.V1.Model.AudioConfig.t`, *default:* `nil`) - Required. The configuration of the synthesized audio. + * `input` (*type:* `GoogleApi.TextToSpeech.V1.Model.SynthesisInput.t`, *default:* `nil`) - Required. The Synthesizer requires either plain text or SSML as input. While Long Audio is in preview, SSML is temporarily unsupported. + * `outputGcsUri` (*type:* `String.t`, *default:* `nil`) - Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist. + * `voice` (*type:* `GoogleApi.TextToSpeech.V1.Model.VoiceSelectionParams.t`, *default:* `nil`) - Required. The desired voice of the synthesized audio. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :audioConfig => GoogleApi.TextToSpeech.V1.Model.AudioConfig.t() | nil, + :input => GoogleApi.TextToSpeech.V1.Model.SynthesisInput.t() | nil, + :outputGcsUri => String.t() | nil, + :voice => GoogleApi.TextToSpeech.V1.Model.VoiceSelectionParams.t() | nil + } + + field(:audioConfig, as: GoogleApi.TextToSpeech.V1.Model.AudioConfig) + field(:input, as: GoogleApi.TextToSpeech.V1.Model.SynthesisInput) + field(:outputGcsUri) + field(:voice, as: GoogleApi.TextToSpeech.V1.Model.VoiceSelectionParams) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1.Model.SynthesizeLongAudioRequest do + def decode(value, options) do + GoogleApi.TextToSpeech.V1.Model.SynthesizeLongAudioRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1.Model.SynthesizeLongAudioRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/api/projects.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/api/projects.ex new file mode 100644 index 0000000000..22d7a5c502 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/api/projects.ex @@ -0,0 +1,247 @@ +# 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.TextToSpeech.V1beta1.Api.Projects do + @moduledoc """ + API calls for all endpoints tagged `Projects`. + """ + + alias GoogleApi.TextToSpeech.V1beta1.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Synthesizes long form text asynchronously. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1beta1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - The resource states of the request in the form of `projects/*/locations/*`. + * `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.TextToSpeech.V1beta1.Model.SynthesizeLongAudioRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TextToSpeech.V1beta1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_projects_locations_synthesize_long_audio( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TextToSpeech.V1beta1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_projects_locations_synthesize_long_audio( + 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("/v1beta1/{+parent}:synthesizeLongAudio", %{ + "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.TextToSpeech.V1beta1.Model.Operation{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1beta1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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.TextToSpeech.V1beta1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_projects_locations_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TextToSpeech.V1beta1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_projects_locations_operations_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("/v1beta1/{+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.TextToSpeech.V1beta1.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.TextToSpeech.V1beta1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.TextToSpeech.V1beta1.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec texttospeech_projects_locations_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.TextToSpeech.V1beta1.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def texttospeech_projects_locations_operations_list( + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta1/{+name}/operations", %{ + "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.TextToSpeech.V1beta1.Model.ListOperationsResponse{}] + ) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/metadata.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/metadata.ex index 895d259f8b..26d7ba165b 100644 --- a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/metadata.ex +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.TextToSpeech.V1beta1 do API client metadata for GoogleApi.TextToSpeech.V1beta1. """ - @discovery_revision "20221109" + @discovery_revision "20240228" def discovery_revision(), do: @discovery_revision end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/custom_voice_params.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/custom_voice_params.ex index a78bf9ddfd..bbca110d43 100644 --- a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/custom_voice_params.ex +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/custom_voice_params.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.TextToSpeech.V1beta1.Model.CustomVoiceParams do ## Attributes * `model` (*type:* `String.t`, *default:* `nil`) - Required. The name of the AutoML model that synthesizes the custom voice. - * `reportedUsage` (*type:* `String.t`, *default:* `nil`) - Optional. The usage of the synthesized audio to be reported. + * `reportedUsage` (*type:* `String.t`, *default:* `nil`) - Optional. Deprecated. The usage of the synthesized audio to be reported. """ use GoogleApi.Gax.ModelBase diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/google_cloud_texttospeech_v1beta1_synthesize_long_audio_metadata.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/google_cloud_texttospeech_v1beta1_synthesize_long_audio_metadata.ex new file mode 100644 index 0000000000..3792dbc7fb --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/google_cloud_texttospeech_v1beta1_synthesize_long_audio_metadata.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.TextToSpeech.V1beta1.Model.GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata do + @moduledoc """ + Metadata for response returned by the `SynthesizeLongAudio` method. + + ## Attributes + + * `lastUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - Deprecated. Do not use. + * `progressPercentage` (*type:* `float()`, *default:* `nil`) - The progress of the most recent processing update in percentage, ie. 70.0%. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the request was received. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :lastUpdateTime => DateTime.t() | nil, + :progressPercentage => float() | nil, + :startTime => DateTime.t() | nil + } + + field(:lastUpdateTime, as: DateTime) + field(:progressPercentage) + field(:startTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.TextToSpeech.V1beta1.Model.GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata do + def decode(value, options) do + GoogleApi.TextToSpeech.V1beta1.Model.GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.TextToSpeech.V1beta1.Model.GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/list_operations_response.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/list_operations_response.ex new file mode 100644 index 0000000000..ffa1276d0d --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/list_operations_response.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.TextToSpeech.V1beta1.Model.ListOperationsResponse do + @moduledoc """ + The response message for Operations.ListOperations. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. + * `operations` (*type:* `list(GoogleApi.TextToSpeech.V1beta1.Model.Operation.t)`, *default:* `nil`) - A list of operations that matches the specified filter in the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :operations => list(GoogleApi.TextToSpeech.V1beta1.Model.Operation.t()) | nil + } + + field(:nextPageToken) + field(:operations, as: GoogleApi.TextToSpeech.V1beta1.Model.Operation, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1beta1.Model.ListOperationsResponse do + def decode(value, options) do + GoogleApi.TextToSpeech.V1beta1.Model.ListOperationsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1beta1.Model.ListOperationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/operation.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/operation.ex new file mode 100644 index 0000000000..a49c01baf9 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/operation.ex @@ -0,0 +1,58 @@ +# 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.TextToSpeech.V1beta1.Model.Operation do + @moduledoc """ + This resource represents a long-running operation that is the result of a network API call. + + ## Attributes + + * `done` (*type:* `boolean()`, *default:* `nil`) - If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + * `error` (*type:* `GoogleApi.TextToSpeech.V1beta1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. + * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :done => boolean() | nil, + :error => GoogleApi.TextToSpeech.V1beta1.Model.Status.t() | nil, + :metadata => map() | nil, + :name => String.t() | nil, + :response => map() | nil + } + + field(:done) + field(:error, as: GoogleApi.TextToSpeech.V1beta1.Model.Status) + field(:metadata, type: :map) + field(:name) + field(:response, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1beta1.Model.Operation do + def decode(value, options) do + GoogleApi.TextToSpeech.V1beta1.Model.Operation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1beta1.Model.Operation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/status.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/status.ex new file mode 100644 index 0000000000..d036733571 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/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.TextToSpeech.V1beta1.Model.Status 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.TextToSpeech.V1beta1.Model.Status do + def decode(value, options) do + GoogleApi.TextToSpeech.V1beta1.Model.Status.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1beta1.Model.Status do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_metadata.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_metadata.ex new file mode 100644 index 0000000000..8608ffaf6c --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_metadata.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.TextToSpeech.V1beta1.Model.SynthesizeLongAudioMetadata do + @moduledoc """ + Metadata for response returned by the `SynthesizeLongAudio` method. + + ## Attributes + + * `lastUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - Deprecated. Do not use. + * `progressPercentage` (*type:* `float()`, *default:* `nil`) - The progress of the most recent processing update in percentage, ie. 70.0%. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the request was received. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :lastUpdateTime => DateTime.t() | nil, + :progressPercentage => float() | nil, + :startTime => DateTime.t() | nil + } + + field(:lastUpdateTime, as: DateTime) + field(:progressPercentage) + field(:startTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1beta1.Model.SynthesizeLongAudioMetadata do + def decode(value, options) do + GoogleApi.TextToSpeech.V1beta1.Model.SynthesizeLongAudioMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1beta1.Model.SynthesizeLongAudioMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_request.ex b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_request.ex new file mode 100644 index 0000000000..0f11c603c7 --- /dev/null +++ b/clients/text_to_speech/lib/google_api/text_to_speech/v1beta1/model/synthesize_long_audio_request.ex @@ -0,0 +1,55 @@ +# 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.TextToSpeech.V1beta1.Model.SynthesizeLongAudioRequest do + @moduledoc """ + The top-level message sent by the client for the `SynthesizeLongAudio` method. + + ## Attributes + + * `audioConfig` (*type:* `GoogleApi.TextToSpeech.V1beta1.Model.AudioConfig.t`, *default:* `nil`) - Required. The configuration of the synthesized audio. + * `input` (*type:* `GoogleApi.TextToSpeech.V1beta1.Model.SynthesisInput.t`, *default:* `nil`) - Required. The Synthesizer requires either plain text or SSML as input. While Long Audio is in preview, SSML is temporarily unsupported. + * `outputGcsUri` (*type:* `String.t`, *default:* `nil`) - Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist. + * `voice` (*type:* `GoogleApi.TextToSpeech.V1beta1.Model.VoiceSelectionParams.t`, *default:* `nil`) - Required. The desired voice of the synthesized audio. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :audioConfig => GoogleApi.TextToSpeech.V1beta1.Model.AudioConfig.t() | nil, + :input => GoogleApi.TextToSpeech.V1beta1.Model.SynthesisInput.t() | nil, + :outputGcsUri => String.t() | nil, + :voice => GoogleApi.TextToSpeech.V1beta1.Model.VoiceSelectionParams.t() | nil + } + + field(:audioConfig, as: GoogleApi.TextToSpeech.V1beta1.Model.AudioConfig) + field(:input, as: GoogleApi.TextToSpeech.V1beta1.Model.SynthesisInput) + field(:outputGcsUri) + field(:voice, as: GoogleApi.TextToSpeech.V1beta1.Model.VoiceSelectionParams) +end + +defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1beta1.Model.SynthesizeLongAudioRequest do + def decode(value, options) do + GoogleApi.TextToSpeech.V1beta1.Model.SynthesizeLongAudioRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.TextToSpeech.V1beta1.Model.SynthesizeLongAudioRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/text_to_speech/mix.exs b/clients/text_to_speech/mix.exs index 6f7cae62a8..32a93dceae 100644 --- a/clients/text_to_speech/mix.exs +++ b/clients/text_to_speech/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.TextToSpeech.Mixfile do use Mix.Project - @version "0.15.1" + @version "0.16.0" def project() do [