diff --git a/clients/discovery_engine/README.md b/clients/discovery_engine/README.md index 49b3047ec9..29f3fd2716 100644 --- a/clients/discovery_engine/README.md +++ b/clients/discovery_engine/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_discovery_engine, "~> 0.2"}] + [{:google_api_discovery_engine, "~> 0.3"}] end ``` 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 index 160a0855ce..f136fbcc46 100644 --- 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 @@ -733,6 +733,80 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do ) end + @doc """ + Trains a custom model. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Connection.t`) - Connection to server + * `data_store` (*type:* `String.t`) - Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models. + * `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.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest.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_train_custom_model( + 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_train_custom_model( + 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, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta/{+dataStore}:trainCustomModel", %{ + "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.GoogleLongrunningOperation{}] + ) + end + @doc """ Creates a Document. 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 index 43a8680194..71c78a43bf 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta do API client metadata for GoogleApi.DiscoveryEngine.V1beta. """ - @discovery_revision "20240307" + @discovery_revision "20240312" def discovery_revision(), do: @discovery_revision 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 index ff7a0921af..b992fd779d 100644 --- 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 @@ -21,27 +21,29 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Doc ## 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. + * `digitalParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig.t`, *default:* `nil`) - Configurations applied to digital parser. + * `ocrParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig.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() + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig.t() | nil, :ocrParsingConfig => - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig.t() + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig.t() | nil } field(:digitalParsingConfig, - as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig ) field(:ocrParsingConfig, - as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig ) 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_v1_document_processing_config_parsing_config_digital_parsing_config.ex similarity index 82% rename from clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_digital_parsing_config.ex rename to clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config_parsing_config_digital_parsing_config.ex index f6c3b381cc..c6dcb1cdd9 100644 --- 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_v1_document_processing_config_parsing_config_digital_parsing_config.ex @@ -15,7 +15,7 @@ # 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 +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig do @moduledoc """ The digital parsing configurations for documents. @@ -30,9 +30,9 @@ end defimpl Poison.Decoder, for: - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig do def decode(value, options) do - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig.decode( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig.decode( value, options ) @@ -41,7 +41,7 @@ end defimpl Poison.Encoder, for: - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) 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_v1_document_processing_config_parsing_config_ocr_parsing_config.ex similarity index 80% rename from clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_ocr_parsing_config.ex rename to clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_document_processing_config_parsing_config_ocr_parsing_config.ex index 552167fc45..75fcc25946 100644 --- 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_v1_document_processing_config_parsing_config_ocr_parsing_config.ex @@ -15,7 +15,7 @@ # 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 +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig do @moduledoc """ The OCR parsing configurations for documents. @@ -37,9 +37,10 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp end defimpl Poison.Decoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig do def decode(value, options) do - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig.decode( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig.decode( value, options ) @@ -47,7 +48,8 @@ defimpl Poison.Decoder, end defimpl Poison.Encoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) 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 index ab4d32c0a9..b9a60911f8 100644 --- 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 @@ -21,37 +21,38 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp ## 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. + * `digitalParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig.t`, *default:* `nil`) - Configurations applied to digital parser. + * `layoutParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig.t`, *default:* `nil`) - Configurations applied to layout parser. + * `ocrParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig.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() + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig.t() | nil, :layoutParsingConfig => - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig.t() + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig.t() | nil, :ocrParsingConfig => - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig.t() + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig.t() | nil } field(:digitalParsingConfig, as: - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig ) field(:layoutParsingConfig, as: - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig ) field(:ocrParsingConfig, - as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaOcrParsingConfig + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig ) 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_v1alpha_document_processing_config_parsing_config_digital_parsing_config.ex similarity index 72% rename from clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_digital_parsing_config.ex rename to clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_parsing_config_digital_parsing_config.ex index 6476ed5433..3918e29a0e 100644 --- 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_v1alpha_document_processing_config_parsing_config_digital_parsing_config.ex @@ -15,7 +15,7 @@ # 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 +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig do @moduledoc """ The digital parsing configurations for documents. @@ -29,9 +29,10 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet end defimpl Poison.Decoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig do def decode(value, options) do - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig.decode( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig.decode( value, options ) @@ -39,7 +40,8 @@ defimpl Poison.Decoder, end defimpl Poison.Encoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) 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_document_processing_config_parsing_config_layout_parsing_config.ex similarity index 72% rename from clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_layout_parsing_config.ex rename to clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_parsing_config_layout_parsing_config.ex index 2990b5127d..1427bf1915 100644 --- 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_document_processing_config_parsing_config_layout_parsing_config.ex @@ -15,7 +15,7 @@ # 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 +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig do @moduledoc """ The layout parsing configurations for documents. @@ -29,9 +29,10 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp end defimpl Poison.Decoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig do def decode(value, options) do - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig.decode( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig.decode( value, options ) @@ -39,7 +40,8 @@ defimpl Poison.Decoder, end defimpl Poison.Encoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) 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_v1alpha_document_processing_config_parsing_config_ocr_parsing_config.ex similarity index 80% rename from clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_ocr_parsing_config.ex rename to clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_document_processing_config_parsing_config_ocr_parsing_config.ex index 1f144ebaf6..13b998685c 100644 --- 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_v1alpha_document_processing_config_parsing_config_ocr_parsing_config.ex @@ -15,7 +15,7 @@ # 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 +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig do @moduledoc """ The OCR parsing configurations for documents. @@ -37,9 +37,10 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet end defimpl Poison.Decoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig do def decode(value, options) do - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig.decode( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig.decode( value, options ) @@ -47,7 +48,8 @@ defimpl Poison.Decoder, end defimpl Poison.Encoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) 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 index 6a4295b43a..a69526ca5d 100644 --- 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 @@ -21,28 +21,29 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ## 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. + * `digitalParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig.t`, *default:* `nil`) - Configurations applied to digital parser. + * `ocrParsingConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig.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() + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig.t() | nil, :ocrParsingConfig => - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig.t() + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig.t() | nil } field(:digitalParsingConfig, as: - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDigitalParsingConfig + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig ) field(:ocrParsingConfig, - as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaOcrParsingConfig + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig ) 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_v1beta_document_processing_config_parsing_config_digital_parsing_config.ex similarity index 72% rename from clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_digital_parsing_config.ex rename to clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config_parsing_config_digital_parsing_config.ex index 4feec33612..920d8eef42 100644 --- 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_v1beta_document_processing_config_parsing_config_digital_parsing_config.ex @@ -15,7 +15,7 @@ # 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 +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig do @moduledoc """ The digital parsing configurations for documents. @@ -29,9 +29,10 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Dig end defimpl Poison.Decoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig do def decode(value, options) do - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig.decode( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig.decode( value, options ) @@ -39,7 +40,8 @@ defimpl Poison.Decoder, end defimpl Poison.Encoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1DigitalParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) 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_v1beta_document_processing_config_parsing_config_ocr_parsing_config.ex similarity index 80% rename from clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_ocr_parsing_config.ex rename to clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_document_processing_config_parsing_config_ocr_parsing_config.ex index 3f17b0a29b..0ba67c9643 100644 --- 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_v1beta_document_processing_config_parsing_config_ocr_parsing_config.ex @@ -15,7 +15,7 @@ # 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 +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig do @moduledoc """ The OCR parsing configurations for documents. @@ -37,9 +37,10 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Ocr end defimpl Poison.Decoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig do def decode(value, options) do - GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig.decode( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig.decode( value, options ) @@ -47,7 +48,8 @@ defimpl Poison.Decoder, end defimpl Poison.Encoder, - for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1OcrParsingConfig do + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) 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 index 3718afe97e..0bf09565ee 100644 --- 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 @@ -22,7 +22,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ## 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")) + * `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 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 index 71ffb0d8bf..34a59f460a 100644 --- 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 @@ -25,6 +25,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `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. + * `returnExtractiveSegmentScore` (*type:* `boolean()`, *default:* `nil`) - Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, please contact your Customer Engineer. The default value is `false`. """ use GoogleApi.Gax.ModelBase @@ -33,13 +34,15 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet :maxExtractiveAnswerCount => integer() | nil, :maxExtractiveSegmentCount => integer() | nil, :numNextSegments => integer() | nil, - :numPreviousSegments => integer() | nil + :numPreviousSegments => integer() | nil, + :returnExtractiveSegmentScore => boolean() | nil } field(:maxExtractiveAnswerCount) field(:maxExtractiveSegmentCount) field(:numNextSegments) field(:numPreviousSegments) + field(:returnExtractiveSegmentScore) end defimpl Poison.Decoder, 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 index 6745bbd357..db16703fad 100644 --- 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 @@ -21,7 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ## 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. + * `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 model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). """ use GoogleApi.Gax.ModelBase 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 index ef07cbec58..abc3640f49 100644 --- 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 @@ -22,7 +22,6 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ## 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. @@ -32,14 +31,12 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet @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) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_request.ex new file mode 100644 index 0000000000..f80275a640 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_request.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.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest do + @moduledoc """ + Request message for SearchTuningService.TrainCustomModel method. + + ## Attributes + + * `errorConfig` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t`, *default:* `nil`) - The desired location of errors incurred during the data ingestion and training. + * `gcsTrainingInput` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput.t`, *default:* `nil`) - Cloud Storage training input. + * `modelType` (*type:* `String.t`, *default:* `nil`) - Model to be trained. Supported values are: * **search-tuning**: Fine tuning the search system based on data provided. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errorConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig.t() + | nil, + :gcsTrainingInput => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput.t() + | nil, + :modelType => String.t() | nil + } + + field(:errorConfig, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaImportErrorConfig + ) + + field(:gcsTrainingInput, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput + ) + + field(:modelType) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest 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_request_gcs_training_input.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_request_gcs_training_input.ex new file mode 100644 index 0000000000..a70a3121aa --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_train_custom_model_request_gcs_training_input.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.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput do + @moduledoc """ + Cloud Storage training data input. + + ## Attributes + + * `corpusDataPath` (*type:* `String.t`, *default:* `nil`) - The Cloud Storage corpus data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id, title and text. Example: `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` + * `queryDataPath` (*type:* `String.t`, *default:* `nil`) - The gcs query data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id and text. Example: {"_id": "query1", "text": "example query"} + * `testDataPath` (*type:* `String.t`, *default:* `nil`) - Cloud Storage test data. Same format as train_data_path. If not provided, a random 80/20 train/test split will be performed on train_data_path. + * `trainDataPath` (*type:* `String.t`, *default:* `nil`) - Cloud Storage training data path whose format should be `gs:///`. The file should be in tsv format. Each line should have the doc_id and query_id and score (number). For search-tuning model, it should have the query-id corpus-id score as tsv file header. The score should be a number in `[0, inf+)`. The larger the number is, the more relevant the pair is. Example: * `query-id\\tcorpus-id\\tscore` * `query1\\tdoc1\\t1` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :corpusDataPath => String.t() | nil, + :queryDataPath => String.t() | nil, + :testDataPath => String.t() | nil, + :trainDataPath => String.t() | nil + } + + field(:corpusDataPath) + field(:queryDataPath) + field(:testDataPath) + field(:trainDataPath) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput 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 index 4afcbed11c..41474eddf6 100644 --- a/clients/discovery_engine/mix.exs +++ b/clients/discovery_engine/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.DiscoveryEngine.Mixfile do use Mix.Project - @version "0.2.0" + @version "0.3.0" def project() do [