From 377d188e385c2d56e8f42114bf883dc1db64f3d1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 01:15:43 +0000 Subject: [PATCH] feat: Automated regeneration of Manufacturers client --- .../manufacturers/v1/api/accounts.ex | 290 ++++++++++++++++++ .../google_api/manufacturers/v1/metadata.ex | 2 +- .../manufacturers/v1/model/attributes.ex | 14 + .../manufacturers/v1/model/certification.ex | 64 ++++ ..._manufacturers_v1_product_certification.ex | 57 ++++ .../list_product_certifications_response.ex | 54 ++++ .../v1/model/product_certification.ex | 74 +++++ 7 files changed, 554 insertions(+), 1 deletion(-) create mode 100644 clients/manufacturers/lib/google_api/manufacturers/v1/model/certification.ex create mode 100644 clients/manufacturers/lib/google_api/manufacturers/v1/model/google_shopping_manufacturers_v1_product_certification.ex create mode 100644 clients/manufacturers/lib/google_api/manufacturers/v1/model/list_product_certifications_response.ex create mode 100644 clients/manufacturers/lib/google_api/manufacturers/v1/model/product_certification.ex diff --git a/clients/manufacturers/lib/google_api/manufacturers/v1/api/accounts.ex b/clients/manufacturers/lib/google_api/manufacturers/v1/api/accounts.ex index de86a3a34c..a423050ebc 100644 --- a/clients/manufacturers/lib/google_api/manufacturers/v1/api/accounts.ex +++ b/clients/manufacturers/lib/google_api/manufacturers/v1/api/accounts.ex @@ -25,6 +25,296 @@ defmodule GoogleApi.Manufacturers.V1.Api.Accounts do @library_version Mix.Project.config() |> Keyword.get(:version, "") + @doc """ + Deletes a product certification by its name. This method can only be called by certification bodies. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Manufacturers.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the product certification to delete. Format: accounts/{account}/languages/{language_code}/productCertifications/{id} + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Manufacturers.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec manufacturers_accounts_languages_product_certifications_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Manufacturers.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def manufacturers_accounts_languages_product_certifications_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Manufacturers.V1.Model.Empty{}]) + end + + @doc """ + Gets a product certification by its name. This method can only be called by certification bodies. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Manufacturers.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the product certification to get. Format: accounts/{account}/languages/{language_code}/productCertifications/{id} + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Manufacturers.V1.Model.ProductCertification{}}` on success + * `{:error, info}` on failure + """ + @spec manufacturers_accounts_languages_product_certifications_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Manufacturers.V1.Model.ProductCertification.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def manufacturers_accounts_languages_product_certifications_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Manufacturers.V1.Model.ProductCertification{}]) + end + + @doc """ + Lists product certifications from a specified certification body. This method can only be called by certification bodies. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Manufacturers.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent, which owns this collection of product certifications. Format: accounts/{account}/languages/{language_code} + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of product certifications to return. The service may return fewer than this value. If unspecified, at most 50 product certifications will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListProductCertifications` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProductCertifications` must match the call that provided the page token. Required if requesting the second or higher page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Manufacturers.V1.Model.ListProductCertificationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec manufacturers_accounts_languages_product_certifications_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Manufacturers.V1.Model.ListProductCertificationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def manufacturers_accounts_languages_product_certifications_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/productCertifications", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Manufacturers.V1.Model.ListProductCertificationsResponse{}] + ) + end + + @doc """ + Updates (or creates if allow_missing = true) a product certification which links certifications with products. This method can only be called by certification bodies. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Manufacturers.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The unique name identifier of a product certification Format: accounts/{account}/languages/{language_code}/productCertifications/{id} Where `id` is a some unique identifier and `language_code` is a 2-letter ISO 639-1 code of a Shopping supported language according to https://support.google.com/merchants/answer/160637. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - Optional. The list of fields to update according to aip.dev/134. However, only full update is supported as of right now. Therefore, it can be either ignored or set to "*". Setting any other values will returns UNIMPLEMENTED error. + * `:body` (*type:* `GoogleApi.Manufacturers.V1.Model.ProductCertification.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Manufacturers.V1.Model.ProductCertification{}}` on success + * `{:error, info}` on failure + """ + @spec manufacturers_accounts_languages_product_certifications_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Manufacturers.V1.Model.ProductCertification.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def manufacturers_accounts_languages_product_certifications_patch( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Manufacturers.V1.Model.ProductCertification{}]) + end + @doc """ Deletes the product from a Manufacturer Center account. diff --git a/clients/manufacturers/lib/google_api/manufacturers/v1/metadata.ex b/clients/manufacturers/lib/google_api/manufacturers/v1/metadata.ex index 110134245e..1459b413a8 100644 --- a/clients/manufacturers/lib/google_api/manufacturers/v1/metadata.ex +++ b/clients/manufacturers/lib/google_api/manufacturers/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Manufacturers.V1 do API client metadata for GoogleApi.Manufacturers.V1. """ - @discovery_revision "20220913" + @discovery_revision "20240205" def discovery_revision(), do: @discovery_revision end diff --git a/clients/manufacturers/lib/google_api/manufacturers/v1/model/attributes.ex b/clients/manufacturers/lib/google_api/manufacturers/v1/model/attributes.ex index dbca643925..3077a5c6d4 100644 --- a/clients/manufacturers/lib/google_api/manufacturers/v1/model/attributes.ex +++ b/clients/manufacturers/lib/google_api/manufacturers/v1/model/attributes.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.Manufacturers.V1.Model.Attributes do ## Attributes + * `certification` (*type:* `list(GoogleApi.Manufacturers.V1.Model.GoogleShoppingManufacturersV1ProductCertification.t)`, *default:* `nil`) - Optional. List of certifications claimed by this product. * `productType` (*type:* `list(String.t)`, *default:* `nil`) - The type or category of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#producttype. * `includedDestination` (*type:* `list(String.t)`, *default:* `nil`) - A list of included destinations such as "ClientExport", "ClientShoppingCatalog" or "PartnerShoppingCatalog". For more information, see https://support.google.com/manufacturers/answer/7443550 * `color` (*type:* `String.t`, *default:* `nil`) - The color of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#color. @@ -58,6 +59,7 @@ defmodule GoogleApi.Manufacturers.V1.Model.Attributes do * `count` (*type:* `GoogleApi.Manufacturers.V1.Model.Count.t`, *default:* `nil`) - The count of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#count. * `disclosureDate` (*type:* `String.t`, *default:* `nil`) - The disclosure date of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#disclosure. * `title` (*type:* `String.t`, *default:* `nil`) - The title of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#title. + * `virtualModelLink` (*type:* `String.t`, *default:* `nil`) - Virtual Model (3d) asset link. * `nutrition` (*type:* `GoogleApi.Manufacturers.V1.Model.Nutrition.t`, *default:* `nil`) - Nutrition Attributes. See more at https://support.google.com/manufacturers/answer/12098458#food-servings. * `excludedDestination` (*type:* `list(String.t)`, *default:* `nil`) - A list of excluded destinations such as "ClientExport", "ClientShoppingCatalog" or "PartnerShoppingCatalog". For more information, see https://support.google.com/manufacturers/answer/7443550 """ @@ -65,6 +67,11 @@ defmodule GoogleApi.Manufacturers.V1.Model.Attributes do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :certification => + list( + GoogleApi.Manufacturers.V1.Model.GoogleShoppingManufacturersV1ProductCertification.t() + ) + | nil, :productType => list(String.t()) | nil, :includedDestination => list(String.t()) | nil, :color => String.t() | nil, @@ -103,10 +110,16 @@ defmodule GoogleApi.Manufacturers.V1.Model.Attributes do :count => GoogleApi.Manufacturers.V1.Model.Count.t() | nil, :disclosureDate => String.t() | nil, :title => String.t() | nil, + :virtualModelLink => String.t() | nil, :nutrition => GoogleApi.Manufacturers.V1.Model.Nutrition.t() | nil, :excludedDestination => list(String.t()) | nil } + field(:certification, + as: GoogleApi.Manufacturers.V1.Model.GoogleShoppingManufacturersV1ProductCertification, + type: :list + ) + field(:productType, type: :list) field(:includedDestination, type: :list) field(:color) @@ -144,6 +157,7 @@ defmodule GoogleApi.Manufacturers.V1.Model.Attributes do field(:count, as: GoogleApi.Manufacturers.V1.Model.Count) field(:disclosureDate) field(:title) + field(:virtualModelLink) field(:nutrition, as: GoogleApi.Manufacturers.V1.Model.Nutrition) field(:excludedDestination, type: :list) end diff --git a/clients/manufacturers/lib/google_api/manufacturers/v1/model/certification.ex b/clients/manufacturers/lib/google_api/manufacturers/v1/model/certification.ex new file mode 100644 index 0000000000..5358eb3d1e --- /dev/null +++ b/clients/manufacturers/lib/google_api/manufacturers/v1/model/certification.ex @@ -0,0 +1,64 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Manufacturers.V1.Model.Certification do + @moduledoc """ + Description of a certification. + + ## Attributes + + * `authority` (*type:* `String.t`, *default:* `nil`) - Required. Name of the certification body. + * `code` (*type:* `String.t`, *default:* `nil`) - Required. A unique code to identify the certification. + * `link` (*type:* `String.t`, *default:* `nil`) - Optional. A URL link to the certification. + * `logo` (*type:* `String.t`, *default:* `nil`) - Optional. A URL link to the certification logo. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. Name of the certification. + * `validUntil` (*type:* `String.t`, *default:* `nil`) - Optional. The expiration date (UTC). + * `value` (*type:* `String.t`, *default:* `nil`) - Optional. A custom value of the certification. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :authority => String.t() | nil, + :code => String.t() | nil, + :link => String.t() | nil, + :logo => String.t() | nil, + :name => String.t() | nil, + :validUntil => String.t() | nil, + :value => String.t() | nil + } + + field(:authority) + field(:code) + field(:link) + field(:logo) + field(:name) + field(:validUntil) + field(:value) +end + +defimpl Poison.Decoder, for: GoogleApi.Manufacturers.V1.Model.Certification do + def decode(value, options) do + GoogleApi.Manufacturers.V1.Model.Certification.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Manufacturers.V1.Model.Certification do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/manufacturers/lib/google_api/manufacturers/v1/model/google_shopping_manufacturers_v1_product_certification.ex b/clients/manufacturers/lib/google_api/manufacturers/v1/model/google_shopping_manufacturers_v1_product_certification.ex new file mode 100644 index 0000000000..13fabb1f33 --- /dev/null +++ b/clients/manufacturers/lib/google_api/manufacturers/v1/model/google_shopping_manufacturers_v1_product_certification.ex @@ -0,0 +1,57 @@ +# 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.Manufacturers.V1.Model.GoogleShoppingManufacturersV1ProductCertification do + @moduledoc """ + Description of a certification. + + ## Attributes + + * `authority` (*type:* `String.t`, *default:* `nil`) - Required. Name of the certification body. + * `code` (*type:* `String.t`, *default:* `nil`) - Required. A unique code to identify the certification. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. Name of the certification. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :authority => String.t() | nil, + :code => String.t() | nil, + :name => String.t() | nil + } + + field(:authority) + field(:code) + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.Manufacturers.V1.Model.GoogleShoppingManufacturersV1ProductCertification do + def decode(value, options) do + GoogleApi.Manufacturers.V1.Model.GoogleShoppingManufacturersV1ProductCertification.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Manufacturers.V1.Model.GoogleShoppingManufacturersV1ProductCertification do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/manufacturers/lib/google_api/manufacturers/v1/model/list_product_certifications_response.ex b/clients/manufacturers/lib/google_api/manufacturers/v1/model/list_product_certifications_response.ex new file mode 100644 index 0000000000..dac2ad5b59 --- /dev/null +++ b/clients/manufacturers/lib/google_api/manufacturers/v1/model/list_product_certifications_response.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Manufacturers.V1.Model.ListProductCertificationsResponse do + @moduledoc """ + Response for ListProductCertifications method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `productCertifications` (*type:* `list(GoogleApi.Manufacturers.V1.Model.ProductCertification.t)`, *default:* `nil`) - The product certifications from the specified certification body. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :productCertifications => + list(GoogleApi.Manufacturers.V1.Model.ProductCertification.t()) | nil + } + + field(:nextPageToken) + + field(:productCertifications, + as: GoogleApi.Manufacturers.V1.Model.ProductCertification, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.Manufacturers.V1.Model.ListProductCertificationsResponse do + def decode(value, options) do + GoogleApi.Manufacturers.V1.Model.ListProductCertificationsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Manufacturers.V1.Model.ListProductCertificationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/manufacturers/lib/google_api/manufacturers/v1/model/product_certification.ex b/clients/manufacturers/lib/google_api/manufacturers/v1/model/product_certification.ex new file mode 100644 index 0000000000..ccf5e7af75 --- /dev/null +++ b/clients/manufacturers/lib/google_api/manufacturers/v1/model/product_certification.ex @@ -0,0 +1,74 @@ +# 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.Manufacturers.V1.Model.ProductCertification do + @moduledoc """ + Product certification data. + + ## Attributes + + * `brand` (*type:* `String.t`, *default:* `nil`) - Required. This is the product's brand name. The brand is used to help identify your product. + * `certification` (*type:* `list(GoogleApi.Manufacturers.V1.Model.Certification.t)`, *default:* `nil`) - Required. A list of certifications to link to the described product. + * `countryCode` (*type:* `list(String.t)`, *default:* `nil`) - Optional. A 2-letter country code (ISO 3166-1 Alpha 2). + * `destinationStatuses` (*type:* `list(GoogleApi.Manufacturers.V1.Model.DestinationStatus.t)`, *default:* `nil`) - Output only. The statuses of the destinations. + * `issues` (*type:* `list(GoogleApi.Manufacturers.V1.Model.Issue.t)`, *default:* `nil`) - Output only. A server-generated list of issues associated with the product. + * `mpn` (*type:* `list(String.t)`, *default:* `nil`) - Optional. These are the Manufacturer Part Numbers (MPN). MPNs are used to uniquely identify a specific product among all products from the same manufacturer + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The unique name identifier of a product certification Format: accounts/{account}/languages/{language_code}/productCertifications/{id} Where `id` is a some unique identifier and `language_code` is a 2-letter ISO 639-1 code of a Shopping supported language according to https://support.google.com/merchants/answer/160637. + * `productCode` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Another name for GTIN. + * `productType` (*type:* `list(String.t)`, *default:* `nil`) - Optional. These are your own product categorization system in your product data. + * `title` (*type:* `String.t`, *default:* `nil`) - Required. This is to clearly identify the product you are certifying. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :brand => String.t() | nil, + :certification => list(GoogleApi.Manufacturers.V1.Model.Certification.t()) | nil, + :countryCode => list(String.t()) | nil, + :destinationStatuses => + list(GoogleApi.Manufacturers.V1.Model.DestinationStatus.t()) | nil, + :issues => list(GoogleApi.Manufacturers.V1.Model.Issue.t()) | nil, + :mpn => list(String.t()) | nil, + :name => String.t() | nil, + :productCode => list(String.t()) | nil, + :productType => list(String.t()) | nil, + :title => String.t() | nil + } + + field(:brand) + field(:certification, as: GoogleApi.Manufacturers.V1.Model.Certification, type: :list) + field(:countryCode, type: :list) + field(:destinationStatuses, as: GoogleApi.Manufacturers.V1.Model.DestinationStatus, type: :list) + field(:issues, as: GoogleApi.Manufacturers.V1.Model.Issue, type: :list) + field(:mpn, type: :list) + field(:name) + field(:productCode, type: :list) + field(:productType, type: :list) + field(:title) +end + +defimpl Poison.Decoder, for: GoogleApi.Manufacturers.V1.Model.ProductCertification do + def decode(value, options) do + GoogleApi.Manufacturers.V1.Model.ProductCertification.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Manufacturers.V1.Model.ProductCertification do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end