Skip to content

Commit

Permalink
feat: Automated regeneration of Content client (#12735)
Browse files Browse the repository at this point in the history
Auto-created at 2024-12-18 13:13:21 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Dec 18, 2024
1 parent 079a3c8 commit cfe4d85
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/content/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_content, "~> 0.72"}]
[{:google_api_content, "~> 0.73"}]
end
```

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

@discovery_revision "20241120"
@discovery_revision "20241217"

def discovery_revision(), do: @discovery_revision
end
9 changes: 9 additions & 0 deletions clients/content/lib/google_api/content/v21/model/product.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ defmodule GoogleApi.Content.V21.Model.Product do
* `productHighlights` (*type:* `list(String.t)`, *default:* `nil`) - Bullet points describing the most relevant highlights of a product.
* `sizeType` (*type:* `String.t`, *default:* `nil`) - The cut of the item. Recommended for apparel items.
* `customAttributes` (*type:* `list(GoogleApi.Content.V21.Model.CustomAttribute.t)`, *default:* `nil`) - A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (for example, `{ "name": "size type", "value": "regular" }`). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google (formerly known as Shopping Actions).
* `sustainabilityIncentives` (*type:* `list(GoogleApi.Content.V21.Model.ProductSustainabilityIncentive.t)`, *default:* `nil`) - Optional. The list of sustainability incentive programs.
* `pickupSla` (*type:* `String.t`, *default:* `nil`) - Item store pickup timeline. Acceptable values are: - "`same day`" - "`next day`" - "`2-day`" - "`3-day`" - "`4-day`" - "`5-day`" - "`6-day`" - "`7-day`" - "`multi-week`"
* `expirationDate` (*type:* `String.t`, *default:* `nil`) - Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in `productstatuses` as `googleExpirationDate` and might be earlier if `expirationDate` is too far in the future.
* `channel` (*type:* `String.t`, *default:* `nil`) - Required. The item's channel (online or local). Acceptable values are: - "`local`" - "`online`"
Expand Down Expand Up @@ -205,6 +206,8 @@ defmodule GoogleApi.Content.V21.Model.Product do
:productHighlights => list(String.t()) | nil,
:sizeType => String.t() | nil,
:customAttributes => list(GoogleApi.Content.V21.Model.CustomAttribute.t()) | nil,
:sustainabilityIncentives =>
list(GoogleApi.Content.V21.Model.ProductSustainabilityIncentive.t()) | nil,
:pickupSla => String.t() | nil,
:expirationDate => String.t() | nil,
:channel => String.t() | nil,
Expand Down Expand Up @@ -317,6 +320,12 @@ defmodule GoogleApi.Content.V21.Model.Product do
field(:productHighlights, type: :list)
field(:sizeType)
field(:customAttributes, as: GoogleApi.Content.V21.Model.CustomAttribute, type: :list)

field(:sustainabilityIncentives,
as: GoogleApi.Content.V21.Model.ProductSustainabilityIncentive,
type: :list
)

field(:pickupSla)
field(:expirationDate)
field(:channel)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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.Content.V21.Model.ProductSustainabilityIncentive do
@moduledoc """
Information regarding sustainability related incentive programs such as rebates or tax relief.
## Attributes
* `amount` (*type:* `GoogleApi.Content.V21.Model.Price.t`, *default:* `nil`) - Optional. The fixed amount of the incentive.
* `percentage` (*type:* `float()`, *default:* `nil`) - Optional. The percentage of the sale price that the incentive is applied to.
* `type` (*type:* `String.t`, *default:* `nil`) - Required. Sustainability incentive program.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:amount => GoogleApi.Content.V21.Model.Price.t() | nil,
:percentage => float() | nil,
:type => String.t() | nil
}

field(:amount, as: GoogleApi.Content.V21.Model.Price)
field(:percentage)
field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.Content.V21.Model.ProductSustainabilityIncentive do
def decode(value, options) do
GoogleApi.Content.V21.Model.ProductSustainabilityIncentive.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Content.V21.Model.ProductSustainabilityIncentive do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
2 changes: 1 addition & 1 deletion clients/content/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Content.Mixfile do
use Mix.Project

@version "0.72.1"
@version "0.73.0"

def project() do
[
Expand Down

0 comments on commit cfe4d85

Please sign in to comment.