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

namespace Google\Cloud\Retail\V2;

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

/**
 * Request message for RejoinUserEvents method.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.RejoinUserEventsRequest</code>
 */
class RejoinUserEventsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent catalog resource name, such as
     * `projects/1234/locations/global/catalogs/default_catalog`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $parent = '';
    /**
     * The type of the user event rejoin to define the scope and range of the user
     * events to be rejoined with the latest product catalog. Defaults to
     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
     * an invalid integer value.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;</code>
     */
    protected $user_event_rejoin_scope = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent catalog resource name, such as
     *           `projects/1234/locations/global/catalogs/default_catalog`.
     *     @type int $user_event_rejoin_scope
     *           The type of the user event rejoin to define the scope and range of the user
     *           events to be rejoined with the latest product catalog. Defaults to
     *           `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
     *           an invalid integer value.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\UserEventService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent catalog resource name, such as
     * `projects/1234/locations/global/catalogs/default_catalog`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent catalog resource name, such as
     * `projects/1234/locations/global/catalogs/default_catalog`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * The type of the user event rejoin to define the scope and range of the user
     * events to be rejoined with the latest product catalog. Defaults to
     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
     * an invalid integer value.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;</code>
     * @return int
     */
    public function getUserEventRejoinScope()
    {
        return $this->user_event_rejoin_scope;
    }

    /**
     * The type of the user event rejoin to define the scope and range of the user
     * events to be rejoined with the latest product catalog. Defaults to
     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
     * an invalid integer value.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope user_event_rejoin_scope = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setUserEventRejoinScope($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Retail\V2\RejoinUserEventsRequest\UserEventRejoinScope::class);
        $this->user_event_rejoin_scope = $var;

        return $this;
    }

}

