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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:allowMissing` (*type:* `boolean()`) - If set to true, and the Document is not found, a new Document will be created.
* `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`) -
* `opts` (*type:* `keyword()`) - Call options

Expand Down Expand Up @@ -1250,6 +1251,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
:uploadType => :query,
:upload_protocol => :query,
:allowMissing => :query,
:updateMask => :query,
:body => :body
}

Expand Down Expand Up @@ -1900,7 +1902,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -3613,7 +3615,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -5206,7 +5208,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
* `parent` (*type:* `String.t`) - Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -6282,7 +6284,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -7307,7 +7309,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -8568,6 +8570,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:allowMissing` (*type:* `boolean()`) - If set to true, and the Document is not found, a new Document will be created.
* `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`) -
* `opts` (*type:* `keyword()`) - Call options

Expand Down Expand Up @@ -8606,6 +8609,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
:uploadType => :query,
:upload_protocol => :query,
:allowMissing => :query,
:updateMask => :query,
:body => :body
}

Expand Down Expand Up @@ -9256,7 +9260,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -10814,7 +10818,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`
* `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -11942,7 +11946,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
* `parent` (*type:* `String.t`) - Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -12328,6 +12332,85 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do
)
end

@doc """
Writes a single user event.

## Parameters

* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
* `:alt` (*type:* `String.t`) - Data format for response.
* `:callback` (*type:* `String.t`) - JSONP
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
* `: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.
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent{}}` on success
* `{:error, info}` on failure
"""
@spec discoveryengine_projects_locations_user_events_write(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok,
GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def discoveryengine_projects_locations_user_events_write(
connection,
parent,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1beta/{+parent}/userEvents:write", %{
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(
opts ++
[
struct:
%GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent{}
]
)
end

@doc """
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.

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 "20240401"
@discovery_revision "20240415"

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

## Attributes

* `enhancedDocumentElements` (*type:* `list(String.t)`, *default:* `nil`) - Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.
* `enhancedDocumentElements` (*type:* `list(String.t)`, *default:* `nil`) - [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.
* `useNativeText` (*type:* `boolean()`, *default:* `nil`) - If true, will use native text instead of OCR text on pages containing native text.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Eng
## Attributes

* `agentCreationConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.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.
* `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. Please use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.
* `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.
"""

use GoogleApi.Gax.ModelBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Eng
## Attributes

* `searchAddOns` (*type:* `list(String.t)`, *default:* `nil`) - The add-on that this search engine enables.
* `searchTier` (*type:* `String.t`, *default:* `nil`) - The search feature tier of this engine. Different tiers might have different pricing. To learn more, please check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.
* `searchTier` (*type:* `String.t`, *default:* `nil`) - The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.
"""

use GoogleApi.Gax.ModelBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp
* `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitation.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.
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
* `queryUnderstandingInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo.t`, *default:* `nil`) - Query understanding information.
* `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerReference.t)`, *default:* `nil`) - References.
* `relatedQuestions` (*type:* `list(String.t)`, *default:* `nil`) - Suggested related questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp

## Attributes

* `enhancedDocumentElements` (*type:* `list(String.t)`, *default:* `nil`) - Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.
* `enhancedDocumentElements` (*type:* `list(String.t)`, *default:* `nil`) - [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.
* `useNativeText` (*type:* `boolean()`, *default:* `nil`) - If true, will use native text instead of OCR text on pages containing native text.
"""

Expand Down
Loading
Loading