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 #12482

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.22"}]
[{:google_api_discovery_engine, "~> 0.23"}]
end
```

Expand Down
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 "20241030"
@discovery_revision "20241031"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGr

## Attributes

* `citedChunks` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk.t)`, *default:* `nil`) - List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
* `citedChunks` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FactChunk.t)`, *default:* `nil`) - List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
* `citedFacts` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk.t)`, *default:* `nil`) - List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.
* `claims` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim.t)`, *default:* `nil`) - Claim texts and citation info across all claims in the answer candidate.
* `supportScore` (*type:* `number()`, *default:* `nil`) - The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.
"""
Expand All @@ -30,8 +31,11 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGr

@type t :: %__MODULE__{
:citedChunks =>
list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FactChunk.t())
| nil,
:citedFacts =>
list(
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk.t()
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk.t()
)
| nil,
:claims =>
Expand All @@ -43,8 +47,13 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGr
}

field(:citedChunks,
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FactChunk,
type: :list
)

field(:citedFacts,
as:
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk,
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk,
type: :list
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,29 @@
# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk do
defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk do
@moduledoc """
Fact chunk for grounding check.

## Attributes

* `chunkText` (*type:* `String.t`, *default:* `nil`) - Text content of the fact chunk. Can be at most 10K characters long.
* `source` (*type:* `String.t`, *default:* `nil`) - Source from which this fact chunk was retrieved. For a fact chunk retrieved from inline facts, this field will contain the index of the specific fact from which this chunk was retrieved.
"""

use GoogleApi.Gax.ModelBase

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

field(:chunkText)
field(:source)
end

defimpl Poison.Decoder,
for:
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk do
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk do
def decode(value, options) do
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk.decode(
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk.decode(
value,
options
)
Expand All @@ -49,7 +46,7 @@ end

defimpl Poison.Encoder,
for:
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseFactChunk do
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGroundingResponseCheckGroundingFactChunk do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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.GoogleCloudDiscoveryengineV1FactChunk do
@moduledoc """
Fact Chunk.

## Attributes

* `chunkText` (*type:* `String.t`, *default:* `nil`) - Text content of the fact chunk. Can be at most 10K characters long.
* `index` (*type:* `integer()`, *default:* `nil`) - The index of this chunk. Currently, only used for the streaming mode.
* `source` (*type:* `String.t`, *default:* `nil`) - Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.
* `sourceMetadata` (*type:* `map()`, *default:* `nil`) - More fine-grained information for the source reference.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:chunkText => String.t() | nil,
:index => integer() | nil,
:source => String.t() | nil,
:sourceMetadata => map() | nil
}

field(:chunkText)
field(:index)
field(:source)
field(:sourceMetadata, type: :map)
end

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

defimpl Poison.Encoder,
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FactChunk do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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.GoogleCloudDiscoveryengineV1Feedback do
@moduledoc """
Information about the user feedback. This information will be used for logging and metrics purpose.

## Attributes

* `comment` (*type:* `String.t`, *default:* `nil`) - Optional. The additional user comment of the feedback if user gives a thumb down.
* `conversationInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FeedbackConversationInfo.t`, *default:* `nil`) - The related conversation information when user gives feedback.
* `feedbackType` (*type:* `String.t`, *default:* `nil`) - Required. Indicate whether the user gives a positive or negative feedback. If the user gives a negative feedback, there might be more feedback details.
* `llmModelVersion` (*type:* `String.t`, *default:* `nil`) - The version of the LLM model that was used to generate the response.
* `reasons` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The reason if user gives a thumb down.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:comment => String.t() | nil,
:conversationInfo =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FeedbackConversationInfo.t()
| nil,
:feedbackType => String.t() | nil,
:llmModelVersion => String.t() | nil,
:reasons => list(String.t()) | nil
}

field(:comment)

field(:conversationInfo,
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FeedbackConversationInfo
)

field(:feedbackType)
field(:llmModelVersion)
field(:reasons, type: :list)
end

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

defimpl Poison.Encoder,
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Feedback do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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.GoogleCloudDiscoveryengineV1FeedbackConversationInfo do
@moduledoc """
The conversation information such as the question index and session name.

## Attributes

* `questionIndex` (*type:* `integer()`, *default:* `nil`) - The index of the user input within the conversation messages.
* `session` (*type:* `String.t`, *default:* `nil`) - Name of the newly generated or continued session.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:questionIndex => integer() | nil,
:session => String.t() | nil
}

field(:questionIndex)
field(:session)
end

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

defimpl Poison.Encoder,
for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FeedbackConversationInfo 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 @@ -22,6 +22,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelIn
## Attributes

* `displayName` (*type:* `String.t`, *default:* `nil`) - The display name of the panel.
* `documents` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentInfo.t)`, *default:* `nil`) - Optional. The document IDs associated with this panel.
* `panelId` (*type:* `String.t`, *default:* `nil`) - Required. The panel ID.
* `panelPosition` (*type:* `integer()`, *default:* `nil`) - The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set.
* `totalPanels` (*type:* `integer()`, *default:* `nil`) - The total number of panels, including this one, shown to the user. Must be set if panel_position is set.
Expand All @@ -31,12 +32,21 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelIn

