Skip to content

Commit ac15abf

Browse files
feat: Automated regeneration of Dialogflow client (#13131)
Auto-created at 2025-03-11 13:15:07 +0000 using the toys pull request generator.
1 parent 67f2318 commit ac15abf

File tree

38 files changed

+1881
-2
lines changed

38 files changed

+1881
-2
lines changed

clients/dialogflow/lib/google_api/dialogflow/v2/api/projects.ex

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8101,6 +8101,85 @@ defmodule GoogleApi.Dialogflow.V2.Api.Projects do
81018101
)
81028102
end
81038103

8104+
@doc """
8105+
Generates all the suggestions using generators configured in the conversation profile. A generator is used only if its trigger event is matched.
8106+
8107+
## Parameters
8108+
8109+
* `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server
8110+
* `conversation` (*type:* `String.t`) - Required. The conversation for which the suggestions are generated. Format: `projects//locations//conversations/`. The conversation must be created with a conversation profile which has generators configured in it to be able to get suggestions.
8111+
* `optional_params` (*type:* `keyword()`) - Optional parameters
8112+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
8113+
* `:access_token` (*type:* `String.t`) - OAuth access token.
8114+
* `:alt` (*type:* `String.t`) - Data format for response.
8115+
* `:callback` (*type:* `String.t`) - JSONP
8116+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
8117+
* `: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.
8118+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
8119+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
8120+
* `: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.
8121+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
8122+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
8123+
* `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsRequest.t`) -
8124+
* `opts` (*type:* `keyword()`) - Call options
8125+
8126+
## Returns
8127+
8128+
* `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsResponse{}}` on success
8129+
* `{:error, info}` on failure
8130+
"""
8131+
@spec dialogflow_projects_conversations_suggestions_generate(
8132+
Tesla.Env.client(),
8133+
String.t(),
8134+
keyword(),
8135+
keyword()
8136+
) ::
8137+
{:ok,
8138+
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsResponse.t()}
8139+
| {:ok, Tesla.Env.t()}
8140+
| {:ok, list()}
8141+
| {:error, any()}
8142+
def dialogflow_projects_conversations_suggestions_generate(
8143+
connection,
8144+
conversation,
8145+
optional_params \\ [],
8146+
opts \\ []
8147+
) do
8148+
optional_params_config = %{
8149+
:"$.xgafv" => :query,
8150+
:access_token => :query,
8151+
:alt => :query,
8152+
:callback => :query,
8153+
:fields => :query,
8154+
:key => :query,
8155+
:oauth_token => :query,
8156+
:prettyPrint => :query,
8157+
:quotaUser => :query,
8158+
:uploadType => :query,
8159+
:upload_protocol => :query,
8160+
:body => :body
8161+
}
8162+
8163+
request =
8164+
Request.new()
8165+
|> Request.method(:post)
8166+
|> Request.url("/v2/{+conversation}/suggestions:generate", %{
8167+
"conversation" => URI.encode(conversation, &URI.char_unreserved?/1)
8168+
})
8169+
|> Request.add_optional_params(optional_params_config, optional_params)
8170+
|> Request.library_version(@library_version)
8171+
8172+
connection
8173+
|> Connection.execute(request)
8174+
|> Response.decode(
8175+
opts ++
8176+
[
8177+
struct:
8178+
%GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsResponse{}
8179+
]
8180+
)
8181+
end
8182+
81048183
@doc """
81058184
Get answers for the given query based on knowledge documents.
81068185

@@ -16286,6 +16365,85 @@ defmodule GoogleApi.Dialogflow.V2.Api.Projects do
1628616365
)
1628716366
end
1628816367

16368+
@doc """
16369+
Data ingestion API. Ingests context references for an existing conversation.
16370+
16371+
## Parameters
16372+
16373+
* `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server
16374+
* `conversation` (*type:* `String.t`) - Required. Resource identifier of the conversation to ingest context information for. Format: `projects//locations//conversations/`.
16375+
* `optional_params` (*type:* `keyword()`) - Optional parameters
16376+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
16377+
* `:access_token` (*type:* `String.t`) - OAuth access token.
16378+
* `:alt` (*type:* `String.t`) - Data format for response.
16379+
* `:callback` (*type:* `String.t`) - JSONP
16380+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
16381+
* `: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.
16382+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
16383+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
16384+
* `: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.
16385+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
16386+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
16387+
* `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IngestContextReferencesRequest.t`) -
16388+
* `opts` (*type:* `keyword()`) - Call options
16389+
16390+
## Returns
16391+
16392+
* `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IngestContextReferencesResponse{}}` on success
16393+
* `{:error, info}` on failure
16394+
"""
16395+
@spec dialogflow_projects_locations_conversations_ingest_context_references(
16396+
Tesla.Env.client(),
16397+
String.t(),
16398+
keyword(),
16399+
keyword()
16400+
) ::
16401+
{:ok,
16402+
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IngestContextReferencesResponse.t()}
16403+
| {:ok, Tesla.Env.t()}
16404+
| {:ok, list()}
16405+
| {:error, any()}
16406+
def dialogflow_projects_locations_conversations_ingest_context_references(
16407+
connection,
16408+
conversation,
16409+
optional_params \\ [],
16410+
opts \\ []
16411+
) do
16412+
optional_params_config = %{
16413+
:"$.xgafv" => :query,
16414+
:access_token => :query,
16415+
:alt => :query,
16416+
:callback => :query,
16417+
:fields => :query,
16418+
:key => :query,
16419+
:oauth_token => :query,
16420+
:prettyPrint => :query,
16421+
:quotaUser => :query,
16422+
:uploadType => :query,
16423+
:upload_protocol => :query,
16424+
:body => :body
16425+
}
16426+
16427+
request =
16428+
Request.new()
16429+
|> Request.method(:post)
16430+
|> Request.url("/v2/{+conversation}:ingestContextReferences", %{
16431+
"conversation" => URI.encode(conversation, &URI.char_unreserved?/1)
16432+
})
16433+
|> Request.add_optional_params(optional_params_config, optional_params)
16434+
|> Request.library_version(@library_version)
16435+
16436+
connection
16437+
|> Connection.execute(request)
16438+
|> Response.decode(
16439+
opts ++
16440+
[
16441+
struct:
16442+
%GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2IngestContextReferencesResponse{}
16443+
]
16444+
)
16445+
end
16446+
1628916447
@doc """
1629016448
Returns the list of all conversations in the specified project.
1629116449

