<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/retail/v2/import_config.proto

namespace Google\Cloud\Retail\V2;

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

/**
 * The inline source for the input config for ImportProducts method.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.ProductInlineSource</code>
 */
class ProductInlineSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A list of products to update/create. Each product must have a
     * valid [Product.id][google.cloud.retail.v2.Product.id]. Recommended max of
     * 100 items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.retail.v2.Product products = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $products;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Retail\V2\Product>|\Google\Protobuf\Internal\RepeatedField $products
     *           Required. A list of products to update/create. Each product must have a
     *           valid [Product.id][google.cloud.retail.v2.Product.id]. Recommended max of
     *           100 items.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A list of products to update/create. Each product must have a
     * valid [Product.id][google.cloud.retail.v2.Product.id]. Recommended max of
     * 100 items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.retail.v2.Product products = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getProducts()
    {
        return $this->products;
    }

    /**
     * Required. A list of products to update/create. Each product must have a
     * valid [Product.id][google.cloud.retail.v2.Product.id]. Recommended max of
     * 100 items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.retail.v2.Product products = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\Retail\V2\Product>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setProducts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Retail\V2\Product::class);
        $this->products = $arr;

        return $this;
    }

}

