Skip to content

Commit 554910d

Browse files
feat: Automated regeneration of DiscoveryEngine client (googleapis#12439)
Auto-created at 2024-10-30 13:16:15 +0000 using the toys pull request generator.
1 parent 6e2a1e8 commit 554910d

File tree

56 files changed

+3469
-6
lines changed

Some content is hidden

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

56 files changed

+3469
-6
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.20"}]
14+
[{:google_api_discovery_engine, "~> 0.21"}]
1515
end
1616
```
1717

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

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3826,6 +3826,81 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do
38263826
)
38273827
end
38283828

3829+
@doc """
3830+
Performs a search. Similar to the SearchService.Search method, but a lite version that allows API key for authentication, where OAuth and IAM checks are not required. Only public website search is supported by this method. If data stores and engines not associated with public website search are specified, a `FAILED_PRECONDITION` error is returned. This method can be used for easy onboarding without having to implement an authentication backend. However, it is strongly recommended to use SearchService.Search instead with required OAuth and IAM checks to provide better data security.
3831+
3832+
## Parameters
3833+
3834+
* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.Connection.t`) - Connection to server
3835+
* `serving_config` (*type:* `String.t`) - Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.
3836+
* `optional_params` (*type:* `keyword()`) - Optional parameters
3837+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
3838+
* `:access_token` (*type:* `String.t`) - OAuth access token.
3839+
* `:alt` (*type:* `String.t`) - Data format for response.
3840+
* `:callback` (*type:* `String.t`) - JSONP
3841+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
3842+
* `: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.
3843+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
3844+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
3845+
* `: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.
3846+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
3847+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
3848+
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequest.t`) -
3849+
* `opts` (*type:* `keyword()`) - Call options
3850+
3851+
## Returns
3852+
3853+
* `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse{}}` on success
3854+
* `{:error, info}` on failure
3855+
"""
3856+
@spec discoveryengine_projects_locations_collections_data_stores_serving_configs_search_lite(
3857+
Tesla.Env.client(),
3858+
String.t(),
3859+
keyword(),
3860+
keyword()
3861+
) ::
3862+
{:ok, GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse.t()}
3863+
| {:ok, Tesla.Env.t()}
3864+
| {:ok, list()}
3865+
| {:error, any()}
3866+
def discoveryengine_projects_locations_collections_data_stores_serving_configs_search_lite(
3867+
connection,
3868+
serving_config,
3869+
optional_params \\ [],
3870+
opts \\ []
3871+
) do
3872+
optional_params_config = %{
3873+
:"$.xgafv" => :query,
3874+
:access_token => :query,
3875+
:alt => :query,
3876+
:callback => :query,
3877+
:fields => :query,
3878+
:key => :query,
3879+
:oauth_token => :query,
3880+
:prettyPrint => :query,
3881+
:quotaUser => :query,
3882+
:uploadType => :query,
3883+
:upload_protocol => :query,
3884+
:body => :body
3885+
}
3886+
3887+
request =
3888+
Request.new()
3889+
|> Request.method(:post)
3890+
|> Request.url("/v1/{+servingConfig}:searchLite", %{
3891+
"servingConfig" => URI.encode(serving_config, &URI.char_unreserved?/1)
3892+
})
3893+
|> Request.add_optional_params(optional_params_config, optional_params)
3894+
|> Request.library_version(@library_version)
3895+
3896+
connection
3897+
|> Connection.execute(request)
3898+
|> Response.decode(
3899+
opts ++
3900+
[struct: %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse{}]
3901+
)
3902+
end
3903+
38293904
@doc """
38303905
Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.
38313906

@@ -7456,6 +7531,81 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do
74567531
)
74577532
end
74587533

7534+
@doc """
7535+
Performs a search. Similar to the SearchService.Search method, but a lite version that allows API key for authentication, where OAuth and IAM checks are not required. Only public website search is supported by this method. If data stores and engines not associated with public website search are specified, a `FAILED_PRECONDITION` error is returned. This method can be used for easy onboarding without having to implement an authentication backend. However, it is strongly recommended to use SearchService.Search instead with required OAuth and IAM checks to provide better data security.
7536+
7537+
## Parameters
7538+
7539+
* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.Connection.t`) - Connection to server
7540+
* `serving_config` (*type:* `String.t`) - Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.
7541+
* `optional_params` (*type:* `keyword()`) - Optional parameters
7542+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
7543+
* `:access_token` (*type:* `String.t`) - OAuth access token.
7544+
* `:alt` (*type:* `String.t`) - Data format for response.
7545+
* `:callback` (*type:* `String.t`) - JSONP
7546+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
7547+
* `: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.
7548+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
7549+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
7550+
* `: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.
7551+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
7552+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
7553+
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequest.t`) -
7554+
* `opts` (*type:* `keyword()`) - Call options
7555+
7556+
## Returns
7557+
7558+
* `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse{}}` on success
7559+
* `{:error, info}` on failure
7560+
"""
7561+
@spec discoveryengine_projects_locations_collections_engines_serving_configs_search_lite(
7562+
Tesla.Env.client(),
7563+
String.t(),
7564+
keyword(),
7565+
keyword()
7566+
) ::
7567+
{:ok, GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse.t()}
7568+
| {:ok, Tesla.Env.t()}
7569+
| {:ok, list()}
7570+
| {:error, any()}
7571+
def discoveryengine_projects_locations_collections_engines_serving_configs_search_lite(
7572+
connection,
7573+
serving_config,
7574+
optional_params \\ [],
7575+
opts \\ []
7576+
) do
7577+
optional_params_config = %{
7578+
:"$.xgafv" => :query,
7579+
:access_token => :query,
7580+
:alt => :query,
7581+
:callback => :query,
7582+
:fields => :query,
7583+
:key => :query,
7584+
:oauth_token => :query,
7585+
:prettyPrint => :query,
7586+
:quotaUser => :query,
7587+
:uploadType => :query,
7588+
:upload_protocol => :query,
7589+
:body => :body
7590+
}
7591+
7592+
request =
7593+
Request.new()
7594+
|> Request.method(:post)
7595+
|> Request.url("/v1/{+servingConfig}:searchLite", %{
7596+
"servingConfig" => URI.encode(serving_config, &URI.char_unreserved?/1)
7597+
})
7598+
|> Request.add_optional_params(optional_params_config, optional_params)
7599+
|> Request.library_version(@library_version)
7600+
7601+
connection
7602+
|> Connection.execute(request)
7603+
|> Response.decode(
7604+
opts ++
7605+
[struct: %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse{}]
7606+
)
7607+
end
7608+
74597609
@doc """
74607610
Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.
74617611

@@ -11342,6 +11492,81 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do
1134211492
)
1134311493
end
1134411494

11495+
@doc """
11496+
Performs a search. Similar to the SearchService.Search method, but a lite version that allows API key for authentication, where OAuth and IAM checks are not required. Only public website search is supported by this method. If data stores and engines not associated with public website search are specified, a `FAILED_PRECONDITION` error is returned. This method can be used for easy onboarding without having to implement an authentication backend. However, it is strongly recommended to use SearchService.Search instead with required OAuth and IAM checks to provide better data security.
11497+
11498+
## Parameters
11499+
11500+
* `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.Connection.t`) - Connection to server
11501+
* `serving_config` (*type:* `String.t`) - Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.
11502+
* `optional_params` (*type:* `keyword()`) - Optional parameters
11503+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
11504+
* `:access_token` (*type:* `String.t`) - OAuth access token.
11505+
* `:alt` (*type:* `String.t`) - Data format for response.
11506+
* `:callback` (*type:* `String.t`) - JSONP
11507+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
11508+
* `: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.
11509+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
11510+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
11511+
* `: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.
11512+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
11513+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
11514+
* `:body` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequest.t`) -
11515+
* `opts` (*type:* `keyword()`) - Call options
11516+
11517+
## Returns
11518+
11519+
* `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse{}}` on success
11520+
* `{:error, info}` on failure
11521+
"""
11522+
@spec discoveryengine_projects_locations_data_stores_serving_configs_search_lite(
11523+
Tesla.Env.client(),
11524+
String.t(),
11525+
keyword(),
11526+
keyword()
11527+
) ::
11528+
{:ok, GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse.t()}
11529+
| {:ok, Tesla.Env.t()}
11530+
| {:ok, list()}
11531+
| {:error, any()}
11532+
def discoveryengine_projects_locations_data_stores_serving_configs_search_lite(
11533+
connection,
11534+
serving_config,
11535+
optional_params \\ [],
11536+
opts \\ []
11537+
) do
11538+
optional_params_config = %{
11539+
:"$.xgafv" => :query,
11540+
:access_token => :query,
11541+
:alt => :query,
11542+
:callback => :query,
11543+
:fields => :query,
11544+
:key => :query,
11545+
:oauth_token => :query,
11546+
:prettyPrint => :query,
11547+
:quotaUser => :query,
11548+
:uploadType => :query,
11549+
:upload_protocol => :query,
11550+
:body => :body
11551+
}
11552+
11553+
request =
11554+
Request.new()
11555+
|> Request.method(:post)
11556+
|> Request.url("/v1/{+servingConfig}:searchLite", %{
11557+
"servingConfig" => URI.encode(serving_config, &URI.char_unreserved?/1)
11558+
})
11559+
|> Request.add_optional_params(optional_params_config, optional_params)
11560+
|> Request.library_version(@library_version)
11561+
11562+
connection
11563+
|> Connection.execute(request)
11564+
|> Response.decode(
11565+
opts ++
11566+
[struct: %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponse{}]
11567+
)
11568+
end
11569+
1134511570
@doc """
1134611571
Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.
1134711572

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 "20241020"
23+
@discovery_revision "20241025"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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.GoogleApiDistribution do
19+
@moduledoc """
20+
`Distribution` contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets. The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths. Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the `mean` and `sum_of_squared_deviation` fields meaningless.
21+
22+
## Attributes
23+
24+
* `bucketCounts` (*type:* `list(String.t)`, *default:* `nil`) - The number of values in each bucket of the histogram, as described in `bucket_options`. If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in `bucket_counts` must equal the value in the `count` field of the distribution. If present, `bucket_counts` should contain N values, where N is the number of buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering schemes described for the three bucket types. The first value must be the count for the underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number N-1).
25+
* `bucketOptions` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionBucketOptions.t`, *default:* `nil`) - Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then omit this field.
26+
* `count` (*type:* `String.t`, *default:* `nil`) - The number of values in the population. Must be non-negative. This value must equal the sum of the values in `bucket_counts` if a histogram is provided.
27+
* `exemplars` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionExemplar.t)`, *default:* `nil`) - Must be in increasing order of `value` field.
28+
* `mean` (*type:* `float()`, *default:* `nil`) - The arithmetic mean of the values in the population. If `count` is zero then this field must be zero.
29+
* `range` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionRange.t`, *default:* `nil`) - If specified, contains the range of the population values. The field must not be present if the `count` is zero.
30+
* `sumOfSquaredDeviation` (*type:* `float()`, *default:* `nil`) - The sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` is zero then this field must be zero.
31+
"""
32+
33+
use GoogleApi.Gax.ModelBase
34+
35+
@type t :: %__MODULE__{
36+
:bucketCounts => list(String.t()) | nil,
37+
:bucketOptions =>
38+
GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionBucketOptions.t() | nil,
39+
:count => String.t() | nil,
40+
:exemplars =>
41+
list(GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionExemplar.t()) | nil,
42+
:mean => float() | nil,
43+
:range => GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionRange.t() | nil,
44+
:sumOfSquaredDeviation => float() | nil
45+
}
46+
47+
field(:bucketCounts, type: :list)
48+
field(:bucketOptions, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionBucketOptions)
49+
field(:count)
50+
51+
field(:exemplars,
52+
as: GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionExemplar,
53+
type: :list
54+
)
55+
56+
field(:mean)
57+
field(:range, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistributionRange)
58+
field(:sumOfSquaredDeviation)
59+
end
60+
61+
defimpl Poison.Decoder, for: GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistribution do
62+
def decode(value, options) do
63+
GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistribution.decode(value, options)
64+
end
65+
end
66+
67+
defimpl Poison.Encoder, for: GoogleApi.DiscoveryEngine.V1.Model.GoogleApiDistribution do
68+
def encode(value, options) do
69+
GoogleApi.Gax.ModelBase.encode(value, options)
70+
end
71+
end

0 commit comments

Comments
 (0)