Skip to content

Commit

Permalink
feat: Automated regeneration of Dialogflow client (#11067)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-13 03:18:46 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 13, 2024
1 parent d7a637f commit e36f8c8
Show file tree
Hide file tree
Showing 20 changed files with 837 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Dialogflow.V2 do
API client metadata for GoogleApi.Dialogflow.V2.
"""

@discovery_revision "20240305"
@discovery_revision "20240311"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericW
* `allowedCaCerts` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile <(printf "\\nsubjectAltName='DNS:www.example.com'") ```
* `httpMethod` (*type:* `String.t`, *default:* `nil`) - Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
* `oauthConfig` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig.t`, *default:* `nil`) - Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
* `parameterMapping` (*type:* `map()`, *default:* `nil`) - Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
* `password` (*type:* `String.t`, *default:* `nil`) - The password for HTTP Basic authentication.
* `requestBody` (*type:* `String.t`, *default:* `nil`) - Optional. Defines a custom JSON object as request body to send to flexible webhook.
* `requestHeaders` (*type:* `map()`, *default:* `nil`) - The HTTP request headers to send together with webhook requests.
* `serviceAgentAuth` (*type:* `String.t`, *default:* `nil`) - Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
* `uri` (*type:* `String.t`, *default:* `nil`) - Required. The webhook URI for receiving POST requests. It must use https protocol.
* `username` (*type:* `String.t`, *default:* `nil`) - The user name for HTTP Basic authentication.
* `webhookType` (*type:* `String.t`, *default:* `nil`) - Optional. Type of the webhook.
Expand All @@ -37,21 +39,31 @@ defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericW
@type t :: %__MODULE__{
:allowedCaCerts => list(String.t()) | nil,
:httpMethod => String.t() | nil,
:oauthConfig =>
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig.t()
| nil,
:parameterMapping => map() | nil,
:password => String.t() | nil,
:requestBody => String.t() | nil,
:requestHeaders => map() | nil,
:serviceAgentAuth => String.t() | nil,
:uri => String.t() | nil,
:username => String.t() | nil,
:webhookType => String.t() | nil
}

field(:allowedCaCerts, type: :list)
field(:httpMethod)

field(:oauthConfig,
as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
)

field(:parameterMapping, type: :map)
field(:password)
field(:requestBody)
field(:requestHeaders, type: :map)
field(:serviceAgentAuth)
field(:uri)
field(:username)
field(:webhookType)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

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

defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig do
@moduledoc """
Represents configuration of OAuth client credential flow for 3rd party API authentication.
## Attributes
* `clientId` (*type:* `String.t`, *default:* `nil`) - Required. The client ID provided by the 3rd party platform.
* `clientSecret` (*type:* `String.t`, *default:* `nil`) - Required. The client secret provided by the 3rd party platform.
* `scopes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The OAuth scopes to grant.
* `tokenEndpoint` (*type:* `String.t`, *default:* `nil`) - Required. The token endpoint provided by the 3rd party platform to exchange an access token.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:clientId => String.t() | nil,
:clientSecret => String.t() | nil,
:scopes => list(String.t()) | nil,
:tokenEndpoint => String.t() | nil
}

field(:clientId)
field(:clientSecret)
field(:scopes, type: :list)
field(:tokenEndpoint)
end

defimpl Poison.Decoder,
for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig do
def decode(value, options) do
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGen
* `allowedCaCerts` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile <(printf "\\nsubjectAltName='DNS:www.example.com'") ```
* `httpMethod` (*type:* `String.t`, *default:* `nil`) - Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
* `oauthConfig` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig.t`, *default:* `nil`) - Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
* `parameterMapping` (*type:* `map()`, *default:* `nil`) - Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
* `password` (*type:* `String.t`, *default:* `nil`) - The password for HTTP Basic authentication.
* `requestBody` (*type:* `String.t`, *default:* `nil`) - Optional. Defines a custom JSON object as request body to send to flexible webhook.
* `requestHeaders` (*type:* `map()`, *default:* `nil`) - The HTTP request headers to send together with webhook requests.
* `serviceAgentAuth` (*type:* `String.t`, *default:* `nil`) - Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
* `uri` (*type:* `String.t`, *default:* `nil`) - Required. The webhook URI for receiving POST requests. It must use https protocol.
* `username` (*type:* `String.t`, *default:* `nil`) - The user name for HTTP Basic authentication.
* `webhookType` (*type:* `String.t`, *default:* `nil`) - Optional. Type of the webhook.
Expand All @@ -37,21 +39,32 @@ defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGen
@type t :: %__MODULE__{
:allowedCaCerts => list(String.t()) | nil,
:httpMethod => String.t() | nil,
:oauthConfig =>
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig.t()
| nil,
:parameterMapping => map() | nil,
:password => String.t() | nil,
:requestBody => String.t() | nil,
:requestHeaders => map() | nil,
:serviceAgentAuth => String.t() | nil,
:uri => String.t() | nil,
:username => String.t() | nil,
:webhookType => String.t() | nil
}

field(:allowedCaCerts, type: :list)
field(:httpMethod)

field(:oauthConfig,
as:
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
)

field(:parameterMapping, type: :map)
field(:password)
field(:requestBody)
field(:requestHeaders, type: :map)
field(:serviceAgentAuth)
field(:uri)
field(:username)
field(:webhookType)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

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

defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig do
@moduledoc """
Represents configuration of OAuth client credential flow for 3rd party API authentication.
## Attributes
* `clientId` (*type:* `String.t`, *default:* `nil`) - Required. The client ID provided by the 3rd party platform.
* `clientSecret` (*type:* `String.t`, *default:* `nil`) - Required. The client secret provided by the 3rd party platform.
* `scopes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The OAuth scopes to grant.
* `tokenEndpoint` (*type:* `String.t`, *default:* `nil`) - Required. The token endpoint provided by the 3rd party platform to exchange an access token.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:clientId => String.t() | nil,
:clientSecret => String.t() | nil,
:scopes => list(String.t()) | nil,
:tokenEndpoint => String.t() | nil
}

