Skip to content

Commit

Permalink
feat: Automated regeneration of Speech client (#10856)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-12 01:26:58 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent b7ddb6f commit dbbfd77
Show file tree
Hide file tree
Showing 15 changed files with 228 additions and 12 deletions.
2 changes: 1 addition & 1 deletion clients/speech/lib/google_api/speech/v1/api/operations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defmodule GoogleApi.Speech.V1.Api.Operations do
end

@doc """
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
## Parameters
Expand Down
2 changes: 1 addition & 1 deletion clients/speech/lib/google_api/speech/v1/api/projects.ex
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ defmodule GoogleApi.Speech.V1.Api.Projects do
## Parameters
* `connection` (*type:* `GoogleApi.Speech.V1.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent resource where this phrase set will be created. Format: `projects/{project}/locations/{location}/phraseSets` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.
* `parent` (*type:* `String.t`) - Required. The parent resource where this phrase set will be created. Format: `projects/{project}/locations/{location}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down
2 changes: 1 addition & 1 deletion clients/speech/lib/google_api/speech/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Speech.V1 do
API client metadata for GoogleApi.Speech.V1.
"""

@discovery_revision "20221020"
@discovery_revision "20240222"

def discovery_revision(), do: @discovery_revision
end
46 changes: 46 additions & 0 deletions clients/speech/lib/google_api/speech/v1/model/abnf_grammar.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Speech.V1.Model.ABNFGrammar do
@moduledoc """
## Attributes
* `abnfStrings` (*type:* `list(String.t)`, *default:* `nil`) - All declarations and rules of an ABNF grammar broken up into multiple strings that will end up concatenated.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:abnfStrings => list(String.t()) | nil
}

field(:abnfStrings, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.ABNFGrammar do
def decode(value, options) do
GoogleApi.Speech.V1.Model.ABNFGrammar.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Speech.V1.Model.ABNFGrammar do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
32 changes: 31 additions & 1 deletion clients/speech/lib/google_api/speech/v1/model/custom_class.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,52 @@ defmodule GoogleApi.Speech.V1.Model.CustomClass do
## Attributes
* `annotations` (*type:* `map()`, *default:* `nil`) - Output only. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. This field is not used.
* `customClassId` (*type:* `String.t`, *default:* `nil`) - If this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive.
* `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this resource was requested for deletion. This field is not used.
* `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. This field is not used.
* `etag` (*type:* `String.t`, *default:* `nil`) - Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. This field is not used.
* `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this resource will be purged. This field is not used.
* `items` (*type:* `list(GoogleApi.Speech.V1.Model.ClassItem.t)`, *default:* `nil`) - A collection of class items.
* `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Output only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the content of the ClassItem is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
* `kmsKeyVersionName` (*type:* `String.t`, *default:* `nil`) - Output only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which content of the ClassItem is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
* `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the custom class.
* `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether or not this CustomClass is in the process of being updated. This field is not used.
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. The CustomClass lifecycle state. This field is not used.
* `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System-assigned unique identifier for the CustomClass. This field is not used.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:annotations => map() | nil,
:customClassId => String.t() | nil,
:deleteTime => DateTime.t() | nil,
:displayName => String.t() | nil,
:etag => String.t() | nil,
:expireTime => DateTime.t() | nil,
:items => list(GoogleApi.Speech.V1.Model.ClassItem.t()) | nil,
:name => String.t() | nil
:kmsKeyName => String.t() | nil,
:kmsKeyVersionName => String.t() | nil,
:name => String.t() | nil,
:reconciling => boolean() | nil,
:state => String.t() | nil,
:uid => String.t() | nil
}

field(:annotations, type: :map)
field(:customClassId)
field(:deleteTime, as: DateTime)
field(:displayName)
field(:etag)
field(:expireTime, as: DateTime)
field(:items, as: GoogleApi.Speech.V1.Model.ClassItem, type: :list)
field(:kmsKeyName)
field(:kmsKeyVersionName)
field(:name)
field(:reconciling)
field(:state)
field(:uid)
end

defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.CustomClass do
Expand Down
52 changes: 52 additions & 0 deletions clients/speech/lib/google_api/speech/v1/model/entry.ex
Original file line number Diff line number Diff line change
@@ -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.Speech.V1.Model.Entry do
@moduledoc """
A single replacement configuration.
## Attributes
* `caseSensitive` (*type:* `boolean()`, *default:* `nil`) - Whether the search is case sensitive.
* `replace` (*type:* `String.t`, *default:* `nil`) - What to replace with. Max length is 100 characters.
* `search` (*type:* `String.t`, *default:* `nil`) - What to replace. Max length is 100 characters.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:caseSensitive => boolean() | nil,
:replace => String.t() | nil,
:search => String.t() | nil
}

field(:caseSensitive)
field(:replace)
field(:search)
end

defimpl Poison.Decoder, for: GoogleApi.Speech.V1.Model.Entry do
def decode(value, options) do
GoogleApi.Speech.V1.Model.Entry.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Speech.V1.Model.Entry do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
2 changes: 1 addition & 1 deletion clients/speech/lib/google_api/speech/v1/model/operation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defmodule GoogleApi.Speech.V1.Model.Operation do
* `error` (*type:* `GoogleApi.Speech.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 response of the operation in case of success. 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`.
* `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
Expand Down
4 changes: 2 additions & 2 deletions clients/speech/lib/google_api/speech/v1/model/phrase.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

defmodule GoogleApi.Speech.V1.Model.Phrase do
@moduledoc """
A phrases containing words and phrase "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also include pre-built or custom classes containing groups of words that represent common concepts that occur in natural language. For example, rather than providing a phrase hint for every month of the year (e.g. "i was born in january", "i was born in febuary", ...), use the pre-built `$MONTH` class improves the likelihood of correctly transcribing audio that includes months (e.g. "i was born in $month"). To refer to pre-built classes, use the class' symbol prepended with `$` e.g. `$MONTH`. To refer to custom classes that were defined inline in the request, set the class's `custom_class_id` to a string unique to all class resources and inline classes. Then use the class' id wrapped in $`{...}` e.g. "${my-months}". To refer to custom classes resources, use the class' id wrapped in `${}` (e.g. `${my-months}`). Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.
A phrases containing words and phrase "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also include pre-built or custom classes containing groups of words that represent common concepts that occur in natural language. For example, rather than providing a phrase hint for every month of the year (e.g. "i was born in january", "i was born in febuary", ...), use the pre-built `$MONTH` class improves the likelihood of correctly transcribing audio that includes months (e.g. "i was born in $month"). To refer to pre-built classes, use the class' symbol prepended with `$` e.g. `$MONTH`. To refer to custom classes that were defined inline in the request, set the class's `custom_class_id` to a string unique to all class resources and inline classes. Then use the class' id wrapped in $`{...}` e.g. "${my-months}". To refer to custom classes resources, use the class' id wrapped in `${}` (e.g. `${my-months}`). Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.
## Attributes
* `boost` (*type:* `number()`, *default:* `nil`) - Hint Boost. Overrides the boost set at the phrase set level. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case. Speech recognition will skip PhraseSets with a boost value of 0.
* `boost` (*type:* `number()`, *default:* `nil`) - Hint Boost. Overrides the boost set at the phrase set level. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests.
* `value` (*type:* `String.t`, *default:* `nil`) - The phrase itself.
"""

Expand Down
Loading

0 comments on commit dbbfd77

Please sign in to comment.