@type t :: %__MODULE__{
:displayName => String.t() | nil,
:documents =>
list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentInfo.t())
| nil,
:panelId => String.t() | nil,
:panelPosition => integer() | nil,
:totalPanels => integer() | nil
}

field(:displayName)

field(:documents,
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1DocumentInfo,
type: :list
)

field(:panelId)
field(:panelPosition)
field(:totalPanels)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1UserEve
* `engine` (*type:* `String.t`, *default:* `nil`) - The Engine resource name, in the form of `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. Optional. Only required for Engine produced user events. For example, user events from blended search.
* `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.
* `eventType` (*type:* `String.t`, *default:* `nil`) - Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home > Men > Jeans * `add-feedback`: Add a user feedback. Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.
* `feedback` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Feedback.t`, *default:* `nil`) - Optional. This field is optional except for the `add-feedback` event types.
* `filter` (*type:* `String.t`, *default:* `nil`) - The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
* `mediaInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1MediaInfo.t`, *default:* `nil`) - Media-specific info.
* `pageInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PageInfo.t`, *default:* `nil`) - Page metadata such as categories and other critical information for certain event types such as `view-category-page`.
* `panel` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelInfo.t`, *default:* `nil`) - Panel metadata associated with this user event.
* `panels` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelInfo.t)`, *default:* `nil`) - Optional. List of panels associated with this event. Used for page-level impression data.
* `promotionIds` (*type:* `list(String.t)`, *default:* `nil`) - The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID.
* `searchInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchInfo.t`, *default:* `nil`) - SearchService.Search details related to the event. This field should be set for `search` event.
* `sessionId` (*type:* `String.t`, *default:* `nil`) - A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the session_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add UserEvent.user_pseudo_id as prefix.
Expand Down Expand Up @@ -64,13 +66,18 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1UserEve
:engine => String.t() | nil,
:eventTime => DateTime.t() | nil,
:eventType => String.t() | nil,
:feedback =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Feedback.t() | nil,
:filter => String.t() | nil,
:mediaInfo =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1MediaInfo.t() | nil,
:pageInfo =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PageInfo.t() | nil,
:panel =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelInfo.t() | nil,
:panels =>
list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelInfo.t())
| nil,
:promotionIds => list(String.t()) | nil,
:searchInfo =>
GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchInfo.t() | nil,
Expand Down Expand Up @@ -106,10 +113,17 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1UserEve
field(:engine)
field(:eventTime, as: DateTime)
field(:eventType)
field(:feedback, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Feedback)
field(:filter)
field(:mediaInfo, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1MediaInfo)
field(:pageInfo, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PageInfo)
field(:panel, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelInfo)

field(:panels,
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1PanelInfo,
type: :list
)

field(:promotionIds, type: :list)

field(:searchInfo, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta do
API client metadata for GoogleApi.DiscoveryEngine.V1beta.
"""

@discovery_revision "20241030"
@discovery_revision "20241031"

def discovery_revision(), do: @discovery_revision
end
Loading
Loading