@@ -17134,6 +17292,85 @@ defmodule GoogleApi.Dialogflow.V2.Api.Projects do
1713417292
)
1713517293
end
1713617294

17295+
@doc """
17296+
Generates all the suggestions using generators configured in the conversation profile. A generator is used only if its trigger event is matched.
17297+
17298+
## Parameters
17299+
17300+
* `connection` (*type:* `GoogleApi.Dialogflow.V2.Connection.t`) - Connection to server
17301+
* `conversation` (*type:* `String.t`) - Required. The conversation for which the suggestions are generated. Format: `projects//locations//conversations/`. The conversation must be created with a conversation profile which has generators configured in it to be able to get suggestions.
17302+
* `optional_params` (*type:* `keyword()`) - Optional parameters
17303+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
17304+
* `:access_token` (*type:* `String.t`) - OAuth access token.
17305+
* `:alt` (*type:* `String.t`) - Data format for response.
17306+
* `:callback` (*type:* `String.t`) - JSONP
17307+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
17308+
* `: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.
17309+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
17310+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
17311+
* `: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.
17312+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
17313+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
17314+
* `:body` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsRequest.t`) -
17315+
* `opts` (*type:* `keyword()`) - Call options
17316+
17317+
## Returns
17318+
17319+
* `{:ok, %GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsResponse{}}` on success
17320+
* `{:error, info}` on failure
17321+
"""
17322+
@spec dialogflow_projects_locations_conversations_suggestions_generate(
17323+
Tesla.Env.client(),
17324+
String.t(),
17325+
keyword(),
17326+
keyword()
17327+
) ::
17328+
{:ok,
17329+
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsResponse.t()}
17330+
| {:ok, Tesla.Env.t()}
17331+
| {:ok, list()}
17332+
| {:error, any()}
17333+
def dialogflow_projects_locations_conversations_suggestions_generate(
17334+
connection,
17335+
conversation,
17336+
optional_params \\ [],
17337+
opts \\ []
17338+
) do
17339+
optional_params_config = %{
17340+
:"$.xgafv" => :query,
17341+
:access_token => :query,
17342+
:alt => :query,
17343+
:callback => :query,
17344+
:fields => :query,
17345+
:key => :query,
17346+
:oauth_token => :query,
17347+
:prettyPrint => :query,
17348+
:quotaUser => :query,
17349+
:uploadType => :query,
17350+
:upload_protocol => :query,
17351+
:body => :body
17352+
}
17353+
17354+
request =
17355+
Request.new()
17356+
|> Request.method(:post)
17357+
|> Request.url("/v2/{+conversation}/suggestions:generate", %{
17358+
"conversation" => URI.encode(conversation, &URI.char_unreserved?/1)
17359+
})
17360+
|> Request.add_optional_params(optional_params_config, optional_params)
17361+
|> Request.library_version(@library_version)
17362+
17363+
connection
17364+
|> Connection.execute(request)
17365+
|> Response.decode(
17366+
opts ++
17367+
[
17368+
struct:
17369+
%GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2GenerateSuggestionsResponse{}
17370+
]
17371+
)
17372+
end
17373+
1713717374
@doc """
1713817375
Get answers for the given query based on knowledge documents.
1713917376

clients/dialogflow/lib/google_api/dialogflow/v2/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Dialogflow.V2 do
2020
API client metadata for GoogleApi.Dialogflow.V2.
2121
"""
2222

