<?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;

/**
 * Request message for the ImportUserEvents request.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.ImportUserEventsRequest</code>
 */
class ImportUserEventsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. `projects/1234/locations/global/catalogs/default_catalog`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The desired input location of the data.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.UserEventInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $input_config = null;
    /**
     * The desired location of errors incurred during the Import. Cannot be set
     * for inline user event imports.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.ImportErrorsConfig errors_config = 3;</code>
     */
    private $errors_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. `projects/1234/locations/global/catalogs/default_catalog`
     *     @type \Google\Cloud\Retail\V2\UserEventInputConfig $input_config
     *           Required. The desired input location of the data.
     *     @type \Google\Cloud\Retail\V2\ImportErrorsConfig $errors_config
     *           The desired location of errors incurred during the Import. Cannot be set
     *           for inline user event imports.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. `projects/1234/locations/global/catalogs/default_catalog`
     *
     * 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. `projects/1234/locations/global/catalogs/default_catalog`
     *
     * 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 desired input location of the data.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.UserEventInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Retail\V2\UserEventInputConfig|null
     */
    public function getInputConfig()
    {
        return $this->input_config;
    }

    public function hasInputConfig()
    {
        return isset($this->input_config);
    }

    public function clearInputConfig()
    {
        unset($this->input_config);
    }

    /**
     * Required. The desired input location of the data.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.UserEventInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Retail\V2\UserEventInputConfig $var
     * @return $this
     */
    public function setInputConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\UserEventInputConfig::class);
        $this->input_config = $var;

        return $this;
    }

    /**
     * The desired location of errors incurred during the Import. Cannot be set
     * for inline user event imports.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.ImportErrorsConfig errors_config = 3;</code>
     * @return \Google\Cloud\Retail\V2\ImportErrorsConfig|null
     */
    public function getErrorsConfig()
    {
        return $this->errors_config;
    }

    public function hasErrorsConfig()
    {
        return isset($this->errors_config);
    }

    public function clearErrorsConfig()
    {
        unset($this->errors_config);
    }

    /**
     * The desired location of errors incurred during the Import. Cannot be set
     * for inline user event imports.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.ImportErrorsConfig errors_config = 3;</code>
     * @param \Google\Cloud\Retail\V2\ImportErrorsConfig $var
     * @return $this
     */
    public function setErrorsConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\ImportErrorsConfig::class);
        $this->errors_config = $var;

        return $this;
    }

}

