Skip to content

Commit 179ea31

Browse files
feat: Automated regeneration of DiscoveryEngine client (googleapis#12739)
Auto-created at 2024-12-18 13:17:34 +0000 using the toys pull request generator.
1 parent 3330d2a commit 179ea31

File tree

94 files changed

+4939
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+4939
-8
lines changed

clients/discovery_engine/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_discovery_engine, "~> 0.27"}]
14+
[{:google_api_discovery_engine, "~> 0.28"}]
1515
end
1616
```
1717

clients/discovery_engine/lib/google_api/discovery_engine/v1/api/projects.ex

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,85 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do
8989
)
9090
end
9191

92+
@doc """
93+
Generates grounded content.
94+
95+
## Parameters
96+
97+
* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.Connection.t`) - Connection to server
98+
* `location` (*type:* `String.t`) - Required. Location resource. Format: `projects/{project}/locations/{location}`.
99+
* `optional_params` (*type:* `keyword()`) - Optional parameters
100+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
101+
* `:access_token` (*type:* `String.t`) - OAuth access token.
102+
* `:alt` (*type:* `String.t`) - Data format for response.
103+
* `:callback` (*type:* `String.t`) - JSONP
104+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
105+
* `: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.
106+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
107+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
108+
* `: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.
109+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
110+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
111+
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequest.t`) -
112+
* `opts` (*type:* `keyword()`) - Call options
113+
114+
## Returns
115+
116+
* `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentResponse{}}` on success
117+
* `{:error, info}` on failure
118+
"""
119+
@spec discoveryengine_projects_locations_generate_grounded_content(
120+
Tesla.Env.client(),
121+
String.t(),
122+
keyword(),
123+
keyword()
124+
) ::
125+
{:ok,
126+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentResponse.t()}
127+
| {:ok, Tesla.Env.t()}
128+
| {:ok, list()}
129+
| {:error, any()}
130+
def discoveryengine_projects_locations_generate_grounded_content(
131+
connection,
132+
location,
133+
optional_params \\ [],
134+
opts \\ []
135+
) do
136+
optional_params_config = %{
137+
:"$.xgafv" => :query,
138+
:access_token => :query,
139+
:alt => :query,
140+
:callback => :query,
141+
:fields => :query,
142+
:key => :query,
143+
:oauth_token => :query,
144+
:prettyPrint => :query,
145+
:quotaUser => :query,
146+
:uploadType => :query,
147+
:upload_protocol => :query,
148+
:body => :body
149+
}
150+
151+
request =
152+
Request.new()
153+
|> Request.method(:post)
154+
|> Request.url("/v1/{+location}:generateGroundedContent", %{
155+
"location" => URI.encode(location, &URI.char_unreserved?/1)
156+
})
157+
|> Request.add_optional_params(optional_params_config, optional_params)
158+
|> Request.library_version(@library_version)
159+
160+
connection
161+
|> Connection.execute(request)
162+
|> Response.decode(
163+
opts ++
164+
[
165+
struct:
166+
%GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentResponse{}
167+
]
168+
)
169+
end
170+
92171
@doc """
93172
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.
94173

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 "20241210"
23+
@discovery_revision "20241216"
2424

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

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CmekCon
2626
* `kmsKeyVersion` (*type:* `String.t`, *default:* `nil`) - Kms key version resource name which will be used to encrypt resources `/cryptoKeyVersions/{keyVersion}`.
2727
* `lastRotationTimestampMicros` (*type:* `String.t`, *default:* `nil`) - Output only. The timestamp of the last key rotation.
2828
* `name` (*type:* `String.t`, *default:* `nil`) - Required. Name of the CmekConfig, of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}`.
29+
* `singleRegionKeys` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SingleRegionKey.t)`, *default:* `nil`) - Optional. Single-regional CMEKs that are required for some VAIS features.
2930
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the CmekConfig.
3031
"""
3132

@@ -37,6 +38,11 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CmekCon
3738
:kmsKeyVersion => String.t() | nil,
3839
:lastRotationTimestampMicros => String.t() | nil,
3940
:name => String.t() | nil,
41+
:singleRegionKeys =>
42+
list(
43+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SingleRegionKey.t()
44+
)
45+
| nil,
4046
:state => String.t() | nil
4147
}
4248

@@ -45,6 +51,12 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CmekCon
4551
field(:kmsKeyVersion)
4652
field(:lastRotationTimestampMicros)
4753
field(:name)
54+
55+
field(:singleRegionKeys,
56+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SingleRegionKey,
57+
type: :list
58+
)
59+
4860
field(:state)
4961
end
5062

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DataSto
3030
* `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
3131
* `documentProcessingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig.t`, *default:* `nil`) - Configuration for Document understanding and enrichment.
3232
* `industryVertical` (*type:* `String.t`, *default:* `nil`) - Immutable. The industry vertical that the data store registers.
33+
* `isInfobotFaqDataStore` (*type:* `boolean()`, *default:* `nil`) - Optional. If set, this DataStore is an Infobot FAQ DataStore.
3334
* `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Input only. The KMS key to be used to protect this DataStore at creation time. Must be set for requests that need to comply with CMEK Org Policy protections. If this field is set and processed successfully, the DataStore will be protected by the KMS key, as indicated in the cmek_config field.
3435
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
3536
* `servingConfigDataStore` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DataStoreServingConfigDataStore.t`, *default:* `nil`) - Optional. Stores serving config at DataStore level.
@@ -57,6 +58,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DataSto
5758
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig.t()
5859
| nil,
5960
:industryVertical => String.t() | nil,
61+
:isInfobotFaqDataStore => boolean() | nil,
6062
:kmsKeyName => String.t() | nil,
6163
:name => String.t() | nil,
6264
:servingConfigDataStore =>
@@ -90,6 +92,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DataSto
9092
)
9193

