diff --git a/clients/discovery_engine/README.md b/clients/discovery_engine/README.md index 6983cd9894..93950e68c5 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.24"}] + [{:google_api_discovery_engine, "~> 0.25"}] end ``` 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 ca7c951edd..9699db9096 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 "20241118" + @discovery_revision "20241123" def discovery_revision(), do: @discovery_revision end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_control.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_control.ex index 5ab561edc9..14297e21ae 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_control.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_control.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Control * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. * `filterAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlFilterAction.t`, *default:* `nil`) - Defines a filter-type control Currently not supported by Recommendation * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` + * `promoteAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction.t`, *default:* `nil`) - Promote certain links based on predefined trigger queries. This now only supports basic site search. * `redirectAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlRedirectAction.t`, *default:* `nil`) - Defines a redirect-type control. * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. * `synonymsAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlSynonymsAction.t`, *default:* `nil`) - Treats a group of terms as synonyms of one another. @@ -48,6 +49,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Control GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlFilterAction.t() | nil, :name => String.t() | nil, + :promoteAction => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction.t() + | nil, :redirectAction => GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlRedirectAction.t() | nil, @@ -77,6 +81,10 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1Control field(:name) + field(:promoteAction, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction + ) + field(:redirectAction, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlRedirectAction ) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_control_promote_action.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_control_promote_action.ex new file mode 100644 index 0000000000..b3ce386b43 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_control_promote_action.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.V1.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction do + @moduledoc """ + Promote certain links based on some trigger queries. Example: Promote shoe store link when searching for `shoe` keyword. The link can be outside of associated data store. + + ## Attributes + + * `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Data store with which this promotion is attached to. + * `searchLinkPromotion` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.t`, *default:* `nil`) - Required. Promotion attached to this action. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStore => String.t() | nil, + :searchLinkPromotion => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.t() + | nil + } + + field(:dataStore) + + field(:searchLinkPromotion, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction do + 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_search_link_promotion.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_link_promotion.ex new file mode 100644 index 0000000000..9e99e46304 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_link_promotion.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.GoogleCloudDiscoveryengineV1SearchLinkPromotion do + @moduledoc """ + Promotion proto includes uri and other helping information to display the promotion. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. The Promotion description. Maximum length: 200 characters. + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. + * `imageUri` (*type:* `String.t`, *default:* `nil`) - Optional. The promotion thumbnail image url. + * `title` (*type:* `String.t`, *default:* `nil`) - Required. The title of the promotion. Maximum length: 160 characters. + * `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URL for the page the user wants to promote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :enabled => boolean() | nil, + :imageUri => String.t() | nil, + :title => String.t() | nil, + :uri => String.t() | nil + } + + field(:description) + field(:enabled) + field(:imageUri) + field(:title) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion do + 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_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_response.ex index 66045c5f68..78da854cce 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_response.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1_search_response.ex @@ -28,6 +28,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR * `queryExpansionInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponseQueryExpansionInfo.t`, *default:* `nil`) - Query expansion information for the returned results. * `redirectUri` (*type:* `String.t`, *default:* `nil`) - The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response. * `results` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponseSearchResult.t)`, *default:* `nil`) - A list of matched documents. The order represents the ranking. + * `searchLinkPromotions` (*type:* `list(GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.t)`, *default:* `nil`) - Promotions for site search. * `sessionInfo` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponseSessionInfo.t`, *default:* `nil`) - Session information. Only set if SearchRequest.session is provided. See its description for more details. * `summary` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponseSummary.t`, *default:* `nil`) - A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set. * `totalSize` (*type:* `integer()`, *default:* `nil`) - The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches. @@ -53,6 +54,11 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponseSearchResult.t() ) | nil, + :searchLinkPromotions => + list( + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.t() + ) + | nil, :sessionInfo => GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponseSessionInfo.t() | nil, @@ -84,6 +90,11 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchR type: :list ) + field(:searchLinkPromotions, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion, + type: :list + ) + field(:sessionInfo, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1SearchResponseSessionInfo ) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_control.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_control.ex index 930cb3878d..1416eabcbb 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_control.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_control.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaCo * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. * `filterAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlFilterAction.t`, *default:* `nil`) - Defines a filter-type control Currently not supported by Recommendation * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` + * `promoteAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction.t`, *default:* `nil`) - Promote certain links based on predefined trigger queries. This now only supports basic site search. * `redirectAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlRedirectAction.t`, *default:* `nil`) - Defines a redirect-type control. * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. * `synonymsAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlSynonymsAction.t`, *default:* `nil`) - Treats a group of terms as synonyms of one another. @@ -50,6 +51,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaCo GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlFilterAction.t() | nil, :name => String.t() | nil, + :promoteAction => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction.t() + | nil, :redirectAction => GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlRedirectAction.t() | nil, @@ -79,6 +83,10 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaCo field(:name) + field(:promoteAction, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction + ) + field(:redirectAction, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlRedirectAction ) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_control_promote_action.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_control_promote_action.ex new file mode 100644 index 0000000000..dfa528b405 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_control_promote_action.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.V1.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction do + @moduledoc """ + Promote certain links based on some trigger queries. Example: Promote shoe store link when searching for `shoe` keyword. The link can be outside of associated data store. + + ## Attributes + + * `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Data store with which this promotion is attached to. + * `searchLinkPromotion` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion.t`, *default:* `nil`) - Required. Promotion attached to this action. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStore => String.t() | nil, + :searchLinkPromotion => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion.t() + | nil + } + + field(:dataStore) + + field(:searchLinkPromotion, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction do + 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_link_promotion.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_search_link_promotion.ex new file mode 100644 index 0000000000..197cdc2f3a --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1alpha_search_link_promotion.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.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion do + @moduledoc """ + Promotion proto includes uri and other helping information to display the promotion. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. The Promotion description. Maximum length: 200 characters. + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. + * `imageUri` (*type:* `String.t`, *default:* `nil`) - Optional. The promotion thumbnail image url. + * `title` (*type:* `String.t`, *default:* `nil`) - Required. The title of the promotion. Maximum length: 160 characters. + * `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URL for the page the user wants to promote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :enabled => boolean() | nil, + :imageUri => String.t() | nil, + :title => String.t() | nil, + :uri => String.t() | nil + } + + field(:description) + field(:enabled) + field(:imageUri) + field(:title) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion do + 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_control.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_control.ex index 25b11b02b6..13d1aa3a3f 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_control.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_control.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCon * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. * `filterAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlFilterAction.t`, *default:* `nil`) - Defines a filter-type control Currently not supported by Recommendation * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` + * `promoteAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction.t`, *default:* `nil`) - Promote certain links based on predefined trigger queries. This now only supports basic site search. * `redirectAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlRedirectAction.t`, *default:* `nil`) - Defines a redirect-type control. * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. * `synonymsAction` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlSynonymsAction.t`, *default:* `nil`) - Treats a group of terms as synonyms of one another. @@ -48,6 +49,9 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCon GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlFilterAction.t() | nil, :name => String.t() | nil, + :promoteAction => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction.t() + | nil, :redirectAction => GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlRedirectAction.t() | nil, @@ -77,6 +81,10 @@ defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCon field(:name) + field(:promoteAction, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction + ) + field(:redirectAction, as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlRedirectAction ) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_control_promote_action.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_control_promote_action.ex new file mode 100644 index 0000000000..4ef971f339 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_control_promote_action.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.V1.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction do + @moduledoc """ + Promote certain links based on some trigger queries. Example: Promote shoe store link when searching for `shoe` keyword. The link can be outside of associated data store. + + ## Attributes + + * `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Data store with which this promotion is attached to. + * `searchLinkPromotion` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.t`, *default:* `nil`) - Required. Promotion attached to this action. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStore => String.t() | nil, + :searchLinkPromotion => + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.t() + | nil + } + + field(:dataStore) + + field(:searchLinkPromotion, + as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction do + 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_link_promotion.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_search_link_promotion.ex new file mode 100644 index 0000000000..35dd3800ff --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1/model/google_cloud_discoveryengine_v1beta_search_link_promotion.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.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion do + @moduledoc """ + Promotion proto includes uri and other helping information to display the promotion. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. The Promotion description. Maximum length: 200 characters. + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. + * `imageUri` (*type:* `String.t`, *default:* `nil`) - Optional. The promotion thumbnail image url. + * `title` (*type:* `String.t`, *default:* `nil`) - Required. The title of the promotion. Maximum length: 160 characters. + * `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URL for the page the user wants to promote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :enabled => boolean() | nil, + :imageUri => String.t() | nil, + :title => String.t() | nil, + :uri => String.t() | nil + } + + field(:description) + field(:enabled) + field(:imageUri) + field(:title) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/metadata.ex index 42beb2b88b..ed7284b2f5 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 "20241118" + @discovery_revision "20241123" def discovery_revision(), do: @discovery_revision end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_control.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_control.ex index 52de402167..b814b457e9 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_control.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_control.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Con * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. * `filterAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlFilterAction.t`, *default:* `nil`) - Defines a filter-type control Currently not supported by Recommendation * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` + * `promoteAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction.t`, *default:* `nil`) - Promote certain links based on predefined trigger queries. This now only supports basic site search. * `redirectAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlRedirectAction.t`, *default:* `nil`) - Defines a redirect-type control. * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. * `synonymsAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlSynonymsAction.t`, *default:* `nil`) - Treats a group of terms as synonyms of one another. @@ -48,6 +49,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Con GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlFilterAction.t() | nil, :name => String.t() | nil, + :promoteAction => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction.t() + | nil, :redirectAction => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlRedirectAction.t() | nil, @@ -77,6 +81,10 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1Con field(:name) + field(:promoteAction, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction + ) + field(:redirectAction, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlRedirectAction ) diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_control_promote_action.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_control_promote_action.ex new file mode 100644 index 0000000000..0b4cf1719d --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_control_promote_action.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.GoogleCloudDiscoveryengineV1ControlPromoteAction do + @moduledoc """ + Promote certain links based on some trigger queries. Example: Promote shoe store link when searching for `shoe` keyword. The link can be outside of associated data store. + + ## Attributes + + * `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Data store with which this promotion is attached to. + * `searchLinkPromotion` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.t`, *default:* `nil`) - Required. Promotion attached to this action. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStore => String.t() | nil, + :searchLinkPromotion => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.t() + | nil + } + + field(:dataStore) + + field(:searchLinkPromotion, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1ControlPromoteAction do + def encode(value, options) do + 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_link_promotion.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_link_promotion.ex new file mode 100644 index 0000000000..763fc1fd55 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1_search_link_promotion.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.GoogleCloudDiscoveryengineV1SearchLinkPromotion do + @moduledoc """ + Promotion proto includes uri and other helping information to display the promotion. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. The Promotion description. Maximum length: 200 characters. + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. + * `imageUri` (*type:* `String.t`, *default:* `nil`) - Optional. The promotion thumbnail image url. + * `title` (*type:* `String.t`, *default:* `nil`) - Required. The title of the promotion. Maximum length: 160 characters. + * `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URL for the page the user wants to promote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :enabled => boolean() | nil, + :imageUri => String.t() | nil, + :title => String.t() | nil, + :uri => String.t() | nil + } + + field(:description) + field(:enabled) + field(:imageUri) + field(:title) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1SearchLinkPromotion do + def encode(value, options) do + 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_control.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_control.ex index e6bc1def7f..5ce6703966 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_control.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_control.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. * `filterAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlFilterAction.t`, *default:* `nil`) - Defines a filter-type control Currently not supported by Recommendation * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` + * `promoteAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction.t`, *default:* `nil`) - Promote certain links based on predefined trigger queries. This now only supports basic site search. * `redirectAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlRedirectAction.t`, *default:* `nil`) - Defines a redirect-type control. * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. * `synonymsAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlSynonymsAction.t`, *default:* `nil`) - Treats a group of terms as synonyms of one another. @@ -50,6 +51,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlFilterAction.t() | nil, :name => String.t() | nil, + :promoteAction => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction.t() + | nil, :redirectAction => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlRedirectAction.t() | nil, @@ -80,6 +84,11 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alp field(:name) + field(:promoteAction, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction + ) + field(:redirectAction, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlRedirectAction diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_control_promote_action.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_control_promote_action.ex new file mode 100644 index 0000000000..80dcf362d8 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_control_promote_action.ex @@ -0,0 +1,62 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction do + @moduledoc """ + Promote certain links based on some trigger queries. Example: Promote shoe store link when searching for `shoe` keyword. The link can be outside of associated data store. + + ## Attributes + + * `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Data store with which this promotion is attached to. + * `searchLinkPromotion` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion.t`, *default:* `nil`) - Required. Promotion attached to this action. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStore => String.t() | nil, + :searchLinkPromotion => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion.t() + | nil + } + + field(:dataStore) + + field(:searchLinkPromotion, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaControlPromoteAction do + def encode(value, options) do + 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_link_promotion.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_search_link_promotion.ex new file mode 100644 index 0000000000..95836111aa --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1alpha_search_link_promotion.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.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion do + @moduledoc """ + Promotion proto includes uri and other helping information to display the promotion. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. The Promotion description. Maximum length: 200 characters. + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. + * `imageUri` (*type:* `String.t`, *default:* `nil`) - Optional. The promotion thumbnail image url. + * `title` (*type:* `String.t`, *default:* `nil`) - Required. The title of the promotion. Maximum length: 160 characters. + * `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URL for the page the user wants to promote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :enabled => boolean() | nil, + :imageUri => String.t() | nil, + :title => String.t() | nil, + :uri => String.t() | nil + } + + field(:description) + field(:enabled) + field(:imageUri) + field(:title) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSearchLinkPromotion do + def encode(value, options) do + 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_control.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_control.ex index 43d722c794..5bbf3f021a 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_control.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_control.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown. * `filterAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlFilterAction.t`, *default:* `nil`) - Defines a filter-type control Currently not supported by Recommendation * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*` + * `promoteAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction.t`, *default:* `nil`) - Promote certain links based on predefined trigger queries. This now only supports basic site search. * `redirectAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlRedirectAction.t`, *default:* `nil`) - Defines a redirect-type control. * `solutionType` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown. * `synonymsAction` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlSynonymsAction.t`, *default:* `nil`) - Treats a group of terms as synonyms of one another. @@ -50,6 +51,9 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlFilterAction.t() | nil, :name => String.t() | nil, + :promoteAction => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction.t() + | nil, :redirectAction => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlRedirectAction.t() | nil, @@ -79,6 +83,11 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet field(:name) + field(:promoteAction, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction + ) + field(:redirectAction, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlRedirectAction diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_control_promote_action.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_control_promote_action.ex new file mode 100644 index 0000000000..9b634566d9 --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_control_promote_action.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.GoogleCloudDiscoveryengineV1betaControlPromoteAction do + @moduledoc """ + Promote certain links based on some trigger queries. Example: Promote shoe store link when searching for `shoe` keyword. The link can be outside of associated data store. + + ## Attributes + + * `dataStore` (*type:* `String.t`, *default:* `nil`) - Required. Data store with which this promotion is attached to. + * `searchLinkPromotion` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.t`, *default:* `nil`) - Required. Promotion attached to this action. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataStore => String.t() | nil, + :searchLinkPromotion => + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.t() + | nil + } + + field(:dataStore) + + field(:searchLinkPromotion, + as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaControlPromoteAction do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_link_promotion.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_link_promotion.ex new file mode 100644 index 0000000000..3cc7be80ef --- /dev/null +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_link_promotion.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.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion do + @moduledoc """ + Promotion proto includes uri and other helping information to display the promotion. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. The Promotion description. Maximum length: 200 characters. + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. + * `imageUri` (*type:* `String.t`, *default:* `nil`) - Optional. The promotion thumbnail image url. + * `title` (*type:* `String.t`, *default:* `nil`) - Required. The title of the promotion. Maximum length: 160 characters. + * `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URL for the page the user wants to promote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :enabled => boolean() | nil, + :imageUri => String.t() | nil, + :title => String.t() | nil, + :uri => String.t() | nil + } + + field(:description) + field(:enabled) + field(:imageUri) + field(:title) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion do + def decode(value, options) do + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response.ex index 37c25cc853..27e0bfc517 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_search_response.ex @@ -33,6 +33,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `queryExpansionInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo.t`, *default:* `nil`) - Query expansion information for the returned results. * `redirectUri` (*type:* `String.t`, *default:* `nil`) - The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response. * `results` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult.t)`, *default:* `nil`) - A list of matched documents. The order represents the ranking. + * `searchLinkPromotions` (*type:* `list(GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.t)`, *default:* `nil`) - Promotions for site search. * `sessionInfo` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo.t`, *default:* `nil`) - Session information. Only set if SearchRequest.session is provided. See its description for more details. * `summary` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSummary.t`, *default:* `nil`) - A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set. * `totalSize` (*type:* `integer()`, *default:* `nil`) - The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches. @@ -75,6 +76,11 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult.t() ) | nil, + :searchLinkPromotions => + list( + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion.t() + ) + | nil, :sessionInfo => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo.t() | nil, @@ -131,6 +137,12 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet type: :list ) + field(:searchLinkPromotions, + as: + GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchLinkPromotion, + type: :list + ) + field(:sessionInfo, as: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo diff --git a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config.ex b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config.ex index f4aaca4c5b..6e6afc3069 100644 --- a/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config.ex +++ b/clients/discovery_engine/lib/google_api/discovery_engine/v1beta/model/google_cloud_discoveryengine_v1beta_serving_config.ex @@ -35,6 +35,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet * `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. * `personalizationSpec` (*type:* `GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestPersonalizationSpec.t`, *default:* `nil`) - The specification for personalization spec. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set, SearchRequest.personalization_spec overrides ServingConfig.personalization_spec. + * `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. @@ -68,6 +69,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet :personalizationSpec => GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestPersonalizationSpec.t() | nil, + :promoteControlIds => list(String.t()) | nil, :rankingExpression => String.t() | nil, :redirectControlIds => list(String.t()) | nil, :replacementControlIds => list(String.t()) | nil, @@ -109,6 +111,7 @@ defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1bet GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1betaSearchRequestPersonalizationSpec ) + field(:promoteControlIds, type: :list) field(:rankingExpression) field(:redirectControlIds, type: :list) field(:replacementControlIds, type: :list) diff --git a/clients/discovery_engine/mix.exs b/clients/discovery_engine/mix.exs index c7ee81062b..bab8d55c94 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.24.1" + @version "0.25.0" def project() do [