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

namespace Google\Shopping\Merchant\Products\V1;

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

/**
 * The status of a product, data validation issues, that is, information about
 * a product computed asynchronously.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1.ProductStatus</code>
 */
class ProductStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * The intended destinations for the product.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.ProductStatus.DestinationStatus destination_statuses = 3;</code>
     */
    private $destination_statuses;
    /**
     * A list of all issues associated with the product.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue item_level_issues = 4;</code>
     */
    private $item_level_issues;
    /**
     * Date on which the item has been created, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp creation_date = 5;</code>
     */
    protected $creation_date = null;
    /**
     * Date on which the item has been last updated, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_update_date = 6;</code>
     */
    protected $last_update_date = null;
    /**
     * Date on which the item expires, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp google_expiration_date = 7;</code>
     */
    protected $google_expiration_date = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Shopping\Merchant\Products\V1\ProductStatus\DestinationStatus[] $destination_statuses
     *           The intended destinations for the product.
     *     @type \Google\Shopping\Merchant\Products\V1\ProductStatus\ItemLevelIssue[] $item_level_issues
     *           A list of all issues associated with the product.
     *     @type \Google\Protobuf\Timestamp $creation_date
     *           Date on which the item has been created, in [ISO
     *           8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *     @type \Google\Protobuf\Timestamp $last_update_date
     *           Date on which the item has been last updated, in [ISO
     *           8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *     @type \Google\Protobuf\Timestamp $google_expiration_date
     *           Date on which the item expires, in [ISO
     *           8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1\ProductsCommon::initOnce();
        parent::__construct($data);
    }

    /**
     * The intended destinations for the product.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.ProductStatus.DestinationStatus destination_statuses = 3;</code>
     * @return RepeatedField<\Google\Shopping\Merchant\Products\V1\ProductStatus\DestinationStatus>
     */
    public function getDestinationStatuses()
    {
        return $this->destination_statuses;
    }

    /**
     * The intended destinations for the product.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.ProductStatus.DestinationStatus destination_statuses = 3;</code>
     * @param \Google\Shopping\Merchant\Products\V1\ProductStatus\DestinationStatus[] $var
     * @return $this
     */
    public function setDestinationStatuses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Shopping\Merchant\Products\V1\ProductStatus\DestinationStatus::class);
        $this->destination_statuses = $arr;

        return $this;
    }

    /**
     * A list of all issues associated with the product.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue item_level_issues = 4;</code>
     * @return RepeatedField<\Google\Shopping\Merchant\Products\V1\ProductStatus\ItemLevelIssue>
     */
    public function getItemLevelIssues()
    {
        return $this->item_level_issues;
    }

    /**
     * A list of all issues associated with the product.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue item_level_issues = 4;</code>
     * @param \Google\Shopping\Merchant\Products\V1\ProductStatus\ItemLevelIssue[] $var
     * @return $this
     */
    public function setItemLevelIssues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Shopping\Merchant\Products\V1\ProductStatus\ItemLevelIssue::class);
        $this->item_level_issues = $arr;

        return $this;
    }

    /**
     * Date on which the item has been created, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp creation_date = 5;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreationDate()
    {
        return $this->creation_date;
    }

    public function hasCreationDate()
    {
        return isset($this->creation_date);
    }

    public function clearCreationDate()
    {
        unset($this->creation_date);
    }

    /**
     * Date on which the item has been created, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp creation_date = 5;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreationDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->creation_date = $var;

        return $this;
    }

    /**
     * Date on which the item has been last updated, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_update_date = 6;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastUpdateDate()
    {
        return $this->last_update_date;
    }

    public function hasLastUpdateDate()
    {
        return isset($this->last_update_date);
    }

    public function clearLastUpdateDate()
    {
        unset($this->last_update_date);
    }

    /**
     * Date on which the item has been last updated, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_update_date = 6;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastUpdateDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_update_date = $var;

        return $this;
    }

    /**
     * Date on which the item expires, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp google_expiration_date = 7;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getGoogleExpirationDate()
    {
        return $this->google_expiration_date;
    }

    public function hasGoogleExpirationDate()
    {
        return isset($this->google_expiration_date);
    }

    public function clearGoogleExpirationDate()
    {
        unset($this->google_expiration_date);
    }

    /**
     * Date on which the item expires, in [ISO
     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp google_expiration_date = 7;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setGoogleExpirationDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->google_expiration_date = $var;

        return $this;
    }

}

