<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/advisorynotifications/v1/service.proto

namespace Google\Cloud\AdvisoryNotifications\V1;

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

/**
 * Response of ListNotifications endpoint.
 *
 * Generated from protobuf message <code>google.cloud.advisorynotifications.v1.ListNotificationsResponse</code>
 */
class ListNotificationsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of notifications under a given parent.
     *
     * Generated from protobuf field <code>repeated .google.cloud.advisorynotifications.v1.Notification notifications = 1;</code>
     */
    private $notifications;
    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    protected $next_page_token = '';
    /**
     * Estimation of a total number of notifications.
     *
     * Generated from protobuf field <code>int32 total_size = 3;</code>
     */
    protected $total_size = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AdvisoryNotifications\V1\Notification>|\Google\Protobuf\Internal\RepeatedField $notifications
     *           List of notifications under a given parent.
     *     @type string $next_page_token
     *           A token, which can be sent as `page_token` to retrieve the next page.
     *           If this field is omitted, there are no subsequent pages.
     *     @type int $total_size
     *           Estimation of a total number of notifications.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Advisorynotifications\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * List of notifications under a given parent.
     *
     * Generated from protobuf field <code>repeated .google.cloud.advisorynotifications.v1.Notification notifications = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNotifications()
    {
        return $this->notifications;
    }

    /**
     * List of notifications under a given parent.
     *
     * Generated from protobuf field <code>repeated .google.cloud.advisorynotifications.v1.Notification notifications = 1;</code>
     * @param array<\Google\Cloud\AdvisoryNotifications\V1\Notification>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNotifications($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AdvisoryNotifications\V1\Notification::class);
        $this->notifications = $arr;

        return $this;
    }

    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * 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;
    }

    /**
     * Estimation of a total number of notifications.
     *
     * Generated from protobuf field <code>int32 total_size = 3;</code>
     * @return int
     */
    public function getTotalSize()
    {
        return $this->total_size;
    }

    /**
     * Estimation of a total number of notifications.
     *
     * Generated from protobuf field <code>int32 total_size = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_size = $var;

        return $this;
    }

}

