Skip to content

Commit 3e96462

Browse files
feat: Automated regeneration of DiscoveryEngine client (googleapis#13029)
Auto-created at 2025-02-25 13:11:12 +0000 using the toys pull request generator.
1 parent 9e7524d commit 3e96462

File tree

30 files changed

+544
-9
lines changed

30 files changed

+544
-9
lines changed

clients/discovery_engine/lib/google_api/discovery_engine/v1/metadata.ex

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

23-
@discovery_revision "20250214"
23+
@discovery_revision "20250222"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DoubleList do
19+
@moduledoc """
20+
Double list.
21+
22+
## Attributes
23+
24+
* `values` (*type:* `list(float())`, *default:* `nil`) - Double values.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:values => list(float()) | nil
31+
}
32+
33+
field(:values, type: :list)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DoubleList do
38+
def decode(value, options) do
39+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DoubleList.decode(
40+
value,
41+
options
42+
)
43+
end
44+
end
45+
46+
defimpl Poison.Encoder,
47+
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DoubleList do
48+
def encode(value, options) do
49+
GoogleApi.Gax.ModelBase.encode(value, options)
50+
end
51+
end

clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_engine_chat_engine_config.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1EngineC
2222
## Attributes
2323
2424
* `agentCreationConfig` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig.t`, *default:* `nil`) - The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.
25+
* `allowCrossRegion` (*type:* `boolean()`, *default:* `nil`) - Optional. If the flag set to true, we allow the agent and engine are in different locations, otherwise the agent and engine are required to be in the same location. The flag is set to false by default. Note that the `allow_cross_region` are one-time consumed by and passed to EngineService.CreateEngine. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.
2526
* `dialogflowAgentToLink` (*type:* `String.t`, *default:* `nil`) - The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.
2627
"""
2728

@@ -31,6 +32,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1EngineC
3132
:agentCreationConfig =>
3233
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig.t()
3334
| nil,
35+
:allowCrossRegion => boolean() | nil,
3436
:dialogflowAgentToLink => String.t() | nil
3537
}
3638

@@ -39,6 +41,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1EngineC
3941
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig
4042
)
4143

44+
field(:allowCrossRegion)
4245
field(:dialogflowAgentToLink)
4346
end
4447

clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_request.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR
3838
* `params` (*type:* `map()`, *default:* `nil`) - Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, `user_country_code: "au"` For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, `search_type: 1`
3939
* `query` (*type:* `String.t`, *default:* `nil`) - Raw search query.
4040
* `queryExpansionSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestQueryExpansionSpec.t`, *default:* `nil`) - The query expansion specification that specifies the conditions under which query expansion occurs.
41+
* `relevanceScoreSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec.t`, *default:* `nil`) - Optional. The specification for returning the relevance score.
4142
* `safeSearch` (*type:* `boolean()`, *default:* `nil`) - Whether to turn on safe search. This is only supported for website search.
4243
* `searchAsYouTypeSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec.t`, *default:* `nil`) - Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical.
4344
* `session` (*type:* `String.t`, *default:* `nil`) - The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is "How did Alphabet do in 2022?" and the current query is "How about 2023?", the current query will be interpreted as "How did Alphabet do in 2023?". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.
@@ -84,6 +85,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR
8485
:queryExpansionSpec =>
8586
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestQueryExpansionSpec.t()
8687
| nil,
88+
:relevanceScoreSpec =>
89+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec.t()
90+
| nil,
8791
:safeSearch => boolean() | nil,
8892
:searchAsYouTypeSpec =>
8993
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec.t()
@@ -143,6 +147,11 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR
143147
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestQueryExpansionSpec
144148
)
145149

150+
field(:relevanceScoreSpec,
151+
as:
152+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec
153+
)
154+
146155
field(:safeSearch)
147156

