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

namespace Google\Cloud\RecommendationEngine\V1beta1;

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

/**
 * Response message for ListUserEvents method.
 *
 * Generated from protobuf message <code>google.cloud.recommendationengine.v1beta1.ListUserEventsResponse</code>
 */
class ListUserEventsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The user events.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommendationengine.v1beta1.UserEvent user_events = 1;</code>
     */
    private $user_events;
    /**
     * If empty, the list is complete. If nonempty, the token to pass to the next
     * request's ListUserEvents.page_token.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    private $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\RecommendationEngine\V1beta1\UserEvent[]|\Google\Protobuf\Internal\RepeatedField $user_events
     *           The user events.
     *     @type string $next_page_token
     *           If empty, the list is complete. If nonempty, the token to pass to the next
     *           request's ListUserEvents.page_token.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recommendationengine\V1Beta1\UserEventService::initOnce();
        parent::__construct($data);
    }

    /**
     * The user events.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommendationengine.v1beta1.UserEvent user_events = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUserEvents()
    {
        return $this->user_events;
    }

    /**
     * The user events.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommendationengine.v1beta1.UserEvent user_events = 1;</code>
     * @param \Google\Cloud\RecommendationEngine\V1beta1\UserEvent[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUserEvents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\RecommendationEngine\V1beta1\UserEvent::class);
        $this->user_events = $arr;

        return $this;
    }

    /**
     * If empty, the list is complete. If nonempty, the token to pass to the next
     * request's ListUserEvents.page_token.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * If empty, the list is complete. If nonempty, the token to pass to the next
     * request's ListUserEvents.page_token.
     *
     * 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;
    }

}

