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

namespace Google\Shopping\Merchant\Products\V1beta;

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

/**
 * Request message for the InsertProductInput method.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1beta.InsertProductInputRequest</code>
 */
class InsertProductInputRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The account where this product will be inserted.
     * Format: `accounts/{account}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The product input to insert.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.products.v1beta.ProductInput product_input = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $product_input = null;
    /**
     * Required. The primary or supplemental product data source name. If the
     * product already exists and data source provided is different, then the
     * product will be moved to a new data source. For more information, see
     * [Overview of Data sources
     * sub-API](/merchant/api/guides/data-sources/overview).
     * Only API data sources are supported.
     * Format: `accounts/{account}/dataSources/{datasource}`. For example,
     * `accounts/123456/dataSources/104628`.
     *
     * Generated from protobuf field <code>string data_source = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_source = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The account where this product will be inserted.
     *           Format: `accounts/{account}`
     *     @type \Google\Shopping\Merchant\Products\V1beta\ProductInput $product_input
     *           Required. The product input to insert.
     *     @type string $data_source
     *           Required. The primary or supplemental product data source name. If the
     *           product already exists and data source provided is different, then the
     *           product will be moved to a new data source. For more information, see
     *           [Overview of Data sources
     *           sub-API](/merchant/api/guides/data-sources/overview).
     *           Only API data sources are supported.
     *           Format: `accounts/{account}/dataSources/{datasource}`. For example,
     *           `accounts/123456/dataSources/104628`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1Beta\Productinputs::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The account where this product will be inserted.
     * Format: `accounts/{account}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The account where this product will be inserted.
     * Format: `accounts/{account}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The product input to insert.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.products.v1beta.ProductInput product_input = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Shopping\Merchant\Products\V1beta\ProductInput|null
     */
    public function getProductInput()
    {
        return $this->product_input;
    }

    public function hasProductInput()
    {
        return isset($this->product_input);
    }

    public function clearProductInput()
    {
        unset($this->product_input);
    }

    /**
     * Required. The product input to insert.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.products.v1beta.ProductInput product_input = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Shopping\Merchant\Products\V1beta\ProductInput $var
     * @return $this
     */
    public function setProductInput($var)
    {
        GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Products\V1beta\ProductInput::class);
        $this->product_input = $var;

        return $this;
    }

    /**
     * Required. The primary or supplemental product data source name. If the
     * product already exists and data source provided is different, then the
     * product will be moved to a new data source. For more information, see
     * [Overview of Data sources
     * sub-API](/merchant/api/guides/data-sources/overview).
     * Only API data sources are supported.
     * Format: `accounts/{account}/dataSources/{datasource}`. For example,
     * `accounts/123456/dataSources/104628`.
     *
     * Generated from protobuf field <code>string data_source = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDataSource()
    {
        return $this->data_source;
    }

    /**
     * Required. The primary or supplemental product data source name. If the
     * product already exists and data source provided is different, then the
     * product will be moved to a new data source. For more information, see
     * [Overview of Data sources
     * sub-API](/merchant/api/guides/data-sources/overview).
     * Only API data sources are supported.
     * Format: `accounts/{account}/dataSources/{datasource}`. For example,
     * `accounts/123456/dataSources/104628`.
     *
     * Generated from protobuf field <code>string data_source = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDataSource($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_source = $var;

        return $this;
    }

}