23-
@discovery_revision "20250305"
23+
@discovery_revision "20250310"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/dialogflow/lib/google_api/dialogflow/v2/model/google_cloud_dialogflow_v2_conversation.ex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Conversation do
2424
* `conversationProfile` (*type:* `String.t`, *default:* `nil`) - Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.
2525
* `conversationStage` (*type:* `String.t`, *default:* `nil`) - Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.
2626
* `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the conversation was finished.
27+
* `ingestedContextReferences` (*type:* `%{optional(String.t) => GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReference.t}`, *default:* `nil`) - Output only. The context reference updates provided by external systems.
2728
* `lifecycleState` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of the Conversation.
2829
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. Identifier. The unique identifier of this conversation. Format: `projects//locations//conversations/`.
2930
* `phoneNumber` (*type:* `GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationPhoneNumber.t`, *default:* `nil`) - Output only. It will not be empty if the conversation is to be connected over telephony.
@@ -37,6 +38,12 @@ defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Conversation do
3738
:conversationProfile => String.t() | nil,
3839
:conversationStage => String.t() | nil,
3940
:endTime => DateTime.t() | nil,
41+
:ingestedContextReferences =>
42+
%{
43+
optional(String.t()) =>
44+
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReference.t()
45+
}
46+
| nil,
4047
:lifecycleState => String.t() | nil,
4148
:name => String.t() | nil,
4249
:phoneNumber =>
@@ -50,6 +57,12 @@ defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2Conversation do
5057
field(:conversationProfile)
5158
field(:conversationStage)
5259
field(:endTime, as: DateTime)
60+
61+
field(:ingestedContextReferences,
62+
as: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReference,
63+
type: :map
64+
)
65+
5366
field(:lifecycleState)
5467
field(:name)
5568

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReference do
19+
@moduledoc """
20+
Represents a section of ingested context information.
21+
22+
## Attributes
23+
24+
* `contextContents` (*type:* `list(GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReferenceContextContent.t)`, *default:* `nil`) - Required. The list of content updates for a context reference.
25+
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the context reference was first created.
26+
* `languageCode` (*type:* `String.t`, *default:* `nil`) - Optional. The language of the information ingested, defaults to "en-US" if not set.
27+
* `updateMode` (*type:* `String.t`, *default:* `nil`) - Required. The mode in which context reference contents are updated.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:contextContents =>
34+
list(
35+
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReferenceContextContent.t()
36+
)
37+
| nil,
38+
:createTime => DateTime.t() | nil,
39+
:languageCode => String.t() | nil,
40+
:updateMode => String.t() | nil
41+
}
42+
43+
field(:contextContents,
44+
as:
45+
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReferenceContextContent,
46+
type: :list
47+
)
48+
49+
field(:createTime, as: DateTime)
50+
field(:languageCode)
51+
field(:updateMode)
52+
end
53+
54+
defimpl Poison.Decoder,
55+
for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReference do
56+
def decode(value, options) do
57+
GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReference.decode(
58+
value,
59+
options
60+
)
61+
end
62+
end
63+
64+
defimpl Poison.Encoder,
65+
for: GoogleApi.Dialogflow.V2.Model.GoogleCloudDialogflowV2ConversationContextReference do
66+
def encode(value, options) do
67+
GoogleApi.Gax.ModelBase.encode(value, options)
68+
end
69+
end

0 commit comments

Comments
 (0)