Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of DiscoveryEngine client #12649

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/discovery_engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_discovery_engine, "~> 0.25"}]
[{:google_api_discovery_engine, "~> 0.26"}]
end
```

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.DiscoveryEngine.V1 do
API client metadata for GoogleApi.DiscoveryEngine.V1.
"""

@discovery_revision "20241123"
@discovery_revision "20241205"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer
* `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitation.t)`, *default:* `nil`) - Citations.
* `completeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer completed timestamp.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer creation timestamp.
* `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
* `groundingSupports` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.t)`, *default:* `nil`) - Optional. Grounding supports.
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
* `queryUnderstandingInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo.t`, *default:* `nil`) - Query understanding information.
* `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerReference.t)`, *default:* `nil`) - References.
Expand All @@ -46,6 +48,12 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer
| nil,
:completeTime => DateTime.t() | nil,
:createTime => DateTime.t() | nil,
:groundingScore => float() | nil,
:groundingSupports =>
list(
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.t()
)
| nil,
:name => String.t() | nil,
:queryUnderstandingInfo =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo.t()
Expand All @@ -72,6 +80,13 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer

field(:completeTime, as: DateTime)
field(:createTime, as: DateTime)
field(:groundingScore)

field(:groundingSupports,
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport,
type: :list
)

field(:name)

field(:queryUnderstandingInfo,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 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.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport do
@moduledoc """
Grounding support for a claim in `answer_text`.

## Attributes

* `endIndex` (*type:* `String.t`, *default:* `nil`) - Required. End of the claim, exclusive.
* `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.
* `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.
* `sources` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource.t)`, *default:* `nil`) - Optional. Citation sources for the claim.
* `startIndex` (*type:* `String.t`, *default:* `nil`) - Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:endIndex => String.t() | nil,
:groundingCheckRequired => boolean() | nil,
:groundingScore => float() | nil,
:sources =>
list(
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource.t()
)
| nil,
:startIndex => String.t() | nil
}

field(:endIndex)
field(:groundingCheckRequired)
field(:groundingScore)

field(:sources,
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource,
type: :list
)

field(:startIndex)
end

defimpl Poison.Decoder,
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport do
def decode(value, options) do
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport 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,17 +23,26 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQ

* `disable` (*type:* `boolean()`, *default:* `nil`) - Disable query rephraser.
* `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.
* `modelSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t`, *default:* `nil`) - Optional. Query Rephraser Model specification.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:disable => boolean() | nil,
:maxRephraseSteps => integer() | nil
:maxRephraseSteps => integer() | nil,
:modelSpec =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t()
| nil
}

field(:disable)
field(:maxRephraseSteps)

field(:modelSpec,
as:
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec
)
end

defimpl Poison.Decoder,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do
@moduledoc """
Query Rephraser Model specification.

## Attributes

* `modelType` (*type:* `String.t`, *default:* `nil`) - Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:modelType => String.t() | nil
}

field(:modelType)
end

defimpl Poison.Decoder,
for:
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do
def decode(value, options) do
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for:
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec 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 @@ -17,7 +17,7 @@

defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec do
@moduledoc """
Safety specification.
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.

## Attributes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FhirSto
* `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}`.
* `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.
* `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.
* `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.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:fhirStore => String.t() | nil,
:gcsStagingDir => String.t() | nil,
:resourceTypes => list(String.t()) | nil
:resourceTypes => list(String.t()) | nil,
:updateFromLatestPredefinedSchema => boolean() | nil
}

field(:fhirStore)
field(:gcsStagingDir)
field(:resourceTypes, type: :list)
field(:updateFromLatestPredefinedSchema)
end

defimpl Poison.Decoder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,25 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR

## Attributes

* `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)
* `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}`.
* `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)
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:boostSpec =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec.t()
| nil,
:dataStore => String.t() | nil,
:filter => String.t() | nil
}

field(:boostSpec,
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec
)

field(:dataStore)
field(:filter)
end
Expand Down
Loading
Loading