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

namespace Google\Shopping\Merchant\Products\V1;

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

/**
 * Response message for the ListProducts method.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1.ListProductsResponse</code>
 */
class ListProductsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The processed products from the specified account. These are your processed
     * products after applying rules and supplemental data sources.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.Product products = 1;</code>
     */
    private $products;
    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    protected $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Shopping\Merchant\Products\V1\Product[] $products
     *           The processed products from the specified account. These are your processed
     *           products after applying rules and supplemental data sources.
     *     @type string $next_page_token
     *           A token, which can be sent as `page_token` to retrieve the next page.
     *           If this field is omitted, there are no subsequent pages.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1\Products::initOnce();
        parent::__construct($data);
    }

    /**
     * The processed products from the specified account. These are your processed
     * products after applying rules and supplemental data sources.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.Product products = 1;</code>
     * @return RepeatedField<\Google\Shopping\Merchant\Products\V1\Product>
     */
    public function getProducts()
    {
        return $this->products;
    }

    /**
     * The processed products from the specified account. These are your processed
     * products after applying rules and supplemental data sources.
     *
     * Generated from protobuf field <code>repeated .google.shopping.merchant.products.v1.Product products = 1;</code>
     * @param \Google\Shopping\Merchant\Products\V1\Product[] $var
     * @return $this
     */
    public function setProducts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Shopping\Merchant\Products\V1\Product::class);
        $this->products = $arr;

        return $this;
    }

    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

}