148157
field(:searchAsYouTypeSpec,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec do
19+
@moduledoc """
20+
The specification for returning the document relevance score.
21+
22+
## Attributes
23+
24+
* `returnRelevanceScore` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether to return the relevance score for search results. The higher the score, the more relevant the document is to the query.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:returnRelevanceScore => boolean() | nil
31+
}
32+
33+
field(:returnRelevanceScore)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for:
38+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec do
39+
def decode(value, options) do
40+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec.decode(
41+
value,
42+
options
43+
)
44+
end
45+
end
46+
47+
defimpl Poison.Encoder,
48+
for:
49+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestRelevanceScoreSpec do
50+
def encode(value, options) do
51+
GoogleApi.Gax.ModelBase.encode(value, options)
52+
end
53+
end

clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_response_search_result.ex

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR
2424
* `chunk` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Chunk.t`, *default:* `nil`) - The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.
2525
* `document` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Document.t`, *default:* `nil`) - The document data snippet in the search response. Only fields that are marked as `retrievable` are populated.
2626
* `id` (*type:* `String.t`, *default:* `nil`) - Document.id of the searched Document.
27+
* `modelScores` (*type:* `%{optional(String.t) => GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DoubleList.t}`, *default:* `nil`) - Output only. Google provided available scores.
2728
"""
2829

2930
use GoogleApi.Gax.ModelBase
@@ -33,12 +34,23 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR
3334
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Chunk.t() | nil,
3435
:document =>
3536
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Document.t() | nil,
36-
:id => String.t() | nil
37+
:id => String.t() | nil,
38+
:modelScores =>
39+
%{
40+
optional(String.t()) =>
41+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DoubleList.t()
42+
}
43+
| nil
3744
}
3845

3946
field(:chunk, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Chunk)
4047
field(:document, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Document)
4148
field(:id)
49+
50+
field(:modelScores,
51+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DoubleList,
52+
type: :map
53+
)
4254
end
4355

4456
defimpl Poison.Decoder,
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaBAPConfig do
19+
@moduledoc """
20+
The configuration for the BAP connector.
21+
22+
## Attributes
23+
24+
* `supportedConnectorModes` (*type:* `list(String.t)`, *default:* `nil`) - Required. The supported connector modes for the associated BAP connection.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:supportedConnectorModes => list(String.t()) | nil
31+
}
32+
33+
field(:supportedConnectorModes, type: :list)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaBAPConfig do
38+
def decode(value, options) do
39+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaBAPConfig.decode(
40+
value,
41+
options
42+
)
43+
end
44+
end
45+
46+
defimpl Poison.Encoder,
47+
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaBAPConfig do
48+
def encode(value, options) do
49+
GoogleApi.Gax.ModelBase.encode(value, options)
50+
end
51+
end

clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_data_connector.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaDa
2323
2424
* `actionConfig` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaActionConfig.t`, *default:* `nil`) - Optional. Action configurations to make the connector support actions.
2525
* `autoRunDisabled` (*type:* `boolean()`, *default:* `nil`) - Indicates whether the connector is disabled for auto run. It can be used to pause periodical and real time sync.
26+
* `bapConfig` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaBAPConfig.t`, *default:* `nil`) - Optional. The configuration for establishing a BAP connection.
2627
* `blockingReasons` (*type:* `list(String.t)`, *default:* `nil`) - Output only. User actions that must be completed before the connector can start syncing data.
2728
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the DataConnector was created at.
2829
* `dataSource` (*type:* `String.t`, *default:* `nil`) - Required. The name of the data source. Supported values: `salesforce`, `jira`, `confluence`, `bigquery`.
@@ -53,6 +54,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaDa
5354
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaActionConfig.t()
5455
| nil,
5556
:autoRunDisabled => boolean() | nil,
57+
:bapConfig =>
58+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaBAPConfig.t()
59+
| nil,
5660
:blockingReasons => list(String.t()) | nil,
5761
:createTime => DateTime.t() | nil,
5862
:dataSource => String.t() | nil,
@@ -91,6 +95,11 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaDa
9195
)
9296

9397
field(:autoRunDisabled)
98+
99+
field(:bapConfig,
100+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaBAPConfig
101+
)
102+
94103
field(:blockingReasons, type: :list)
95104
field(:createTime, as: DateTime)
96105
field(:dataSource)

clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_config.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaEn
2222
## Attributes
2323
2424
* `agentCreationConfig` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig.t`, *default:* `nil`) - The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.
25+
* `allowCrossRegion` (*type:* `boolean()`, *default:* `nil`) - Optional. If the flag set to true, we allow the agent and engine are in different locations, otherwise the agent and engine are required to be in the same location. The flag is set to false by default. Note that the `allow_cross_region` are one-time consumed by and passed to EngineService.CreateEngine. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.
2526
* `dialogflowAgentToLink` (*type:* `String.t`, *default:* `nil`) - The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.
2627
"""
2728

@@ -31,6 +32,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaEn
3132
:agentCreationConfig =>
3233
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig.t()
3334
| nil,
35+
:allowCrossRegion => boolean() | nil,
3436
:dialogflowAgentToLink => String.t() | nil
3537
}
3638

@@ -39,6 +41,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaEn
3941
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig
4042
)
4143

44+
field(:allowCrossRegion)
4245
field(:dialogflowAgentToLink)
4346
end
4447

0 commit comments

Comments
 (0)