Skip to content

Commit fefaa58

Browse files
feat: Automated regeneration of DiscoveryEngine client (googleapis#12513)
Auto-created at 2024-11-12 13:15:12 +0000 using the toys pull request generator.
1 parent a66a60a commit fefaa58

25 files changed

+207
-271
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.23"}]
14+
[{:google_api_discovery_engine, "~> 0.24"}]
1515
end
1616
```
1717

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

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13669,6 +13669,80 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do
1366913669
|> Response.decode(opts ++ [struct: %GoogleApi.DiscoveryEngine.V1.Model.GoogleApiHttpBody{}])
1367013670
end
1367113671

13672+
@doc """
13673+
Bulk import of user events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.
13674+
13675+
## Parameters
13676+
13677+
* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.Connection.t`) - Connection to server
13678+
* `parent` (*type:* `String.t`) - Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
13679+
* `optional_params` (*type:* `keyword()`) - Optional parameters
13680+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
13681+
* `:access_token` (*type:* `String.t`) - OAuth access token.
13682+
* `:alt` (*type:* `String.t`) - Data format for response.
13683+
* `:callback` (*type:* `String.t`) - JSONP
13684+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
13685+
* `: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.
13686+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
13687+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
13688+
* `: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.
13689+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
13690+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
13691+
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ImportUserEventsRequest.t`) -
13692+
* `opts` (*type:* `keyword()`) - Call options
13693+
13694+
## Returns
13695+
13696+
* `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleLongrunningOperation{}}` on success
13697+
* `{:error, info}` on failure
13698+
"""
13699+
@spec discoveryengine_projects_locations_user_events_import(
13700+
Tesla.Env.client(),
13701+
String.t(),
13702+
keyword(),
13703+
keyword()
13704+
) ::
13705+
{:ok, GoogleApi.DiscoveryEngine.V1.Model.GoogleLongrunningOperation.t()}
13706+
| {:ok, Tesla.Env.t()}
13707+
| {:ok, list()}
13708+
| {:error, any()}
13709+
def discoveryengine_projects_locations_user_events_import(
13710+
connection,
13711+
parent,
13712+
optional_params \\ [],
13713+
opts \\ []
13714+
) do
13715+
optional_params_config = %{
13716+
:"$.xgafv" => :query,
13717+
:access_token => :query,
13718+
:alt => :query,
13719+
:callback => :query,
13720+
:fields => :query,
13721+
:key => :query,
13722+
:oauth_token => :query,
13723+
:prettyPrint => :query,
13724+
:quotaUser => :query,
13725+
:uploadType => :query,
13726+
:upload_protocol => :query,
13727+
:body => :body
13728+
}
13729+
13730+
request =
13731+
Request.new()
13732+
|> Request.method(:post)
13733+
|> Request.url("/v1/{+parent}/userEvents:import", %{
13734+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
13735+
})
13736+
|> Request.add_optional_params(optional_params_config, optional_params)
13737+
|> Request.library_version(@library_version)
13738+
13739+
connection
13740+
|> Connection.execute(request)
13741+
|> Response.decode(
13742+
opts ++ [struct: %GoogleApi.DiscoveryEngine.V1.Model.GoogleLongrunningOperation{}]
13743+
)
13744+
end
13745+
1367213746
@doc """
1367313747
Writes a single user event.
1367413748

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 "20241031"
23+
@discovery_revision "20241110"
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_query_request_grounding_spec.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQ
2121
2222
## Attributes
2323
24+
* `filteringLevel` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies whether to enable the filtering based on grounding score and at what level.
2425
* `includeGroundingSupports` (*type:* `boolean()`, *default:* `nil`) - Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.
2526
"""
2627

2728
use GoogleApi.Gax.ModelBase
2829

2930
@type t :: %__MODULE__{
31+
:filteringLevel => String.t() | nil,
3032
:includeGroundingSupports => boolean() | nil
3133
}
3234

35+
field(:filteringLevel)
3336
field(:includeGroundingSupports)
3437
end
3538

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1CheckGr
2424
* `citationIndices` (*type:* `list(integer())`, *default:* `nil`) - A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.
2525
* `claimText` (*type:* `String.t`, *default:* `nil`) - Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.
2626
* `endPos` (*type:* `integer()`, *default:* `nil`) - Position indicating the end of the claim in the answer candidate, exclusive.
27-
* `groundingCheckRequired` (*type:* `boolean()`, *default:* `nil`) - Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned.
27+
* `groundingCheckRequired` (*type:* `boolean()`, *default:* `nil`) - Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices should not be returned.
2828
* `startPos` (*type:* `integer()`, *default:* `nil`) - Position indicating the start of the claim in the answer candidate, measured in bytes.
2929
"""
3030

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Chunk d
2828
* `id` (*type:* `String.t`, *default:* `nil`) - Unique chunk ID of the current chunk.
2929
* `name` (*type:* `String.t`, *default:* `nil`) - The full resource name of the chunk. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
3030
* `pageSpan` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ChunkPageSpan.t`, *default:* `nil`) - Page span of the chunk.
31-
* `relevanceScore` (*type:* `float()`, *default:* `nil`) - Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.
31+
* `relevanceScore` (*type:* `float()`, *default:* `nil`) - Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.
3232
"""
3333

3434
use GoogleApi.Gax.ModelBase

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Documen
2121
2222
## Attributes
2323
24+
* `conversionValue` (*type:* `number()`, *default:* `nil`) - Optional. The conversion value associated with this Document. Must be set if UserEvent.event_type is "conversion". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the `watch` conversion type.
2425
* `id` (*type:* `String.t`, *default:* `nil`) - The Document resource ID.
2526
* `joined` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether the referenced Document can be found in the data store.
2627
* `name` (*type:* `String.t`, *default:* `nil`) - The Document resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
@@ -32,6 +33,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Documen
3233
use GoogleApi.Gax.ModelBase
3334

3435
@type t :: %__MODULE__{
36+
:conversionValue => number() | nil,
3537
:id => String.t() | nil,
3638
:joined => boolean() | nil,
3739
:name => String.t() | nil,
@@ -40,6 +42,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Documen
4042
:uri => String.t() | nil
4143
}
4244

45+
field(:conversionValue)
4346
field(:id)
4447
field(:joined)
4548
field(:name)

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

Lines changed: 0 additions & 66 deletions
This file was deleted.

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

Lines changed: 0 additions & 54 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Ranking
2323
2424
* `content` (*type:* `String.t`, *default:* `nil`) - The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.
2525
* `id` (*type:* `String.t`, *default:* `nil`) - The unique ID to represent the record.
26-
* `score` (*type:* `number()`, *default:* `nil`) - The score of this record based on the given query and selected model.
26+
* `score` (*type:* `number()`, *default:* `nil`) - The score of this record based on the given query and selected model. The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.
2727
* `title` (*type:* `String.t`, *default:* `nil`) - The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.
2828
"""
2929

0 commit comments

Comments
 (0)