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

namespace Google\Shopping\Css\V1;

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

/**
 * The processed CSS Product(a.k.a Aggregate Offer internally).
 *
 * Generated from protobuf message <code>google.shopping.css.v1.CssProduct</code>
 */
class CssProduct extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the CSS Product.
     * Format:
     * `"accounts/{account}/cssProducts/{css_product}"`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Output only. Your unique raw identifier for the product.
     *
     * Generated from protobuf field <code>string raw_provided_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $raw_provided_id = '';
    /**
     * Output only. 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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $content_language = '';
    /**
     * Output only. The feed label for the product.
     *
     * Generated from protobuf field <code>string feed_label = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $feed_label = '';
    /**
     * Output only. A list of product attributes.
     *
     * Generated from protobuf field <code>.google.shopping.css.v1.Attributes attributes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $attributes = null;
    /**
     * Output only. A list of custom (CSS-provided) attributes. It can also be
     * used to submit 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.
     *
     * Generated from protobuf field <code>repeated .google.shopping.type.CustomAttribute custom_attributes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $custom_attributes;
    /**
     * Output only. The status of a product, data validation issues, that is,
     * information about a product computed asynchronously.
     *
     * Generated from protobuf field <code>.google.shopping.css.v1.CssProductStatus css_product_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $css_product_status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the CSS Product.
     *           Format:
     *           `"accounts/{account}/cssProducts/{css_product}"`
     *     @type string $raw_provided_id
     *           Output only. Your unique raw identifier for the product.
     *     @type string $content_language
     *           Output only. The two-letter [ISO
     *           639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the
     *           product.
     *     @type string $feed_label
     *           Output only. The feed label for the product.
     *     @type \Google\Shopping\Css\V1\Attributes $attributes
     *           Output only. A list of product attributes.
     *     @type array<\Google\Shopping\Type\CustomAttribute>|\Google\Protobuf\Internal\RepeatedField $custom_attributes
     *           Output only. A list of custom (CSS-provided) attributes. It can also be
     *           used to submit 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.
     *     @type \Google\Shopping\Css\V1\CssProductStatus $css_product_status
     *           Output only. The status of a product, data validation issues, that is,
     *           information about a product computed asynchronously.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Css\V1\CssProducts::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the CSS Product.
     * Format:
     * `"accounts/{account}/cssProducts/{css_product}"`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the CSS Product.
     * Format:
     * `"accounts/{account}/cssProducts/{css_product}"`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Your unique raw identifier for the product.
     *
     * Generated from protobuf field <code>string raw_provided_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getRawProvidedId()
    {
        return $this->raw_provided_id;
    }

    /**
     * Output only. Your unique raw identifier for the product.
     *
     * Generated from protobuf field <code>string raw_provided_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setRawProvidedId($var)
    {
        GPBUtil::checkString($var, True);
        $this->raw_provided_id = $var;

        return $this;
    }

    /**
     * Output only. 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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getContentLanguage()
    {
        return $this->content_language;
    }

    /**
     * Output only. 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 = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setContentLanguage($var)
    {
        GPBUtil::checkString($var, True);
        $this->content_language = $var;

        return $this;
    }

    /**
     * Output only. The feed label for the product.
     *
     * Generated from protobuf field <code>string feed_label = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getFeedLabel()
    {
        return $this->feed_label;
    }

    /**
     * Output only. The feed label for the product.
     *
     * Generated from protobuf field <code>string feed_label = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setFeedLabel($var)
    {
        GPBUtil::checkString($var, True);
        $this->feed_label = $var;

        return $this;
    }

    /**
     * Output only. A list of product attributes.
     *
     * Generated from protobuf field <code>.google.shopping.css.v1.Attributes attributes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Shopping\Css\V1\Attributes|null
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    public function hasAttributes()
    {
        return isset($this->attributes);
    }

    public function clearAttributes()
    {
        unset($this->attributes);
    }

    /**
     * Output only. A list of product attributes.
     *
     * Generated from protobuf field <code>.google.shopping.css.v1.Attributes attributes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Shopping\Css\V1\Attributes $var
     * @return $this
     */
    public function setAttributes($var)
    {
        GPBUtil::checkMessage($var, \Google\Shopping\Css\V1\Attributes::class);
        $this->attributes = $var;

        return $this;
    }

    /**
     * Output only. A list of custom (CSS-provided) attributes. It can also be
     * used to submit 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.
     *
     * Generated from protobuf field <code>repeated .google.shopping.type.CustomAttribute custom_attributes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCustomAttributes()
    {
        return $this->custom_attributes;
    }

    /**
     * Output only. A list of custom (CSS-provided) attributes. It can also be
     * used to submit 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.
     *
     * Generated from protobuf field <code>repeated .google.shopping.type.CustomAttribute custom_attributes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Shopping\Type\CustomAttribute>|\Google\Protobuf\Internal\RepeatedField $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;
    }

    /**
     * Output only. The status of a product, data validation issues, that is,
     * information about a product computed asynchronously.
     *
     * Generated from protobuf field <code>.google.shopping.css.v1.CssProductStatus css_product_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Shopping\Css\V1\CssProductStatus|null
     */
    public function getCssProductStatus()
    {
        return $this->css_product_status;
    }

    public function hasCssProductStatus()
    {
        return isset($this->css_product_status);
    }

    public function clearCssProductStatus()
    {
        unset($this->css_product_status);
    }

    /**
     * Output only. The status of a product, data validation issues, that is,
     * information about a product computed asynchronously.
     *
     * Generated from protobuf field <code>.google.shopping.css.v1.CssProductStatus css_product_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Shopping\Css\V1\CssProductStatus $var
     * @return $this
     */
    public function setCssProductStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Shopping\Css\V1\CssProductStatus::class);
        $this->css_product_status = $var;

        return $this;
    }

}

