Skip to content

Commit

Permalink
feat: Automated regeneration of Retail client (#12434)
Browse files Browse the repository at this point in the history
Auto-created at 2024-10-30 13:13:05 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Oct 30, 2024
1 parent 4dd9fa5 commit cd442ed
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/retail/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_retail, "~> 0.17"}]
[{:google_api_retail, "~> 0.18"}]
end
```

Expand Down
2 changes: 1 addition & 1 deletion clients/retail/lib/google_api/retail/v2/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Retail.V2 do
API client metadata for GoogleApi.Retail.V2.
"""

@discovery_revision "20241017"
@discovery_revision "20241024"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata do
@moduledoc """
Metadata for pinning to be returned in the response. This is used for distinguishing between applied vs dropped pins.
## Attributes
* `allMatchedPins` (*type:* `%{optional(String.t) => GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t}`, *default:* `nil`) - Map of all matched pins, keyed by pin position.
* `droppedPins` (*type:* `%{optional(String.t) => GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t}`, *default:* `nil`) - Map of pins that were dropped due to overlap with other matching pins, keyed by pin position.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:allMatchedPins =>
%{
optional(String.t()) =>
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t()
}
| nil,
:droppedPins =>
%{
optional(String.t()) =>
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t()
}
| nil
}

field(:allMatchedPins,
as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins,
type: :map
)

field(:droppedPins,
as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins,
type: :map
)
end

defimpl Poison.Decoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata do
def decode(value, options) do
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata 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,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.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins do
@moduledoc """
List of product ids which have associated pins.
## Attributes
* `productId` (*type:* `list(String.t)`, *default:* `nil`) - List of product ids which have associated pins.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:productId => list(String.t()) | nil
}

field(:productId, type: :list)
end

defimpl Poison.Decoder,
for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins do
def decode(value, options) do
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins 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 @@ -29,6 +29,7 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponse do
* `facets` (*type:* `list(GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseFacet.t)`, *default:* `nil`) - Results of facets requested by user.
* `invalidConditionBoostSpecs` (*type:* `list(GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec.t)`, *default:* `nil`) - The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
* `pinControlMetadata` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata.t`, *default:* `nil`) - Metadata for pin controls which were applicable to the request. This contains two map fields, one for all matched pins and one for pins which were matched but not applied. The two maps are keyed by pin position, and the values are the product ids which were matched to that pin.
* `queryExpansionInfo` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseQueryExpansionInfo.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.Retail.V2.Model.GoogleCloudRetailV2SearchResponseSearchResult.t)`, *default:* `nil`) - A list of matched items. The order represents the ranking.
Expand All @@ -55,6 +56,8 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponse do
)
| nil,
:nextPageToken => String.t() | nil,
:pinControlMetadata =>
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata.t() | nil,
:queryExpansionInfo =>
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseQueryExpansionInfo.t()
| nil,
Expand Down Expand Up @@ -90,6 +93,7 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponse do
)

field(:nextPageToken)
field(:pinControlMetadata, as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata)

field(:queryExpansionInfo,
as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseQueryExpansionInfo
Expand Down
2 changes: 1 addition & 1 deletion clients/retail/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Retail.Mixfile do
use Mix.Project

@version "0.17.0"
@version "0.18.0"

def project() do
[
Expand Down

0 comments on commit cd442ed

Please sign in to comment.