field(:clientId)
field(:clientSecret)
field(:scopes, type: :list)
field(:tokenEndpoint)
end

defimpl Poison.Decoder,
for:
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig do
def decode(value, options) do
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for:
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Dialogflow.V3 do
API client metadata for GoogleApi.Dialogflow.V3.
"""

@discovery_revision "20240305"
@discovery_revision "20240311"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# 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.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignals do
@moduledoc """
Data store connection feature output signals. Might be only partially field if processing stop before the final answer. Reasons for this can be, but are not limited to: empty UCS search results, positive RAI check outcome, grounding failure, ...
## Attributes
* `answer` (*type:* `String.t`, *default:* `nil`) - Optional. The final compiled answer.
* `answerGenerationModelCallSignals` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals.t`, *default:* `nil`) - Optional. Diagnostic info related to the answer generation model call.
* `answerParts` (*type:* `list(GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart.t)`, *default:* `nil`) - Optional. Answer parts with relevant citations. Concatenation of texts should add up the `answer` (not counting whitespaces).
* `citedSnippets` (*type:* `list(GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet.t)`, *default:* `nil`) - Optional. Snippets cited by the answer generation model from the most to least relevant.
* `groundingSignals` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals.t`, *default:* `nil`) - Optional. Grounding signals.
* `rewriterModelCallSignals` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals.t`, *default:* `nil`) - Optional. Diagnostic info related to the rewriter model call.
* `rewrittenQuery` (*type:* `String.t`, *default:* `nil`) - Optional. Rewritten string query used for search.
* `safetySignals` (*type:* `GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals.t`, *default:* `nil`) - Optional. Safety check result.
* `searchSnippets` (*type:* `list(GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet.t)`, *default:* `nil`) - Optional. Search snippets included in the answer generation prompt.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:answer => String.t() | nil,
:answerGenerationModelCallSignals =>
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals.t()
| nil,
:answerParts =>
list(
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart.t()
)
| nil,
:citedSnippets =>
list(
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet.t()
)
| nil,
:groundingSignals =>
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals.t()
| nil,
:rewriterModelCallSignals =>
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals.t()
| nil,
:rewrittenQuery => String.t() | nil,
:safetySignals =>
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals.t()
| nil,
:searchSnippets =>
list(
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet.t()
)
| nil
}

field(:answer)

field(:answerGenerationModelCallSignals,
as:
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
)

field(:answerParts,
as:
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart,
type: :list
)

field(:citedSnippets,
as:
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet,
type: :list
)

field(:groundingSignals,
as:
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
)

field(:rewriterModelCallSignals,
as:
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
)

field(:rewrittenQuery)

field(:safetySignals,
as:
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
)

field(:searchSnippets,
as:
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet,
type: :list
)
end

defimpl Poison.Decoder,
for: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignals do
def decode(value, options) do
GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignals.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.Dialogflow.V3.Model.GoogleCloudDialogflowCxV3DataStoreConnectionSignals do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading

0 comments on commit e36f8c8

Please sign in to comment.