diff --git a/clients/discovery_engine/.gitignore b/clients/discovery_engine/.gitignore new file mode 100644 index 0000000000..6bf4496152 --- /dev/null +++ b/clients/discovery_engine/.gitignore @@ -0,0 +1,37 @@ +# 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. + +# The directory Mix will write compiled artifacts to. +/_build + +# If you run "mix test --cover", coverage assets end up here. +/cover + +# The directory Mix downloads your dependencies sources to. +/deps + +# Where 3rd-party dependencies like ExDoc output generated docs. +/doc + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch + +# If the VM crashes, it generates a dump, let's ignore it too. +erl_crash.dump + +# Also ignore archive artifacts (built via "mix archive.build"). +*.ez diff --git a/clients/discovery_engine/LICENSE b/clients/discovery_engine/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/clients/discovery_engine/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/clients/discovery_engine/README.md b/clients/discovery_engine/README.md new file mode 100644 index 0000000000..49b3047ec9 --- /dev/null +++ b/clients/discovery_engine/README.md @@ -0,0 +1,23 @@ +# GoogleApi.DiscoveryEngine + +Discovery Engine API client library. + +Discovery Engine API. + +## Installation + +Install this package from [Hex](https://hex.pm) by adding +`google_api_discovery_engine` to your list of dependencies in `mix.exs`: + +```elixir +def deps do + [{:google_api_discovery_engine, "~> 0.2"}] +end +``` + +## For more information + +Product documentation is available at [https://cloud.google.com/discovery-engine/docs](https://cloud.google.com/discovery-engine/docs). + +Library reference documentation is published on Hexdocs at +[https://hexdocs.pm/google_api_discovery_engine](https://hexdocs.pm/google_api_discovery_engine). diff --git a/clients/discovery_engine/config/config.exs b/clients/discovery_engine/config/config.exs new file mode 100644 index 0000000000..07afe5f311 --- /dev/null +++ b/clients/discovery_engine/config/config.exs @@ -0,0 +1,20 @@ +# 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. + +use Mix.Config + + diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/api/projects.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/api/projects.ex new file mode 100644 index 0000000000..160a0855ce --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/api/projects.ex @@ -0,0 +1,10386 @@ +# 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.V1beta.Api.Projects do + @moduledoc """ + API calls for all endpoints tagged `Projects`. + """ + + alias GoogleApi.DiscoveryEngine.V1beta.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_connector_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_connector_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_connector_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_connector_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Completes the specified user input with keyword suggestions. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `data_store` (*type:* `String.t`) - Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * `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"). + * `:includeTailSuggestions` (*type:* `boolean()`) - Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned. + * `:query` (*type:* `String.t`) - Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. + * `:queryModel` (*type:* `String.t`) - Specifies the autocomplete data model. This overrides any model specified in the Configuration > Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. + * `:userPseudoId` (*type:* `String.t`) - A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_complete_query( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_complete_query( + connection, + data_store, + 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, + :includeTailSuggestions => :query, + :query => :query, + :queryModel => :query, + :userPseudoId => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+dataStore}:completeQuery", %{ + "dataStore" => URI.encode(data_store, &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.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{} + ] + ) + end + + @doc """ + Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. + * `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"). + * `:createAdvancedSiteSearch` (*type:* `boolean()`) - A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored. + * `:dataStoreId` (*type:* `String.t`) - Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_create( + 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, + :createAdvancedSiteSearch => :query, + :dataStoreId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+parent}/dataStores", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDataStore{} + ] + ) + end + + @doc """ + Gets the SiteSearchEngine. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_get_site_search_engine( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_get_site_search_engine( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaSiteSearchEngine{} + ] + ) + end + + @doc """ + Lists all the DataStores associated with the project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned. + * `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"). + * `:filter` (*type:* `String.t`) - Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' + * `:pageSize` (*type:* `integer()`) - Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned. + * `:pageToken` (*type:* `String.t`) - A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_list( + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/dataStores", %{ + "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.GoogleCloudDiscoveryengineV1betaListDataStoresResponse{} + ] + ) + end + + @doc """ + Updates a DataStore + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDataStore{} + ] + ) + end + + @doc """ + Creates a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * `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"). + * `:documentId` (*type:* `String.t`) - Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_documents_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_documents_create( + 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, + :documentId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+parent}/documents", %{ + "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.GoogleCloudDiscoveryengineV1betaDocument{} + ] + ) + end + + @doc """ + Deletes a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_documents_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_documents_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleProtobufEmpty{}] + ) + end + + @doc """ + Gets a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_documents_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_documents_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDocument{} + ] + ) + end + + @doc """ + Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission. + * `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.GoogleCloudDiscoveryengineV1betaImportDocumentsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_documents_import( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_documents_import( + 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}/documents:import", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a list of Documents. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned. + * `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"). + * `:pageSize` (*type:* `integer()`) - Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned. + * `:pageToken` (*type:* `String.t`) - A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_documents_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_documents_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/documents", %{ + "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.GoogleCloudDiscoveryengineV1betaListDocumentsResponse{} + ] + ) + end + + @doc """ + Updates a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `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"). + * `:allowMissing` (*type:* `boolean()`) - If set to true, and the Document is not found, a new Document will be created. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_documents_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_documents_patch( + connection, + name, + 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, + :allowMissing => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDocument{} + ] + ) + end + + @doc """ + Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * `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.GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_documents_purge( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_documents_purge( + 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}/documents:purge", %{ + "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.GoogleLongrunningOperation{}] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_branches_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_branches_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Converses a conversation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session. + * `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.GoogleCloudDiscoveryengineV1betaConverseConversationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_conversations_converse( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_conversations_converse( + connection, + name, + 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/{+name}:converse", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConverseConversationResponse{} + ] + ) + end + + @doc """ + Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * `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.GoogleCloudDiscoveryengineV1betaConversation.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_conversations_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_conversations_create( + 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}/conversations", %{ + "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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + end + + @doc """ + Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_conversations_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_conversations_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleProtobufEmpty{}] + ) + end + + @doc """ + Gets a Conversation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_conversations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_conversations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + end + + @doc """ + Lists all Conversations by their parent DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * `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"). + * `:filter` (*type:* `String.t`) - A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" + * `:orderBy` (*type:* `String.t`) - A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: "update_time desc" "create_time" + * `:pageSize` (*type:* `integer()`) - Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_conversations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_conversations_list( + 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, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/conversations", %{ + "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.GoogleCloudDiscoveryengineV1betaListConversationsResponse{} + ] + ) + end + + @doc """ + Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned. + + ## 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/*`. + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_conversations_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_conversations_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_models_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_models_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_models_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_models_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Creates a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * `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"). + * `:schemaId` (*type:* `String.t`) - Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_schemas_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_schemas_create( + 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, + :schemaId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+parent}/schemas", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_schemas_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_schemas_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_schemas_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_schemas_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaSchema{}] + ) + end + + @doc """ + Gets a list of Schemas. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * `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"). + * `:pageSize` (*type:* `integer()`) - The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_schemas_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_schemas_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/schemas", %{ + "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.GoogleCloudDiscoveryengineV1betaListSchemasResponse{} + ] + ) + end + + @doc """ + Updates a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `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"). + * `:allowMissing` (*type:* `boolean()`) - If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_schemas_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_schemas_patch( + connection, + name, + 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, + :allowMissing => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_schemas_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_schemas_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_schemas_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_schemas_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_serving_configs_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_serving_configs_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaServingConfig{} + ] + ) + end + + @doc """ + Lists all ServingConfigs linked to this dataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_serving_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_serving_configs_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/servingConfigs", %{ + "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.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{} + ] + ) + end + + @doc """ + Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_serving_configs_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_serving_configs_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaServingConfig{} + ] + ) + end + + @doc """ + Makes a recommendation, which requires a contextual user event. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `serving_config` (*type:* `String.t`) - Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests. + * `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.GoogleCloudDiscoveryengineV1betaRecommendRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_serving_configs_recommend( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_serving_configs_recommend( + connection, + serving_config, + 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/{+servingConfig}:recommend", %{ + "servingConfig" => URI.encode(serving_config, &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.GoogleCloudDiscoveryengineV1betaRecommendResponse{} + ] + ) + end + + @doc """ + Performs a search. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `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. + * `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.GoogleCloudDiscoveryengineV1betaSearchRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_serving_configs_search( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_serving_configs_search( + connection, + serving_config, + 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/{+servingConfig}:search", %{ + "servingConfig" => URI.encode(serving_config, &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.GoogleCloudDiscoveryengineV1betaSearchResponse{} + ] + ) + end + + @doc """ + Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_batch_verify_target_sites( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_batch_verify_target_sites( + 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}:batchVerifyTargetSites", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Downgrade from advanced site search to basic site search. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `site_search_engine` (*type:* `String.t`) - Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_disable_advanced_site_search( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_disable_advanced_site_search( + connection, + site_search_engine, + 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/{+siteSearchEngine}:disableAdvancedSiteSearch", %{ + "siteSearchEngine" => URI.encode(site_search_engine, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Upgrade from basic site search to advanced site search. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `site_search_engine` (*type:* `String.t`) - Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_enable_advanced_site_search( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_enable_advanced_site_search( + connection, + site_search_engine, + 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/{+siteSearchEngine}:enableAdvancedSiteSearch", %{ + "siteSearchEngine" => URI.encode(site_search_engine, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `site_search_engine` (*type:* `String.t`) - Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_fetch_domain_verification_status( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_fetch_domain_verification_status( + connection, + site_search_engine, + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus", %{ + "siteSearchEngine" => URI.encode(site_search_engine, &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.GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{} + ] + ) + end + + @doc """ + Request on-demand recrawl for a list of URIs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `site_search_engine` (*type:* `String.t`) - Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_recrawl_uris( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_recrawl_uris( + connection, + site_search_engine, + 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/{+siteSearchEngine}:recrawlUris", %{ + "siteSearchEngine" => URI.encode(site_search_engine, &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.GoogleLongrunningOperation{}] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Creates TargetSite in a batch. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field. + * `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.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_batch_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_batch_create( + 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}/targetSites:batchCreate", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Creates a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaTargetSite.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_create( + 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}/targetSites", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaTargetSite{} + ] + ) + end + + @doc """ + Gets a list of TargetSites. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. + * `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"). + * `:pageSize` (*type:* `integer()`) - Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/targetSites", %{ + "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.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{} + ] + ) + end + + @doc """ + Updates a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated. + * `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.GoogleCloudDiscoveryengineV1betaTargetSite.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_patch( + connection, + name, + 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(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_site_search_engine_target_sites_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Imports all SuggestionDenyListEntry for a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. + * `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.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_suggestion_deny_list_entries_import( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_suggestion_deny_list_entries_import( + 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}/suggestionDenyListEntries:import", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Permanently deletes all SuggestionDenyListEntry for a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. + * `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.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_suggestion_deny_list_entries_purge( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_suggestion_deny_list_entries_purge( + 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}/suggestionDenyListEntries:purge", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly. + + ## 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}`. + * `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"). + * `:ets` (*type:* `String.t`) - The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. + * `:uri` (*type:* `String.t`) - The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests. + * `:userEvent` (*type:* `String.t`) - Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleApiHttpBody{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_user_events_collect( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleApiHttpBody.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_user_events_collect( + 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, + :ets => :query, + :uri => :query, + :userEvent => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/userEvents:collect", %{ + "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.GoogleApiHttpBody{}] + ) + end + + @doc """ + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `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.GoogleCloudDiscoveryengineV1betaImportUserEventsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_user_events_import( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_user_events_import( + 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:import", %{ + "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.GoogleLongrunningOperation{}] + ) + 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 DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * `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_collections_data_stores_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_collections_data_stores_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 """ + Creates a Engine. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. + * `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"). + * `:engineId` (*type:* `String.t`) - Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_create( + 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, + :engineId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+parent}/engines", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a Engine. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a Engine. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaEngine{}] + ) + end + + @doc """ + Lists all the Engines associated with the project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. + * `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"). + * `:filter` (*type:* `String.t`) - Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH + * `:pageSize` (*type:* `integer()`) - Optional. Not supported. + * `:pageToken` (*type:* `String.t`) - Optional. Not supported. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListEnginesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListEnginesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_list( + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/engines", %{ + "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.GoogleCloudDiscoveryengineV1betaListEnginesResponse{} + ] + ) + end + + @doc """ + Updates an Engine + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaEngine{}] + ) + end + + @doc """ + Converses a conversation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session. + * `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.GoogleCloudDiscoveryengineV1betaConverseConversationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_conversations_converse( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_conversations_converse( + connection, + name, + 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/{+name}:converse", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConverseConversationResponse{} + ] + ) + end + + @doc """ + Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * `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.GoogleCloudDiscoveryengineV1betaConversation.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_conversations_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_conversations_create( + 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}/conversations", %{ + "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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + end + + @doc """ + Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_conversations_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_conversations_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleProtobufEmpty{}] + ) + end + + @doc """ + Gets a Conversation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_conversations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_conversations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + end + + @doc """ + Lists all Conversations by their parent DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * `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"). + * `:filter` (*type:* `String.t`) - A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" + * `:orderBy` (*type:* `String.t`) - A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: "update_time desc" "create_time" + * `:pageSize` (*type:* `integer()`) - Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_conversations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_conversations_list( + 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, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/conversations", %{ + "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.GoogleCloudDiscoveryengineV1betaListConversationsResponse{} + ] + ) + end + + @doc """ + Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned. + + ## 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/*`. + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_conversations_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_conversations_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_serving_configs_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_serving_configs_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaServingConfig{} + ] + ) + end + + @doc """ + Lists all ServingConfigs linked to this dataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_serving_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_serving_configs_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/servingConfigs", %{ + "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.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{} + ] + ) + end + + @doc """ + Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_serving_configs_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_serving_configs_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaServingConfig{} + ] + ) + end + + @doc """ + Makes a recommendation, which requires a contextual user event. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `serving_config` (*type:* `String.t`) - Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests. + * `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.GoogleCloudDiscoveryengineV1betaRecommendRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_serving_configs_recommend( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_serving_configs_recommend( + connection, + serving_config, + 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/{+servingConfig}:recommend", %{ + "servingConfig" => URI.encode(serving_config, &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.GoogleCloudDiscoveryengineV1betaRecommendResponse{} + ] + ) + end + + @doc """ + Performs a search. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `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. + * `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.GoogleCloudDiscoveryengineV1betaSearchRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_serving_configs_search( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_serving_configs_search( + connection, + serving_config, + 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/{+servingConfig}:search", %{ + "servingConfig" => URI.encode(serving_config, &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.GoogleCloudDiscoveryengineV1betaSearchResponse{} + ] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Completes the specified user input with keyword suggestions. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `data_store` (*type:* `String.t`) - Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + * `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"). + * `:includeTailSuggestions` (*type:* `boolean()`) - Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned. + * `:query` (*type:* `String.t`) - Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. + * `:queryModel` (*type:* `String.t`) - Specifies the autocomplete data model. This overrides any model specified in the Configuration > Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores. + * `:userPseudoId` (*type:* `String.t`) - A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_complete_query( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_complete_query( + connection, + data_store, + 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, + :includeTailSuggestions => :query, + :query => :query, + :queryModel => :query, + :userPseudoId => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+dataStore}:completeQuery", %{ + "dataStore" => URI.encode(data_store, &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.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{} + ] + ) + end + + @doc """ + Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. + * `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"). + * `:createAdvancedSiteSearch` (*type:* `boolean()`) - A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored. + * `:dataStoreId` (*type:* `String.t`) - Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_create( + 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, + :createAdvancedSiteSearch => :query, + :dataStoreId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+parent}/dataStores", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDataStore{} + ] + ) + end + + @doc """ + Gets the SiteSearchEngine. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_get_site_search_engine( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_get_site_search_engine( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaSiteSearchEngine{} + ] + ) + end + + @doc """ + Lists all the DataStores associated with the project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned. + * `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"). + * `:filter` (*type:* `String.t`) - Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' + * `:pageSize` (*type:* `integer()`) - Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned. + * `:pageToken` (*type:* `String.t`) - A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_list( + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/dataStores", %{ + "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.GoogleCloudDiscoveryengineV1betaListDataStoresResponse{} + ] + ) + end + + @doc """ + Updates a DataStore + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDataStore{} + ] + ) + end + + @doc """ + Creates a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * `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"). + * `:documentId` (*type:* `String.t`) - Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_documents_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_documents_create( + 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, + :documentId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+parent}/documents", %{ + "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.GoogleCloudDiscoveryengineV1betaDocument{} + ] + ) + end + + @doc """ + Deletes a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_documents_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_documents_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleProtobufEmpty{}] + ) + end + + @doc """ + Gets a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_documents_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_documents_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDocument{} + ] + ) + end + + @doc """ + Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission. + * `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.GoogleCloudDiscoveryengineV1betaImportDocumentsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_documents_import( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_documents_import( + 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}/documents:import", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a list of Documents. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned. + * `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"). + * `:pageSize` (*type:* `integer()`) - Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned. + * `:pageToken` (*type:* `String.t`) - A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_documents_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_documents_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/documents", %{ + "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.GoogleCloudDiscoveryengineV1betaListDocumentsResponse{} + ] + ) + end + + @doc """ + Updates a Document. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `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"). + * `:allowMissing` (*type:* `boolean()`) - If set to true, and the Document is not found, a new Document will be created. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_documents_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_documents_patch( + connection, + name, + 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, + :allowMissing => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaDocument{} + ] + ) + end + + @doc """ + Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * `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.GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_documents_purge( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_documents_purge( + 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}/documents:purge", %{ + "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.GoogleLongrunningOperation{}] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_branches_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_branches_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Converses a conversation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session. + * `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.GoogleCloudDiscoveryengineV1betaConverseConversationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_conversations_converse( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_conversations_converse( + connection, + name, + 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/{+name}:converse", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConverseConversationResponse{} + ] + ) + end + + @doc """ + Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * `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.GoogleCloudDiscoveryengineV1betaConversation.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_conversations_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_conversations_create( + 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}/conversations", %{ + "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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + end + + @doc """ + Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_conversations_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_conversations_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleProtobufEmpty{}] + ) + end + + @doc """ + Gets a Conversation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_conversations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_conversations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + end + + @doc """ + Lists all Conversations by their parent DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * `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"). + * `:filter` (*type:* `String.t`) - A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" + * `:orderBy` (*type:* `String.t`) - A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: "update_time desc" "create_time" + * `:pageSize` (*type:* `integer()`) - Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_conversations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_conversations_list( + 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, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/conversations", %{ + "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.GoogleCloudDiscoveryengineV1betaListConversationsResponse{} + ] + ) + end + + @doc """ + Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned. + + ## 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/*`. + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_conversations_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_conversations_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaConversation{} + ] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_models_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_models_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_models_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_models_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Creates a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * `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"). + * `:schemaId` (*type:* `String.t`) - Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_schemas_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_schemas_create( + 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, + :schemaId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+parent}/schemas", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_schemas_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_schemas_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_schemas_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_schemas_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaSchema{}] + ) + end + + @doc """ + Gets a list of Schemas. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * `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"). + * `:pageSize` (*type:* `integer()`) - The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_schemas_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_schemas_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/schemas", %{ + "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.GoogleCloudDiscoveryengineV1betaListSchemasResponse{} + ] + ) + end + + @doc """ + Updates a Schema. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `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"). + * `:allowMissing` (*type:* `boolean()`) - If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_schemas_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_schemas_patch( + connection, + name, + 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, + :allowMissing => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_serving_configs_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_serving_configs_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaServingConfig{} + ] + ) + end + + @doc """ + Lists all ServingConfigs linked to this dataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_serving_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_serving_configs_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/servingConfigs", %{ + "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.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{} + ] + ) + end + + @doc """ + Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` + * `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"). + * `:updateMask` (*type:* `String.t`) - Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated. + * `:body` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_serving_configs_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_serving_configs_patch( + connection, + name, + 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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaServingConfig{} + ] + ) + end + + @doc """ + Makes a recommendation, which requires a contextual user event. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `serving_config` (*type:* `String.t`) - Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests. + * `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.GoogleCloudDiscoveryengineV1betaRecommendRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_serving_configs_recommend( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_serving_configs_recommend( + connection, + serving_config, + 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/{+servingConfig}:recommend", %{ + "servingConfig" => URI.encode(serving_config, &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.GoogleCloudDiscoveryengineV1betaRecommendResponse{} + ] + ) + end + + @doc """ + Performs a search. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `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. + * `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.GoogleCloudDiscoveryengineV1betaSearchRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_serving_configs_search( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_serving_configs_search( + connection, + serving_config, + 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/{+servingConfig}:search", %{ + "servingConfig" => URI.encode(serving_config, &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.GoogleCloudDiscoveryengineV1betaSearchResponse{} + ] + ) + end + + @doc """ + Downgrade from advanced site search to basic site search. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `site_search_engine` (*type:* `String.t`) - Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_disable_advanced_site_search( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_disable_advanced_site_search( + connection, + site_search_engine, + 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/{+siteSearchEngine}:disableAdvancedSiteSearch", %{ + "siteSearchEngine" => URI.encode(site_search_engine, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Upgrade from basic site search to advanced site search. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `site_search_engine` (*type:* `String.t`) - Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_enable_advanced_site_search( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_enable_advanced_site_search( + connection, + site_search_engine, + 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/{+siteSearchEngine}:enableAdvancedSiteSearch", %{ + "siteSearchEngine" => URI.encode(site_search_engine, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Request on-demand recrawl for a list of URIs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `site_search_engine` (*type:* `String.t`) - Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_recrawl_uris( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_recrawl_uris( + connection, + site_search_engine, + 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/{+siteSearchEngine}:recrawlUris", %{ + "siteSearchEngine" => URI.encode(site_search_engine, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Creates TargetSite in a batch. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field. + * `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.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_batch_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_batch_create( + 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}/targetSites:batchCreate", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Creates a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. + * `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.GoogleCloudDiscoveryengineV1betaTargetSite.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_create( + 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}/targetSites", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_delete( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleCloudDiscoveryengineV1betaTargetSite{} + ] + ) + end + + @doc """ + Gets a list of TargetSites. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. + * `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"). + * `:pageSize` (*type:* `integer()`) - Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_list( + 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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/targetSites", %{ + "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.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{} + ] + ) + end + + @doc """ + Updates a TargetSite. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated. + * `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.GoogleCloudDiscoveryengineV1betaTargetSite.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_site_search_engine_target_sites_patch( + connection, + name, + 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(:patch) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Imports all SuggestionDenyListEntry for a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. + * `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.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_suggestion_deny_list_entries_import( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_suggestion_deny_list_entries_import( + 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}/suggestionDenyListEntries:import", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Permanently deletes all SuggestionDenyListEntry for a DataStore. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. + * `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.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_suggestion_deny_list_entries_purge( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_suggestion_deny_list_entries_purge( + 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}/suggestionDenyListEntries:purge", %{ + "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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly. + + ## 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}`. + * `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"). + * `:ets` (*type:* `String.t`) - The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. + * `:uri` (*type:* `String.t`) - The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests. + * `:userEvent` (*type:* `String.t`) - Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleApiHttpBody{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_user_events_collect( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleApiHttpBody.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_user_events_collect( + 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, + :ets => :query, + :uri => :query, + :userEvent => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+parent}/userEvents:collect", %{ + "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.GoogleApiHttpBody{}] + ) + end + + @doc """ + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` + * `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.GoogleCloudDiscoveryengineV1betaImportUserEventsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_user_events_import( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_user_events_import( + 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:import", %{ + "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.GoogleLongrunningOperation{}] + ) + 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 DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * `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_data_stores_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_data_stores_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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_operations_get( + connection, + name, + 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_operations_get(connection, name, 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 + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}", %{ + "name" => URI.encode(name, &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.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_operations_list( + connection, + name, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta/{+name}/operations", %{ + "name" => URI.encode(name, &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.GoogleLongrunningListOperationsResponse{} + ] + ) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/connection.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/connection.ex new file mode 100644 index 0000000000..583f9eda86 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/connection.ex @@ -0,0 +1,32 @@ +# 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.V1beta.Connection do + @moduledoc """ + Handle Tesla connections for GoogleApi.DiscoveryEngine.V1beta. + """ + + @type t :: Tesla.Env.client() + + use GoogleApi.Gax.Connection, + scopes: [ + # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. + "https://www.googleapis.com/auth/cloud-platform" + ], + otp_app: :google_api_discovery_engine, + base_url: "https://discoveryengine.googleapis.com/" +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex new file mode 100644 index 0000000000..43a8680194 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex @@ -0,0 +1,26 @@ +# Copyright 2020 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.V1beta do + @moduledoc """ + API client metadata for GoogleApi.DiscoveryEngine.V1beta. + """ + + @discovery_revision "20240307" + + def discovery_revision(), do: @discovery_revision +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_api_http_body.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_api_http_body.ex new file mode 100644 index 0000000000..3d7e9a885f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_api_http_body.ex @@ -0,0 +1,52 @@ +# 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.V1beta.Model.GoogleApiHttpBody do + @moduledoc """ + Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + + ## Attributes + + * `contentType` (*type:* `String.t`, *default:* `nil`) - The HTTP Content-Type header value specifying the content type of the body. + * `data` (*type:* `String.t`, *default:* `nil`) - The HTTP request/response body as raw binary. + * `extensions` (*type:* `list(map())`, *default:* `nil`) - Application specific response metadata. Must be set in the first response for streaming APIs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contentType => String.t() | nil, + :data => String.t() | nil, + :extensions => list(map()) | nil + } + + field(:contentType) + field(:data) + field(:extensions, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleApiHttpBody do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleApiHttpBody.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleApiHttpBody do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_error_context.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_error_context.ex new file mode 100644 index 0000000000..cf36fe25ca --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_error_context.ex @@ -0,0 +1,63 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorContext do + @moduledoc """ + A description of the context in which an error occurred. + + ## Attributes + + * `httpRequest` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingHttpRequestContext.t`, *default:* `nil`) - The HTTP request which was processed when the error was triggered. + * `reportLocation` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingSourceLocation.t`, *default:* `nil`) - The location in the source code where the decision was made to report the error, usually the place where it was logged. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :httpRequest => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingHttpRequestContext.t() + | nil, + :reportLocation => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingSourceLocation.t() + | nil + } + + field(:httpRequest, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingHttpRequestContext + ) + + field(:reportLocation, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingSourceLocation + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorContext do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorContext.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorContext do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_error_log.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_error_log.ex new file mode 100644 index 0000000000..e05f024e92 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_error_log.ex @@ -0,0 +1,85 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorLog do + @moduledoc """ + An error log which is reported to the Error Reporting system. + + ## Attributes + + * `context` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorContext.t`, *default:* `nil`) - A description of the context in which the error occurred. + * `importPayload` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingImportErrorContext.t`, *default:* `nil`) - The error payload that is populated on LRO import APIs. + * `message` (*type:* `String.t`, *default:* `nil`) - A message describing the error. + * `requestPayload` (*type:* `map()`, *default:* `nil`) - The API request payload, represented as a protocol buffer. Most API request types are supported—for example: * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest` * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest` + * `responsePayload` (*type:* `map()`, *default:* `nil`) - The API response payload, represented as a protocol buffer. This is used to log some "soft errors", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported, and no PII is included: * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend` * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent` * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent` + * `serviceContext` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingServiceContext.t`, *default:* `nil`) - The service context in which this error has occurred. + * `status` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t`, *default:* `nil`) - The RPC status associated with the error log. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :context => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorContext.t() + | nil, + :importPayload => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingImportErrorContext.t() + | nil, + :message => String.t() | nil, + :requestPayload => map() | nil, + :responsePayload => map() | nil, + :serviceContext => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingServiceContext.t() + | nil, + :status => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t() | nil + } + + field(:context, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorContext + ) + + field(:importPayload, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingImportErrorContext + ) + + field(:message) + field(:requestPayload, type: :map) + field(:responsePayload, type: :map) + + field(:serviceContext, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingServiceContext + ) + + field(:status, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorLog do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorLog.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingErrorLog do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_http_request_context.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_http_request_context.ex new file mode 100644 index 0000000000..1603ed4e3a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_http_request_context.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineLoggingHttpRequestContext do + @moduledoc """ + HTTP request data that is related to a reported error. + + ## Attributes + + * `responseStatusCode` (*type:* `integer()`, *default:* `nil`) - The HTTP response status code for the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :responseStatusCode => integer() | nil + } + + field(:responseStatusCode) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingHttpRequestContext do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingHttpRequestContext.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingHttpRequestContext do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_import_error_context.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_import_error_context.ex new file mode 100644 index 0000000000..8c5432e407 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_import_error_context.ex @@ -0,0 +1,63 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineLoggingImportErrorContext do + @moduledoc """ + The error payload that is populated on LRO import APIs, including the following: * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments` * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents` + + ## Attributes + + * `document` (*type:* `String.t`, *default:* `nil`) - The detailed content which caused the error on importing a document. + * `gcsPath` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage file path of the import source. Can be set for batch operation error. + * `lineNumber` (*type:* `String.t`, *default:* `nil`) - Line number of the content in file. Should be empty for permission or batch operation error. + * `operation` (*type:* `String.t`, *default:* `nil`) - The operation resource name of the LRO. + * `userEvent` (*type:* `String.t`, *default:* `nil`) - The detailed content which caused the error on importing a user event. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :document => String.t() | nil, + :gcsPath => String.t() | nil, + :lineNumber => String.t() | nil, + :operation => String.t() | nil, + :userEvent => String.t() | nil + } + + field(:document) + field(:gcsPath) + field(:lineNumber) + field(:operation) + field(:userEvent) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingImportErrorContext do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingImportErrorContext.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingImportErrorContext do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_service_context.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_service_context.ex new file mode 100644 index 0000000000..8277785a39 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_service_context.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineLoggingServiceContext do + @moduledoc """ + Describes a running service that sends errors. + + ## Attributes + + * `service` (*type:* `String.t`, *default:* `nil`) - An identifier of the service—for example, `discoveryengine.googleapis.com`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :service => String.t() | nil + } + + field(:service) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingServiceContext do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingServiceContext.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingServiceContext do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_source_location.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_source_location.ex new file mode 100644 index 0000000000..0edd5a10ba --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_logging_source_location.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineLoggingSourceLocation do + @moduledoc """ + Indicates a location in the source code of the service for which errors are reported. + + ## Attributes + + * `functionName` (*type:* `String.t`, *default:* `nil`) - Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :functionName => String.t() | nil + } + + field(:functionName) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingSourceLocation do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingSourceLocation.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineLoggingSourceLocation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_batch_create_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_batch_create_target_site_metadata.ex new file mode 100644 index 0000000000..3bf2042ca3 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_batch_create_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_batch_create_target_sites_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_batch_create_target_sites_response.ex new file mode 100644 index 0000000000..edc3abf8e5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_batch_create_target_sites_response.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse do + @moduledoc """ + Response message for SiteSearchEngineService.BatchCreateTargetSites method. + + ## Attributes + + * `targetSites` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSite.t)`, *default:* `nil`) - TargetSites created. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :targetSites => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSite.t() + ) + | nil + } + + field(:targetSites, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSite, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_data_store_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_data_store_metadata.ex new file mode 100644 index 0000000000..7a2458f733 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_data_store_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1CreateDataStoreMetadata do + @moduledoc """ + Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateDataStoreMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateDataStoreMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateDataStoreMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_engine_metadata.ex new file mode 100644 index 0000000000..7441076d3c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_engine_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1CreateEngineMetadata do + @moduledoc """ + Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_schema_metadata.ex new file mode 100644 index 0000000000..29ad1718dd --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_schema_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1CreateSchemaMetadata do + @moduledoc """ + Metadata for Create Schema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_target_site_metadata.ex new file mode 100644 index 0000000000..280d18a816 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_create_target_site_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_data_store.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_data_store.ex new file mode 100644 index 0000000000..02a8f00b22 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_data_store.ex @@ -0,0 +1,86 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1DataStore do + @moduledoc """ + DataStore captures global settings and configs at the DataStore level. + + ## Attributes + + * `contentConfig` (*type:* `String.t`, *default:* `nil`) - Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the DataStore was created at. + * `defaultSchemaId` (*type:* `String.t`, *default:* `nil`) - Output only. The id of the default Schema asscociated to this data store. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + * `documentProcessingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig.t`, *default:* `nil`) - Configuration for Document understanding and enrichment. + * `industryVertical` (*type:* `String.t`, *default:* `nil`) - Immutable. The industry vertical that the data store registers. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `solutionTypes` (*type:* `list(String.t)`, *default:* `nil`) - The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + * `startingSchema` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Schema.t`, *default:* `nil`) - The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contentConfig => String.t() | nil, + :createTime => DateTime.t() | nil, + :defaultSchemaId => String.t() | nil, + :displayName => String.t() | nil, + :documentProcessingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig.t() + | nil, + :industryVertical => String.t() | nil, + :name => String.t() | nil, + :solutionTypes => list(String.t()) | nil, + :startingSchema => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Schema.t() | nil + } + + field(:contentConfig) + field(:createTime, as: DateTime) + field(:defaultSchemaId) + field(:displayName) + + field(:documentProcessingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig + ) + + field(:industryVertical) + field(:name) + field(:solutionTypes, type: :list) + + field(:startingSchema, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Schema + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DataStore do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DataStore.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DataStore do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_data_store_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_data_store_metadata.ex new file mode 100644 index 0000000000..dd0526067e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_data_store_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata do + @moduledoc """ + Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_engine_metadata.ex new file mode 100644 index 0000000000..0ae27030c5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_engine_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteEngineMetadata do + @moduledoc """ + Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_schema_metadata.ex new file mode 100644 index 0000000000..e98039012a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_schema_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteSchemaMetadata do + @moduledoc """ + Metadata for DeleteSchema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_target_site_metadata.ex new file mode 100644 index 0000000000..6eac702cd9 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_delete_target_site_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_digital_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_digital_parsing_config.ex new file mode 100644 index 0000000000..4feec33612 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_digital_parsing_config.ex @@ -0,0 +1,46 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig do + @moduledoc """ + The digital parsing configurations for documents. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_disable_advanced_site_search_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_disable_advanced_site_search_metadata.ex new file mode 100644 index 0000000000..f329e655ef --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_disable_advanced_site_search_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_disable_advanced_site_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_disable_advanced_site_search_response.ex new file mode 100644 index 0000000000..dc1620aa12 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_disable_advanced_site_search_response.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse do + @moduledoc """ + Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config.ex new file mode 100644 index 0000000000..c0e35e5823 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config.ex @@ -0,0 +1,73 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig do + @moduledoc """ + A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. + + ## Attributes + + * `defaultParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig.t`, *default:* `nil`) - Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing. + * `name` (*type:* `String.t`, *default:* `nil`) - The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + * `parsingConfigOverrides` (*type:* `%{optional(String.t) => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig.t}`, *default:* `nil`) - Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :defaultParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig.t() + | nil, + :name => String.t() | nil, + :parsingConfigOverrides => + %{ + optional(String.t()) => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig.t() + } + | nil + } + + field(:defaultParsingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig + ) + + field(:name) + + field(:parsingConfigOverrides, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig, + type: :map + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config_parsing_config.ex new file mode 100644 index 0000000000..ff7a0921af --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config_parsing_config.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig do + @moduledoc """ + Related configurations applied to a specific type of document parser. + + ## Attributes + + * `digitalParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig.t`, *default:* `nil`) - Configurations applied to digital parser. + * `ocrParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig.t`, *default:* `nil`) - Configurations applied to OCR parser. Currently it only applies to PDFs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :digitalParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig.t() + | nil, + :ocrParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig.t() + | nil + } + + field(:digitalParsingConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig + ) + + field(:ocrParsingConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_enable_advanced_site_search_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_enable_advanced_site_search_metadata.ex new file mode 100644 index 0000000000..8aa27b827c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_enable_advanced_site_search_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_enable_advanced_site_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_enable_advanced_site_search_response.ex new file mode 100644 index 0000000000..351548ea74 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_enable_advanced_site_search_response.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse do + @moduledoc """ + Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine.ex new file mode 100644 index 0000000000..64f2d11669 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine.ex @@ -0,0 +1,104 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1Engine do + @moduledoc """ + Metadata that describes the training and serving parameters of an Engine. + + ## Attributes + + * `chatEngineConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfig.t`, *default:* `nil`) - Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + * `chatEngineMetadata` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineMetadata.t`, *default:* `nil`) - Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + * `commonConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineCommonConfig.t`, *default:* `nil`) - Common config spec that specifies the metadata of the engine. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the Recommendation Engine was created at. + * `dataStoreIds` (*type:* `list(String.t)`, *default:* `nil`) - The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + * `industryVertical` (*type:* `String.t`, *default:* `nil`) - The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore liniked to the engine. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + * `searchEngineConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineSearchEngineConfig.t`, *default:* `nil`) - Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. The solutions of the engine. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the Recommendation Engine was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :chatEngineConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfig.t() + | nil, + :chatEngineMetadata => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineMetadata.t() + | nil, + :commonConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineCommonConfig.t() + | nil, + :createTime => DateTime.t() | nil, + :dataStoreIds => list(String.t()) | nil, + :displayName => String.t() | nil, + :industryVertical => String.t() | nil, + :name => String.t() | nil, + :searchEngineConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineSearchEngineConfig.t() + | nil, + :solutionType => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:chatEngineConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfig + ) + + field(:chatEngineMetadata, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineMetadata + ) + + field(:commonConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineCommonConfig + ) + + field(:createTime, as: DateTime) + field(:dataStoreIds, type: :list) + field(:displayName) + field(:industryVertical) + field(:name) + + field(:searchEngineConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineSearchEngineConfig + ) + + field(:solutionType) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Engine do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Engine.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Engine do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_config.ex new file mode 100644 index 0000000000..b753844235 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_config.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfig do + @moduledoc """ + Configurations for a Chat Engine. + + ## 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :agentCreationConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig.t() + | nil, + :dialogflowAgentToLink => String.t() | nil + } + + field(:agentCreationConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig + ) + + field(:dialogflowAgentToLink) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_config_agent_creation_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_config_agent_creation_config.ex new file mode 100644 index 0000000000..a4c107ff0f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_config_agent_creation_config.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig do + @moduledoc """ + Configurations for generating a Dialogflow agent. 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. + + ## Attributes + + * `business` (*type:* `String.t`, *default:* `nil`) - Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + * `defaultLanguageCode` (*type:* `String.t`, *default:* `nil`) - Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + * `location` (*type:* `String.t`, *default:* `nil`) - Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default. + * `timeZone` (*type:* `String.t`, *default:* `nil`) - Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :business => String.t() | nil, + :defaultLanguageCode => String.t() | nil, + :location => String.t() | nil, + :timeZone => String.t() | nil + } + + field(:business) + field(:defaultLanguageCode) + field(:location) + field(:timeZone) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_metadata.ex new file mode 100644 index 0000000000..d7fcdd0332 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_chat_engine_metadata.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineMetadata do + @moduledoc """ + Additional information of a Chat Engine. Fields in this message are output only. + + ## Attributes + + * `dialogflowAgent` (*type:* `String.t`, *default:* `nil`) - The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dialogflowAgent => String.t() | nil + } + + field(:dialogflowAgent) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineChatEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_common_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_common_config.ex new file mode 100644 index 0000000000..ff289c3c1f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_common_config.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1EngineCommonConfig do + @moduledoc """ + Common configurations for an Engine. + + ## Attributes + + * `companyName` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :companyName => String.t() | nil + } + + field(:companyName) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineCommonConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineCommonConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineCommonConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_search_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_search_engine_config.ex new file mode 100644 index 0000000000..b17e24a46f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_engine_search_engine_config.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1EngineSearchEngineConfig do + @moduledoc """ + Configurations for a Search Engine. + + ## 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :searchAddOns => list(String.t()) | nil, + :searchTier => String.t() | nil + } + + field(:searchAddOns, type: :list) + field(:searchTier) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineSearchEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineSearchEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1EngineSearchEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_documents_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_documents_metadata.ex new file mode 100644 index 0000000000..4744224aad --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_documents_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsMetadata do + @moduledoc """ + Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were processed successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_documents_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_documents_response.ex new file mode 100644 index 0000000000..dc5b239ce8 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_documents_response.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsResponse do + @moduledoc """ + Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors in the request if set. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportDocumentsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_error_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_error_config.ex new file mode 100644 index 0000000000..946f63a15c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_error_config.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig do + @moduledoc """ + Configuration of destination for Import related errors. + + ## Attributes + + * `gcsPrefix` (*type:* `String.t`, *default:* `nil`) - Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :gcsPrefix => String.t() | nil + } + + field(:gcsPrefix) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_suggestion_deny_list_entries_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_suggestion_deny_list_entries_metadata.ex new file mode 100644 index 0000000000..be6e5786b9 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_suggestion_deny_list_entries_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata do + @moduledoc """ + Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_suggestion_deny_list_entries_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_suggestion_deny_list_entries_response.ex new file mode 100644 index 0000000000..e8afdd1bea --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_suggestion_deny_list_entries_response.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse do + @moduledoc """ + Response message for CompletionService.ImportSuggestionDenyListEntries method. + + ## Attributes + + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `failedEntriesCount` (*type:* `String.t`, *default:* `nil`) - Count of deny list entries that failed to be imported. + * `importedEntriesCount` (*type:* `String.t`, *default:* `nil`) - Count of deny list entries successfully imported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :failedEntriesCount => String.t() | nil, + :importedEntriesCount => String.t() | nil + } + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:failedEntriesCount) + field(:importedEntriesCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_user_events_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_user_events_metadata.ex new file mode 100644 index 0000000000..c6000addd0 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_user_events_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsMetadata do + @moduledoc """ + Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were processed successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_user_events_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_user_events_response.ex new file mode 100644 index 0000000000..7c95305529 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_import_user_events_response.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsResponse do + @moduledoc """ + Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors if this field was set in the request. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `joinedEventsCount` (*type:* `String.t`, *default:* `nil`) - Count of user events imported with complete existing Documents. + * `unjoinedEventsCount` (*type:* `String.t`, *default:* `nil`) - Count of user events imported, but with Document information not found in the existing Branch. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :joinedEventsCount => String.t() | nil, + :unjoinedEventsCount => String.t() | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:joinedEventsCount) + field(:unjoinedEventsCount) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ImportUserEventsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_ocr_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_ocr_parsing_config.ex new file mode 100644 index 0000000000..3f17b0a29b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_ocr_parsing_config.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig do + @moduledoc """ + The OCR parsing configurations for documents. + + ## 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. + * `useNativeText` (*type:* `boolean()`, *default:* `nil`) - If true, will use native text instead of OCR text on pages containing native text. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enhancedDocumentElements => list(String.t()) | nil, + :useNativeText => boolean() | nil + } + + field(:enhancedDocumentElements, type: :list) + field(:useNativeText) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_documents_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_documents_metadata.ex new file mode 100644 index 0000000000..0a73dfcbe0 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_documents_metadata.ex @@ -0,0 +1,63 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata do + @moduledoc """ + Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `ignoredCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were ignored as entries were not found. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were deleted successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :ignoredCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:ignoredCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_documents_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_documents_response.ex new file mode 100644 index 0000000000..604ff87843 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_documents_response.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsResponse do + @moduledoc """ + Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. + + ## Attributes + + * `purgeCount` (*type:* `String.t`, *default:* `nil`) - The total count of documents purged as a result of the operation. + * `purgeSample` (*type:* `list(String.t)`, *default:* `nil`) - A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :purgeCount => String.t() | nil, + :purgeSample => list(String.t()) | nil + } + + field(:purgeCount) + field(:purgeSample, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeDocumentsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_suggestion_deny_list_entries_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_suggestion_deny_list_entries_metadata.ex new file mode 100644 index 0000000000..07d463b66e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_suggestion_deny_list_entries_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata do + @moduledoc """ + Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_suggestion_deny_list_entries_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_suggestion_deny_list_entries_response.ex new file mode 100644 index 0000000000..bbd6aa488b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_purge_suggestion_deny_list_entries_response.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse do + @moduledoc """ + Response message for CompletionService.PurgeSuggestionDenyListEntries method. + + ## Attributes + + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `purgeCount` (*type:* `String.t`, *default:* `nil`) - Number of suggestion deny list entries purged. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :purgeCount => String.t() | nil + } + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:purgeCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_schema.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_schema.ex new file mode 100644 index 0000000000..9ed4e9a8eb --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_schema.ex @@ -0,0 +1,57 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1Schema do + @moduledoc """ + Defines the structure and layout of a type of document data. + + ## Attributes + + * `jsonSchema` (*type:* `String.t`, *default:* `nil`) - The JSON representation of the schema. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `structSchema` (*type:* `map()`, *default:* `nil`) - The structured representation of the schema. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :jsonSchema => String.t() | nil, + :name => String.t() | nil, + :structSchema => map() | nil + } + + field(:jsonSchema) + field(:name) + field(:structSchema, type: :map) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Schema do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Schema.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Schema do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_site_verification_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_site_verification_info.ex new file mode 100644 index 0000000000..ea59211f1c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_site_verification_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1SiteVerificationInfo do + @moduledoc """ + Verification information for target sites in advanced site search. + + ## Attributes + + * `siteVerificationState` (*type:* `String.t`, *default:* `nil`) - Site verification state indicating the ownership and validity. + * `verifyTime` (*type:* `DateTime.t`, *default:* `nil`) - Latest site verification time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :siteVerificationState => String.t() | nil, + :verifyTime => DateTime.t() | nil + } + + field(:siteVerificationState) + field(:verifyTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SiteVerificationInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SiteVerificationInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SiteVerificationInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site.ex new file mode 100644 index 0000000000..93841245bc --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site.ex @@ -0,0 +1,87 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSite do + @moduledoc """ + A target site for the SiteSearchEngine. + + ## Attributes + + * `exactMatch` (*type:* `boolean()`, *default:* `nil`) - Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine. + * `failureReason` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReason.t`, *default:* `nil`) - Output only. Failure reason. + * `generatedUriPattern` (*type:* `String.t`, *default:* `nil`) - Output only. This is system-generated based on the provided_uri_pattern. + * `indexingStatus` (*type:* `String.t`, *default:* `nil`) - Output only. Indexing status. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated. + * `providedUriPattern` (*type:* `String.t`, *default:* `nil`) - Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + * `siteVerificationInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SiteVerificationInfo.t`, *default:* `nil`) - Output only. Site ownership and validity verification status. + * `type` (*type:* `String.t`, *default:* `nil`) - The type of the target site, e.g., whether the site is to be included or excluded. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The target site's last updated time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :exactMatch => boolean() | nil, + :failureReason => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReason.t() + | nil, + :generatedUriPattern => String.t() | nil, + :indexingStatus => String.t() | nil, + :name => String.t() | nil, + :providedUriPattern => String.t() | nil, + :siteVerificationInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SiteVerificationInfo.t() + | nil, + :type => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:exactMatch) + + field(:failureReason, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReason + ) + + field(:generatedUriPattern) + field(:indexingStatus) + field(:name) + field(:providedUriPattern) + + field(:siteVerificationInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SiteVerificationInfo + ) + + field(:type) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSite do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSite.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSite do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site_failure_reason.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site_failure_reason.ex new file mode 100644 index 0000000000..3bb4b305fa --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site_failure_reason.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReason do + @moduledoc """ + Site search indexing failure reasons. + + ## Attributes + + * `quotaFailure` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure.t`, *default:* `nil`) - Failed due to insufficient quota. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :quotaFailure => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure.t() + | nil + } + + field(:quotaFailure, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReason do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReason.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReason do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site_failure_reason_quota_failure.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site_failure_reason_quota_failure.ex new file mode 100644 index 0000000000..96a10ba085 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_target_site_failure_reason_quota_failure.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure do + @moduledoc """ + Failed due to insufficient quota. + + ## Attributes + + * `totalRequiredQuota` (*type:* `String.t`, *default:* `nil`) - This number is an estimation on how much total quota this project needs to successfully complete indexing. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :totalRequiredQuota => String.t() | nil + } + + field(:totalRequiredQuota) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_update_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_update_schema_metadata.ex new file mode 100644 index 0000000000..395ebdc072 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_update_schema_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateSchemaMetadata do + @moduledoc """ + Metadata for UpdateSchema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_update_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_update_target_site_metadata.ex new file mode 100644 index 0000000000..a5cffe895f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_update_target_site_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_acl_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_acl_config.ex new file mode 100644 index 0000000000..f5430c1d1f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_acl_config.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAclConfig do + @moduledoc """ + Access Control Configuration. + + ## Attributes + + * `idpConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig.t`, *default:* `nil`) - Identity provider config. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :idpConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig.t() + | nil, + :name => String.t() | nil + } + + field(:idpConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig + ) + + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAclConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAclConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAclConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_batch_create_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_batch_create_target_site_metadata.ex new file mode 100644 index 0000000000..200e5545bb --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_batch_create_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_batch_create_target_sites_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_batch_create_target_sites_response.ex new file mode 100644 index 0000000000..e6341bd27a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_batch_create_target_sites_response.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse do + @moduledoc """ + Response message for SiteSearchEngineService.BatchCreateTargetSites method. + + ## Attributes + + * `targetSites` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSite.t)`, *default:* `nil`) - TargetSites created. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :targetSites => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSite.t() + ) + | nil + } + + field(:targetSites, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSite, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_data_store_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_data_store_metadata.ex new file mode 100644 index 0000000000..41e8a7d20a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_data_store_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata do + @moduledoc """ + Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_engine_metadata.ex new file mode 100644 index 0000000000..5f31008b8c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_engine_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata do + @moduledoc """ + Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_schema_metadata.ex new file mode 100644 index 0000000000..e01b6ffcee --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_schema_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata do + @moduledoc """ + Metadata for Create Schema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_target_site_metadata.ex new file mode 100644 index 0000000000..14adfb139b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_create_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_data_store.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_data_store.ex new file mode 100644 index 0000000000..4a917f1592 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_data_store.ex @@ -0,0 +1,98 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDataStore do + @moduledoc """ + DataStore captures global settings and configs at the DataStore level. + + ## Attributes + + * `aclEnabled` (*type:* `boolean()`, *default:* `nil`) - Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config. + * `contentConfig` (*type:* `String.t`, *default:* `nil`) - Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the DataStore was created at. + * `defaultSchemaId` (*type:* `String.t`, *default:* `nil`) - Output only. The id of the default Schema asscociated to this data store. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + * `documentProcessingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.t`, *default:* `nil`) - Configuration for Document understanding and enrichment. + * `idpConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig.t`, *default:* `nil`) - Output only. Data store level identity provider config. + * `industryVertical` (*type:* `String.t`, *default:* `nil`) - Immutable. The industry vertical that the data store registers. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `solutionTypes` (*type:* `list(String.t)`, *default:* `nil`) - The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + * `startingSchema` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSchema.t`, *default:* `nil`) - The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :aclEnabled => boolean() | nil, + :contentConfig => String.t() | nil, + :createTime => DateTime.t() | nil, + :defaultSchemaId => String.t() | nil, + :displayName => String.t() | nil, + :documentProcessingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.t() + | nil, + :idpConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig.t() + | nil, + :industryVertical => String.t() | nil, + :name => String.t() | nil, + :solutionTypes => list(String.t()) | nil, + :startingSchema => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSchema.t() + | nil + } + + field(:aclEnabled) + field(:contentConfig) + field(:createTime, as: DateTime) + field(:defaultSchemaId) + field(:displayName) + + field(:documentProcessingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig + ) + + field(:idpConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig + ) + + field(:industryVertical) + field(:name) + field(:solutionTypes, type: :list) + + field(:startingSchema, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSchema + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDataStore do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDataStore.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDataStore do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_data_store_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_data_store_metadata.ex new file mode 100644 index 0000000000..8eb39aa98e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_data_store_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata do + @moduledoc """ + Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_engine_metadata.ex new file mode 100644 index 0000000000..19a4d8bca5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_engine_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata do + @moduledoc """ + Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_schema_metadata.ex new file mode 100644 index 0000000000..2f806ed8ee --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_schema_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata do + @moduledoc """ + Metadata for DeleteSchema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_target_site_metadata.ex new file mode 100644 index 0000000000..453f1331f5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_digital_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_digital_parsing_config.ex new file mode 100644 index 0000000000..f6c3b381cc --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_digital_parsing_config.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig do + @moduledoc """ + The digital parsing configurations for documents. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_disable_advanced_site_search_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_disable_advanced_site_search_metadata.ex new file mode 100644 index 0000000000..64025d0101 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_disable_advanced_site_search_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_disable_advanced_site_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_disable_advanced_site_search_response.ex new file mode 100644 index 0000000000..9ef09bca7c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_disable_advanced_site_search_response.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse do + @moduledoc """ + Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config.ex new file mode 100644 index 0000000000..8d78ebf926 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config.ex @@ -0,0 +1,84 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig do + @moduledoc """ + A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. + + ## Attributes + + * `chunkingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig.t`, *default:* `nil`) - Whether chunking mode is enabled. + * `defaultParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig.t`, *default:* `nil`) - Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing. + * `name` (*type:* `String.t`, *default:* `nil`) - The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + * `parsingConfigOverrides` (*type:* `%{optional(String.t) => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig.t}`, *default:* `nil`) - Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :chunkingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig.t() + | nil, + :defaultParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig.t() + | nil, + :name => String.t() | nil, + :parsingConfigOverrides => + %{ + optional(String.t()) => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig.t() + } + | nil + } + + field(:chunkingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig + ) + + field(:defaultParsingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig + ) + + field(:name) + + field(:parsingConfigOverrides, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig, + type: :map + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_chunking_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_chunking_config.ex new file mode 100644 index 0000000000..3c774d3093 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_chunking_config.ex @@ -0,0 +1,58 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig do + @moduledoc """ + Configuration for chunking config. + + ## Attributes + + * `layoutBasedChunkingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig.t`, *default:* `nil`) - Configuration for the layout based chunking. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :layoutBasedChunkingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig.t() + | nil + } + + field(:layoutBasedChunkingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_chunking_config_layout_based_chunking_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_chunking_config_layout_based_chunking_config.ex new file mode 100644 index 0000000000..1e5cead246 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_chunking_config_layout_based_chunking_config.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig do + @moduledoc """ + Configuration for the layout based chunking. + + ## Attributes + + * `chunkSize` (*type:* `integer()`, *default:* `nil`) - The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500. + * `includeAncestorHeadings` (*type:* `boolean()`, *default:* `nil`) - Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :chunkSize => integer() | nil, + :includeAncestorHeadings => boolean() | nil + } + + field(:chunkSize) + field(:includeAncestorHeadings) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_parsing_config.ex new file mode 100644 index 0000000000..ab4d32c0a9 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_parsing_config.ex @@ -0,0 +1,75 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig do + @moduledoc """ + Related configurations applied to a specific type of document parser. + + ## Attributes + + * `digitalParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig.t`, *default:* `nil`) - Configurations applied to digital parser. + * `layoutParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig.t`, *default:* `nil`) - Configurations applied to layout parser. + * `ocrParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig.t`, *default:* `nil`) - Configurations applied to OCR parser. Currently it only applies to PDFs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :digitalParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig.t() + | nil, + :layoutParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig.t() + | nil, + :ocrParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig.t() + | nil + } + + field(:digitalParsingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig + ) + + field(:layoutParsingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig + ) + + field(:ocrParsingConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_enable_advanced_site_search_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_enable_advanced_site_search_metadata.ex new file mode 100644 index 0000000000..b9602bcdc6 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_enable_advanced_site_search_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_enable_advanced_site_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_enable_advanced_site_search_response.ex new file mode 100644 index 0000000000..06c7cea07b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_enable_advanced_site_search_response.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse do + @moduledoc """ + Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine.ex new file mode 100644 index 0000000000..2e35d918fd --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine.ex @@ -0,0 +1,133 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngine do + @moduledoc """ + Metadata that describes the training and serving parameters of an Engine. + + ## Attributes + + * `chatEngineConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig.t`, *default:* `nil`) - Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + * `chatEngineMetadata` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata.t`, *default:* `nil`) - Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + * `commonConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineCommonConfig.t`, *default:* `nil`) - Common config spec that specifies the metadata of the engine. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the Recommendation Engine was created at. + * `dataStoreIds` (*type:* `list(String.t)`, *default:* `nil`) - The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + * `industryVertical` (*type:* `String.t`, *default:* `nil`) - The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore liniked to the engine. + * `mediaRecommendationEngineConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig.t`, *default:* `nil`) - Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + * `recommendationMetadata` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata.t`, *default:* `nil`) - Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION. + * `searchEngineConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig.t`, *default:* `nil`) - Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + * `similarDocumentsConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig.t`, *default:* `nil`) - Additional config specs for a `similar-items` engine. + * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. The solutions of the engine. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the Recommendation Engine was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :chatEngineConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig.t() + | nil, + :chatEngineMetadata => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata.t() + | nil, + :commonConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineCommonConfig.t() + | nil, + :createTime => DateTime.t() | nil, + :dataStoreIds => list(String.t()) | nil, + :displayName => String.t() | nil, + :industryVertical => String.t() | nil, + :mediaRecommendationEngineConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig.t() + | nil, + :name => String.t() | nil, + :recommendationMetadata => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata.t() + | nil, + :searchEngineConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig.t() + | nil, + :similarDocumentsConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig.t() + | nil, + :solutionType => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:chatEngineConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig + ) + + field(:chatEngineMetadata, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata + ) + + field(:commonConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineCommonConfig + ) + + field(:createTime, as: DateTime) + field(:dataStoreIds, type: :list) + field(:displayName) + field(:industryVertical) + + field(:mediaRecommendationEngineConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig + ) + + field(:name) + + field(:recommendationMetadata, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata + ) + + field(:searchEngineConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig + ) + + field(:similarDocumentsConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig + ) + + field(:solutionType) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngine do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngine.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngine do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_config.ex new file mode 100644 index 0000000000..5472aa5c0b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_config.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig do + @moduledoc """ + Configurations for a Chat Engine. + + ## Attributes + + * `agentCreationConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig.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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :agentCreationConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig.t() + | nil, + :dialogflowAgentToLink => String.t() | nil + } + + field(:agentCreationConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig + ) + + field(:dialogflowAgentToLink) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_config_agent_creation_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_config_agent_creation_config.ex new file mode 100644 index 0000000000..7a37ae2534 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_config_agent_creation_config.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig do + @moduledoc """ + Configurations for generating a Dialogflow agent. 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. + + ## Attributes + + * `business` (*type:* `String.t`, *default:* `nil`) - Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + * `defaultLanguageCode` (*type:* `String.t`, *default:* `nil`) - Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + * `location` (*type:* `String.t`, *default:* `nil`) - Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default. + * `timeZone` (*type:* `String.t`, *default:* `nil`) - Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :business => String.t() | nil, + :defaultLanguageCode => String.t() | nil, + :location => String.t() | nil, + :timeZone => String.t() | nil + } + + field(:business) + field(:defaultLanguageCode) + field(:location) + field(:timeZone) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_metadata.ex new file mode 100644 index 0000000000..022e9dda28 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_chat_engine_metadata.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata do + @moduledoc """ + Additional information of a Chat Engine. Fields in this message are output only. + + ## Attributes + + * `dialogflowAgent` (*type:* `String.t`, *default:* `nil`) - The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dialogflowAgent => String.t() | nil + } + + field(:dialogflowAgent) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_common_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_common_config.ex new file mode 100644 index 0000000000..97376932e0 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_common_config.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineCommonConfig do + @moduledoc """ + Common configurations for an Engine. + + ## Attributes + + * `companyName` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :companyName => String.t() | nil + } + + field(:companyName) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineCommonConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineCommonConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineCommonConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_media_recommendation_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_media_recommendation_engine_config.ex new file mode 100644 index 0000000000..b70ce27bca --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_media_recommendation_engine_config.ex @@ -0,0 +1,69 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig do + @moduledoc """ + Additional config specs for a Media Recommendation engine. + + ## Attributes + + * `optimizationObjective` (*type:* `String.t`, *default:* `nil`) - The optimization objective. e.g., `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` + * `optimizationObjectiveConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig.t`, *default:* `nil`) - Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5). + * `trainingState` (*type:* `String.t`, *default:* `nil`) - The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before. + * `type` (*type:* `String.t`, *default:* `nil`) - Required. The type of engine. e.g., `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :optimizationObjective => String.t() | nil, + :optimizationObjectiveConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig.t() + | nil, + :trainingState => String.t() | nil, + :type => String.t() | nil + } + + field(:optimizationObjective) + + field(:optimizationObjectiveConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig + ) + + field(:trainingState) + field(:type) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_media_recommendation_engine_config_optimization_objective_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_media_recommendation_engine_config_optimization_objective_config.ex new file mode 100644 index 0000000000..01120d7593 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_media_recommendation_engine_config_optimization_objective_config.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig do + @moduledoc """ + Custom threshold for `cvr` optimization_objective. + + ## Attributes + + * `targetField` (*type:* `String.t`, *default:* `nil`) - Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`. + * `targetFieldValueFloat` (*type:* `number()`, *default:* `nil`) - Required. The threshold to be applied to the target (e.g., 0.5). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :targetField => String.t() | nil, + :targetFieldValueFloat => number() | nil + } + + field(:targetField) + field(:targetFieldValueFloat) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_recommendation_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_recommendation_metadata.ex new file mode 100644 index 0000000000..09f29225f1 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_recommendation_metadata.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata do + @moduledoc """ + Additional information of a recommendation engine. + + ## Attributes + + * `dataState` (*type:* `String.t`, *default:* `nil`) - Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training. + * `lastTuneTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines. + * `servingState` (*type:* `String.t`, *default:* `nil`) - Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`. + * `tuningOperation` (*type:* `String.t`, *default:* `nil`) - Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataState => String.t() | nil, + :lastTuneTime => DateTime.t() | nil, + :servingState => String.t() | nil, + :tuningOperation => String.t() | nil + } + + field(:dataState) + field(:lastTuneTime, as: DateTime) + field(:servingState) + field(:tuningOperation) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_search_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_search_engine_config.ex new file mode 100644 index 0000000000..69836d96e7 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_search_engine_config.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig do + @moduledoc """ + Configurations for a Search Engine. + + ## 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :searchAddOns => list(String.t()) | nil, + :searchTier => String.t() | nil + } + + field(:searchAddOns, type: :list) + field(:searchTier) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_similar_documents_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_similar_documents_engine_config.ex new file mode 100644 index 0000000000..623e60b9a4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_engine_similar_documents_engine_config.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig do + @moduledoc """ + Additional config specs for a `similar-items` engine. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_estimate_data_size_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_estimate_data_size_metadata.ex new file mode 100644 index 0000000000..1bcce00f09 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_estimate_data_size_metadata.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata do + @moduledoc """ + Metadata related to the progress of the EstimateDataSize operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_estimate_data_size_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_estimate_data_size_response.ex new file mode 100644 index 0000000000..0bd2f72e23 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_estimate_data_size_response.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse do + @moduledoc """ + Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. + + ## Attributes + + * `dataSizeBytes` (*type:* `String.t`, *default:* `nil`) - Data size in terms of bytes. + * `documentCount` (*type:* `String.t`, *default:* `nil`) - Total number of documents. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataSizeBytes => String.t() | nil, + :documentCount => String.t() | nil + } + + field(:dataSizeBytes) + field(:documentCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_field_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_field_config.ex new file mode 100644 index 0000000000..6cfa599a6f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_field_config.ex @@ -0,0 +1,75 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaFieldConfig do + @moduledoc """ + Configurations for fields of a schema. For example, configuring a field is indexable, or searchable. + + ## Attributes + + * `completableOption` (*type:* `String.t`, *default:* `nil`) - If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw `INVALID_ARGUMENT` error. + * `dynamicFacetableOption` (*type:* `String.t`, *default:* `nil`) - If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw `INVALID_ARGUMENT` error. + * `fieldPath` (*type:* `String.t`, *default:* `nil`) - Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`. + * `fieldType` (*type:* `String.t`, *default:* `nil`) - Output only. Raw type of the field. + * `indexableOption` (*type:* `String.t`, *default:* `nil`) - If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw `INVALID_ARGUMENT` error. + * `keyPropertyType` (*type:* `String.t`, *default:* `nil`) - Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified. + * `recsFilterableOption` (*type:* `String.t`, *default:* `nil`) - If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned. + * `retrievableOption` (*type:* `String.t`, *default:* `nil`) - If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error. + * `searchableOption` (*type:* `String.t`, *default:* `nil`) - If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :completableOption => String.t() | nil, + :dynamicFacetableOption => String.t() | nil, + :fieldPath => String.t() | nil, + :fieldType => String.t() | nil, + :indexableOption => String.t() | nil, + :keyPropertyType => String.t() | nil, + :recsFilterableOption => String.t() | nil, + :retrievableOption => String.t() | nil, + :searchableOption => String.t() | nil + } + + field(:completableOption) + field(:dynamicFacetableOption) + field(:fieldPath) + field(:fieldType) + field(:indexableOption) + field(:keyPropertyType) + field(:recsFilterableOption) + field(:retrievableOption) + field(:searchableOption) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaFieldConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaFieldConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaFieldConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_idp_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_idp_config.ex new file mode 100644 index 0000000000..faeb6e6132 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_idp_config.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig do + @moduledoc """ + Identity Provider Config. + + ## Attributes + + * `externalIdpConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig.t`, *default:* `nil`) - External Identity provider config. + * `idpType` (*type:* `String.t`, *default:* `nil`) - Identity provider type configured. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :externalIdpConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig.t() + | nil, + :idpType => String.t() | nil + } + + field(:externalIdpConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig + ) + + field(:idpType) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_idp_config_external_idp_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_idp_config_external_idp_config.ex new file mode 100644 index 0000000000..f812b6a13a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_idp_config_external_idp_config.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig do + @moduledoc """ + Third party IDP Config. + + ## Attributes + + * `workforcePoolName` (*type:* `String.t`, *default:* `nil`) - Workforce pool name. Example: "locations/global/workforcePools/pool_id" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :workforcePoolName => String.t() | nil + } + + field(:workforcePoolName) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_documents_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_documents_metadata.ex new file mode 100644 index 0000000000..f77e654bd3 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_documents_metadata.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata do + @moduledoc """ + Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were processed successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_documents_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_documents_response.ex new file mode 100644 index 0000000000..21d068369a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_documents_response.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse do + @moduledoc """ + Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors in the request if set. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_error_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_error_config.ex new file mode 100644 index 0000000000..33aa09a86e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_error_config.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig do + @moduledoc """ + Configuration of destination for Import related errors. + + ## Attributes + + * `gcsPrefix` (*type:* `String.t`, *default:* `nil`) - Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :gcsPrefix => String.t() | nil + } + + field(:gcsPrefix) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_suggestion_deny_list_entries_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_suggestion_deny_list_entries_metadata.ex new file mode 100644 index 0000000000..bcaeaea6b8 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_suggestion_deny_list_entries_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata do + @moduledoc """ + Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_suggestion_deny_list_entries_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_suggestion_deny_list_entries_response.ex new file mode 100644 index 0000000000..d664aa7528 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_suggestion_deny_list_entries_response.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse do + @moduledoc """ + Response message for CompletionService.ImportSuggestionDenyListEntries method. + + ## Attributes + + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `failedEntriesCount` (*type:* `String.t`, *default:* `nil`) - Count of deny list entries that failed to be imported. + * `importedEntriesCount` (*type:* `String.t`, *default:* `nil`) - Count of deny list entries successfully imported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :failedEntriesCount => String.t() | nil, + :importedEntriesCount => String.t() | nil + } + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:failedEntriesCount) + field(:importedEntriesCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_user_events_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_user_events_metadata.ex new file mode 100644 index 0000000000..f3e6754de4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_user_events_metadata.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata do + @moduledoc """ + Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were processed successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_user_events_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_user_events_response.ex new file mode 100644 index 0000000000..63dbf46875 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_import_user_events_response.ex @@ -0,0 +1,67 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse do + @moduledoc """ + Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors if this field was set in the request. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `joinedEventsCount` (*type:* `String.t`, *default:* `nil`) - Count of user events imported with complete existing Documents. + * `unjoinedEventsCount` (*type:* `String.t`, *default:* `nil`) - Count of user events imported, but with Document information not found in the existing Branch. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :joinedEventsCount => String.t() | nil, + :unjoinedEventsCount => String.t() | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:joinedEventsCount) + field(:unjoinedEventsCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_layout_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_layout_parsing_config.ex new file mode 100644 index 0000000000..2990b5127d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_layout_parsing_config.ex @@ -0,0 +1,46 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig do + @moduledoc """ + The layout parsing configurations for documents. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_ocr_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_ocr_parsing_config.ex new file mode 100644 index 0000000000..552167fc45 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_ocr_parsing_config.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig do + @moduledoc """ + The OCR parsing configurations for documents. + + ## 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. + * `useNativeText` (*type:* `boolean()`, *default:* `nil`) - If true, will use native text instead of OCR text on pages containing native text. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enhancedDocumentElements => list(String.t()) | nil, + :useNativeText => boolean() | nil + } + + field(:enhancedDocumentElements, type: :list) + field(:useNativeText) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_documents_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_documents_metadata.ex new file mode 100644 index 0000000000..f638b05dac --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_documents_metadata.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata do + @moduledoc """ + Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `ignoredCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were ignored as entries were not found. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were deleted successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :ignoredCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:ignoredCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_documents_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_documents_response.ex new file mode 100644 index 0000000000..7634619ede --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_documents_response.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse do + @moduledoc """ + Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. + + ## Attributes + + * `purgeCount` (*type:* `String.t`, *default:* `nil`) - The total count of documents purged as a result of the operation. + * `purgeSample` (*type:* `list(String.t)`, *default:* `nil`) - A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :purgeCount => String.t() | nil, + :purgeSample => list(String.t()) | nil + } + + field(:purgeCount) + field(:purgeSample, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_suggestion_deny_list_entries_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_suggestion_deny_list_entries_metadata.ex new file mode 100644 index 0000000000..a1a2b5d491 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_suggestion_deny_list_entries_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata do + @moduledoc """ + Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_suggestion_deny_list_entries_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_suggestion_deny_list_entries_response.ex new file mode 100644 index 0000000000..b8e52096d5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_suggestion_deny_list_entries_response.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse do + @moduledoc """ + Response message for CompletionService.PurgeSuggestionDenyListEntries method. + + ## Attributes + + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `purgeCount` (*type:* `String.t`, *default:* `nil`) - Number of suggestion deny list entries purged. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :purgeCount => String.t() | nil + } + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:purgeCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_user_events_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_user_events_metadata.ex new file mode 100644 index 0000000000..490d9a1fd9 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_user_events_metadata.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata do + @moduledoc """ + Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were deleted successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_user_events_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_user_events_response.ex new file mode 100644 index 0000000000..9465a538db --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_purge_user_events_response.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse do + @moduledoc """ + Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. + + ## Attributes + + * `purgeCount` (*type:* `String.t`, *default:* `nil`) - The total count of events purged as a result of the operation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :purgeCount => String.t() | nil + } + + field(:purgeCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_metadata.ex new file mode 100644 index 0000000000..a2903ee3ec --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_metadata.ex @@ -0,0 +1,69 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.RecrawlUris operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `invalidUris` (*type:* `list(String.t)`, *default:* `nil`) - Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE. + * `pendingCount` (*type:* `integer()`, *default:* `nil`) - Total number of URIs that have yet to be crawled. + * `quotaExceededCount` (*type:* `integer()`, *default:* `nil`) - Total number of URIs that were rejected due to insufficient indexing resources. + * `successCount` (*type:* `integer()`, *default:* `nil`) - Total number of URIs that have been crawled so far. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + * `validUrisCount` (*type:* `integer()`, *default:* `nil`) - Total number of unique URIs in the request that are not in invalid_uris. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :invalidUris => list(String.t()) | nil, + :pendingCount => integer() | nil, + :quotaExceededCount => integer() | nil, + :successCount => integer() | nil, + :updateTime => DateTime.t() | nil, + :validUrisCount => integer() | nil + } + + field(:createTime, as: DateTime) + field(:invalidUris, type: :list) + field(:pendingCount) + field(:quotaExceededCount) + field(:successCount) + field(:updateTime, as: DateTime) + field(:validUrisCount) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response.ex new file mode 100644 index 0000000000..e96aa813c7 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response.ex @@ -0,0 +1,63 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse do + @moduledoc """ + Response message for SiteSearchEngineService.RecrawlUris method. + + ## Attributes + + * `failedUris` (*type:* `list(String.t)`, *default:* `nil`) - URIs that were not crawled before the LRO terminated. + * `failureSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo.t)`, *default:* `nil`) - Details for a sample of up to 10 `failed_uris`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :failedUris => list(String.t()) | nil, + :failureSamples => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo.t() + ) + | nil + } + + field(:failedUris, type: :list) + + field(:failureSamples, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response_failure_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response_failure_info.ex new file mode 100644 index 0000000000..54d34d6577 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response_failure_info.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo do + @moduledoc """ + Details about why a particular URI failed to be crawled. Each FailureInfo contains one FailureReason per CorpusType. + + ## Attributes + + * `failureReasons` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason.t)`, *default:* `nil`) - List of failure reasons by corpus type (e.g. desktop, mobile). + * `uri` (*type:* `String.t`, *default:* `nil`) - URI that failed to be crawled. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :failureReasons => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason.t() + ) + | nil, + :uri => String.t() | nil + } + + field(:failureReasons, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason, + type: :list + ) + + field(:uri) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response_failure_info_failure_reason.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response_failure_info_failure_reason.ex new file mode 100644 index 0000000000..7dedf8f591 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_recrawl_uris_response_failure_info_failure_reason.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason do + @moduledoc """ + Details about why crawling failed for a particular CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different reasons. + + ## Attributes + + * `corpusType` (*type:* `String.t`, *default:* `nil`) - DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. + * `errorMessage` (*type:* `String.t`, *default:* `nil`) - Reason why the URI was not crawled. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :corpusType => String.t() | nil, + :errorMessage => String.t() | nil + } + + field(:corpusType) + field(:errorMessage) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_schema.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_schema.ex new file mode 100644 index 0000000000..0efe492102 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_schema.ex @@ -0,0 +1,68 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSchema do + @moduledoc """ + Defines the structure and layout of a type of document data. + + ## Attributes + + * `fieldConfigs` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaFieldConfig.t)`, *default:* `nil`) - Output only. Configurations for fields of the schema. + * `jsonSchema` (*type:* `String.t`, *default:* `nil`) - The JSON representation of the schema. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `structSchema` (*type:* `map()`, *default:* `nil`) - The structured representation of the schema. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fieldConfigs => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaFieldConfig.t() + ) + | nil, + :jsonSchema => String.t() | nil, + :name => String.t() | nil, + :structSchema => map() | nil + } + + field(:fieldConfigs, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaFieldConfig, + type: :list + ) + + field(:jsonSchema) + field(:name) + field(:structSchema, type: :map) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSchema do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSchema.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSchema do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_site_verification_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_site_verification_info.ex new file mode 100644 index 0000000000..3c87b88556 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_site_verification_info.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo do + @moduledoc """ + Verification information for target sites in advanced site search. + + ## Attributes + + * `siteVerificationState` (*type:* `String.t`, *default:* `nil`) - Site verification state indicating the ownership and validity. + * `verifyTime` (*type:* `DateTime.t`, *default:* `nil`) - Latest site verification time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :siteVerificationState => String.t() | nil, + :verifyTime => DateTime.t() | nil + } + + field(:siteVerificationState) + field(:verifyTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site.ex new file mode 100644 index 0000000000..63c37a0e0d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site.ex @@ -0,0 +1,89 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSite do + @moduledoc """ + A target site for the SiteSearchEngine. + + ## Attributes + + * `exactMatch` (*type:* `boolean()`, *default:* `nil`) - Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine. + * `failureReason` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason.t`, *default:* `nil`) - Output only. Failure reason. + * `generatedUriPattern` (*type:* `String.t`, *default:* `nil`) - Output only. This is system-generated based on the provided_uri_pattern. + * `indexingStatus` (*type:* `String.t`, *default:* `nil`) - Output only. Indexing status. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated. + * `providedUriPattern` (*type:* `String.t`, *default:* `nil`) - Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + * `siteVerificationInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo.t`, *default:* `nil`) - Output only. Site ownership and validity verification status. + * `type` (*type:* `String.t`, *default:* `nil`) - The type of the target site, e.g., whether the site is to be included or excluded. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The target site's last updated time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :exactMatch => boolean() | nil, + :failureReason => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason.t() + | nil, + :generatedUriPattern => String.t() | nil, + :indexingStatus => String.t() | nil, + :name => String.t() | nil, + :providedUriPattern => String.t() | nil, + :siteVerificationInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo.t() + | nil, + :type => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:exactMatch) + + field(:failureReason, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason + ) + + field(:generatedUriPattern) + field(:indexingStatus) + field(:name) + field(:providedUriPattern) + + field(:siteVerificationInfo, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo + ) + + field(:type) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSite do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSite.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSite do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site_failure_reason.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site_failure_reason.ex new file mode 100644 index 0000000000..1d08817908 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site_failure_reason.ex @@ -0,0 +1,58 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason do + @moduledoc """ + Site search indexing failure reasons. + + ## Attributes + + * `quotaFailure` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure.t`, *default:* `nil`) - Failed due to insufficient quota. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :quotaFailure => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure.t() + | nil + } + + field(:quotaFailure, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site_failure_reason_quota_failure.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site_failure_reason_quota_failure.ex new file mode 100644 index 0000000000..6180e434fe --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_target_site_failure_reason_quota_failure.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure do + @moduledoc """ + Failed due to insufficient quota. + + ## Attributes + + * `totalRequiredQuota` (*type:* `String.t`, *default:* `nil`) - This number is an estimation on how much total quota this project needs to successfully complete indexing. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :totalRequiredQuota => String.t() | nil + } + + field(:totalRequiredQuota) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_train_custom_model_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_train_custom_model_metadata.ex new file mode 100644 index 0000000000..7f7fcbaf65 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_train_custom_model_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata do + @moduledoc """ + Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_train_custom_model_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_train_custom_model_response.ex new file mode 100644 index 0000000000..564818f2e3 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_train_custom_model_response.ex @@ -0,0 +1,64 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse do + @moduledoc """ + Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors in the request if set. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the data. + * `modelStatus` (*type:* `String.t`, *default:* `nil`) - The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training is in progress. * **ready**: The model is ready for serving. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :modelStatus => String.t() | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:modelStatus) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_tune_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_tune_engine_metadata.ex new file mode 100644 index 0000000000..a48cdc2cf0 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_tune_engine_metadata.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata do + @moduledoc """ + Metadata associated with a tune operation. + + ## Attributes + + * `engine` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :engine => String.t() | nil + } + + field(:engine) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_tune_engine_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_tune_engine_response.ex new file mode 100644 index 0000000000..d27040d671 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_tune_engine_response.ex @@ -0,0 +1,46 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineResponse do + @moduledoc """ + Response associated with a tune operation. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaTuneEngineResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_schema_metadata.ex new file mode 100644 index 0000000000..913a381aaf --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_schema_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata do + @moduledoc """ + Metadata for UpdateSchema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_target_site_metadata.ex new file mode 100644 index 0000000000..c315922c7d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_site_metadata.ex new file mode 100644 index 0000000000..6336bacf40 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_sites_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_sites_request.ex new file mode 100644 index 0000000000..8b5e4c1e40 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_sites_request.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest do + @moduledoc """ + Request message for SiteSearchEngineService.BatchCreateTargetSites method. + + ## Attributes + + * `requests` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest.t)`, *default:* `nil`) - Required. The request message specifying the resources to create. A maximum of 20 TargetSites can be created in a batch. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :requests => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest.t() + ) + | nil + } + + field(:requests, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_sites_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_sites_response.ex new file mode 100644 index 0000000000..eb702039f5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_create_target_sites_response.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse do + @moduledoc """ + Response message for SiteSearchEngineService.BatchCreateTargetSites method. + + ## Attributes + + * `targetSites` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t)`, *default:* `nil`) - TargetSites created. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :targetSites => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t() + ) + | nil + } + + field(:targetSites, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_verify_target_sites_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_verify_target_sites_request.ex new file mode 100644 index 0000000000..087d7a356b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_batch_verify_target_sites_request.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest do + @moduledoc """ + Request message for SiteSearchEngineService.BatchVerifyTargetSites method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_big_query_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_big_query_source.ex new file mode 100644 index 0000000000..3a2b596398 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_big_query_source.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource do + @moduledoc """ + BigQuery source import data from. + + ## Attributes + + * `dataSchema` (*type:* `String.t`, *default:* `nil`) - The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder. + * `datasetId` (*type:* `String.t`, *default:* `nil`) - Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters. + * `gcsStagingDir` (*type:* `String.t`, *default:* `nil`) - Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory. + * `partitionDate` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleTypeDate.t`, *default:* `nil`) - BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + * `projectId` (*type:* `String.t`, *default:* `nil`) - The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + * `tableId` (*type:* `String.t`, *default:* `nil`) - Required. The BigQuery table to copy the data from with a length limit of 1,024 characters. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataSchema => String.t() | nil, + :datasetId => String.t() | nil, + :gcsStagingDir => String.t() | nil, + :partitionDate => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleTypeDate.t() | nil, + :projectId => String.t() | nil, + :tableId => String.t() | nil + } + + field(:dataSchema) + field(:datasetId) + field(:gcsStagingDir) + field(:partitionDate, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleTypeDate) + field(:projectId) + field(:tableId) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_complete_query_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_complete_query_response.ex new file mode 100644 index 0000000000..cd1e1914ae --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_complete_query_response.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse do + @moduledoc """ + Response message for CompletionService.CompleteQuery method. + + ## Attributes + + * `querySuggestions` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion.t)`, *default:* `nil`) - Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion. + * `tailMatchTriggered` (*type:* `boolean()`, *default:* `nil`) - True if the returned suggestions are all tail suggestions. For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :querySuggestions => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion.t() + ) + | nil, + :tailMatchTriggered => boolean() | nil + } + + field(:querySuggestions, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion, + type: :list + ) + + field(:tailMatchTriggered) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_complete_query_response_query_suggestion.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_complete_query_response_query_suggestion.ex new file mode 100644 index 0000000000..8d5d04eea6 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_complete_query_response_query_suggestion.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion do + @moduledoc """ + Suggestions as search queries. + + ## Attributes + + * `completableFieldPaths` (*type:* `list(String.t)`, *default:* `nil`) - The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model. + * `suggestion` (*type:* `String.t`, *default:* `nil`) - The suggestion for the query. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :completableFieldPaths => list(String.t()) | nil, + :suggestion => String.t() | nil + } + + field(:completableFieldPaths, type: :list) + field(:suggestion) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_completion_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_completion_info.ex new file mode 100644 index 0000000000..37351d2e95 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_completion_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompletionInfo do + @moduledoc """ + Detailed completion information including completion attribution token and clicked completion info. + + ## Attributes + + * `selectedPosition` (*type:* `integer()`, *default:* `nil`) - End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + * `selectedSuggestion` (*type:* `String.t`, *default:* `nil`) - End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :selectedPosition => integer() | nil, + :selectedSuggestion => String.t() | nil + } + + field(:selectedPosition) + field(:selectedSuggestion) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompletionInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompletionInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompletionInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation.ex new file mode 100644 index 0000000000..baae9f4edb --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation.ex @@ -0,0 +1,76 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation do + @moduledoc """ + External conversation proto definition. + + ## Attributes + + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the conversation finished. + * `messages` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationMessage.t)`, *default:* `nil`) - Conversation messages. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the conversation started. + * `state` (*type:* `String.t`, *default:* `nil`) - The state of the Conversation. + * `userPseudoId` (*type:* `String.t`, *default:* `nil`) - A unique identifier for tracking users. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endTime => DateTime.t() | nil, + :messages => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationMessage.t() + ) + | nil, + :name => String.t() | nil, + :startTime => DateTime.t() | nil, + :state => String.t() | nil, + :userPseudoId => String.t() | nil + } + + field(:endTime, as: DateTime) + + field(:messages, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationMessage, + type: :list + ) + + field(:name) + field(:startTime, as: DateTime) + field(:state) + field(:userPseudoId) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation_context.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation_context.ex new file mode 100644 index 0000000000..479c1252ac --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation_context.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationContext do + @moduledoc """ + Defines context of the conversation + + ## Attributes + + * `activeDocument` (*type:* `String.t`, *default:* `nil`) - The current active document the user opened. It contains the document resource reference. + * `contextDocuments` (*type:* `list(String.t)`, *default:* `nil`) - The current list of documents the user is seeing. It contains the document resource references. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :activeDocument => String.t() | nil, + :contextDocuments => list(String.t()) | nil + } + + field(:activeDocument) + field(:contextDocuments, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationContext do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationContext.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationContext do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation_message.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation_message.ex new file mode 100644 index 0000000000..d1be0ff22b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_conversation_message.ex @@ -0,0 +1,63 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationMessage do + @moduledoc """ + Defines a conversation message. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Message creation timestamp. + * `reply` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply.t`, *default:* `nil`) - Search reply. + * `userInput` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput.t`, *default:* `nil`) - User text input. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :reply => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply.t() | nil, + :userInput => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput.t() + | nil + } + + field(:createTime, as: DateTime) + field(:reply, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply) + + field(:userInput, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationMessage do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationMessage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationMessage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_converse_conversation_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_converse_conversation_request.ex new file mode 100644 index 0000000000..2d34c177b4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_converse_conversation_request.ex @@ -0,0 +1,98 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationRequest do + @moduledoc """ + Request message for ConversationalSearchService.ConverseConversation method. + + ## Attributes + + * `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t`, *default:* `nil`) - Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * `conversation` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t`, *default:* `nil`) - The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session. + * `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. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + * `query` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput.t`, *default:* `nil`) - Required. Current user input. + * `safeSearch` (*type:* `boolean()`, *default:* `nil`) - Whether to turn on safe search. + * `servingConfig` (*type:* `String.t`, *default:* `nil`) - The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used. + * `summarySpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec.t`, *default:* `nil`) - A specification for configuring the summary returned in the response. + * `userLabels` (*type:* `map()`, *default:* `nil`) - The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :boostSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t() + | nil, + :conversation => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t() + | nil, + :filter => String.t() | nil, + :query => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput.t() + | nil, + :safeSearch => boolean() | nil, + :servingConfig => String.t() | nil, + :summarySpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec.t() + | nil, + :userLabels => map() | nil + } + + field(:boostSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec + ) + + field(:conversation, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation + ) + + field(:filter) + + field(:query, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput + ) + + field(:safeSearch) + field(:servingConfig) + + field(:summarySpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec + ) + + field(:userLabels, type: :map) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_converse_conversation_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_converse_conversation_response.ex new file mode 100644 index 0000000000..be076cc607 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_converse_conversation_response.ex @@ -0,0 +1,77 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse do + @moduledoc """ + Response message for ConversationalSearchService.ConverseConversation method. + + ## Attributes + + * `conversation` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t`, *default:* `nil`) - Updated conversation including the answer. + * `relatedQuestions` (*type:* `list(String.t)`, *default:* `nil`) - Suggested related questions. + * `reply` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply.t`, *default:* `nil`) - Answer to the current query. + * `searchResults` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult.t)`, *default:* `nil`) - Search Results. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :conversation => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t() + | nil, + :relatedQuestions => list(String.t()) | nil, + :reply => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply.t() | nil, + :searchResults => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult.t() + ) + | nil + } + + field(:conversation, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation + ) + + field(:relatedQuestions, type: :list) + field(:reply, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply) + + field(:searchResults, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConverseConversationResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_data_store_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_data_store_metadata.ex new file mode 100644 index 0000000000..c12db83b12 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_data_store_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata do + @moduledoc """ + Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_engine_metadata.ex new file mode 100644 index 0000000000..491e42dda4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_engine_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateEngineMetadata do + @moduledoc """ + Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_schema_metadata.ex new file mode 100644 index 0000000000..d97f1f81be --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_schema_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata do + @moduledoc """ + Metadata for Create Schema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_target_site_metadata.ex new file mode 100644 index 0000000000..76ba6e9e2f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_target_site_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_target_site_request.ex new file mode 100644 index 0000000000..7c9cd539b7 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_create_target_site_request.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest do + @moduledoc """ + Request message for SiteSearchEngineService.CreateTargetSite method. + + ## Attributes + + * `parent` (*type:* `String.t`, *default:* `nil`) - Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. + * `targetSite` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t`, *default:* `nil`) - Required. The TargetSite to create. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :parent => String.t() | nil, + :targetSite => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t() + | nil + } + + field(:parent) + + field(:targetSite, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_custom_attribute.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_custom_attribute.ex new file mode 100644 index 0000000000..19a0381da0 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_custom_attribute.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaCustomAttribute do + @moduledoc """ + A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + + ## Attributes + + * `numbers` (*type:* `list(float())`, *default:* `nil`) - The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `text` (*type:* `list(String.t)`, *default:* `nil`) - The textual values of this custom attribute. For example, `["yellow", "green"]` when the key is "color". Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :numbers => list(float()) | nil, + :text => list(String.t()) | nil + } + + field(:numbers, type: :list) + field(:text, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCustomAttribute do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCustomAttribute.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCustomAttribute do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_data_store.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_data_store.ex new file mode 100644 index 0000000000..4b36288655 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_data_store.ex @@ -0,0 +1,87 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore do + @moduledoc """ + DataStore captures global settings and configs at the DataStore level. + + ## Attributes + + * `contentConfig` (*type:* `String.t`, *default:* `nil`) - Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the DataStore was created at. + * `defaultSchemaId` (*type:* `String.t`, *default:* `nil`) - Output only. The id of the default Schema asscociated to this data store. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + * `documentProcessingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig.t`, *default:* `nil`) - Configuration for Document understanding and enrichment. + * `industryVertical` (*type:* `String.t`, *default:* `nil`) - Immutable. The industry vertical that the data store registers. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `solutionTypes` (*type:* `list(String.t)`, *default:* `nil`) - The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + * `startingSchema` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t`, *default:* `nil`) - The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contentConfig => String.t() | nil, + :createTime => DateTime.t() | nil, + :defaultSchemaId => String.t() | nil, + :displayName => String.t() | nil, + :documentProcessingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig.t() + | nil, + :industryVertical => String.t() | nil, + :name => String.t() | nil, + :solutionTypes => list(String.t()) | nil, + :startingSchema => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t() + | nil + } + + field(:contentConfig) + field(:createTime, as: DateTime) + field(:defaultSchemaId) + field(:displayName) + + field(:documentProcessingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig + ) + + field(:industryVertical) + field(:name) + field(:solutionTypes, type: :list) + + field(:startingSchema, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_data_store_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_data_store_metadata.ex new file mode 100644 index 0000000000..63b65033b4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_data_store_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata do + @moduledoc """ + Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_engine_metadata.ex new file mode 100644 index 0000000000..6630d72bb4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_engine_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata do + @moduledoc """ + Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_schema_metadata.ex new file mode 100644 index 0000000000..919b084fe2 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_schema_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata do + @moduledoc """ + Metadata for DeleteSchema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_target_site_metadata.ex new file mode 100644 index 0000000000..7967d6d507 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_delete_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_digital_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_digital_parsing_config.ex new file mode 100644 index 0000000000..6476ed5433 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_digital_parsing_config.ex @@ -0,0 +1,46 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig do + @moduledoc """ + The digital parsing configurations for documents. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_metadata.ex new file mode 100644 index 0000000000..1683cff3bf --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_request.ex new file mode 100644 index 0000000000..78b5823115 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_request.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest do + @moduledoc """ + Request message for SiteSearchEngineService.DisableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_response.ex new file mode 100644 index 0000000000..0dfdc8c7dc --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_disable_advanced_site_search_response.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse do + @moduledoc """ + Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document.ex new file mode 100644 index 0000000000..8f24d9b2ef --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document.ex @@ -0,0 +1,80 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument do + @moduledoc """ + Document captures all raw metadata information of items to be recommended or searched. + + ## Attributes + + * `content` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentContent.t`, *default:* `nil`) - The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + * `derivedStructData` (*type:* `map()`, *default:* `nil`) - Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + * `id` (*type:* `String.t`, *default:* `nil`) - Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + * `indexTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed. + * `jsonData` (*type:* `String.t`, *default:* `nil`) - The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `parentDocumentId` (*type:* `String.t`, *default:* `nil`) - The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + * `schemaId` (*type:* `String.t`, *default:* `nil`) - The identifier of the schema located in the same data store. + * `structData` (*type:* `map()`, *default:* `nil`) - The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :content => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentContent.t() + | nil, + :derivedStructData => map() | nil, + :id => String.t() | nil, + :indexTime => DateTime.t() | nil, + :jsonData => String.t() | nil, + :name => String.t() | nil, + :parentDocumentId => String.t() | nil, + :schemaId => String.t() | nil, + :structData => map() | nil + } + + field(:content, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentContent + ) + + field(:derivedStructData, type: :map) + field(:id) + field(:indexTime, as: DateTime) + field(:jsonData) + field(:name) + field(:parentDocumentId) + field(:schemaId) + field(:structData, type: :map) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_content.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_content.ex new file mode 100644 index 0000000000..c93972609f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_content.ex @@ -0,0 +1,57 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentContent do + @moduledoc """ + Unstructured data linked to this document. + + ## Attributes + + * `mimeType` (*type:* `String.t`, *default:* `nil`) - The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml. + * `rawBytes` (*type:* `String.t`, *default:* `nil`) - The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + * `uri` (*type:* `String.t`, *default:* `nil`) - The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 MB for text-based formats, 100 MB for other formats. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :mimeType => String.t() | nil, + :rawBytes => String.t() | nil, + :uri => String.t() | nil + } + + field(:mimeType) + field(:rawBytes) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentContent do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentContent.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentContent do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_info.ex new file mode 100644 index 0000000000..4ead316d84 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_info.ex @@ -0,0 +1,63 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentInfo do + @moduledoc """ + Detailed document information associated with a user event. + + ## Attributes + + * `id` (*type:* `String.t`, *default:* `nil`) - The Document resource ID. + * `name` (*type:* `String.t`, *default:* `nil`) - The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + * `promotionIds` (*type:* `list(String.t)`, *default:* `nil`) - The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + * `quantity` (*type:* `integer()`, *default:* `nil`) - Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 2 if two quantities of the same Document are involved in a `add-to-cart` event. Required for events of the following event types: * `add-to-cart` * `purchase` + * `uri` (*type:* `String.t`, *default:* `nil`) - The Document URI - only allowed for website data stores. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :id => String.t() | nil, + :name => String.t() | nil, + :promotionIds => list(String.t()) | nil, + :quantity => integer() | nil, + :uri => String.t() | nil + } + + field(:id) + field(:name) + field(:promotionIds, type: :list) + field(:quantity) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config.ex new file mode 100644 index 0000000000..dbe48c8695 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config.ex @@ -0,0 +1,75 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig do + @moduledoc """ + A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. + + ## Attributes + + * `defaultParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig.t`, *default:* `nil`) - Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing. + * `name` (*type:* `String.t`, *default:* `nil`) - The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + * `parsingConfigOverrides` (*type:* `%{optional(String.t) => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig.t}`, *default:* `nil`) - Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :defaultParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig.t() + | nil, + :name => String.t() | nil, + :parsingConfigOverrides => + %{ + optional(String.t()) => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig.t() + } + | nil + } + + field(:defaultParsingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig + ) + + field(:name) + + field(:parsingConfigOverrides, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig, + type: :map + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config_parsing_config.ex new file mode 100644 index 0000000000..6a4295b43a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config_parsing_config.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig do + @moduledoc """ + Related configurations applied to a specific type of document parser. + + ## Attributes + + * `digitalParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig.t`, *default:* `nil`) - Configurations applied to digital parser. + * `ocrParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig.t`, *default:* `nil`) - Configurations applied to OCR parser. Currently it only applies to PDFs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :digitalParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig.t() + | nil, + :ocrParsingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig.t() + | nil + } + + field(:digitalParsingConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig + ) + + field(:ocrParsingConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_double_list.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_double_list.ex new file mode 100644 index 0000000000..831bc0a6b6 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_double_list.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaDoubleList do + @moduledoc """ + Double list. + + ## Attributes + + * `values` (*type:* `list(float())`, *default:* `nil`) - Double values. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :values => list(float()) | nil + } + + field(:values, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDoubleList do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDoubleList.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDoubleList do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_embedding_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_embedding_config.ex new file mode 100644 index 0000000000..46f4fb8122 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_embedding_config.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEmbeddingConfig do + @moduledoc """ + Defines embedding config, used for bring your own embeddings feature. + + ## Attributes + + * `fieldPath` (*type:* `String.t`, *default:* `nil`) - Full field path in the schema mapped as embedding field. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fieldPath => String.t() | nil + } + + field(:fieldPath) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEmbeddingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEmbeddingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEmbeddingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_metadata.ex new file mode 100644 index 0000000000..fb126ae917 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_request.ex new file mode 100644 index 0000000000..f29b70150f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_request.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest do + @moduledoc """ + Request message for SiteSearchEngineService.EnableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_response.ex new file mode 100644 index 0000000000..1c8bd4eaf6 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_enable_advanced_site_search_response.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse do + @moduledoc """ + Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine.ex new file mode 100644 index 0000000000..0d6fa7910d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine.ex @@ -0,0 +1,105 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine do + @moduledoc """ + Metadata that describes the training and serving parameters of an Engine. + + ## Attributes + + * `chatEngineConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig.t`, *default:* `nil`) - Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + * `chatEngineMetadata` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata.t`, *default:* `nil`) - Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + * `commonConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineCommonConfig.t`, *default:* `nil`) - Common config spec that specifies the metadata of the engine. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the Recommendation Engine was created at. + * `dataStoreIds` (*type:* `list(String.t)`, *default:* `nil`) - The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + * `industryVertical` (*type:* `String.t`, *default:* `nil`) - The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore liniked to the engine. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + * `searchEngineConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig.t`, *default:* `nil`) - Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. The solutions of the engine. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp the Recommendation Engine was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :chatEngineConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig.t() + | nil, + :chatEngineMetadata => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata.t() + | nil, + :commonConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineCommonConfig.t() + | nil, + :createTime => DateTime.t() | nil, + :dataStoreIds => list(String.t()) | nil, + :displayName => String.t() | nil, + :industryVertical => String.t() | nil, + :name => String.t() | nil, + :searchEngineConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig.t() + | nil, + :solutionType => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:chatEngineConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig + ) + + field(:chatEngineMetadata, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata + ) + + field(:commonConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineCommonConfig + ) + + field(:createTime, as: DateTime) + field(:dataStoreIds, type: :list) + field(:displayName) + field(:industryVertical) + field(:name) + + field(:searchEngineConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig + ) + + field(:solutionType) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_config.ex new file mode 100644 index 0000000000..dce53e20fc --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_config.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig do + @moduledoc """ + Configurations for a Chat Engine. + + ## Attributes + + * `agentCreationConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig.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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :agentCreationConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig.t() + | nil, + :dialogflowAgentToLink => String.t() | nil + } + + field(:agentCreationConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig + ) + + field(:dialogflowAgentToLink) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_config_agent_creation_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_config_agent_creation_config.ex new file mode 100644 index 0000000000..4e8dbd13bf --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_config_agent_creation_config.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig do + @moduledoc """ + Configurations for generating a Dialogflow agent. 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. + + ## Attributes + + * `business` (*type:* `String.t`, *default:* `nil`) - Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + * `defaultLanguageCode` (*type:* `String.t`, *default:* `nil`) - Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + * `location` (*type:* `String.t`, *default:* `nil`) - Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default. + * `timeZone` (*type:* `String.t`, *default:* `nil`) - Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :business => String.t() | nil, + :defaultLanguageCode => String.t() | nil, + :location => String.t() | nil, + :timeZone => String.t() | nil + } + + field(:business) + field(:defaultLanguageCode) + field(:location) + field(:timeZone) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_metadata.ex new file mode 100644 index 0000000000..9d236965b4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_chat_engine_metadata.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata do + @moduledoc """ + Additional information of a Chat Engine. Fields in this message are output only. + + ## Attributes + + * `dialogflowAgent` (*type:* `String.t`, *default:* `nil`) - The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dialogflowAgent => String.t() | nil + } + + field(:dialogflowAgent) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_common_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_common_config.ex new file mode 100644 index 0000000000..8ffbdf8eae --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_common_config.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineCommonConfig do + @moduledoc """ + Common configurations for an Engine. + + ## Attributes + + * `companyName` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :companyName => String.t() | nil + } + + field(:companyName) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineCommonConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineCommonConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineCommonConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_search_engine_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_search_engine_config.ex new file mode 100644 index 0000000000..68cd3b418c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_engine_search_engine_config.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig do + @moduledoc """ + Configurations for a Search Engine. + + ## 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :searchAddOns => list(String.t()) | nil, + :searchTier => String.t() | nil + } + + field(:searchAddOns, type: :list) + field(:searchTier) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_fetch_domain_verification_status_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_fetch_domain_verification_status_response.ex new file mode 100644 index 0000000000..92851b0b24 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_fetch_domain_verification_status_response.ex @@ -0,0 +1,68 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse do + @moduledoc """ + Response message for SiteSearchEngineService.FetchDomainVerificationStatus method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `targetSites` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t)`, *default:* `nil`) - List of TargetSites containing the site verification status. + * `totalSize` (*type:* `integer()`, *default:* `nil`) - The total number of items matching the request. This will always be populated in the response. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :targetSites => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t() + ) + | nil, + :totalSize => integer() | nil + } + + field(:nextPageToken) + + field(:targetSites, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite, + type: :list + ) + + field(:totalSize) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_gcs_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_gcs_source.ex new file mode 100644 index 0000000000..77cfebb4f4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_gcs_source.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource do + @moduledoc """ + Cloud Storage location for input content. + + ## Attributes + + * `dataSchema` (*type:* `String.t`, *default:* `nil`) - The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by Gen App Builder. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line. + * `inputUris` (*type:* `list(String.t)`, *default:* `nil`) - Required. Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files (or 100,000 files if `data_schema` is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is `content`). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataSchema => String.t() | nil, + :inputUris => list(String.t()) | nil + } + + field(:dataSchema) + field(:inputUris, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_metadata.ex new file mode 100644 index 0000000000..4aadca8858 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_metadata.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata do + @moduledoc """ + Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were processed successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_request.ex new file mode 100644 index 0000000000..5ec98a1347 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_request.ex @@ -0,0 +1,94 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequest do + @moduledoc """ + Request message for Import methods. + + ## Attributes + + * `autoGenerateIds` (*type:* `boolean()`, *default:* `nil`) - Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * `bigquerySource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource.t`, *default:* `nil`) - BigQuery input source. + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t`, *default:* `nil`) - The desired location of errors incurred during the Import. + * `gcsSource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource.t`, *default:* `nil`) - Cloud Storage location for the input content. + * `idField` (*type:* `String.t`, *default:* `nil`) - The field in the Cloud Storage and BigQuery sources that indicates the unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored. The values of the JSON field or the BigQuery column are used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom`. And only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. + * `inlineSource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource.t`, *default:* `nil`) - The Inline source for the input content for documents. + * `reconciliationMode` (*type:* `String.t`, *default:* `nil`) - The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :autoGenerateIds => boolean() | nil, + :bigquerySource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource.t() + | nil, + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t() + | nil, + :gcsSource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource.t() + | nil, + :idField => String.t() | nil, + :inlineSource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource.t() + | nil, + :reconciliationMode => String.t() | nil + } + + field(:autoGenerateIds) + + field(:bigquerySource, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource + ) + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig + ) + + field(:gcsSource, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource + ) + + field(:idField) + + field(:inlineSource, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource + ) + + field(:reconciliationMode) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_request_inline_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_request_inline_source.ex new file mode 100644 index 0000000000..5171fbe144 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_request_inline_source.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource do + @moduledoc """ + The inline source for the input config for ImportDocuments method. + + ## Attributes + + * `documents` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t)`, *default:* `nil`) - Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :documents => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t() + ) + | nil + } + + field(:documents, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_response.ex new file mode 100644 index 0000000000..bb8ec01662 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_documents_response.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsResponse do + @moduledoc """ + Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors in the request if set. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportDocumentsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_error_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_error_config.ex new file mode 100644 index 0000000000..094d06d5ed --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_error_config.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig do + @moduledoc """ + Configuration of destination for Import related errors. + + ## Attributes + + * `gcsPrefix` (*type:* `String.t`, *default:* `nil`) - Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :gcsPrefix => String.t() | nil + } + + field(:gcsPrefix) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_metadata.ex new file mode 100644 index 0000000000..3fa8143b3c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata do + @moduledoc """ + Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_request.ex new file mode 100644 index 0000000000..85d261b9e6 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_request.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest do + @moduledoc """ + Request message for CompletionService.ImportSuggestionDenyListEntries method. + + ## Attributes + + * `gcsSource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource.t`, *default:* `nil`) - Cloud Storage location for the input content. Only 1 file can be specified that contains all entries to import. Supported values `gcs_source.schema` for autocomplete suggestion deny list entry imports: * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per line. + * `inlineSource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource.t`, *default:* `nil`) - The Inline source for the input content for suggestion deny list entries. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :gcsSource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource.t() + | nil, + :inlineSource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource.t() + | nil + } + + field(:gcsSource, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource + ) + + field(:inlineSource, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_request_inline_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_request_inline_source.ex new file mode 100644 index 0000000000..2f075129be --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_request_inline_source.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource do + @moduledoc """ + The inline source for SuggestionDenyListEntry. + + ## Attributes + + * `entries` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry.t)`, *default:* `nil`) - Required. A list of all denylist entries to import. Max of 1000 items. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :entries => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry.t() + ) + | nil + } + + field(:entries, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_response.ex new file mode 100644 index 0000000000..e5f145eb32 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_suggestion_deny_list_entries_response.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse do + @moduledoc """ + Response message for CompletionService.ImportSuggestionDenyListEntries method. + + ## Attributes + + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `failedEntriesCount` (*type:* `String.t`, *default:* `nil`) - Count of deny list entries that failed to be imported. + * `importedEntriesCount` (*type:* `String.t`, *default:* `nil`) - Count of deny list entries successfully imported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :failedEntriesCount => String.t() | nil, + :importedEntriesCount => String.t() | nil + } + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:failedEntriesCount) + field(:importedEntriesCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_metadata.ex new file mode 100644 index 0000000000..252b588683 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_metadata.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata do + @moduledoc """ + Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were processed successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_request.ex new file mode 100644 index 0000000000..fc97975c0b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_request.ex @@ -0,0 +1,82 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequest do + @moduledoc """ + Request message for the ImportUserEvents request. + + ## Attributes + + * `bigquerySource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource.t`, *default:* `nil`) - BigQuery input source. + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t`, *default:* `nil`) - The desired location of errors incurred during the Import. Cannot be set for inline user event imports. + * `gcsSource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource.t`, *default:* `nil`) - Cloud Storage location for the input content. + * `inlineSource` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource.t`, *default:* `nil`) - The Inline source for the input content for UserEvents. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bigquerySource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource.t() + | nil, + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t() + | nil, + :gcsSource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource.t() + | nil, + :inlineSource => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource.t() + | nil + } + + field(:bigquerySource, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaBigQuerySource + ) + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig + ) + + field(:gcsSource, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaGcsSource + ) + + field(:inlineSource, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_request_inline_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_request_inline_source.ex new file mode 100644 index 0000000000..b177d37fe4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_request_inline_source.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource do + @moduledoc """ + The inline source for the input config for ImportUserEvents method. + + ## Attributes + + * `userEvents` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent.t)`, *default:* `nil`) - Required. A list of user events to import. Recommended max of 10k items. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :userEvents => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent.t() + ) + | nil + } + + field(:userEvents, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_response.ex new file mode 100644 index 0000000000..15b2cb8fca --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_import_user_events_response.ex @@ -0,0 +1,67 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsResponse do + @moduledoc """ + Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors if this field was set in the request. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `joinedEventsCount` (*type:* `String.t`, *default:* `nil`) - Count of user events imported with complete existing Documents. + * `unjoinedEventsCount` (*type:* `String.t`, *default:* `nil`) - Count of user events imported, but with Document information not found in the existing Branch. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :joinedEventsCount => String.t() | nil, + :unjoinedEventsCount => String.t() | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:joinedEventsCount) + field(:unjoinedEventsCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportUserEventsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_interval.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_interval.ex new file mode 100644 index 0000000000..6a89ac4c5b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_interval.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval do + @moduledoc """ + A floating point interval. + + ## Attributes + + * `exclusiveMaximum` (*type:* `float()`, *default:* `nil`) - Exclusive upper bound. + * `exclusiveMinimum` (*type:* `float()`, *default:* `nil`) - Exclusive lower bound. + * `maximum` (*type:* `float()`, *default:* `nil`) - Inclusive upper bound. + * `minimum` (*type:* `float()`, *default:* `nil`) - Inclusive lower bound. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :exclusiveMaximum => float() | nil, + :exclusiveMinimum => float() | nil, + :maximum => float() | nil, + :minimum => float() | nil + } + + field(:exclusiveMaximum) + field(:exclusiveMinimum) + field(:maximum) + field(:minimum) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_conversations_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_conversations_response.ex new file mode 100644 index 0000000000..f05f6ccb7a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_conversations_response.ex @@ -0,0 +1,64 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse do + @moduledoc """ + Response for ListConversations method. + + ## Attributes + + * `conversations` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t)`, *default:* `nil`) - All the Conversations for a given data store. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Pagination token, if not returned indicates the last page. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :conversations => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation.t() + ) + | nil, + :nextPageToken => String.t() | nil + } + + field(:conversations, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversation, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListConversationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_data_stores_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_data_stores_response.ex new file mode 100644 index 0000000000..566b0c2e07 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_data_stores_response.ex @@ -0,0 +1,64 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse do + @moduledoc """ + Response message for DataStoreService.ListDataStores method. + + ## Attributes + + * `dataStores` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t)`, *default:* `nil`) - All the customer's DataStores. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as ListDataStoresRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStores => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore.t() + ) + | nil, + :nextPageToken => String.t() | nil + } + + field(:dataStores, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDataStore, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDataStoresResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_documents_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_documents_response.ex new file mode 100644 index 0000000000..e7279390dd --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_documents_response.ex @@ -0,0 +1,64 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse do + @moduledoc """ + Response message for DocumentService.ListDocuments method. + + ## Attributes + + * `documents` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t)`, *default:* `nil`) - The Documents. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :documents => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t() + ) + | nil, + :nextPageToken => String.t() | nil + } + + field(:documents, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListDocumentsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_engines_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_engines_response.ex new file mode 100644 index 0000000000..85bda1ce0a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_engines_response.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaListEnginesResponse do + @moduledoc """ + Response message for EngineService.ListEngines method. + + ## Attributes + + * `engines` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine.t)`, *default:* `nil`) - All the customer's Engines. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Not supported. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :engines => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine.t() + ) + | nil, + :nextPageToken => String.t() | nil + } + + field(:engines, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEngine, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListEnginesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListEnginesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListEnginesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_schemas_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_schemas_response.ex new file mode 100644 index 0000000000..5d5d94fdda --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_schemas_response.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse do + @moduledoc """ + Response message for SchemaService.ListSchemas method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as ListSchemasRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `schemas` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t)`, *default:* `nil`) - The Schemas. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :schemas => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.t() + ) + | nil + } + + field(:nextPageToken) + + field(:schemas, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListSchemasResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_serving_configs_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_serving_configs_response.ex new file mode 100644 index 0000000000..3fe56b24bc --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_serving_configs_response.ex @@ -0,0 +1,64 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse do + @moduledoc """ + Response for ListServingConfigs method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Pagination token, if not returned indicates the last page. + * `servingConfigs` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t)`, *default:* `nil`) - All the ServingConfigs for a given dataStore. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :servingConfigs => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.t() + ) + | nil + } + + field(:nextPageToken) + + field(:servingConfigs, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListServingConfigsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_target_sites_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_target_sites_response.ex new file mode 100644 index 0000000000..782227932f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_list_target_sites_response.ex @@ -0,0 +1,68 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse do + @moduledoc """ + Response message for SiteSearchEngineService.ListTargetSites method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `targetSites` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t)`, *default:* `nil`) - List of TargetSites. + * `totalSize` (*type:* `integer()`, *default:* `nil`) - The total number of items matching the request. This will always be populated in the response. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :targetSites => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.t() + ) + | nil, + :totalSize => integer() | nil + } + + field(:nextPageToken) + + field(:targetSites, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite, + type: :list + ) + + field(:totalSize) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaListTargetSitesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_media_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_media_info.ex new file mode 100644 index 0000000000..1ef3ce3714 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_media_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaMediaInfo do + @moduledoc """ + Media-specific user event information. + + ## Attributes + + * `mediaProgressDuration` (*type:* `String.t`, *default:* `nil`) - The media progress time in seconds, if applicable. For example, if the end user has finished 90 seconds of a playback video, then MediaInfo.media_progress_duration.seconds should be set to 90. + * `mediaProgressPercentage` (*type:* `number()`, *default:* `nil`) - Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :mediaProgressDuration => String.t() | nil, + :mediaProgressPercentage => number() | nil + } + + field(:mediaProgressDuration) + field(:mediaProgressPercentage) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaMediaInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaMediaInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaMediaInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_ocr_parsing_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_ocr_parsing_config.ex new file mode 100644 index 0000000000..1f144ebaf6 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_ocr_parsing_config.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig do + @moduledoc """ + The OCR parsing configurations for documents. + + ## 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. + * `useNativeText` (*type:* `boolean()`, *default:* `nil`) - If true, will use native text instead of OCR text on pages containing native text. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enhancedDocumentElements => list(String.t()) | nil, + :useNativeText => boolean() | nil + } + + field(:enhancedDocumentElements, type: :list) + field(:useNativeText) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_page_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_page_info.ex new file mode 100644 index 0000000000..9b3385c038 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_page_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPageInfo do + @moduledoc """ + Detailed page information. + + ## Attributes + + * `pageCategory` (*type:* `String.t`, *default:* `nil`) - The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `pageviewId` (*type:* `String.t`, *default:* `nil`) - A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageview_id` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + * `referrerUri` (*type:* `String.t`, *default:* `nil`) - The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. However, some browser privacy restrictions may cause this field to be empty. + * `uri` (*type:* `String.t`, *default:* `nil`) - Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :pageCategory => String.t() | nil, + :pageviewId => String.t() | nil, + :referrerUri => String.t() | nil, + :uri => String.t() | nil + } + + field(:pageCategory) + field(:pageviewId) + field(:referrerUri) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPageInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPageInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPageInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_panel_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_panel_info.ex new file mode 100644 index 0000000000..148d4b97ed --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_panel_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPanelInfo do + @moduledoc """ + Detailed panel information associated with a user event. + + ## Attributes + + * `displayName` (*type:* `String.t`, *default:* `nil`) - The display name of the 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :displayName => String.t() | nil, + :panelId => String.t() | nil, + :panelPosition => integer() | nil, + :totalPanels => integer() | nil + } + + field(:displayName) + field(:panelId) + field(:panelPosition) + field(:totalPanels) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPanelInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPanelInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPanelInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_metadata.ex new file mode 100644 index 0000000000..cff5ef3618 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_metadata.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata do + @moduledoc """ + Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `failureCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that encountered errors while processing. + * `ignoredCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were ignored as entries were not found. + * `successCount` (*type:* `String.t`, *default:* `nil`) - Count of entries that were deleted successfully. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :failureCount => String.t() | nil, + :ignoredCount => String.t() | nil, + :successCount => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:failureCount) + field(:ignoredCount) + field(:successCount) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_request.ex new file mode 100644 index 0000000000..d6edf337aa --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_request.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest do + @moduledoc """ + Request message for DocumentService.PurgeDocuments method. + + ## Attributes + + * `filter` (*type:* `String.t`, *default:* `nil`) - Required. Filter matching documents to purge. Only currently supported value is `*` (all items). + * `force` (*type:* `boolean()`, *default:* `nil`) - Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any documents. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :filter => String.t() | nil, + :force => boolean() | nil + } + + field(:filter) + field(:force) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_response.ex new file mode 100644 index 0000000000..5fdfca8610 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_documents_response.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse do + @moduledoc """ + Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. + + ## Attributes + + * `purgeCount` (*type:* `String.t`, *default:* `nil`) - The total count of documents purged as a result of the operation. + * `purgeSample` (*type:* `list(String.t)`, *default:* `nil`) - A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :purgeCount => String.t() | nil, + :purgeSample => list(String.t()) | nil + } + + field(:purgeCount) + field(:purgeSample, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_metadata.ex new file mode 100644 index 0000000000..6c8b22d6df --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata do + @moduledoc """ + Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_request.ex new file mode 100644 index 0000000000..bafdadd91b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_request.ex @@ -0,0 +1,48 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest do + @moduledoc """ + Request message for CompletionService.PurgeSuggestionDenyListEntries method. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_response.ex new file mode 100644 index 0000000000..2710e8404e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_purge_suggestion_deny_list_entries_response.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse do + @moduledoc """ + Response message for CompletionService.PurgeSuggestionDenyListEntries method. + + ## Attributes + + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the request. + * `purgeCount` (*type:* `String.t`, *default:* `nil`) - Number of suggestion deny list entries purged. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :purgeCount => String.t() | nil + } + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:purgeCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_request.ex new file mode 100644 index 0000000000..8deb588b05 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_request.ex @@ -0,0 +1,72 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendRequest do + @moduledoc """ + Request message for Recommend method. + + ## Attributes + + * `filter` (*type:* `String.t`, *default:* `nil`) - Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` If `attributeFilteringSyntax` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) If your filter blocks all results, the API will return generic (unfiltered) popular Documents. If you only want results strictly matching the filters, set `strictFiltering` to True in RecommendRequest.params to receive empty results instead. Note that the API will never return Documents with `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + * `pageSize` (*type:* `integer()`, *default:* `nil`) - Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100. + * `params` (*type:* `map()`, *default:* `nil`) - Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to true, the associated Document object will be returned in RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. If set to true, the recommendation 'score' corresponding to each returned Document will be set in RecommendResponse.RecommendationResult.metadata. The given 'score' indicates the probability of a Document conversion given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular Documents instead of empty if your filter blocks all recommendation results. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` This gives request-level control and adjusts recommendation results based on Document category. * `attributeFilteringSyntax`: Boolean. False by default. If set to true, the `filter` field is interpreted according to the new, attribute-based syntax. + * `userEvent` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent.t`, *default:* `nil`) - Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset. + * `userLabels` (*type:* `map()`, *default:* `nil`) - The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + * `validateOnly` (*type:* `boolean()`, *default:* `nil`) - Use validate only mode for this recommendation query. If set to true, a fake model will be used that returns arbitrary Document IDs. Note that the validate only mode should only be used for testing the API, or if the model is not ready. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :filter => String.t() | nil, + :pageSize => integer() | nil, + :params => map() | nil, + :userEvent => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent.t() + | nil, + :userLabels => map() | nil, + :validateOnly => boolean() | nil + } + + field(:filter) + field(:pageSize) + field(:params, type: :map) + + field(:userEvent, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent + ) + + field(:userLabels, type: :map) + field(:validateOnly) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_response.ex new file mode 100644 index 0000000000..7a0ea8354f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_response.ex @@ -0,0 +1,70 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse do + @moduledoc """ + Response message for Recommend method. + + ## Attributes + + * `attributionToken` (*type:* `String.t`, *default:* `nil`) - A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. + * `missingIds` (*type:* `list(String.t)`, *default:* `nil`) - IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. + * `results` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult.t)`, *default:* `nil`) - A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least). + * `validateOnly` (*type:* `boolean()`, *default:* `nil`) - True if RecommendRequest.validate_only was set. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attributionToken => String.t() | nil, + :missingIds => list(String.t()) | nil, + :results => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult.t() + ) + | nil, + :validateOnly => boolean() | nil + } + + field(:attributionToken) + field(:missingIds, type: :list) + + field(:results, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult, + type: :list + ) + + field(:validateOnly) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_response_recommendation_result.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_response_recommendation_result.ex new file mode 100644 index 0000000000..7e7dffa1f5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recommend_response_recommendation_result.ex @@ -0,0 +1,64 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult do + @moduledoc """ + RecommendationResult represents a generic recommendation result with associated metadata. + + ## Attributes + + * `document` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`, *default:* `nil`) - Set if `returnDocument` is set to true in RecommendRequest.params. + * `id` (*type:* `String.t`, *default:* `nil`) - Resource ID of the recommended Document. + * `metadata` (*type:* `map()`, *default:* `nil`) - Additional Document metadata / annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :document => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t() + | nil, + :id => String.t() | nil, + :metadata => map() | nil + } + + field(:document, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument + ) + + field(:id) + field(:metadata, type: :map) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recrawl_uris_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recrawl_uris_request.ex new file mode 100644 index 0000000000..18a8a86010 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_recrawl_uris_request.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest do + @moduledoc """ + Request message for SiteSearchEngineService.RecrawlUris method. + + ## Attributes + + * `uris` (*type:* `list(String.t)`, *default:* `nil`) - Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :uris => list(String.t()) | nil + } + + field(:uris, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_reply.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_reply.ex new file mode 100644 index 0000000000..afce74d13b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_reply.ex @@ -0,0 +1,71 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply do + @moduledoc """ + Defines a reply message to user. + + ## Attributes + + * `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReplyReference.t)`, *default:* `nil`) - References in the reply. + * `reply` (*type:* `String.t`, *default:* `nil`) - DEPRECATED: use `summary` instead. Text reply. + * `summary` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary.t`, *default:* `nil`) - Summary based on search results. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :references => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReplyReference.t() + ) + | nil, + :reply => String.t() | nil, + :summary => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary.t() + | nil + } + + field(:references, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReplyReference, + type: :list + ) + + field(:reply) + + field(:summary, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReply do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_reply_reference.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_reply_reference.ex new file mode 100644 index 0000000000..08ed284c32 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_reply_reference.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaReplyReference do + @moduledoc """ + Defines reference in reply. + + ## Attributes + + * `anchorText` (*type:* `String.t`, *default:* `nil`) - Anchor text. + * `end` (*type:* `integer()`, *default:* `nil`) - Anchor text end index. + * `start` (*type:* `integer()`, *default:* `nil`) - Anchor text start index. + * `uri` (*type:* `String.t`, *default:* `nil`) - URI link reference. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :anchorText => String.t() | nil, + :end => integer() | nil, + :start => integer() | nil, + :uri => String.t() | nil + } + + field(:anchorText) + field(:end) + field(:start) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReplyReference do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReplyReference.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaReplyReference do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_schema.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_schema.ex new file mode 100644 index 0000000000..0ab1c16623 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_schema.ex @@ -0,0 +1,57 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema do + @moduledoc """ + Defines the structure and layout of a type of document data. + + ## Attributes + + * `jsonSchema` (*type:* `String.t`, *default:* `nil`) - The JSON representation of the schema. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + * `structSchema` (*type:* `map()`, *default:* `nil`) - The structured representation of the schema. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :jsonSchema => String.t() | nil, + :name => String.t() | nil, + :structSchema => map() | nil + } + + field(:jsonSchema) + field(:name) + field(:structSchema, type: :map) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSchema do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_info.ex new file mode 100644 index 0000000000..b758911a7a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_info.ex @@ -0,0 +1,57 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchInfo do + @moduledoc """ + Detailed search information. + + ## Attributes + + * `offset` (*type:* `integer()`, *default:* `nil`) - An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `orderBy` (*type:* `String.t`, *default:* `nil`) - The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `searchQuery` (*type:* `String.t`, *default:* `nil`) - The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. At least one of search_query or PageInfo.page_category is required for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :offset => integer() | nil, + :orderBy => String.t() | nil, + :searchQuery => String.t() | nil + } + + field(:offset) + field(:orderBy) + field(:searchQuery) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request.ex new file mode 100644 index 0000000000..3d9a702055 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request.ex @@ -0,0 +1,177 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequest do + @moduledoc """ + Request message for SearchService.Search method. + + ## Attributes + + * `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t`, *default:* `nil`) - Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * `branch` (*type:* `String.t`, *default:* `nil`) - The branch resource name, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. Use `default_branch` as the branch ID or leave this field empty, to search documents under the default branch. + * `canonicalFilter` (*type:* `String.t`, *default:* `nil`) - The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter. + * `contentSearchSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec.t`, *default:* `nil`) - A specification for configuring the behavior of content search. + * `dataStoreSpecs` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec.t)`, *default:* `nil`) - A list of data store specs to apply on a search call. + * `embeddingSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec.t`, *default:* `nil`) - Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path. + * `facetSpecs` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec.t)`, *default:* `nil`) - Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `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. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + * `imageQuery` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery.t`, *default:* `nil`) - Raw image query. + * `offset` (*type:* `integer()`, *default:* `nil`) - A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + * `orderBy` (*type:* `String.t`, *default:* `nil`) - The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * `pageSize` (*type:* `integer()`, *default:* `nil`) - Maximum number of Documents to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 100. Values above 100 are coerced to 100. If this field is negative, an `INVALID_ARGUMENT` is returned. + * `pageToken` (*type:* `String.t`, *default:* `nil`) - A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `params` (*type:* `map()`, *default:* `nil`) - Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. Example: user_country_code: "au" For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. Example: search_type: 1 + * `query` (*type:* `String.t`, *default:* `nil`) - Raw search query. + * `queryExpansionSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec.t`, *default:* `nil`) - The query expansion specification that specifies the conditions under which query expansion occurs. + * `rankingExpression` (*type:* `String.t`, *default:* `nil`) - The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joint by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: `relevance_score`: pre-defined keywords, used for measure relevance between query and document. `embedding_field_path`: the document embedding field used with query embedding vector. `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + * `safeSearch` (*type:* `boolean()`, *default:* `nil`) - Whether to turn on safe search. This is only supported for website search. + * `spellCorrectionSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec.t`, *default:* `nil`) - The spell correction specification that specifies the mode under which spell correction takes effect. + * `userInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo.t`, *default:* `nil`) - Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics. + * `userLabels` (*type:* `map()`, *default:* `nil`) - The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + * `userPseudoId` (*type:* `String.t`, *default:* `nil`) - A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :boostSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t() + | nil, + :branch => String.t() | nil, + :canonicalFilter => String.t() | nil, + :contentSearchSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec.t() + | nil, + :dataStoreSpecs => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec.t() + ) + | nil, + :embeddingSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec.t() + | nil, + :facetSpecs => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec.t() + ) + | nil, + :filter => String.t() | nil, + :imageQuery => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery.t() + | nil, + :offset => integer() | nil, + :orderBy => String.t() | nil, + :pageSize => integer() | nil, + :pageToken => String.t() | nil, + :params => map() | nil, + :query => String.t() | nil, + :queryExpansionSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec.t() + | nil, + :rankingExpression => String.t() | nil, + :safeSearch => boolean() | nil, + :spellCorrectionSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec.t() + | nil, + :userInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo.t() + | nil, + :userLabels => map() | nil, + :userPseudoId => String.t() | nil + } + + field(:boostSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec + ) + + field(:branch) + field(:canonicalFilter) + + field(:contentSearchSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec + ) + + field(:dataStoreSpecs, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec, + type: :list + ) + + field(:embeddingSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec + ) + + field(:facetSpecs, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec, + type: :list + ) + + field(:filter) + + field(:imageQuery, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery + ) + + field(:offset) + field(:orderBy) + field(:pageSize) + field(:pageToken) + field(:params, type: :map) + field(:query) + + field(:queryExpansionSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec + ) + + field(:rankingExpression) + field(:safeSearch) + + field(:spellCorrectionSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec + ) + + field(:userInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo + ) + + field(:userLabels, type: :map) + field(:userPseudoId) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec.ex new file mode 100644 index 0000000000..17f29dfd9f --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec do + @moduledoc """ + Boost specification to boost certain documents. + + ## Attributes + + * `conditionBoostSpecs` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec.t)`, *default:* `nil`) - Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :conditionBoostSpecs => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec.t() + ) + | nil + } + + field(:conditionBoostSpecs, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec_condition_boost_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec_condition_boost_spec.ex new file mode 100644 index 0000000000..3718afe97e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_boost_spec_condition_boost_spec.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec do + @moduledoc """ + Boost applies to documents which match a condition. + + ## Attributes + + * `boost` (*type:* `number()`, *default:* `nil`) - Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. + * `condition` (*type:* `String.t`, *default:* `nil`) - An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": * (document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue")) + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :boost => number() | nil, + :condition => String.t() | nil + } + + field(:boost) + field(:condition) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec.ex new file mode 100644 index 0000000000..6ec7735471 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec.ex @@ -0,0 +1,76 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec do + @moduledoc """ + A specification for configuring the behavior of content search. + + ## Attributes + + * `extractiveContentSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec.t`, *default:* `nil`) - If there is no extractive_content_spec provided, there will be no extractive answer in the search response. + * `snippetSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec.t`, *default:* `nil`) - If `snippetSpec` is not specified, snippets are not included in the search response. + * `summarySpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec.t`, *default:* `nil`) - If `summarySpec` is not specified, summaries are not included in the search response. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :extractiveContentSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec.t() + | nil, + :snippetSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec.t() + | nil, + :summarySpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec.t() + | nil + } + + field(:extractiveContentSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec + ) + + field(:snippetSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec + ) + + field(:summarySpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_extractive_content_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_extractive_content_spec.ex new file mode 100644 index 0000000000..71ffb0d8bf --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_extractive_content_spec.ex @@ -0,0 +1,62 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec do + @moduledoc """ + A specification for configuring the extractive content in a search response. + + ## Attributes + + * `maxExtractiveAnswerCount` (*type:* `integer()`, *default:* `nil`) - The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult. + * `maxExtractiveSegmentCount` (*type:* `integer()`, *default:* `nil`) - The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`. + * `numNextSegments` (*type:* `integer()`, *default:* `nil`) - Return at most `num_next_segments` segments after each selected segments. + * `numPreviousSegments` (*type:* `integer()`, *default:* `nil`) - Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :maxExtractiveAnswerCount => integer() | nil, + :maxExtractiveSegmentCount => integer() | nil, + :numNextSegments => integer() | nil, + :numPreviousSegments => integer() | nil + } + + field(:maxExtractiveAnswerCount) + field(:maxExtractiveSegmentCount) + field(:numNextSegments) + field(:numPreviousSegments) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_snippet_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_snippet_spec.ex new file mode 100644 index 0000000000..0208e30d3d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_snippet_spec.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec do + @moduledoc """ + A specification for configuring snippets in a search response. + + ## Attributes + + * `maxSnippetCount` (*type:* `integer()`, *default:* `nil`) - [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0. + * `referenceOnly` (*type:* `boolean()`, *default:* `nil`) - [DEPRECATED] This field is deprecated and will have no affect on the snippet. + * `returnSnippet` (*type:* `boolean()`, *default:* `nil`) - If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :maxSnippetCount => integer() | nil, + :referenceOnly => boolean() | nil, + :returnSnippet => boolean() | nil + } + + field(:maxSnippetCount) + field(:referenceOnly) + field(:returnSnippet) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec.ex new file mode 100644 index 0000000000..97444c0360 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec.ex @@ -0,0 +1,84 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec do + @moduledoc """ + A specification for configuring a summary returned in a search response. + + ## Attributes + + * `ignoreAdversarialQuery` (*type:* `boolean()`, *default:* `nil`) - Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead. + * `ignoreNonSummarySeekingQuery` (*type:* `boolean()`, *default:* `nil`) - Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead. + * `includeCitations` (*type:* `boolean()`, *default:* `nil`) - Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results. + * `languageCode` (*type:* `String.t`, *default:* `nil`) - Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. + * `modelPromptSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec.t`, *default:* `nil`) - If specified, the spec will be used to modify the prompt provided to the LLM. + * `modelSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec.t`, *default:* `nil`) - If specified, the spec will be used to modify the model specification provided to the LLM. + * `summaryResultCount` (*type:* `integer()`, *default:* `nil`) - The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results can be used to generate a summary. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :ignoreAdversarialQuery => boolean() | nil, + :ignoreNonSummarySeekingQuery => boolean() | nil, + :includeCitations => boolean() | nil, + :languageCode => String.t() | nil, + :modelPromptSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec.t() + | nil, + :modelSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec.t() + | nil, + :summaryResultCount => integer() | nil + } + + field(:ignoreAdversarialQuery) + field(:ignoreNonSummarySeekingQuery) + field(:includeCitations) + field(:languageCode) + + field(:modelPromptSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec + ) + + field(:modelSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec + ) + + field(:summaryResultCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec_model_prompt_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec_model_prompt_spec.ex new file mode 100644 index 0000000000..77a68f88ce --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec_model_prompt_spec.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec do + @moduledoc """ + Specification of the prompt to use with the model. + + ## Attributes + + * `preamble` (*type:* `String.t`, *default:* `nil`) - Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :preamble => String.t() | nil + } + + field(:preamble) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec_model_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec_model_spec.ex new file mode 100644 index 0000000000..6745bbd357 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_content_search_spec_summary_spec_model_spec.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec do + @moduledoc """ + Specification of the model. + + ## Attributes + + * `version` (*type:* `String.t`, *default:* `nil`) - The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned version of the text-bison@001 model. * `preview`: string. (Public preview) Uses a fine-tuned version of the text-bison@002 model. This model works only for summaries in English. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :version => String.t() | nil + } + + field(:version) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_data_store_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_data_store_spec.ex new file mode 100644 index 0000000000..464844e4cf --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_data_store_spec.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec do + @moduledoc """ + A struct to define data stores to filter on in a search call. + + ## Attributes + + * `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStore => String.t() | nil + } + + field(:dataStore) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_embedding_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_embedding_spec.ex new file mode 100644 index 0000000000..e709e74c16 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_embedding_spec.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec do + @moduledoc """ + The specification that uses customized query embedding vector to do semantic document retrieval. + + ## Attributes + + * `embeddingVectors` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector.t)`, *default:* `nil`) - The embedding vector used for retrieval. Limit to 1. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :embeddingVectors => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector.t() + ) + | nil + } + + field(:embeddingVectors, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_embedding_spec_embedding_vector.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_embedding_spec_embedding_vector.ex new file mode 100644 index 0000000000..41ee3fcb84 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_embedding_spec_embedding_vector.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector do + @moduledoc """ + Embedding vector. + + ## Attributes + + * `fieldPath` (*type:* `String.t`, *default:* `nil`) - Embedding field path in schema. + * `vector` (*type:* `list(number())`, *default:* `nil`) - Query embedding vector. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fieldPath => String.t() | nil, + :vector => list(number()) | nil + } + + field(:fieldPath) + field(:vector, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_facet_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_facet_spec.ex new file mode 100644 index 0000000000..5573727d90 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_facet_spec.ex @@ -0,0 +1,69 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec do + @moduledoc """ + A facet specification to perform faceted search. + + ## Attributes + + * `enableDynamicPosition` (*type:* `boolean()`, *default:* `nil`) - Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * "rating", enable_dynamic_position = true * "price", enable_dynamic_position = false * "brands", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be ("price", "brands", "rating", "gender") or ("price", "brands", "gender", "rating") depends on how API orders "gender" and "rating" facets. However, notice that "price" and "brands" are always ranked at first and second position because their enable_dynamic_position is false. + * `excludedFilterKeys` (*type:* `list(String.t)`, *default:* `nil`) - List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet "Red" and 200 documents with the color facet "Blue". A query containing the filter "color:ANY("Red")" and having "color" as FacetKey.key would by default return only "Red" documents in the search results, and also return "Red" with count 100 as the only color facet. Although there are also blue documents available, "Blue" would not be shown as an available facet value. If "color" is listed in "excludedFilterKeys", then the query returns the facet values "Red" with count 100 and "Blue" with count 200, because the "color" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only "Red" documents. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. + * `facetKey` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey.t`, *default:* `nil`) - Required. The facet key specification. + * `limit` (*type:* `integer()`, *default:* `nil`) - Maximum of facet values that should be returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. If this field is negative, an `INVALID_ARGUMENT` is returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enableDynamicPosition => boolean() | nil, + :excludedFilterKeys => list(String.t()) | nil, + :facetKey => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey.t() + | nil, + :limit => integer() | nil + } + + field(:enableDynamicPosition) + field(:excludedFilterKeys, type: :list) + + field(:facetKey, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey + ) + + field(:limit) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_facet_spec_facet_key.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_facet_spec_facet_key.ex new file mode 100644 index 0000000000..b2b84b378a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_facet_spec_facet_key.ex @@ -0,0 +1,80 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey do + @moduledoc """ + Specifies how a facet is computed. + + ## Attributes + + * `caseInsensitive` (*type:* `boolean()`, *default:* `nil`) - True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise. + * `contains` (*type:* `list(String.t)`, *default:* `nil`) - Only get facet values that contains the given strings. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual fields. Maximum is 10. + * `intervals` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval.t)`, *default:* `nil`) - Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30. + * `key` (*type:* `String.t`, *default:* `nil`) - Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive. + * `orderBy` (*type:* `String.t`, *default:* `nil`) - The order in which documents are returned. Allowed values are: * "count desc", which means order by SearchResponse.Facet.values.count descending. * "value desc", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals. + * `prefixes` (*type:* `list(String.t)`, *default:* `nil`) - Only get facet values that start with the given string prefix. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" facet only contains "Action > 2022" and "Action > 2021". Only supported on textual fields. Maximum is 10. + * `restrictedValues` (*type:* `list(String.t)`, *default:* `nil`) - Only get facet for the given restricted values. Only supported on textual fields. For example, suppose "category" has three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set "restricted_values" to "Action > 2022", the "category" facet only contains "Action > 2022". Only supported on textual fields. Maximum is 10. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :caseInsensitive => boolean() | nil, + :contains => list(String.t()) | nil, + :intervals => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval.t() + ) + | nil, + :key => String.t() | nil, + :orderBy => String.t() | nil, + :prefixes => list(String.t()) | nil, + :restrictedValues => list(String.t()) | nil + } + + field(:caseInsensitive) + field(:contains, type: :list) + + field(:intervals, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval, + type: :list + ) + + field(:key) + field(:orderBy) + field(:prefixes, type: :list) + field(:restrictedValues, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_image_query.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_image_query.ex new file mode 100644 index 0000000000..698fb36db2 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_image_query.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery do + @moduledoc """ + Specifies the image query input. + + ## Attributes + + * `imageBytes` (*type:* `String.t`, *default:* `nil`) - Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :imageBytes => String.t() | nil + } + + field(:imageBytes) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_query_expansion_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_query_expansion_spec.ex new file mode 100644 index 0000000000..1e57c2503b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_query_expansion_spec.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec do + @moduledoc """ + Specification to determine under which conditions query expansion should occur. + + ## Attributes + + * `condition` (*type:* `String.t`, *default:* `nil`) - The condition under which query expansion should occur. Default to Condition.DISABLED. + * `pinUnexpandedResults` (*type:* `boolean()`, *default:* `nil`) - Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :condition => String.t() | nil, + :pinUnexpandedResults => boolean() | nil + } + + field(:condition) + field(:pinUnexpandedResults) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_spell_correction_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_spell_correction_spec.ex new file mode 100644 index 0000000000..61e11f4f2c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_request_spell_correction_spec.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec do + @moduledoc """ + The specification for query spell correction. + + ## Attributes + + * `mode` (*type:* `String.t`, *default:* `nil`) - The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :mode => String.t() | nil + } + + field(:mode) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response.ex new file mode 100644 index 0000000000..09e4c6cb35 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response.ex @@ -0,0 +1,132 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse do + @moduledoc """ + Response message for SearchService.Search method. + + ## Attributes + + * `appliedControls` (*type:* `list(String.t)`, *default:* `nil`) - Controls applied as part of the Control service. + * `attributionToken` (*type:* `String.t`, *default:* `nil`) - A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. + * `correctedQuery` (*type:* `String.t`, *default:* `nil`) - Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search. + * `facets` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacet.t)`, *default:* `nil`) - Results of facets requested by user. + * `geoSearchDebugInfo` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo.t)`, *default:* `nil`) - + * `guidedSearchResult` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult.t`, *default:* `nil`) - Guided search result. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `queryExpansionInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo.t`, *default:* `nil`) - Query expansion information for the returned results. + * `redirectUri` (*type:* `String.t`, *default:* `nil`) - The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response. + * `results` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult.t)`, *default:* `nil`) - A list of matched documents. The order represents the ranking. + * `summary` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary.t`, *default:* `nil`) - A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set. + * `totalSize` (*type:* `integer()`, *default:* `nil`) - The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :appliedControls => list(String.t()) | nil, + :attributionToken => String.t() | nil, + :correctedQuery => String.t() | nil, + :facets => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacet.t() + ) + | nil, + :geoSearchDebugInfo => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo.t() + ) + | nil, + :guidedSearchResult => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult.t() + | nil, + :nextPageToken => String.t() | nil, + :queryExpansionInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo.t() + | nil, + :redirectUri => String.t() | nil, + :results => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult.t() + ) + | nil, + :summary => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary.t() + | nil, + :totalSize => integer() | nil + } + + field(:appliedControls, type: :list) + field(:attributionToken) + field(:correctedQuery) + + field(:facets, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacet, + type: :list + ) + + field(:geoSearchDebugInfo, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo, + type: :list + ) + + field(:guidedSearchResult, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult + ) + + field(:nextPageToken) + + field(:queryExpansionInfo, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo + ) + + field(:redirectUri) + + field(:results, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult, + type: :list + ) + + field(:summary, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary + ) + + field(:totalSize) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_facet.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_facet.ex new file mode 100644 index 0000000000..23faa89419 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_facet.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacet do + @moduledoc """ + A facet result. + + ## Attributes + + * `dynamicFacet` (*type:* `boolean()`, *default:* `nil`) - Whether the facet is dynamically generated. + * `key` (*type:* `String.t`, *default:* `nil`) - The key for this facet. E.g., "colors" or "price". It matches SearchRequest.FacetSpec.FacetKey.key. + * `values` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue.t)`, *default:* `nil`) - The facet values for this field. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dynamicFacet => boolean() | nil, + :key => String.t() | nil, + :values => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue.t() + ) + | nil + } + + field(:dynamicFacet) + field(:key) + + field(:values, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacet do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacet.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacet do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_facet_facet_value.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_facet_facet_value.ex new file mode 100644 index 0000000000..7828163c0d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_facet_facet_value.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue do + @moduledoc """ + A facet value which contains value names and their count. + + ## Attributes + + * `count` (*type:* `String.t`, *default:* `nil`) - Number of items that have this facet value. + * `interval` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval.t`, *default:* `nil`) - Interval value for a facet, such as 10, 20) for facet "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. + * `value` (*type:* `String.t`, *default:* `nil`) - Text value of a facet, such as "Black" for facet "colors". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => String.t() | nil, + :interval => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval.t() + | nil, + :value => String.t() | nil + } + + field(:count) + + field(:interval, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaInterval + ) + + field(:value) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_geo_search_debug_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_geo_search_debug_info.ex new file mode 100644 index 0000000000..d52fd572fe --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_geo_search_debug_info.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo do + @moduledoc """ + Debug information specifically related to forward geocoding issues arising from Geolocation Search. + + ## Attributes + + * `errorMessage` (*type:* `String.t`, *default:* `nil`) - The error produced. + * `originalAddressQuery` (*type:* `String.t`, *default:* `nil`) - The address from which forward geocoding ingestion produced issues. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorMessage => String.t() | nil, + :originalAddressQuery => String.t() | nil + } + + field(:errorMessage) + field(:originalAddressQuery) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_guided_search_result.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_guided_search_result.ex new file mode 100644 index 0000000000..c27ae6642c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_guided_search_result.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult do + @moduledoc """ + Guided search result. The guided search helps user to refine the search results and narrow down to the real needs from a broaded search results. + + ## Attributes + + * `followUpQuestions` (*type:* `list(String.t)`, *default:* `nil`) - Suggested follow-up questions. + * `refinementAttributes` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute.t)`, *default:* `nil`) - A list of ranked refinement attributes. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :followUpQuestions => list(String.t()) | nil, + :refinementAttributes => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute.t() + ) + | nil + } + + field(:followUpQuestions, type: :list) + + field(:refinementAttributes, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_guided_search_result_refinement_attribute.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_guided_search_result_refinement_attribute.ex new file mode 100644 index 0000000000..d65ad3e2a9 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_guided_search_result_refinement_attribute.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute do + @moduledoc """ + Useful attribute for search result refinements. + + ## Attributes + + * `attributeKey` (*type:* `String.t`, *default:* `nil`) - Attribute key used to refine the results e.g. 'movie_type'. + * `attributeValue` (*type:* `String.t`, *default:* `nil`) - Attribute value used to refine the results e.g. 'drama'. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attributeKey => String.t() | nil, + :attributeValue => String.t() | nil + } + + field(:attributeKey) + field(:attributeValue) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_query_expansion_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_query_expansion_info.ex new file mode 100644 index 0000000000..c6c6802723 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_query_expansion_info.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo do + @moduledoc """ + Information describing query expansion including whether expansion has occurred. + + ## Attributes + + * `expandedQuery` (*type:* `boolean()`, *default:* `nil`) - Bool describing whether query expansion has occurred. + * `pinnedResultCount` (*type:* `String.t`, *default:* `nil`) - Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :expandedQuery => boolean() | nil, + :pinnedResultCount => String.t() | nil + } + + field(:expandedQuery) + field(:pinnedResultCount) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_search_result.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_search_result.ex new file mode 100644 index 0000000000..243e0ef469 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_search_result.ex @@ -0,0 +1,73 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult do + @moduledoc """ + Represents the search results. + + ## Attributes + + * `document` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t`, *default:* `nil`) - The document data snippet in the search response. Only fields that are marked as retrievable are populated. + * `id` (*type:* `String.t`, *default:* `nil`) - Document.id of the searched Document. + * `modelScores` (*type:* `%{optional(String.t) => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDoubleList.t}`, *default:* `nil`) - Google provided available scores. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :document => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument.t() + | nil, + :id => String.t() | nil, + :modelScores => + %{ + optional(String.t()) => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDoubleList.t() + } + | nil + } + + field(:document, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocument + ) + + field(:id) + + field(:modelScores, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDoubleList, + type: :map + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary.ex new file mode 100644 index 0000000000..e940a43614 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary.ex @@ -0,0 +1,74 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary do + @moduledoc """ + Summary of the top N search result specified by the summary spec. + + ## Attributes + + * `safetyAttributes` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes.t`, *default:* `nil`) - A collection of Safety Attribute categories and their associated confidence scores. + * `summarySkippedReasons` (*type:* `list(String.t)`, *default:* `nil`) - Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + * `summaryText` (*type:* `String.t`, *default:* `nil`) - The summary content. + * `summaryWithMetadata` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata.t`, *default:* `nil`) - Summary with metadata information. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :safetyAttributes => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes.t() + | nil, + :summarySkippedReasons => list(String.t()) | nil, + :summaryText => String.t() | nil, + :summaryWithMetadata => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata.t() + | nil + } + + field(:safetyAttributes, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes + ) + + field(:summarySkippedReasons, type: :list) + field(:summaryText) + + field(:summaryWithMetadata, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation.ex new file mode 100644 index 0000000000..3c385f66d8 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation.ex @@ -0,0 +1,69 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation do + @moduledoc """ + Citation info for a segment. + + ## Attributes + + * `endIndex` (*type:* `String.t`, *default:* `nil`) - End of the attributed segment, exclusive. + * `sources` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource.t)`, *default:* `nil`) - Citation sources for the attributed segment. + * `startIndex` (*type:* `String.t`, *default:* `nil`) - Index indicates the start of the segment, measured in bytes/unicode. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endIndex => String.t() | nil, + :sources => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource.t() + ) + | nil, + :startIndex => String.t() | nil + } + + field(:endIndex) + + field(:sources, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource, + type: :list + ) + + field(:startIndex) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation_metadata.ex new file mode 100644 index 0000000000..ba4a3d6c27 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation_metadata.ex @@ -0,0 +1,61 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata do + @moduledoc """ + Citation metadata. + + ## Attributes + + * `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation.t)`, *default:* `nil`) - Citations for segments. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :citations => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation.t() + ) + | nil + } + + field(:citations, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation_source.ex new file mode 100644 index 0000000000..fecf5a8bc5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_citation_source.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource do + @moduledoc """ + Citation source. + + ## Attributes + + * `referenceIndex` (*type:* `String.t`, *default:* `nil`) - Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :referenceIndex => String.t() | nil + } + + field(:referenceIndex) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_reference.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_reference.ex new file mode 100644 index 0000000000..90373ddaf2 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_reference.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference do + @moduledoc """ + Document reference. + + ## Attributes + + * `document` (*type:* `String.t`, *default:* `nil`) - Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + * `title` (*type:* `String.t`, *default:* `nil`) - Title of the document. + * `uri` (*type:* `String.t`, *default:* `nil`) - Cloud Storage or HTTP uri for the document. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :document => String.t() | nil, + :title => String.t() | nil, + :uri => String.t() | nil + } + + field(:document) + field(:title) + field(:uri) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_safety_attributes.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_safety_attributes.ex new file mode 100644 index 0000000000..6fec85c7c0 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_safety_attributes.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes do + @moduledoc """ + Safety Attribute categories and their associated confidence scores. + + ## Attributes + + * `categories` (*type:* `list(String.t)`, *default:* `nil`) - The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + * `scores` (*type:* `list(number())`, *default:* `nil`) - The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :categories => list(String.t()) | nil, + :scores => list(number()) | nil + } + + field(:categories, type: :list) + field(:scores, type: :list) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_summary_with_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_summary_with_metadata.ex new file mode 100644 index 0000000000..fe792e6b0d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response_summary_summary_with_metadata.ex @@ -0,0 +1,74 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata do + @moduledoc """ + Summary with metadata information. + + ## Attributes + + * `citationMetadata` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata.t`, *default:* `nil`) - Citation metadata for given summary. + * `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference.t)`, *default:* `nil`) - Document References. + * `summary` (*type:* `String.t`, *default:* `nil`) - Summary text with no citation information. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :citationMetadata => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata.t() + | nil, + :references => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference.t() + ) + | nil, + :summary => String.t() | nil + } + + field(:citationMetadata, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata + ) + + field(:references, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference, + type: :list + ) + + field(:summary) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config.ex new file mode 100644 index 0000000000..ac2fbccf4a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config.ex @@ -0,0 +1,125 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig do + @moduledoc """ + Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results. + + ## Attributes + + * `boostControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. ServingConfig created timestamp. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The human readable serving config display name. Used in Discovery UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + * `dissociateControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + * `diversityLevel` (*type:* `String.t`, *default:* `nil`) - How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION. + * `embeddingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEmbeddingConfig.t`, *default:* `nil`) - Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config. + * `filterControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls. + * `genericConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig.t`, *default:* `nil`) - The GenericConfig of the serving configuration. + * `ignoreControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100. + * `mediaConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig.t`, *default:* `nil`) - The MediaConfig of the serving configuration. + * `modelId` (*type:* `String.t`, *default:* `nil`) - The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}` + * `onewaySynonymsControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + * `rankingExpression` (*type:* `String.t`, *default:* `nil`) - The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by "+". * ranking_expression = function, { " + ", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: relevance_score: pre-defined keywords, used for measure relevance between query and document. embedding_field_path: the document embedding field used with query embedding vector. dotProduct: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding). + * `redirectControlIds` (*type:* `list(String.t)`, *default:* `nil`) - IDs of the redirect controls. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + * `replacementControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Condition replacement specifications. Applied according to the order in the list. A previously replaced term can not be re-replaced. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. Specifies the solution type that a serving config can be associated with. + * `synonymsControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Condition synonyms specifications. If multiple synonyms conditions match, all matching synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. ServingConfig updated timestamp. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :boostControlIds => list(String.t()) | nil, + :createTime => DateTime.t() | nil, + :displayName => String.t() | nil, + :dissociateControlIds => list(String.t()) | nil, + :diversityLevel => String.t() | nil, + :embeddingConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEmbeddingConfig.t() + | nil, + :filterControlIds => list(String.t()) | nil, + :genericConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig.t() + | nil, + :ignoreControlIds => list(String.t()) | nil, + :mediaConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig.t() + | nil, + :modelId => String.t() | nil, + :name => String.t() | nil, + :onewaySynonymsControlIds => list(String.t()) | nil, + :rankingExpression => String.t() | nil, + :redirectControlIds => list(String.t()) | nil, + :replacementControlIds => list(String.t()) | nil, + :solutionType => String.t() | nil, + :synonymsControlIds => list(String.t()) | nil, + :updateTime => DateTime.t() | nil + } + + field(:boostControlIds, type: :list) + field(:createTime, as: DateTime) + field(:displayName) + field(:dissociateControlIds, type: :list) + field(:diversityLevel) + + field(:embeddingConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaEmbeddingConfig + ) + + field(:filterControlIds, type: :list) + + field(:genericConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig + ) + + field(:ignoreControlIds, type: :list) + + field(:mediaConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig + ) + + field(:modelId) + field(:name) + field(:onewaySynonymsControlIds, type: :list) + field(:rankingExpression) + field(:redirectControlIds, type: :list) + field(:replacementControlIds, type: :list) + field(:solutionType) + field(:synonymsControlIds, type: :list) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config_generic_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config_generic_config.ex new file mode 100644 index 0000000000..d45fdf9d37 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config_generic_config.ex @@ -0,0 +1,58 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig do + @moduledoc """ + Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search. + + ## Attributes + + * `contentSearchSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec.t`, *default:* `nil`) - Specifies the expected behavior of content search. Only valid for content-search enabled data store. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contentSearchSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec.t() + | nil + } + + field(:contentSearchSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config_media_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config_media_config.ex new file mode 100644 index 0000000000..ef07cbec58 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config_media_config.ex @@ -0,0 +1,65 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig do + @moduledoc """ + Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION. + + ## Attributes + + * `contentFreshnessCutoffDays` (*type:* `integer()`, *default:* `nil`) - Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days. + * `contentWatchedMinutesThreshold` (*type:* `number()`, *default:* `nil`) - Specifies the content watched minutes threshold for demotion. + * `contentWatchedPercentageThreshold` (*type:* `number()`, *default:* `nil`) - Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive. + * `contentWatchedSecondsThreshold` (*type:* `number()`, *default:* `nil`) - Specifies the content watched minutes threshold for demotion. + * `demotionEventType` (*type:* `String.t`, *default:* `nil`) - Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contentFreshnessCutoffDays => integer() | nil, + :contentWatchedMinutesThreshold => number() | nil, + :contentWatchedPercentageThreshold => number() | nil, + :contentWatchedSecondsThreshold => number() | nil, + :demotionEventType => String.t() | nil + } + + field(:contentFreshnessCutoffDays) + field(:contentWatchedMinutesThreshold) + field(:contentWatchedPercentageThreshold) + field(:contentWatchedSecondsThreshold) + field(:demotionEventType) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_site_search_engine.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_site_search_engine.ex new file mode 100644 index 0000000000..b6b9899f9e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_site_search_engine.ex @@ -0,0 +1,51 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine do + @moduledoc """ + SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - The fully qualified resource name of the site search engine. Format: `projects/*/locations/*/dataStores/*/siteSearchEngine` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteSearchEngine do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_site_verification_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_site_verification_info.ex new file mode 100644 index 0000000000..fbe39702d3 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_site_verification_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteVerificationInfo do + @moduledoc """ + Verification information for target sites in advanced site search. + + ## Attributes + + * `siteVerificationState` (*type:* `String.t`, *default:* `nil`) - Site verification state indicating the ownership and validity. + * `verifyTime` (*type:* `DateTime.t`, *default:* `nil`) - Latest site verification time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :siteVerificationState => String.t() | nil, + :verifyTime => DateTime.t() | nil + } + + field(:siteVerificationState) + field(:verifyTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteVerificationInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteVerificationInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteVerificationInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_suggestion_deny_list_entry.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_suggestion_deny_list_entry.ex new file mode 100644 index 0000000000..72e7ee6909 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_suggestion_deny_list_entry.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry do + @moduledoc """ + Suggestion deny list entry identifying the phrase to block from suggestions and the applied operation for the phrase. + + ## Attributes + + * `blockPhrase` (*type:* `String.t`, *default:* `nil`) - Required. Phrase to block from suggestions served. Can be maximum 125 characters. + * `matchOperator` (*type:* `String.t`, *default:* `nil`) - Required. The match operator to apply for this phrase. Whether to block the exact phrase, or block any suggestions containing this phrase. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :blockPhrase => String.t() | nil, + :matchOperator => String.t() | nil + } + + field(:blockPhrase) + field(:matchOperator) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site.ex new file mode 100644 index 0000000000..d11ade5eb5 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site.ex @@ -0,0 +1,89 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite do + @moduledoc """ + A target site for the SiteSearchEngine. + + ## Attributes + + * `exactMatch` (*type:* `boolean()`, *default:* `nil`) - Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine. + * `failureReason` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason.t`, *default:* `nil`) - Output only. Failure reason. + * `generatedUriPattern` (*type:* `String.t`, *default:* `nil`) - Output only. This is system-generated based on the provided_uri_pattern. + * `indexingStatus` (*type:* `String.t`, *default:* `nil`) - Output only. Indexing status. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated. + * `providedUriPattern` (*type:* `String.t`, *default:* `nil`) - Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + * `siteVerificationInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteVerificationInfo.t`, *default:* `nil`) - Output only. Site ownership and validity verification status. + * `type` (*type:* `String.t`, *default:* `nil`) - The type of the target site, e.g., whether the site is to be included or excluded. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The target site's last updated time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :exactMatch => boolean() | nil, + :failureReason => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason.t() + | nil, + :generatedUriPattern => String.t() | nil, + :indexingStatus => String.t() | nil, + :name => String.t() | nil, + :providedUriPattern => String.t() | nil, + :siteVerificationInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteVerificationInfo.t() + | nil, + :type => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:exactMatch) + + field(:failureReason, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason + ) + + field(:generatedUriPattern) + field(:indexingStatus) + field(:name) + field(:providedUriPattern) + + field(:siteVerificationInfo, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSiteVerificationInfo + ) + + field(:type) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSite do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site_failure_reason.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site_failure_reason.ex new file mode 100644 index 0000000000..a6a1cf44b0 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site_failure_reason.ex @@ -0,0 +1,58 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason do + @moduledoc """ + Site search indexing failure reasons. + + ## Attributes + + * `quotaFailure` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure.t`, *default:* `nil`) - Failed due to insufficient quota. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :quotaFailure => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure.t() + | nil + } + + field(:quotaFailure, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site_failure_reason_quota_failure.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site_failure_reason_quota_failure.ex new file mode 100644 index 0000000000..ed7eb314b1 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_target_site_failure_reason_quota_failure.ex @@ -0,0 +1,53 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure do + @moduledoc """ + Failed due to insufficient quota. + + ## Attributes + + * `totalRequiredQuota` (*type:* `String.t`, *default:* `nil`) - This number is an estimation on how much total quota this project needs to successfully complete indexing. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :totalRequiredQuota => String.t() | nil + } + + field(:totalRequiredQuota) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_text_input.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_text_input.ex new file mode 100644 index 0000000000..6ac6272b55 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_text_input.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput do + @moduledoc """ + Defines text input. + + ## Attributes + + * `context` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationContext.t`, *default:* `nil`) - Conversation context of the input. + * `input` (*type:* `String.t`, *default:* `nil`) - Text input. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :context => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationContext.t() + | nil, + :input => String.t() | nil + } + + field(:context, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaConversationContext + ) + + field(:input) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTextInput do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_metadata.ex new file mode 100644 index 0000000000..d9513b25bc --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata do + @moduledoc """ + Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_response.ex new file mode 100644 index 0000000000..41dc1d9a10 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_response.ex @@ -0,0 +1,64 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse do + @moduledoc """ + Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t`, *default:* `nil`) - Echoes the destination for the complete errors in the request if set. + * `errorSamples` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t)`, *default:* `nil`) - A sample of errors encountered while processing the data. + * `modelStatus` (*type:* `String.t`, *default:* `nil`) - The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training is in progress. * **ready**: The model is ready for serving. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t() + | nil, + :errorSamples => list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t()) | nil, + :modelStatus => String.t() | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig + ) + + field(:errorSamples, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus, type: :list) + field(:modelStatus) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_transaction_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_transaction_info.ex new file mode 100644 index 0000000000..609dab9313 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_transaction_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaTransactionInfo do + @moduledoc """ + A transaction represents the entire purchase transaction. + + ## Attributes + + * `cost` (*type:* `number()`, *default:* `nil`) - All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + * `currency` (*type:* `String.t`, *default:* `nil`) - Required. Currency code. Use three-character ISO-4217 code. + * `discountValue` (*type:* `number()`, *default:* `nil`) - The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + * `tax` (*type:* `number()`, *default:* `nil`) - All the taxes associated with the transaction. + * `transactionId` (*type:* `String.t`, *default:* `nil`) - The transaction ID with a length limit of 128 characters. + * `value` (*type:* `number()`, *default:* `nil`) - Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cost => number() | nil, + :currency => String.t() | nil, + :discountValue => number() | nil, + :tax => number() | nil, + :transactionId => String.t() | nil, + :value => number() | nil + } + + field(:cost) + field(:currency) + field(:discountValue) + field(:tax) + field(:transactionId) + field(:value) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTransactionInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTransactionInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTransactionInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_update_schema_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_update_schema_metadata.ex new file mode 100644 index 0000000000..e4732505ed --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_update_schema_metadata.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata do + @moduledoc """ + Metadata for UpdateSchema LRO. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_update_target_site_metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_update_target_site_metadata.ex new file mode 100644 index 0000000000..e27724ef0a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_update_target_site_metadata.ex @@ -0,0 +1,56 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata do + @moduledoc """ + Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation create time. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Operation last update time. If the operation is done, this is also the finish time. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_user_event.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_user_event.ex new file mode 100644 index 0000000000..9bafcb4898 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_user_event.ex @@ -0,0 +1,159 @@ +# 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.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent do + @moduledoc """ + UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + + ## Attributes + + * `attributes` (*type:* `%{optional(String.t) => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCustomAttribute.t}`, *default:* `nil`) - Extra user event features to include in the recommendation model. These attributes must NOT contain data that needs to be parsed or processed further, e.g. JSON or other encodings. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Discovery Engine API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an `INVALID_ARGUMENT` error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is `traffic_channel`, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways. + * `attributionToken` (*type:* `String.t`, *default:* `nil`) - Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + * `completionInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompletionInfo.t`, *default:* `nil`) - CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search. + * `directUserRequest` (*type:* `boolean()`, *default:* `nil`) - Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + * `documents` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentInfo.t)`, *default:* `nil`) - List of Documents associated with this user event. This field is optional except for the following event types: * `view-item` * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a `search` event, this field represents the documents returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different UserEvent.documents is desired. + * `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 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. + * `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.V1beta.Model.GoogleCloudDiscoveryengineV1betaMediaInfo.t`, *default:* `nil`) - Media-specific info. + * `pageInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPageInfo.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.V1beta.Model.GoogleCloudDiscoveryengineV1betaPanelInfo.t`, *default:* `nil`) - Panel metadata associated with this user event. + * `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.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchInfo.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. + * `tagIds` (*type:* `list(String.t)`, *default:* `nil`) - A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups on the customer end. + * `transactionInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTransactionInfo.t`, *default:* `nil`) - The transaction metadata (if any) associated with this user event. + * `userInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo.t`, *default:* `nil`) - Information about the end user. + * `userPseudoId` (*type:* `String.t`, *default:* `nil`) - Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attributes => + %{ + optional(String.t()) => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCustomAttribute.t() + } + | nil, + :attributionToken => String.t() | nil, + :completionInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompletionInfo.t() + | nil, + :directUserRequest => boolean() | nil, + :documents => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentInfo.t() + ) + | nil, + :eventTime => DateTime.t() | nil, + :eventType => String.t() | nil, + :filter => String.t() | nil, + :mediaInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaMediaInfo.t() + | nil, + :pageInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPageInfo.t() + | nil, + :panel => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPanelInfo.t() + | nil, + :promotionIds => list(String.t()) | nil, + :searchInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchInfo.t() + | nil, + :sessionId => String.t() | nil, + :tagIds => list(String.t()) | nil, + :transactionInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTransactionInfo.t() + | nil, + :userInfo => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo.t() + | nil, + :userPseudoId => String.t() | nil + } + + field(:attributes, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCustomAttribute, + type: :map + ) + + field(:attributionToken) + + field(:completionInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaCompletionInfo + ) + + field(:directUserRequest) + + field(:documents, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentInfo, + type: :list + ) + + field(:eventTime, as: DateTime) + field(:eventType) + field(:filter) + + field(:mediaInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaMediaInfo + ) + + field(:pageInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPageInfo + ) + + field(:panel, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaPanelInfo + ) + + field(:promotionIds, type: :list) + + field(:searchInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchInfo + ) + + field(:sessionId) + field(:tagIds, type: :list) + + field(:transactionInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTransactionInfo + ) + + field(:userInfo, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo + ) + + field(:userPseudoId) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserEvent do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_user_info.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_user_info.ex new file mode 100644 index 0000000000..324ef868e6 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_user_info.ex @@ -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.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo do + @moduledoc """ + Information of an end user. + + ## Attributes + + * `userAgent` (*type:* `String.t`, *default:* `nil`) - User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + * `userId` (*type:* `String.t`, *default:* `nil`) - Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :userAgent => String.t() | nil, + :userId => String.t() | nil + } + + field(:userAgent) + field(:userId) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaUserInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_longrunning_list_operations_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_longrunning_list_operations_response.ex new file mode 100644 index 0000000000..ead2b24e04 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_longrunning_list_operations_response.ex @@ -0,0 +1,59 @@ +# 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.V1beta.Model.GoogleLongrunningListOperationsResponse do + @moduledoc """ + The response message for Operations.ListOperations. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. + * `operations` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t)`, *default:* `nil`) - A list of operations that matches the specified filter in the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :operations => + list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.t()) | nil + } + + field(:nextPageToken) + + field(:operations, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningListOperationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_longrunning_operation.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_longrunning_operation.ex new file mode 100644 index 0000000000..3e7526f027 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_longrunning_operation.ex @@ -0,0 +1,58 @@ +# 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.V1beta.Model.GoogleLongrunningOperation do + @moduledoc """ + This resource represents a long-running operation that is the result of a network API call. + + ## Attributes + + * `done` (*type:* `boolean()`, *default:* `nil`) - If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + * `error` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. + * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :done => boolean() | nil, + :error => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.t() | nil, + :metadata => map() | nil, + :name => String.t() | nil, + :response => map() | nil + } + + field(:done) + field(:error, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus) + field(:metadata, type: :map) + field(:name) + field(:response, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleLongrunningOperation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_protobuf_empty.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_protobuf_empty.ex new file mode 100644 index 0000000000..11f35f1ed7 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_protobuf_empty.ex @@ -0,0 +1,41 @@ +# 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.V1beta.Model.GoogleProtobufEmpty do + @moduledoc """ + A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleProtobufEmpty do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_rpc_status.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_rpc_status.ex new file mode 100644 index 0000000000..f7f0a366cd --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_rpc_status.ex @@ -0,0 +1,52 @@ +# 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.V1beta.Model.GoogleRpcStatus do + @moduledoc """ + The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + + ## Attributes + + * `code` (*type:* `integer()`, *default:* `nil`) - The status code, which should be an enum value of google.rpc.Code. + * `details` (*type:* `list(map())`, *default:* `nil`) - A list of messages that carry the error details. There is a common set of message types for APIs to use. + * `message` (*type:* `String.t`, *default:* `nil`) - A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => integer() | nil, + :details => list(map()) | nil, + :message => String.t() | nil + } + + field(:code) + field(:details, type: :list) + field(:message) +end + +defimpl Poison.Decoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleRpcStatus do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_type_date.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_type_date.ex new file mode 100644 index 0000000000..e0c83dfa93 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_type_date.ex @@ -0,0 +1,52 @@ +# 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.V1beta.Model.GoogleTypeDate do + @moduledoc """ + Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp + + ## Attributes + + * `day` (*type:* `integer()`, *default:* `nil`) - Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. + * `month` (*type:* `integer()`, *default:* `nil`) - Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + * `year` (*type:* `integer()`, *default:* `nil`) - Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :day => integer() | nil, + :month => integer() | nil, + :year => integer() | nil + } + + field(:day) + field(:month) + field(:year) +end + +defimpl Poison.Decoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleTypeDate do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleTypeDate.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleTypeDate do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/mix.exs b/clients/discovery_engine/mix.exs new file mode 100644 index 0000000000..4afcbed11c --- /dev/null +++ b/clients/discovery_engine/mix.exs @@ -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.Mixfile do + use Mix.Project + + @version "0.2.0" + + def project() do + [ + app: :google_api_discovery_engine, + version: @version, + elixir: "~> 1.6", + build_embedded: Mix.env == :prod, + start_permanent: Mix.env == :prod, + description: description(), + package: package(), + deps: deps(), + source_url: "https://github.com/googleapis/elixir-google-api/tree/master/clients/discovery_engine" + ] + end + + def application() do + [extra_applications: [:logger]] + end + + defp deps() do + [ + {:google_gax, "~> 0.4"}, + + {:ex_doc, "~> 0.16", only: :dev} + ] + end + + defp description() do + """ + Discovery Engine API client library. Discovery Engine API. + """ + end + + defp package() do + [ + files: ["lib", "mix.exs", "README*", "LICENSE"], + maintainers: ["Jeff Ching", "Daniel Azuma"], + licenses: ["Apache 2.0"], + links: %{ + "GitHub" => "https://github.com/googleapis/elixir-google-api/tree/master/clients/discovery_engine", + "Homepage" => "https://cloud.google.com/discovery-engine/docs" + } + ] + end +end diff --git a/clients/discovery_engine/test/test_helper.exs b/clients/discovery_engine/test/test_helper.exs new file mode 100644 index 0000000000..a42c4c4a19 --- /dev/null +++ b/clients/discovery_engine/test/test_helper.exs @@ -0,0 +1,35 @@ +# 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. + +ExUnit.start() + +defmodule GoogleApi.DiscoveryEngine.TestHelper do + + defmacro __using__(opts) do + quote do + use ExUnit.Case, unquote(opts) + import GoogleApi.DiscoveryEngine.TestHelper + end + end + + def for_scope(scopes) when is_list(scopes), do: for_scope(Enum.join(scopes, " ")) + def for_scope(scope) do + {:ok, token} = Goth.Token.for_scope(scope) + token.token + end + +end