Skip to content

Commit

Permalink
feat: Automated regeneration of CloudSearch client (#10985)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent 46dd4c7 commit cfb4460
Show file tree
Hide file tree
Showing 459 changed files with 3,000 additions and 21,887 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defmodule GoogleApi.CloudSearch.V1.Api.Operations do
end

@doc """
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
## Parameters
Expand Down
61 changes: 60 additions & 1 deletion clients/cloud_search/lib/google_api/cloud_search/v1/api/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,65 @@ defmodule GoogleApi.CloudSearch.V1.Api.Query do

@library_version Mix.Project.config() |> Keyword.get(:version, "")

@doc """
Provides functionality to remove logged activity for a user. Currently to be used only for Chat 1p clients **Note:** This API requires a standard end user account to execute. A service account can't perform Remove Activity requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
## Parameters
* `connection` (*type:* `GoogleApi.CloudSearch.V1.Connection.t`) - Connection to server
* `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.CloudSearch.V1.Model.RemoveActivityRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.CloudSearch.V1.Model.RemoveActivityResponse{}}` on success
* `{:error, info}` on failure
"""
@spec cloudsearch_query_remove_activity(Tesla.Env.client(), keyword(), keyword()) ::
{:ok, GoogleApi.CloudSearch.V1.Model.RemoveActivityResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def cloudsearch_query_remove_activity(connection, 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("/v1/query:removeActivity", %{})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [struct: %GoogleApi.CloudSearch.V1.Model.RemoveActivityResponse{}])
end

@doc """
The Cloud Search Query API provides the search method, which returns the most relevant results from a user query. The results can come from Google Workspace apps, such as Gmail or Google Drive, or they can come from data that you have indexed from a third party. **Note:** This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up [Google Workspace domain-wide delegation of authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
Expand Down Expand Up @@ -163,7 +222,7 @@ defmodule GoogleApi.CloudSearch.V1.Api.Query do
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:pageToken` (*type:* `String.t`) - Number of sources to return in the response.
* `:"requestOptions.debugOptions.enableDebugging"` (*type:* `boolean()`) - If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field.
* `:"requestOptions.languageCode"` (*type:* `String.t`) - The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. From Suggest API perspective, for 3p suggest this is used as a hint while making predictions to add language boosting.
* `:"requestOptions.languageCode"` (*type:* `String.t`) - The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. For translations. Set this field using the language set in browser or for the page. In the event that the user's language preference is known, set this field to the known user language. When specified, the documents in search results are biased towards the specified language. The Suggest API uses this field as a hint to make better third-party autocomplete predictions.
* `:"requestOptions.searchApplicationId"` (*type:* `String.t`) - The ID generated when you create a search application using the [admin console](https://support.google.com/a/answer/9043922).
* `:"requestOptions.timeZone"` (*type:* `String.t`) - Current user's time zone id, such as "America/Los_Angeles" or "Australia/Sydney". These IDs are defined by [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) project, and currently available in the file [timezone.xml](http://unicode.org/repos/cldr/trunk/common/bcp47/timezone.xml). This field is used to correctly interpret date and time queries. If this field is not specified, the default time zone (UTC) is used.
* `opts` (*type:* `keyword()`) - Call options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.CloudSearch.V1 do
API client metadata for GoogleApi.CloudSearch.V1.
"""

@discovery_revision "20221108"
@discovery_revision "20240103"

def discovery_revision(), do: @discovery_revision
end

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

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

defmodule GoogleApi.CloudSearch.V1.Model.GoogleChatV1WidgetMarkupOpenLink do
defmodule GoogleApi.CloudSearch.V1.Model.Action do
@moduledoc """
A link that opens a new window.
## Attributes
* `url` (*type:* `String.t`, *default:* `nil`) - The URL to open.
* `title` (*type:* `String.t`, *default:* `nil`) - [Required] Title of the action.
* `url` (*type:* `String.t`, *default:* `nil`) - [Optional] Url of the action.
"""

use GoogleApi.Gax.ModelBase

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

field(:title)
field(:url)
end

defimpl Poison.Decoder, for: GoogleApi.CloudSearch.V1.Model.GoogleChatV1WidgetMarkupOpenLink do
defimpl Poison.Decoder, for: GoogleApi.CloudSearch.V1.Model.Action do
def decode(value, options) do
GoogleApi.CloudSearch.V1.Model.GoogleChatV1WidgetMarkupOpenLink.decode(value, options)
GoogleApi.CloudSearch.V1.Model.Action.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.CloudSearch.V1.Model.GoogleChatV1WidgetMarkupOpenLink do
defimpl Poison.Encoder, for: GoogleApi.CloudSearch.V1.Model.Action do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
Expand Down
Loading

0 comments on commit cfb4460

Please sign in to comment.