9294
field(:industryVertical)
95+
field(:isInfobotFaqDataStore)
9396
field(:kmsKeyName)
9497
field(:name)
9598

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Documen
2424
* `content` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentContent.t`, *default:* `nil`) - The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store.
2525
* `derivedStructData` (*type:* `map()`, *default:* `nil`) - Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.
2626
* `id` (*type:* `String.t`, *default:* `nil`) - Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.
27-
* `indexStatus` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentIndexStatus.t`, *default:* `nil`) - Output only. The index status of the document. * If document is indexed successfully, the index_time field is populated. * Otherwise, if document is not indexed due to errors, the error_samples field is populated. * Otherwise, index_status is unset.
27+
* `indexStatus` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentIndexStatus.t`, *default:* `nil`) - Output only. The index status of the document. * If document is indexed successfully, the index_time field is populated. * Otherwise, if document is not indexed due to errors, the error_samples field is populated. * Otherwise, if document's index is in progress, the pending_message field is populated.
2828
* `indexTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.
2929
* `jsonData` (*type:* `String.t`, *default:* `nil`) - The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.
3030
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Documen
2323
2424
* `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while indexing the document. If this field is populated, the document is not indexed due to errors.
2525
* `indexTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the document was indexed. If this field is populated, it means the document has been indexed.
26+
* `pendingMessage` (*type:* `String.t`, *default:* `nil`) - Immutable. The message indicates the document index is in progress. If this field is populated, the document index is pending.
2627
"""
2728

2829
use GoogleApi.Gax.ModelBase
2930

3031
@type t :: %__MODULE__{
3132
:errorSamples => list(GoogleApi.DiscoveryEngine.V1.Model.GoogleRpcStatus.t()) | nil,
32-
:indexTime => DateTime.t() | nil
33+
:indexTime => DateTime.t() | nil,
34+
:pendingMessage => String.t() | nil
3335
}
3436

3537
field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleRpcStatus, type: :list)
3638
field(:indexTime, as: DateTime)
39+
field(:pendingMessage)
3740
end
3841

3942
defimpl Poison.Decoder,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequest do
19+
@moduledoc """
20+
Top-level message sent by the client for the `GenerateGroundedContent` method.
21+
22+
## Attributes
23+
24+
* `contents` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GroundedGenerationContent.t)`, *default:* `nil`) - Content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
25+
* `generationSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGenerationSpec.t`, *default:* `nil`) - Content generation specification.
26+
* `groundingSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGroundingSpec.t`, *default:* `nil`) - Grounding specification.
27+
* `systemInstruction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GroundedGenerationContent.t`, *default:* `nil`) - Content of the system instruction for the current API. These instructions will take priority over any other prompt instructions if the selected model is supporting them.
28+
* `userLabels` (*type:* `map()`, *default:* `nil`) - The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:contents =>
35+
list(
36+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GroundedGenerationContent.t()
37+
)
38+
| nil,
39+
:generationSpec =>
40+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGenerationSpec.t()
41+
| nil,
42+
:groundingSpec =>
43+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGroundingSpec.t()
44+
| nil,
45+
:systemInstruction =>
46+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GroundedGenerationContent.t()
47+
| nil,
48+
:userLabels => map() | nil
49+
}
50+
51+
field(:contents,
52+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GroundedGenerationContent,
53+
type: :list
54+
)
55+
56+
field(:generationSpec,
57+
as:
58+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGenerationSpec
59+
)
60+
61+
field(:groundingSpec,
62+
as:
63+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestGroundingSpec
64+
)
65+
66+
field(:systemInstruction,
67+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GroundedGenerationContent
68+
)
69+
70+
field(:userLabels, type: :map)
71+
end
72+
73+
defimpl Poison.Decoder,
74+
for:
75+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequest do
76+
def decode(value, options) do
77+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequest.decode(
78+
value,
79+
options
80+
)
81+
end
82+
end
83+
84+
defimpl Poison.Encoder,
85+
for:
86+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequest do
87+
def encode(value, options) do
88+
GoogleApi.Gax.ModelBase.encode(value, options)
89+
end
90+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestDynamicRetrievalConfiguration do
19+
@moduledoc """
20+
Describes the options to customize dynamic retrieval.
21+
22+
## Attributes
23+
24+
* `predictor` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestDynamicRetrievalConfigurationDynamicRetrievalPredictor.t`, *default:* `nil`) - Specification for the predictor for dynamic retrieval.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:predictor =>
31+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestDynamicRetrievalConfigurationDynamicRetrievalPredictor.t()
32+
| nil
33+
}
34+
35+
field(:predictor,
36+
as:
37+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestDynamicRetrievalConfigurationDynamicRetrievalPredictor
38+
)
39+
end
40+
41+
defimpl Poison.Decoder,
42+
for:
43+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestDynamicRetrievalConfiguration do
44+
def decode(value, options) do
45+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestDynamicRetrievalConfiguration.decode(
46+
value,
47+
options
48+
)
49+
end
50+
end
51+
52+
defimpl Poison.Encoder,
53+
for:
54+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1GenerateGroundedContentRequestDynamicRetrievalConfiguration do
55+
def encode(value, options) do
56+
GoogleApi.Gax.ModelBase.encode(value, options)
57+
end
58+
end

0 commit comments

Comments
 (0)