diff --git a/clients/discovery_engine/README.md b/clients/discovery_engine/README.md index 93950e68c5..26380e4e78 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.25"}] + [{:google_api_discovery_engine, "~> 0.26"}] end ``` diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/api/projects.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/api/projects.ex index 43ae3b871a..02e3f40f3b 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/api/projects.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/api/projects.ex @@ -3672,6 +3672,83 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ) end + @doc """ + Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig{}}` 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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig.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("/v1/{+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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig{}] + ) + end + @doc """ Makes a recommendation, which requires a contextual user event. @@ -3901,6 +3978,85 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ) end + @doc """ + Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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/*/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.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_serving_configs_stream_answer( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_serving_configs_stream_answer( + 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("/v1/{+servingConfig}:streamAnswer", %{ + "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.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse{} + ] + ) + end + @doc """ Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. @@ -4066,6 +4222,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do * `: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"). + * `:includeAnswerDetails` (*type:* `boolean()`) - Optional. If set to true, the full session including all answer details will be returned. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -4100,7 +4257,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :includeAnswerDetails => :query } request = @@ -5633,7 +5791,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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}`. + * `parent` (*type:* `String.t`) - Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -7377,6 +7535,83 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ) end + @doc """ + Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig{}}` 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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig.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("/v1/{+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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig{}] + ) + end + @doc """ Makes a recommendation, which requires a contextual user event. @@ -7606,6 +7841,85 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ) end + @doc """ + Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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/*/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.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_serving_configs_stream_answer( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_serving_configs_stream_answer( + 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("/v1/{+servingConfig}:streamAnswer", %{ + "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.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse{} + ] + ) + end + @doc """ Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. @@ -7771,6 +8085,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do * `: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"). + * `:includeAnswerDetails` (*type:* `boolean()`) - Optional. If set to true, the full session including all answer details will be returned. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -7805,7 +8120,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :includeAnswerDetails => :query } request = @@ -11338,6 +11654,83 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ) end + @doc """ + Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig{}}` 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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig.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("/v1/{+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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig{}] + ) + end + @doc """ Makes a recommendation, which requires a contextual user event. @@ -11567,6 +11960,85 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ) end + @doc """ + Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream. + + ## Parameters + + * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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/*/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.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_serving_configs_stream_answer( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_serving_configs_stream_answer( + 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("/v1/{+servingConfig}:streamAnswer", %{ + "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.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryResponse{} + ] + ) + end + @doc """ Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. @@ -11732,6 +12204,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do * `: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"). + * `:includeAnswerDetails` (*type:* `boolean()`) - Optional. If set to true, the full session including all answer details will be returned. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -11766,7 +12239,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :includeAnswerDetails => :query } request = @@ -12842,7 +13316,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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}`. + * `parent` (*type:* `String.t`) - Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -13599,7 +14073,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.DiscoveryEngine.V1.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}`. + * `parent` (*type:* `String.t`) - Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/metadata.ex index 9699db9096..9961c1a898 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/metadata.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.DiscoveryEngine.V1 do API client metadata for GoogleApi.DiscoveryEngine.V1. """ - @discovery_revision "20241123" + @discovery_revision "20241205" def discovery_revision(), do: @discovery_revision end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer.ex index 770e85a91b..9042f7da6f 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer.ex @@ -26,6 +26,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer * `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitation.t)`, *default:* `nil`) - Citations. * `completeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer completed timestamp. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer creation timestamp. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + * `groundingSupports` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.t)`, *default:* `nil`) - Optional. Grounding supports. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` * `queryUnderstandingInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo.t`, *default:* `nil`) - Query understanding information. * `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerReference.t)`, *default:* `nil`) - References. @@ -46,6 +48,12 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer | nil, :completeTime => DateTime.t() | nil, :createTime => DateTime.t() | nil, + :groundingScore => float() | nil, + :groundingSupports => + list( + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.t() + ) + | nil, :name => String.t() | nil, :queryUnderstandingInfo => GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo.t() @@ -72,6 +80,13 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Answer field(:completeTime, as: DateTime) field(:createTime, as: DateTime) + field(:groundingScore) + + field(:groundingSupports, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport, + type: :list + ) + field(:name) field(:queryUnderstandingInfo, diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_grounding_support.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_grounding_support.ex new file mode 100644 index 0000000000..498296ee94 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_grounding_support.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.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport do + @moduledoc """ + Grounding support for a claim in `answer_text`. + + ## Attributes + + * `endIndex` (*type:* `String.t`, *default:* `nil`) - Required. End of the claim, exclusive. + * `groundingCheckRequired` (*type:* `boolean()`, *default:* `nil`) - Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + * `sources` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource.t)`, *default:* `nil`) - Optional. Citation sources for the claim. + * `startIndex` (*type:* `String.t`, *default:* `nil`) - Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endIndex => String.t() | nil, + :groundingCheckRequired => boolean() | nil, + :groundingScore => float() | nil, + :sources => + list( + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource.t() + ) + | nil, + :startIndex => String.t() | nil + } + + field(:endIndex) + field(:groundingCheckRequired) + field(:groundingScore) + + field(:sources, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerCitationSource, + type: :list + ) + + field(:startIndex) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerGroundingSupport 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/v1/model/google_cloud_discoveryengine_v1_answer_query_request_query_understanding_spec_query_rephraser_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_query_understanding_spec_query_rephraser_spec.ex index ecc9a19161..8dcd49fd3b 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_query_understanding_spec_query_rephraser_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_query_understanding_spec_query_rephraser_spec.ex @@ -23,17 +23,26 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQ * `disable` (*type:* `boolean()`, *default:* `nil`) - Disable query rephraser. * `maxRephraseSteps` (*type:* `integer()`, *default:* `nil`) - Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + * `modelSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t`, *default:* `nil`) - Optional. Query Rephraser Model specification. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :disable => boolean() | nil, - :maxRephraseSteps => integer() | nil + :maxRephraseSteps => integer() | nil, + :modelSpec => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t() + | nil } field(:disable) field(:maxRephraseSteps) + + field(:modelSpec, + as: + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + ) end defimpl Poison.Decoder, diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_query_understanding_spec_query_rephraser_spec_model_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_query_understanding_spec_query_rephraser_spec_model_spec.ex new file mode 100644 index 0000000000..ac2f60c501 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_query_understanding_spec_query_rephraser_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.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do + @moduledoc """ + Query Rephraser Model specification. + + ## Attributes + + * `modelType` (*type:* `String.t`, *default:* `nil`) - Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :modelType => String.t() | nil + } + + field(:modelType) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec 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/v1/model/google_cloud_discoveryengine_v1_answer_query_request_safety_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_safety_spec.ex index 66eeffa2de..0fd60f703d 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_safety_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_answer_query_request_safety_spec.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec do @moduledoc """ - Safety specification. + Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. ## Attributes diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_fhir_store_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_fhir_store_source.ex index a7c8715510..9e6709cd13 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_fhir_store_source.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_fhir_store_source.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FhirSto * `fhirStore` (*type:* `String.t`, *default:* `nil`) - Required. The full resource name of the FHIR store to import data from, in the format of `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. * `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 FhirStore export to a specific Cloud Storage directory. * `resourceTypes` (*type:* `list(String.t)`, *default:* `nil`) - The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. + * `updateFromLatestPredefinedSchema` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1FhirSto @type t :: %__MODULE__{ :fhirStore => String.t() | nil, :gcsStagingDir => String.t() | nil, - :resourceTypes => list(String.t()) | nil + :resourceTypes => list(String.t()) | nil, + :updateFromLatestPredefinedSchema => boolean() | nil } field(:fhirStore) field(:gcsStagingDir) field(:resourceTypes, type: :list) + field(:updateFromLatestPredefinedSchema) end defimpl Poison.Decoder, diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_request_data_store_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_request_data_store_spec.ex index 13e08416cc..fa4a95dcae 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_request_data_store_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_request_data_store_spec.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR ## Attributes + * `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec.t`, *default:* `nil`) - Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) * `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}`. * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) """ @@ -28,10 +29,17 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :boostSpec => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec.t() + | nil, :dataStore => String.t() | nil, :filter => String.t() | nil } + field(:boostSpec, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestBoostSpec + ) + field(:dataStore) field(:filter) end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_serving_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_serving_config.ex new file mode 100644 index 0000000000..917f29c03c --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_serving_config.ex @@ -0,0 +1,117 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig 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. + * `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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig.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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig.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. + * `promoteControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Condition promote specifications. Maximum number of specifications is 100. + * `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, + :filterControlIds => list(String.t()) | nil, + :genericConfig => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig.t() + | nil, + :ignoreControlIds => list(String.t()) | nil, + :mediaConfig => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig.t() + | nil, + :modelId => String.t() | nil, + :name => String.t() | nil, + :onewaySynonymsControlIds => list(String.t()) | nil, + :promoteControlIds => 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(:filterControlIds, type: :list) + + field(:genericConfig, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + ) + + field(:ignoreControlIds, type: :list) + + field(:mediaConfig, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + ) + + field(:modelId) + field(:name) + field(:onewaySynonymsControlIds, type: :list) + field(:promoteControlIds, 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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfig 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/v1/model/google_cloud_discoveryengine_v1_serving_config_generic_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_serving_config_generic_config.ex new file mode 100644 index 0000000000..4025147409 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_serving_config_generic_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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig 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.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec.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.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec.t() + | nil + } + + field(:contentSearchSpec, + as: + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig 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/v1/model/google_cloud_discoveryengine_v1_serving_config_media_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_serving_config_media_config.ex new file mode 100644 index 0000000000..e9dc2462ec --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_serving_config_media_config.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.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig 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. + * `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. + * `demoteContentWatchedPastDays` (*type:* `integer()`, *default:* `nil`) - Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days. + * `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, + :contentWatchedPercentageThreshold => number() | nil, + :contentWatchedSecondsThreshold => number() | nil, + :demoteContentWatchedPastDays => integer() | nil, + :demotionEventType => String.t() | nil + } + + field(:contentFreshnessCutoffDays) + field(:contentWatchedPercentageThreshold) + field(:contentWatchedSecondsThreshold) + field(:demoteContentWatchedPastDays) + field(:demotionEventType) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig 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/v1/model/google_cloud_discoveryengine_v1_session.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_session.ex index a4309468d5..96f7766f64 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_session.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_session.ex @@ -21,7 +21,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Session ## Attributes + * `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session finished. + * `isPinned` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session started. * `state` (*type:* `String.t`, *default:* `nil`) - The state of the session. @@ -32,7 +34,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Session use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :displayName => String.t() | nil, :endTime => DateTime.t() | nil, + :isPinned => boolean() | nil, :name => String.t() | nil, :startTime => DateTime.t() | nil, :state => String.t() | nil, @@ -42,7 +46,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Session :userPseudoId => String.t() | nil } + field(:displayName) field(:endTime, as: DateTime) + field(:isPinned) field(:name) field(:startTime, as: DateTime) field(:state) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_answer.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_answer.ex index 80b8ef4beb..35c94fdf42 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_answer.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_answer.ex @@ -26,6 +26,8 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAn * `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitation.t)`, *default:* `nil`) - Citations. * `completeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer completed timestamp. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer creation timestamp. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + * `groundingSupports` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport.t)`, *default:* `nil`) - Optional. Grounding supports. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` * `queryUnderstandingInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo.t`, *default:* `nil`) - Query understanding information. * `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerReference.t)`, *default:* `nil`) - References. @@ -46,6 +48,12 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAn | nil, :completeTime => DateTime.t() | nil, :createTime => DateTime.t() | nil, + :groundingScore => float() | nil, + :groundingSupports => + list( + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport.t() + ) + | nil, :name => String.t() | nil, :queryUnderstandingInfo => GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo.t() @@ -74,6 +82,14 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAn field(:completeTime, as: DateTime) field(:createTime, as: DateTime) + field(:groundingScore) + + field(:groundingSupports, + as: + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport, + type: :list + ) + field(:name) field(:queryUnderstandingInfo, diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_answer_grounding_support.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_answer_grounding_support.ex new file mode 100644 index 0000000000..0eba6af9b2 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_answer_grounding_support.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.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport do + @moduledoc """ + Grounding support for a claim in `answer_text`. + + ## Attributes + + * `endIndex` (*type:* `String.t`, *default:* `nil`) - Required. End of the claim, exclusive. + * `groundingCheckRequired` (*type:* `boolean()`, *default:* `nil`) - Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + * `sources` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitationSource.t)`, *default:* `nil`) - Optional. Citation sources for the claim. + * `startIndex` (*type:* `String.t`, *default:* `nil`) - Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endIndex => String.t() | nil, + :groundingCheckRequired => boolean() | nil, + :groundingScore => float() | nil, + :sources => + list( + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitationSource.t() + ) + | nil, + :startIndex => String.t() | nil + } + + field(:endIndex) + field(:groundingCheckRequired) + field(:groundingScore) + + field(:sources, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitationSource, + type: :list + ) + + field(:startIndex) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport 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/v1/model/google_cloud_discoveryengine_v1alpha_delete_session_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_delete_session_request.ex new file mode 100644 index 0000000000..5bcead8e4d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_delete_session_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.V1.Model.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest do + @moduledoc """ + Request for DeleteSession method. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest 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/v1/model/google_cloud_discoveryengine_v1alpha_get_session_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_get_session_request.ex new file mode 100644 index 0000000000..73d5571c03 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_get_session_request.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.V1.Model.GoogleCloudDiscoveryengineV1alphaGetSessionRequest do + @moduledoc """ + Request for GetSession method. + + ## Attributes + + * `includeAnswerDetails` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, the full session including all answer details will be returned. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :includeAnswerDetails => boolean() | nil, + :name => String.t() | nil + } + + field(:includeAnswerDetails) + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaGetSessionRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaGetSessionRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaGetSessionRequest 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/v1/model/google_cloud_discoveryengine_v1alpha_list_sessions_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_list_sessions_request.ex new file mode 100644 index 0000000000..4cca5ac549 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_list_sessions_request.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.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsRequest do + @moduledoc """ + Request for ListSessions method. + + ## Attributes + + * `filter` (*type:* `String.t`, *default:* `nil`) - 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`, *default:* `nil`) - 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` * `session_name` Example: "update_time desc" "create_time" + * `pageSize` (*type:* `integer()`, *default:* `nil`) - Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + * `pageToken` (*type:* `String.t`, *default:* `nil`) - A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. + * `parent` (*type:* `String.t`, *default:* `nil`) - Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :filter => String.t() | nil, + :orderBy => String.t() | nil, + :pageSize => integer() | nil, + :pageToken => String.t() | nil, + :parent => String.t() | nil + } + + field(:filter) + field(:orderBy) + field(:pageSize) + field(:pageToken) + field(:parent) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsRequest 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/v1/model/google_cloud_discoveryengine_v1alpha_list_sessions_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_list_sessions_response.ex new file mode 100644 index 0000000000..baa2f6fdfa --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_list_sessions_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.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsResponse do + @moduledoc """ + Response for ListSessions method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Pagination token, if not returned indicates the last page. + * `sessions` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSession.t)`, *default:* `nil`) - All the Sessions for a given data store. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :sessions => + list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSession.t()) + | nil + } + + field(:nextPageToken) + + field(:sessions, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSession, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaListSessionsResponse 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/v1/model/google_cloud_discoveryengine_v1alpha_search_request_data_store_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_search_request_data_store_spec.ex index a00b2dcee5..152fff79f7 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_search_request_data_store_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_search_request_data_store_spec.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSe ## Attributes + * `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec.t`, *default:* `nil`) - Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) * `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}`. * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) """ @@ -28,10 +29,17 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSe use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :boostSpec => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec.t() + | nil, :dataStore => String.t() | nil, :filter => String.t() | nil } + field(:boostSpec, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec + ) + field(:dataStore) field(:filter) end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_session.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_session.ex index d7f9a43d32..3f92c8adc8 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_session.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_session.ex @@ -21,7 +21,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSe ## Attributes + * `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session finished. + * `isPinned` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session started. * `state` (*type:* `String.t`, *default:* `nil`) - The state of the session. @@ -32,7 +34,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSe use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :displayName => String.t() | nil, :endTime => DateTime.t() | nil, + :isPinned => boolean() | nil, :name => String.t() | nil, :startTime => DateTime.t() | nil, :state => String.t() | nil, @@ -44,7 +48,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSe :userPseudoId => String.t() | nil } + field(:displayName) field(:endTime, as: DateTime) + field(:isPinned) field(:name) field(:startTime, as: DateTime) field(:state) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_update_session_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_update_session_request.ex new file mode 100644 index 0000000000..7301b73913 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_update_session_request.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest do + @moduledoc """ + Request for UpdateSession method. + + ## Attributes + + * `session` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSession.t`, *default:* `nil`) - Required. The Session to update. + * `updateMask` (*type:* `String.t`, *default:* `nil`) - Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :session => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSession.t() | nil, + :updateMask => String.t() | nil + } + + field(:session, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSession) + field(:updateMask) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest 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/v1/model/google_cloud_discoveryengine_v1beta_search_request_data_store_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_search_request_data_store_spec.ex index e7310a2563..1fa461fdb4 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_search_request_data_store_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_search_request_data_store_spec.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSea ## Attributes + * `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t`, *default:* `nil`) - Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) * `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}`. * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) """ @@ -28,10 +29,17 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSea use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :boostSpec => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t() + | nil, :dataStore => String.t() | nil, :filter => String.t() | nil } + field(:boostSpec, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec + ) + field(:dataStore) field(:filter) 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 b6d5a967dc..31b44ed3c5 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 @@ -4298,6 +4298,85 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do ) end + @doc """ + Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream. + + ## 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/*/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.GoogleCloudDiscoveryengineV1betaAnswerQueryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_data_stores_serving_configs_stream_answer( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_data_stores_serving_configs_stream_answer( + 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}:streamAnswer", %{ + "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.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{} + ] + ) + end + @doc """ Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. @@ -4468,6 +4547,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do * `: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"). + * `:includeAnswerDetails` (*type:* `boolean()`) - Optional. If set to true, the full session including all answer details will be returned. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -4503,7 +4583,8 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :includeAnswerDetails => :query } request = @@ -6204,7 +6285,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do ## 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}`. + * `parent` (*type:* `String.t`) - Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -8766,6 +8847,85 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do ) end + @doc """ + Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream. + + ## 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/*/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.GoogleCloudDiscoveryengineV1betaAnswerQueryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_collections_engines_serving_configs_stream_answer( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_collections_engines_serving_configs_stream_answer( + 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}:streamAnswer", %{ + "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.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{} + ] + ) + end + @doc """ Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. @@ -8936,6 +9096,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do * `: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"). + * `:includeAnswerDetails` (*type:* `boolean()`) - Optional. If set to true, the full session including all answer details will be returned. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -8971,7 +9132,8 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :includeAnswerDetails => :query } request = @@ -13136,6 +13298,85 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do ) end + @doc """ + Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream. + + ## 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/*/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.GoogleCloudDiscoveryengineV1betaAnswerQueryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec discoveryengine_projects_locations_data_stores_serving_configs_stream_answer( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def discoveryengine_projects_locations_data_stores_serving_configs_stream_answer( + 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}:streamAnswer", %{ + "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.GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{} + ] + ) + end + @doc """ Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned. @@ -13306,6 +13547,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do * `: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"). + * `:includeAnswerDetails` (*type:* `boolean()`) - Optional. If set to true, the full session including all answer details will be returned. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -13341,7 +13583,8 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :includeAnswerDetails => :query } request = @@ -14656,7 +14899,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do ## 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}`. + * `parent` (*type:* `String.t`) - Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -16746,7 +16989,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Api.Projects do ## 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}`. + * `parent` (*type:* `String.t`) - Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. 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 ed7284b2f5..5d764b5384 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 "20241123" + @discovery_revision "20241205" def discovery_revision(), do: @discovery_revision end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec.ex new file mode 100644 index 0000000000..2d74a77f5e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec.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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec do + @moduledoc """ + A specification for configuring the behavior of content search. + + ## Attributes + + * `chunkSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec.t`, *default:* `nil`) - Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS + * `extractiveContentSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec.t`, *default:* `nil`) - If there is no extractive_content_spec provided, there will be no extractive answer in the search response. + * `searchResultMode` (*type:* `String.t`, *default:* `nil`) - Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. + * `snippetSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec.t`, *default:* `nil`) - If `snippetSpec` is not specified, snippets are not included in the search response. + * `summarySpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec.t`, *default:* `nil`) - If `summarySpec` is not specified, summaries are not included in the search response. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :chunkSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec.t() + | nil, + :extractiveContentSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec.t() + | nil, + :searchResultMode => String.t() | nil, + :snippetSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec.t() + | nil, + :summarySpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec.t() + | nil + } + + field(:chunkSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec + ) + + field(:extractiveContentSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec + ) + + field(:searchResultMode) + + field(:snippetSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec + ) + + field(:summarySpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec 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_search_request_content_search_spec_chunk_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_chunk_spec.ex new file mode 100644 index 0000000000..95fbc209b4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_chunk_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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec do + @moduledoc """ + Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS + + ## Attributes + + * `numNextChunks` (*type:* `integer()`, *default:* `nil`) - The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned. + * `numPreviousChunks` (*type:* `integer()`, *default:* `nil`) - The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :numNextChunks => integer() | nil, + :numPreviousChunks => integer() | nil + } + + field(:numNextChunks) + field(:numPreviousChunks) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec 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_search_request_content_search_spec_extractive_content_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_extractive_content_spec.ex new file mode 100644 index 0000000000..8a874b8fc3 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_extractive_content_spec.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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec 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. + * `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, contact your Customer Engineer. The default value is `false`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :maxExtractiveAnswerCount => integer() | nil, + :maxExtractiveSegmentCount => integer() | nil, + :numNextSegments => integer() | nil, + :numPreviousSegments => integer() | nil, + :returnExtractiveSegmentScore => boolean() | nil + } + + field(:maxExtractiveAnswerCount) + field(:maxExtractiveSegmentCount) + field(:numNextSegments) + field(:numPreviousSegments) + field(:returnExtractiveSegmentScore) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec 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_search_request_content_search_spec_snippet_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_snippet_spec.ex new file mode 100644 index 0000000000..ee00f8bdb3 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec 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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec 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_search_request_content_search_spec_summary_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_summary_spec.ex new file mode 100644 index 0000000000..0ce69dc442 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_summary_spec.ex @@ -0,0 +1,93 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec 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. + * `ignoreJailBreakingQuery` (*type:* `boolean()`, *default:* `nil`) - Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. "Reply in the tone of a competing company's CEO". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead. + * `ignoreLowRelevantContent` (*type:* `boolean()`, *default:* `nil`) - Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers. + * `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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec.t`, *default:* `nil`) - If specified, the spec will be used to modify the prompt provided to the LLM. + * `modelSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec.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 for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + * `useSemanticChunks` (*type:* `boolean()`, *default:* `nil`) - If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :ignoreAdversarialQuery => boolean() | nil, + :ignoreJailBreakingQuery => boolean() | nil, + :ignoreLowRelevantContent => boolean() | nil, + :ignoreNonSummarySeekingQuery => boolean() | nil, + :includeCitations => boolean() | nil, + :languageCode => String.t() | nil, + :modelPromptSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec.t() + | nil, + :modelSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec.t() + | nil, + :summaryResultCount => integer() | nil, + :useSemanticChunks => boolean() | nil + } + + field(:ignoreAdversarialQuery) + field(:ignoreJailBreakingQuery) + field(:ignoreLowRelevantContent) + field(:ignoreNonSummarySeekingQuery) + field(:includeCitations) + field(:languageCode) + + field(:modelPromptSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec + ) + + field(:modelSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec + ) + + field(:summaryResultCount) + field(:useSemanticChunks) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec 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_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_v1_search_request_content_search_spec_summary_spec_model_prompt_spec.ex new file mode 100644 index 0000000000..6a43e57bfc --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec 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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec 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_search_request_content_search_spec_summary_spec_model_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_request_content_search_spec_summary_spec_model_spec.ex new file mode 100644 index 0000000000..49e8cfeed4 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec 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 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 + + @type t :: %__MODULE__{ + :version => String.t() | nil + } + + field(:version) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec 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_serving_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_serving_config.ex new file mode 100644 index 0000000000..953af925ed --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_serving_config.ex @@ -0,0 +1,119 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfig 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. + * `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.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig.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.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig.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. + * `promoteControlIds` (*type:* `list(String.t)`, *default:* `nil`) - Condition promote specifications. Maximum number of specifications is 100. + * `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, + :filterControlIds => list(String.t()) | nil, + :genericConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig.t() + | nil, + :ignoreControlIds => list(String.t()) | nil, + :mediaConfig => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig.t() + | nil, + :modelId => String.t() | nil, + :name => String.t() | nil, + :onewaySynonymsControlIds => list(String.t()) | nil, + :promoteControlIds => 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(:filterControlIds, type: :list) + + field(:genericConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + ) + + field(:ignoreControlIds, type: :list) + + field(:mediaConfig, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + ) + + field(:modelId) + field(:name) + field(:onewaySynonymsControlIds, type: :list) + field(:promoteControlIds, 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.GoogleCloudDiscoveryengineV1ServingConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfig 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_serving_config_generic_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_serving_config_generic_config.ex new file mode 100644 index 0000000000..e73b9742cb --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_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.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig 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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec.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.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec.t() + | nil + } + + field(:contentSearchSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigGenericConfig 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_serving_config_media_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_serving_config_media_config.ex new file mode 100644 index 0000000000..30db28d91b --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_serving_config_media_config.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.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig 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. + * `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. + * `demoteContentWatchedPastDays` (*type:* `integer()`, *default:* `nil`) - Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days. + * `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, + :contentWatchedPercentageThreshold => number() | nil, + :contentWatchedSecondsThreshold => number() | nil, + :demoteContentWatchedPastDays => integer() | nil, + :demotionEventType => String.t() | nil + } + + field(:contentFreshnessCutoffDays) + field(:contentWatchedPercentageThreshold) + field(:contentWatchedSecondsThreshold) + field(:demoteContentWatchedPastDays) + field(:demotionEventType) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ServingConfigMediaConfig 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_answer.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_answer.ex index 64a43e5ccf..4a01153719 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_answer.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_answer.ex @@ -26,6 +26,8 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp * `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitation.t)`, *default:* `nil`) - Citations. * `completeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer completed timestamp. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer creation timestamp. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + * `groundingSupports` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport.t)`, *default:* `nil`) - Optional. Grounding supports. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` * `queryUnderstandingInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo.t`, *default:* `nil`) - Query understanding information. * `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerReference.t)`, *default:* `nil`) - References. @@ -46,6 +48,12 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp | nil, :completeTime => DateTime.t() | nil, :createTime => DateTime.t() | nil, + :groundingScore => float() | nil, + :groundingSupports => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport.t() + ) + | nil, :name => String.t() | nil, :queryUnderstandingInfo => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo.t() @@ -74,6 +82,14 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp field(:completeTime, as: DateTime) field(:createTime, as: DateTime) + field(:groundingScore) + + field(:groundingSupports, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport, + type: :list + ) + field(:name) field(:queryUnderstandingInfo, diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_answer_grounding_support.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_answer_grounding_support.ex new file mode 100644 index 0000000000..f926bae54a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_answer_grounding_support.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.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport do + @moduledoc """ + Grounding support for a claim in `answer_text`. + + ## Attributes + + * `endIndex` (*type:* `String.t`, *default:* `nil`) - Required. End of the claim, exclusive. + * `groundingCheckRequired` (*type:* `boolean()`, *default:* `nil`) - Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + * `sources` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitationSource.t)`, *default:* `nil`) - Optional. Citation sources for the claim. + * `startIndex` (*type:* `String.t`, *default:* `nil`) - Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endIndex => String.t() | nil, + :groundingCheckRequired => boolean() | nil, + :groundingScore => float() | nil, + :sources => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitationSource.t() + ) + | nil, + :startIndex => String.t() | nil + } + + field(:endIndex) + field(:groundingCheckRequired) + field(:groundingScore) + + field(:sources, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerCitationSource, + type: :list + ) + + field(:startIndex) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport 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_session_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_session_request.ex new file mode 100644 index 0000000000..d5cc368dde --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_delete_session_request.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.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest do + @moduledoc """ + Request for DeleteSession method. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest 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_get_session_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_get_session_request.ex new file mode 100644 index 0000000000..2ee73710b8 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_get_session_request.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.GoogleCloudDiscoveryengineV1alphaGetSessionRequest do + @moduledoc """ + Request for GetSession method. + + ## Attributes + + * `includeAnswerDetails` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, the full session including all answer details will be returned. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :includeAnswerDetails => boolean() | nil, + :name => String.t() | nil + } + + field(:includeAnswerDetails) + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaGetSessionRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaGetSessionRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaGetSessionRequest 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_list_sessions_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_list_sessions_request.ex new file mode 100644 index 0000000000..d52dd71c51 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_list_sessions_request.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.GoogleCloudDiscoveryengineV1alphaListSessionsRequest do + @moduledoc """ + Request for ListSessions method. + + ## Attributes + + * `filter` (*type:* `String.t`, *default:* `nil`) - 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`, *default:* `nil`) - 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` * `session_name` Example: "update_time desc" "create_time" + * `pageSize` (*type:* `integer()`, *default:* `nil`) - Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + * `pageToken` (*type:* `String.t`, *default:* `nil`) - A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page. + * `parent` (*type:* `String.t`, *default:* `nil`) - Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :filter => String.t() | nil, + :orderBy => String.t() | nil, + :pageSize => integer() | nil, + :pageToken => String.t() | nil, + :parent => String.t() | nil + } + + field(:filter) + field(:orderBy) + field(:pageSize) + field(:pageToken) + field(:parent) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaListSessionsRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaListSessionsRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaListSessionsRequest 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_list_sessions_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_list_sessions_response.ex new file mode 100644 index 0000000000..48b7891adb --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_list_sessions_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.GoogleCloudDiscoveryengineV1alphaListSessionsResponse do + @moduledoc """ + Response for ListSessions method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Pagination token, if not returned indicates the last page. + * `sessions` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSession.t)`, *default:* `nil`) - All the Sessions for a given data store. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :sessions => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSession.t() + ) + | nil + } + + field(:nextPageToken) + + field(:sessions, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSession, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaListSessionsResponse do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaListSessionsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaListSessionsResponse 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_search_request_data_store_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_search_request_data_store_spec.ex index 98ea22a69b..81efa2bc26 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_search_request_data_store_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_search_request_data_store_spec.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp ## Attributes + * `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec.t`, *default:* `nil`) - Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) * `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}`. * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) """ @@ -28,10 +29,18 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :boostSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec.t() + | nil, :dataStore => String.t() | nil, :filter => String.t() | nil } + field(:boostSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec + ) + field(:dataStore) field(:filter) end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_session.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_session.ex index 7ced524f5b..3d267070bd 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_session.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_session.ex @@ -21,7 +21,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp ## Attributes + * `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session finished. + * `isPinned` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session started. * `state` (*type:* `String.t`, *default:* `nil`) - The state of the session. @@ -32,7 +34,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :displayName => String.t() | nil, :endTime => DateTime.t() | nil, + :isPinned => boolean() | nil, :name => String.t() | nil, :startTime => DateTime.t() | nil, :state => String.t() | nil, @@ -44,7 +48,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp :userPseudoId => String.t() | nil } + field(:displayName) field(:endTime, as: DateTime) + field(:isPinned) field(:name) field(:startTime, as: DateTime) field(:state) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_session_request.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_session_request.ex new file mode 100644 index 0000000000..4e225a5c9e --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_update_session_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.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest do + @moduledoc """ + Request for UpdateSession method. + + ## Attributes + + * `session` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSession.t`, *default:* `nil`) - Required. The Session to update. + * `updateMask` (*type:* `String.t`, *default:* `nil`) - Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :session => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSession.t() + | nil, + :updateMask => String.t() | nil + } + + field(:session, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSession + ) + + field(:updateMask) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest 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_answer.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer.ex index 2a39b4aeb8..ee18d52a76 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer.ex @@ -26,6 +26,8 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `citations` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerCitation.t)`, *default:* `nil`) - Citations. * `completeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer completed timestamp. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Answer creation timestamp. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. + * `groundingSupports` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport.t)`, *default:* `nil`) - Optional. Grounding supports. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` * `queryUnderstandingInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo.t`, *default:* `nil`) - Query understanding information. * `references` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerReference.t)`, *default:* `nil`) - References. @@ -46,6 +48,12 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet | nil, :completeTime => DateTime.t() | nil, :createTime => DateTime.t() | nil, + :groundingScore => float() | nil, + :groundingSupports => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport.t() + ) + | nil, :name => String.t() | nil, :queryUnderstandingInfo => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo.t() @@ -74,6 +82,14 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet field(:completeTime, as: DateTime) field(:createTime, as: DateTime) + field(:groundingScore) + + field(:groundingSupports, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport, + type: :list + ) + field(:name) field(:queryUnderstandingInfo, diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_grounding_support.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_grounding_support.ex new file mode 100644 index 0000000000..075bcf8227 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_grounding_support.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.GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport do + @moduledoc """ + Grounding support for a claim in `answer_text`. + + ## Attributes + + * `endIndex` (*type:* `String.t`, *default:* `nil`) - Required. End of the claim, exclusive. + * `groundingCheckRequired` (*type:* `boolean()`, *default:* `nil`) - Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned. + * `groundingScore` (*type:* `float()`, *default:* `nil`) - A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. + * `sources` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerCitationSource.t)`, *default:* `nil`) - Optional. Citation sources for the claim. + * `startIndex` (*type:* `String.t`, *default:* `nil`) - Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endIndex => String.t() | nil, + :groundingCheckRequired => boolean() | nil, + :groundingScore => float() | nil, + :sources => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerCitationSource.t() + ) + | nil, + :startIndex => String.t() | nil + } + + field(:endIndex) + field(:groundingCheckRequired) + field(:groundingScore) + + field(:sources, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerCitationSource, + type: :list + ) + + field(:startIndex) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport 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_answer_query_request_query_understanding_spec_query_rephraser_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_query_understanding_spec_query_rephraser_spec.ex index a4f4141de8..ec50772cd2 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_query_understanding_spec_query_rephraser_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_query_understanding_spec_query_rephraser_spec.ex @@ -23,17 +23,26 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `disable` (*type:* `boolean()`, *default:* `nil`) - Disable query rephraser. * `maxRephraseSteps` (*type:* `integer()`, *default:* `nil`) - Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default. + * `modelSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t`, *default:* `nil`) - Optional. Query Rephraser Model specification. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :disable => boolean() | nil, - :maxRephraseSteps => integer() | nil + :maxRephraseSteps => integer() | nil, + :modelSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.t() + | nil } field(:disable) field(:maxRephraseSteps) + + field(:modelSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + ) end defimpl Poison.Decoder, diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_query_understanding_spec_query_rephraser_spec_model_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_query_understanding_spec_query_rephraser_spec_model_spec.ex new file mode 100644 index 0000000000..7823a574b1 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_query_understanding_spec_query_rephraser_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.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do + @moduledoc """ + Query Rephraser Model specification. + + ## Attributes + + * `modelType` (*type:* `String.t`, *default:* `nil`) - Optional. Enabled query rephraser model type. If not set, it will use LARGE by default. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :modelType => String.t() | nil + } + + field(:modelType) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec 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_answer_query_request_safety_spec.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_safety_spec.ex index dc0f6cab56..39eb842c51 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_safety_spec.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_answer_query_request_safety_spec.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec do @moduledoc """ - Safety specification. + Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied. ## Attributes diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_fhir_store_source.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_fhir_store_source.ex index 49c1e8f719..80828f8e9d 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_fhir_store_source.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_fhir_store_source.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `fhirStore` (*type:* `String.t`, *default:* `nil`) - Required. The full resource name of the FHIR store to import data from, in the format of `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. * `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 FhirStore export to a specific Cloud Storage directory. * `resourceTypes` (*type:* `list(String.t)`, *default:* `nil`) - The FHIR resource types to import. The resource types should be a subset of all [supported FHIR resource types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). Default to all supported FHIR resource types if empty. + * `updateFromLatestPredefinedSchema` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet @type t :: %__MODULE__{ :fhirStore => String.t() | nil, :gcsStagingDir => String.t() | nil, - :resourceTypes => list(String.t()) | nil + :resourceTypes => list(String.t()) | nil, + :updateFromLatestPredefinedSchema => boolean() | nil } field(:fhirStore) field(:gcsStagingDir) field(:resourceTypes, type: :list) + field(:updateFromLatestPredefinedSchema) end defimpl Poison.Decoder, 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 index eefb1dabf6..07b9154e15 100644 --- 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 @@ -21,6 +21,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ## Attributes + * `boostSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t`, *default:* `nil`) - Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) * `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}`. * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) """ @@ -28,10 +29,18 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :boostSpec => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec.t() + | nil, :dataStore => String.t() | nil, :filter => String.t() | nil } + field(:boostSpec, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec + ) + field(:dataStore) field(:filter) end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_session.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_session.ex index 220be37e36..7527e4cbab 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_session.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_session.ex @@ -21,7 +21,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet ## Attributes + * `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session finished. + * `isPinned` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the session started. * `state` (*type:* `String.t`, *default:* `nil`) - The state of the session. @@ -32,7 +34,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :displayName => String.t() | nil, :endTime => DateTime.t() | nil, + :isPinned => boolean() | nil, :name => String.t() | nil, :startTime => DateTime.t() | nil, :state => String.t() | nil, @@ -44,7 +48,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet :userPseudoId => String.t() | nil } + field(:displayName) field(:endTime, as: DateTime) + field(:isPinned) field(:name) field(:startTime, as: DateTime) field(:state) diff --git a/clients/discovery_engine/mix.exs b/clients/discovery_engine/mix.exs index bab8d55c94..197641894d 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.25.0" + @version "0.26.0" def project() do [