Skip to content

Commit

Permalink
feat: Automated regeneration of DiscoveryEngine client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Nov 23, 2024
1 parent 03c2570 commit be91719
Show file tree
Hide file tree
Showing 25 changed files with 815 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clients/discovery_engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down Expand Up @@ -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
)
Expand Down
Loading

0 comments on commit be91719

Please sign in to comment.