Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of Manufacturers client #10803

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -58,13 +59,19 @@ 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
"""

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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading