Skip to content

Commit 337a2a1

Browse files
feat: Automated regeneration of DiscoveryEngine client (googleapis#12649)
Auto-created at 2024-12-06 13:18:23 +0000 using the toys pull request generator.
1 parent a5fa432 commit 337a2a1

File tree

54 files changed

+2814
-22
lines changed

Some content is hidden

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

54 files changed

+2814
-22
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.25"}]
14+
[{:google_api_discovery_engine, "~> 0.26"}]
1515
end
1616
```
1717

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

Lines changed: 480 additions & 6 deletions
Large diffs are not rendered by default.

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 "20241123"
23+
@discovery_revision "20241205"
2424

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

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer
2626
* `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitation.t)`, *default:* `nil`) - Citations.
2727
* `completeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer completed timestamp.
2828
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer creation timestamp.
29+
* `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
30+
* `groundingSupports` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.t)`, *default:* `nil`) - Optional. Grounding supports.
2931
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
3032
* `queryUnderstandingInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo.t`, *default:* `nil`) - Query understanding information.
3133
* `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerReference.t)`, *default:* `nil`) - References.
@@ -46,6 +48,12 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer
4648
| nil,
4749
:completeTime => DateTime.t() | nil,
4850
:createTime => DateTime.t() | nil,
51+
:groundingScore => float() | nil,
52+
:groundingSupports =>
53+
list(
54+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.t()
55+
)
56+
| nil,
4957
:name => String.t() | nil,
5058
:queryUnderstandingInfo =>
5159
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo.t()
@@ -72,6 +80,13 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer
7280

7381
field(:completeTime, as: DateTime)
7482
field(:createTime, as: DateTime)
83+
field(:groundingScore)
84+
85+
field(:groundingSupports,
86+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport,
87+
type: :list
88+
)
89+
7590
field(:name)
7691

7792
field(:queryUnderstandingInfo,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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.GoogleCloudDiscoveryengineV1AnswerGroundingSupport do
19+
@moduledoc """
20+
Grounding support for a claim in `answer_text`.
21+
22+
## Attributes
23+
24+
* `endIndex` (*type:* `String.t`, *default:* `nil`) - Required. End of the claim, exclusive.
25+
* `groundingCheckRequired` (*type:* `boolean()`, *default:* `nil`) - Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
26+
* `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
27+
* `sources` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource.t)`, *default:* `nil`) - Optional. Citation sources for the claim.
28+
* `startIndex` (*type:* `String.t`, *default:* `nil`) - Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:endIndex => String.t() | nil,
35+
:groundingCheckRequired => boolean() | nil,
36+
:groundingScore => float() | nil,
37+
:sources =>
38+
list(
39+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource.t()
40+
)
41+
| nil,
42+
:startIndex => String.t() | nil
43+
}
44+
45+
field(:endIndex)
46+
field(:groundingCheckRequired)
47+
field(:groundingScore)
48+
49+
field(:sources,
50+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource,
51+
type: :list
52+
)
53+
54+
field(:startIndex)
55+
end
56+
57+
defimpl Poison.Decoder,
58+
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport do
59+
def decode(value, options) do
60+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.decode(
61+
value,
62+
options
63+
)
64+
end
65+
end
66+
67+
defimpl Poison.Encoder,
68+
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport do
69+
def encode(value, options) do
70+
GoogleApi.Gax.ModelBase.encode(value, options)
71+
end
72+
end

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,26 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQ
2323
2424
* `disable` (*type:* `boolean()`, *default:* `nil`) - Disable query rephraser.
2525
* `maxRephraseSteps` (*type:* `integer()`, *default:* `nil`) - Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
26+
* `modelSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t`, *default:* `nil`) - Optional. Query Rephraser Model specification.
2627
"""
2728

2829
use GoogleApi.Gax.ModelBase
2930

3031
@type t :: %__MODULE__{
3132
:disable => boolean() | nil,
32-
:maxRephraseSteps => integer() | nil
33+
:maxRephraseSteps => integer() | nil,
34+
:modelSpec =>
35+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t()
36+
| nil
3337
}
3438

3539
field(:disable)
3640
field(:maxRephraseSteps)
41+
42+
field(:modelSpec,
43+
as:
44+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec
45+
)
3746
end
3847

3948
defimpl Poison.Decoder,
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.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do
19+
@moduledoc """
20+
Query Rephraser Model specification.
21+
22+
## Attributes
23+
24+
* `modelType` (*type:* `String.t`, *default:* `nil`) - Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:modelType => String.t() | nil
31+
}
32+
33+
field(:modelType)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for:
38+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do
39+
def decode(value, options) do
40+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.decode(
41+
value,
42+
options
43+
)
44+
end
45+
end
46+
47+
defimpl Poison.Encoder,
48+
for:
49+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec 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_answer_query_request_safety_spec.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec do
1919
@moduledoc """
20-
Safety specification.
20+
Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.
2121
2222
## Attributes
2323

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FhirSto
2424
* `fhirStore` (*type:* `String.t`, *default:* `nil`) - Required. The full resource name of the FHIR store to import data from, in the format of `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
2525
* `gcsStagingDir` (*type:* `String.t`, *default:* `nil`) - Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the FhirStore export to a specific Cloud Storage directory.
2626
* `resourceTypes` (*type:* `list(String.t)`, *default:* `nil`) - The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty.
27+
* `updateFromLatestPredefinedSchema` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.
2728
"""
2829

2930
use GoogleApi.Gax.ModelBase
3031

3132
@type t :: %__MODULE__{
3233
:fhirStore => String.t() | nil,
3334
:gcsStagingDir => String.t() | nil,
34-
:resourceTypes => list(String.t()) | nil
35+
:resourceTypes => list(String.t()) | nil,
36+
:updateFromLatestPredefinedSchema => boolean() | nil
3537
}
3638

3739
field(:fhirStore)
3840
field(:gcsStagingDir)
3941
field(:resourceTypes, type: :list)
42+
field(:updateFromLatestPredefinedSchema)
4043
end
4144

4245
defimpl Poison.Decoder,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,25 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR
2121
2222
## Attributes
2323
24+
* `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec.t`, *default:* `nil`) - Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
2425
* `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
2526
* `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
2627
"""
2728

2829
use GoogleApi.Gax.ModelBase
2930

3031
@type t :: %__MODULE__{
32+
:boostSpec =>
33+
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec.t()
34+
| nil,
3135
:dataStore => String.t() | nil,
3236
:filter => String.t() | nil
3337
}
3438

39+
field(:boostSpec,
40+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec
41+
)
42+
3543
field(:dataStore)
3644
field(:filter)
3745
end

0 commit comments

Comments
 (0)