<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/products/v1/productinputs.proto

namespace Google\Shopping\Merchant\Products\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * This resource represents input data you submit for a product, not the
 *  processed product that you see in Merchant Center, in Shopping ads, or
 *  across Google surfaces. Product inputs, rules and supplemental data source
 *  data are combined to create the processed
 *  [Product][google.shopping.merchant.products.v1.Product]. For more
 *  information, see [Manage products](/merchant/api/guides/products/overview).
 *  Required product input attributes to pass data validation checks are
 *  primarily defined in the [Products Data
 *  Specification](https://support.google.com/merchants/answer/188494).
 *  The following attributes are required:
 *  [feedLabel][google.shopping.merchant.products.v1.Product.feed_label],
 *  [contentLanguage][google.shopping.merchant.products.v1.Product.content_language]
 *  and [offerId][google.shopping.merchant.products.v1.Product.offer_id].
 *  After inserting, updating, or deleting a product input, it may take several
 *  minutes before the processed product can be retrieved.
 *  All fields in the product input and its sub-messages match the English name
 *  of their corresponding attribute in the [Products Data
 *  Specification](https://support.google.com/merchants/answer/188494) with
 *  [some exceptions](https://support.google.com/merchants/answer/7052112).
 *  The following reference documentation lists the field names in the
 *  **camelCase** casing style while the Products Data Specification lists the
 *  names in the **snake_case** casing style.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1.ProductInput</code>
 */
class ProductInput extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The name of the product.
     * Format: `accounts/{account}/productInputs/{productinput}`
     * The {productinput} segment is a unique identifier for the product.
     * This identifier must be unique within a merchant account and generally
     * follows the structure: `content_language~feed_label~offer_id`. Example:
     * `en~US~sku123` For legacy local products, the structure is:
     * `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
     * The format of the {productinput} segment in the URL is automatically
     * detected by the server, supporting two options:
     * 1.  **Encoded Format**: The `{productinput}` segment is an unpadded
     * base64url
     *     encoded string (RFC 4648 Section 5). The decoded string must result
     *     in the `content_language~feed_label~offer_id` structure. This encoding
     *     MUST be used if any part of the product identifier (like `offer_id`)
     *     contains characters such as `/`, `%`, or `~`.
     *     *   Example: To represent the product ID `en~US~sku/123`, the
     *         `{productinput}` segment must be the unpadded base64url encoding of
     *         this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
     *         for the product would be
     *         `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.
     * 2.  **Plain Format**: The `{productinput}` segment is the tilde-separated
     * string
     *     `content_language~feed_label~offer_id`. This format is suitable only
     *     when `content_language`, `feed_label`, and `offer_id` do not contain
     *     URL-problematic characters like `/`, `%`, or `~`.
     * We recommend using the **Encoded Format** for all product IDs to ensure
     * correct parsing, especially those containing special characters. The
     * presence of tilde (`~`) characters in the `{productinput}` segment is used
     * to differentiate between the two formats.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. The **unpadded base64url encoded name** of the product input.
     * Format:
     * `accounts/{account}/productInputs/{productinput}` where the last
     * section `productinput` is the unpadded base64url encoding of the
     * `content_language~feed_label~offer_id` name.
     * Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
     * product input name `accounts/123/productInputs/en~US~sku/123`. This field
     * can be used directly as input to the API methods that require the product
     * input name to be encoded if it contains special characters, for example
     * [`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).
     *
     * Generated from protobuf field <code>string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $base64_encoded_name = '';
    /**
     * Output only. The name of the processed product.
     * Format: `accounts/{account}/products/{product}`
     *
     * Generated from protobuf field <code>string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $product = '';
    /**
     * Output only. The **unpadded base64url encoded name** of the processed
     * product. Format: `accounts/{account}/products/{product}` where the last
     * section `product` is the unpadded base64url encoding of the
     * `content_language~feed_label~offer_id` name.
     * Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
     * product name `accounts/123/products/en~US~sku/123`. This field can be used
     * directly as input to the API methods that require the product name to be
     * encoded if it contains special characters, for example
     * [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).
     *
     * Generated from protobuf field <code>string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $base64_encoded_product = '';
    /**
     * Immutable. Determines whether the product is **only** targeting
     * local destinations and whether the product name should be distinguished
     * with a `local~` prefix. For example,
     * `accounts/123/productInputs/local~en~US~sku123`. If a product that is not
     * `legacy_local` is already targeting local destinations,
     * creating a `legacy_local` product with an otherwise matching name will
     * fail.
     *
     * Generated from protobuf field <code>bool legacy_local = 10 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $legacy_local = false;
    /**
     * Required. Immutable. Your unique identifier for the product. This is the
     * same for the product input and processed product. Leading and trailing
     * whitespaces are stripped and multiple whitespaces are replaced by a single
     * whitespace upon submission. See the [products data
     * specification](https://support.google.com/merchants/answer/188494#id) for
     * details.
     *
     * Generated from protobuf field <code>string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $offer_id = '';
    /**
     * Required. Immutable. The two-letter [ISO
     * 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the
     * product.
     *
     * Generated from protobuf field <code>string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $content_language = '';
    /**
     * Required. Immutable. The feed label that lets you categorize and identify
     * your products. The maximum allowed characters are 20, and the supported
     * characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
     * not include any spaces. For more information, see [Using feed
     * labels](//support.google.com/merchants/answer/14994087).
     *
     * Generated from protobuf field <code>string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $feed_label = '';
    /**
     * Optional. Immutable. Represents the existing version (freshness) of the
     * product, which can be used to preserve the right order when multiple
     * updates are done at the same time.
     * If set, the insertion is prevented when version number is lower than
     * the current version number of the existing product. Re-insertion (for
     * example, product refresh after 30 days) can be performed with the current
     * `version_number`.
     * Only supported for insertions into primary data sources.
     * Do not set this field for updates.
     * Do not set this field for insertions into supplemental data sources.
     * If the operation is prevented, the aborted exception will be
     * thrown.
     *
     * Generated from protobuf field <code>optional int64 version_number = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $version_number = null;
    /**
     * Optional. A list of strongly-typed product attributes.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $product_attributes = null;
    /**
     * Optional. A list of custom (merchant-provided) attributes. It can also be
     * used for submitting any attribute of the data specification in its generic
     * form (for example,
     * `{ "name": "size type", "value": "regular" }`).
     * This is useful for submitting attributes not explicitly exposed by the
     * API.
     * Maximum allowed number of characters for each
     * custom attribute is 10240 (represents sum of characters for name and
     * value). Maximum 2500 custom attributes can be set per product, with total
     * size of 102.4kB. Underscores in custom attribute names are replaced by
     * spaces upon insertion.
     *
     * Generated from protobuf field <code>repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $custom_attributes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The name of the product.
     *           Format: `accounts/{account}/productInputs/{productinput}`
     *           The {productinput} segment is a unique identifier for the product.
     *           This identifier must be unique within a merchant account and generally
     *           follows the structure: `content_language~feed_label~offer_id`. Example:
     *           `en~US~sku123` For legacy local products, the structure is:
     *           `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
     *           The format of the {productinput} segment in the URL is automatically
     *           detected by the server, supporting two options:
     *           1.  **Encoded Format**: The `{productinput}` segment is an unpadded
     *           base64url
     *               encoded string (RFC 4648 Section 5). The decoded string must result
     *               in the `content_language~feed_label~offer_id` structure. This encoding
     *               MUST be used if any part of the product identifier (like `offer_id`)
     *               contains characters such as `/`, `%`, or `~`.
     *               *   Example: To represent the product ID `en~US~sku/123`, the
     *                   `{productinput}` segment must be the unpadded base64url encoding of
     *                   this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
     *                   for the product would be
     *                   `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.
     *           2.  **Plain Format**: The `{productinput}` segment is the tilde-separated
     *           string
     *               `content_language~feed_label~offer_id`. This format is suitable only
     *               when `content_language`, `feed_label`, and `offer_id` do not contain
     *               URL-problematic characters like `/`, `%`, or `~`.
     *           We recommend using the **Encoded Format** for all product IDs to ensure
     *           correct parsing, especially those containing special characters. The
     *           presence of tilde (`~`) characters in the `{productinput}` segment is used
     *           to differentiate between the two formats.
     *     @type string $base64_encoded_name
     *           Output only. The **unpadded base64url encoded name** of the product input.
     *           Format:
     *           `accounts/{account}/productInputs/{productinput}` where the last
     *           section `productinput` is the unpadded base64url encoding of the
     *           `content_language~feed_label~offer_id` name.
     *           Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
     *           product input name `accounts/123/productInputs/en~US~sku/123`. This field
     *           can be used directly as input to the API methods that require the product
     *           input name to be encoded if it contains special characters, for example
     *           [`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).
     *     @type string $product
     *           Output only. The name of the processed product.
     *           Format: `accounts/{account}/products/{product}`
     *     @type string $base64_encoded_product
     *           Output only. The **unpadded base64url encoded name** of the processed
     *           product. Format: `accounts/{account}/products/{product}` where the last
     *           section `product` is the unpadded base64url encoding of the
     *           `content_language~feed_label~offer_id` name.
     *           Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
     *           product name `accounts/123/products/en~US~sku/123`. This field can be used
     *           directly as input to the API methods that require the product name to be
     *           encoded if it contains special characters, for example
     *           [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).
     *     @type bool $legacy_local
     *           Immutable. Determines whether the product is **only** targeting
     *           local destinations and whether the product name should be distinguished
     *           with a `local~` prefix. For example,
     *           `accounts/123/productInputs/local~en~US~sku123`. If a product that is not
     *           `legacy_local` is already targeting local destinations,
     *           creating a `legacy_local` product with an otherwise matching name will
     *           fail.
     *     @type string $offer_id
     *           Required. Immutable. Your unique identifier for the product. This is the
     *           same for the product input and processed product. Leading and trailing
     *           whitespaces are stripped and multiple whitespaces are replaced by a single
     *           whitespace upon submission. See the [products data
     *           specification](https://support.google.com/merchants/answer/188494#id) for
     *           details.
     *     @type string $content_language
     *           Required. Immutable. The two-letter [ISO
     *           639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the
     *           product.
     *     @type string $feed_label
     *           Required. Immutable. The feed label that lets you categorize and identify
     *           your products. The maximum allowed characters are 20, and the supported
     *           characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
     *           not include any spaces. For more information, see [Using feed
     *           labels](//support.google.com/merchants/answer/14994087).
     *     @type int|string $version_number
     *           Optional. Immutable. Represents the existing version (freshness) of the
     *           product, which can be used to preserve the right order when multiple
     *           updates are done at the same time.
     *           If set, the insertion is prevented when version number is lower than
     *           the current version number of the existing product. Re-insertion (for
     *           example, product refresh after 30 days) can be performed with the current
     *           `version_number`.
     *           Only supported for insertions into primary data sources.
     *           Do not set this field for updates.
     *           Do not set this field for insertions into supplemental data sources.
     *           If the operation is prevented, the aborted exception will be
     *           thrown.
     *     @type \Google\Shopping\Merchant\Products\V1\ProductAttributes $product_attributes
     *           Optional. A list of strongly-typed product attributes.
     *     @type \Google\Shopping\Type\CustomAttribute[] $custom_attributes
     *           Optional. A list of custom (merchant-provided) attributes. It can also be
     *           used for submitting any attribute of the data specification in its generic
     *           form (for example,
     *           `{ "name": "size type", "value": "regular" }`).
     *           This is useful for submitting attributes not explicitly exposed by the
     *           API.
     *           Maximum allowed number of characters for each
     *           custom attribute is 10240 (represents sum of characters for name and
     *           value). Maximum 2500 custom attributes can be set per product, with total
     *           size of 102.4kB. Underscores in custom attribute names are replaced by
     *           spaces upon insertion.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1\Productinputs::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The name of the product.
     * Format: `accounts/{account}/productInputs/{productinput}`
     * The {productinput} segment is a unique identifier for the product.
     * This identifier must be unique within a merchant account and generally
     * follows the structure: `content_language~feed_label~offer_id`. Example:
     * `en~US~sku123` For legacy local products, the structure is:
     * `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
     * The format of the {productinput} segment in the URL is automatically
     * detected by the server, supporting two options:
     * 1.  **Encoded Format**: The `{productinput}` segment is an unpadded
     * base64url
     *     encoded string (RFC 4648 Section 5). The decoded string must result
     *     in the `content_language~feed_label~offer_id` structure. This encoding
     *     MUST be used if any part of the product identifier (like `offer_id`)
     *     contains characters such as `/`, `%`, or `~`.
     *     *   Example: To represent the product ID `en~US~sku/123`, the
     *         `{productinput}` segment must be the unpadded base64url encoding of
     *         this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
     *         for the product would be
     *         `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.
     * 2.  **Plain Format**: The `{productinput}` segment is the tilde-separated
     * string
     *     `content_language~feed_label~offer_id`. This format is suitable only
     *     when `content_language`, `feed_label`, and `offer_id` do not contain
     *     URL-problematic characters like `/`, `%`, or `~`.
     * We recommend using the **Encoded Format** for all product IDs to ensure
     * correct parsing, especially those containing special characters. The
     * presence of tilde (`~`) characters in the `{productinput}` segment is used
     * to differentiate between the two formats.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The name of the product.
     * Format: `accounts/{account}/productInputs/{productinput}`
     * The {productinput} segment is a unique identifier for the product.
     * This identifier must be unique within a merchant account and generally
     * follows the structure: `content_language~feed_label~offer_id`. Example:
     * `en~US~sku123` For legacy local products, the structure is:
     * `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123`
     * The format of the {productinput} segment in the URL is automatically
     * detected by the server, supporting two options:
     * 1.  **Encoded Format**: The `{productinput}` segment is an unpadded
     * base64url
     *     encoded string (RFC 4648 Section 5). The decoded string must result
     *     in the `content_language~feed_label~offer_id` structure. This encoding
     *     MUST be used if any part of the product identifier (like `offer_id`)
     *     contains characters such as `/`, `%`, or `~`.
     *     *   Example: To represent the product ID `en~US~sku/123`, the
     *         `{productinput}` segment must be the unpadded base64url encoding of
     *         this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name
     *         for the product would be
     *         `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`.
     * 2.  **Plain Format**: The `{productinput}` segment is the tilde-separated
     * string
     *     `content_language~feed_label~offer_id`. This format is suitable only
     *     when `content_language`, `feed_label`, and `offer_id` do not contain
     *     URL-problematic characters like `/`, `%`, or `~`.
     * We recommend using the **Encoded Format** for all product IDs to ensure
     * correct parsing, especially those containing special characters. The
     * presence of tilde (`~`) characters in the `{productinput}` segment is used
     * to differentiate between the two formats.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. The **unpadded base64url encoded name** of the product input.
     * Format:
     * `accounts/{account}/productInputs/{productinput}` where the last
     * section `productinput` is the unpadded base64url encoding of the
     * `content_language~feed_label~offer_id` name.
     * Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
     * product input name `accounts/123/productInputs/en~US~sku/123`. This field
     * can be used directly as input to the API methods that require the product
     * input name to be encoded if it contains special characters, for example
     * [`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).
     *
     * Generated from protobuf field <code>string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBase64EncodedName()
    {
        return $this->base64_encoded_name;
    }

    /**
     * Output only. The **unpadded base64url encoded name** of the product input.
     * Format:
     * `accounts/{account}/productInputs/{productinput}` where the last
     * section `productinput` is the unpadded base64url encoding of the
     * `content_language~feed_label~offer_id` name.
     * Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded
     * product input name `accounts/123/productInputs/en~US~sku/123`. This field
     * can be used directly as input to the API methods that require the product
     * input name to be encoded if it contains special characters, for example
     * [`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get).
     *
     * Generated from protobuf field <code>string base64_encoded_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBase64EncodedName($var)
    {
        GPBUtil::checkString($var, True);
        $this->base64_encoded_name = $var;

        return $this;
    }

    /**
     * Output only. The name of the processed product.
     * Format: `accounts/{account}/products/{product}`
     *
     * Generated from protobuf field <code>string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getProduct()
    {
        return $this->product;
    }

    /**
     * Output only. The name of the processed product.
     * Format: `accounts/{account}/products/{product}`
     *
     * Generated from protobuf field <code>string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setProduct($var)
    {
        GPBUtil::checkString($var, True);
        $this->product = $var;

        return $this;
    }

    /**
     * Output only. The **unpadded base64url encoded name** of the processed
     * product. Format: `accounts/{account}/products/{product}` where the last
     * section `product` is the unpadded base64url encoding of the
     * `content_language~feed_label~offer_id` name.
     * Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
     * product name `accounts/123/products/en~US~sku/123`. This field can be used
     * directly as input to the API methods that require the product name to be
     * encoded if it contains special characters, for example
     * [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).
     *
     * Generated from protobuf field <code>string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getBase64EncodedProduct()
    {
        return $this->base64_encoded_product;
    }

    /**
     * Output only. The **unpadded base64url encoded name** of the processed
     * product. Format: `accounts/{account}/products/{product}` where the last
     * section `product` is the unpadded base64url encoding of the
     * `content_language~feed_label~offer_id` name.
     * Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded
     * product name `accounts/123/products/en~US~sku/123`. This field can be used
     * directly as input to the API methods that require the product name to be
     * encoded if it contains special characters, for example
     * [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get).
     *
     * Generated from protobuf field <code>string base64_encoded_product = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setBase64EncodedProduct($var)
    {
        GPBUtil::checkString($var, True);
        $this->base64_encoded_product = $var;

        return $this;
    }

    /**
     * Immutable. Determines whether the product is **only** targeting
     * local destinations and whether the product name should be distinguished
     * with a `local~` prefix. For example,
     * `accounts/123/productInputs/local~en~US~sku123`. If a product that is not
     * `legacy_local` is already targeting local destinations,
     * creating a `legacy_local` product with an otherwise matching name will
     * fail.
     *
     * Generated from protobuf field <code>bool legacy_local = 10 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return bool
     */
    public function getLegacyLocal()
    {
        return $this->legacy_local;
    }

    /**
     * Immutable. Determines whether the product is **only** targeting
     * local destinations and whether the product name should be distinguished
     * with a `local~` prefix. For example,
     * `accounts/123/productInputs/local~en~US~sku123`. If a product that is not
     * `legacy_local` is already targeting local destinations,
     * creating a `legacy_local` product with an otherwise matching name will
     * fail.
     *
     * Generated from protobuf field <code>bool legacy_local = 10 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param bool $var
     * @return $this
     */
    public function setLegacyLocal($var)
    {
        GPBUtil::checkBool($var);
        $this->legacy_local = $var;

        return $this;
    }

    /**
     * Required. Immutable. Your unique identifier for the product. This is the
     * same for the product input and processed product. Leading and trailing
     * whitespaces are stripped and multiple whitespaces are replaced by a single
     * whitespace upon submission. See the [products data
     * specification](https://support.google.com/merchants/answer/188494#id) for
     * details.
     *
     * Generated from protobuf field <code>string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getOfferId()
    {
        return $this->offer_id;
    }

    /**
     * Required. Immutable. Your unique identifier for the product. This is the
     * same for the product input and processed product. Leading and trailing
     * whitespaces are stripped and multiple whitespaces are replaced by a single
     * whitespace upon submission. See the [products data
     * specification](https://support.google.com/merchants/answer/188494#id) for
     * details.
     *
     * Generated from protobuf field <code>string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setOfferId($var)
    {
        GPBUtil::checkString($var, True);
        $this->offer_id = $var;

        return $this;
    }

    /**
     * Required. Immutable. The two-letter [ISO
     * 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the
     * product.
     *
     * Generated from protobuf field <code>string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getContentLanguage()
    {
        return $this->content_language;
    }

    /**
     * Required. Immutable. The two-letter [ISO
     * 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the
     * product.
     *
     * Generated from protobuf field <code>string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setContentLanguage($var)
    {
        GPBUtil::checkString($var, True);
        $this->content_language = $var;

        return $this;
    }

    /**
     * Required. Immutable. The feed label that lets you categorize and identify
     * your products. The maximum allowed characters are 20, and the supported
     * characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
     * not include any spaces. For more information, see [Using feed
     * labels](//support.google.com/merchants/answer/14994087).
     *
     * Generated from protobuf field <code>string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getFeedLabel()
    {
        return $this->feed_label;
    }

    /**
     * Required. Immutable. The feed label that lets you categorize and identify
     * your products. The maximum allowed characters are 20, and the supported
     * characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must
     * not include any spaces. For more information, see [Using feed
     * labels](//support.google.com/merchants/answer/14994087).
     *
     * Generated from protobuf field <code>string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setFeedLabel($var)
    {
        GPBUtil::checkString($var, True);
        $this->feed_label = $var;

        return $this;
    }

    /**
     * Optional. Immutable. Represents the existing version (freshness) of the
     * product, which can be used to preserve the right order when multiple
     * updates are done at the same time.
     * If set, the insertion is prevented when version number is lower than
     * the current version number of the existing product. Re-insertion (for
     * example, product refresh after 30 days) can be performed with the current
     * `version_number`.
     * Only supported for insertions into primary data sources.
     * Do not set this field for updates.
     * Do not set this field for insertions into supplemental data sources.
     * If the operation is prevented, the aborted exception will be
     * thrown.
     *
     * Generated from protobuf field <code>optional int64 version_number = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int|string
     */
    public function getVersionNumber()
    {
        return isset($this->version_number) ? $this->version_number : 0;
    }

    public function hasVersionNumber()
    {
        return isset($this->version_number);
    }

    public function clearVersionNumber()
    {
        unset($this->version_number);
    }

    /**
     * Optional. Immutable. Represents the existing version (freshness) of the
     * product, which can be used to preserve the right order when multiple
     * updates are done at the same time.
     * If set, the insertion is prevented when version number is lower than
     * the current version number of the existing product. Re-insertion (for
     * example, product refresh after 30 days) can be performed with the current
     * `version_number`.
     * Only supported for insertions into primary data sources.
     * Do not set this field for updates.
     * Do not set this field for insertions into supplemental data sources.
     * If the operation is prevented, the aborted exception will be
     * thrown.
     *
     * Generated from protobuf field <code>optional int64 version_number = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int|string $var
     * @return $this
     */
    public function setVersionNumber($var)
    {
        GPBUtil::checkInt64($var);
        $this->version_number = $var;

        return $this;
    }

    /**
     * Optional. A list of strongly-typed product attributes.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Shopping\Merchant\Products\V1\ProductAttributes|null
     */
    public function getProductAttributes()
    {
        return $this->product_attributes;
    }

    public function hasProductAttributes()
    {
        return isset($this->product_attributes);
    }

    public function clearProductAttributes()
    {
        unset($this->product_attributes);
    }

    /**
     * Optional. A list of strongly-typed product attributes.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Shopping\Merchant\Products\V1\ProductAttributes $var
     * @return $this
     */
    public function setProductAttributes($var)
    {
        GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Products\V1\ProductAttributes::class);
        $this->product_attributes = $var;

        return $this;
    }

    /**
     * Optional. A list of custom (merchant-provided) attributes. It can also be
     * used for submitting any attribute of the data specification in its generic
     * form (for example,
     * `{ "name": "size type", "value": "regular" }`).
     * This is useful for submitting attributes not explicitly exposed by the
     * API.
     * Maximum allowed number of characters for each
     * custom attribute is 10240 (represents sum of characters for name and
     * value). Maximum 2500 custom attributes can be set per product, with total
     * size of 102.4kB. Underscores in custom attribute names are replaced by
     * spaces upon insertion.
     *
     * Generated from protobuf field <code>repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<\Google\Shopping\Type\CustomAttribute>
     */
    public function getCustomAttributes()
    {
        return $this->custom_attributes;
    }

    /**
     * Optional. A list of custom (merchant-provided) attributes. It can also be
     * used for submitting any attribute of the data specification in its generic
     * form (for example,
     * `{ "name": "size type", "value": "regular" }`).
     * This is useful for submitting attributes not explicitly exposed by the
     * API.
     * Maximum allowed number of characters for each
     * custom attribute is 10240 (represents sum of characters for name and
     * value). Maximum 2500 custom attributes can be set per product, with total
     * size of 102.4kB. Underscores in custom attribute names are replaced by
     * spaces upon insertion.
     *
     * Generated from protobuf field <code>repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Shopping\Type\CustomAttribute[] $var
     * @return $this
     */
    public function setCustomAttributes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Shopping\Type\CustomAttribute::class);
        $this->custom_attributes = $arr;

        return $this;
    }

}

