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

namespace Google\Cloud\EssentialContacts\V1;

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

/**
 * Response message for the ComputeContacts method.
 *
 * Generated from protobuf message <code>google.cloud.essentialcontacts.v1.ComputeContactsResponse</code>
 */
class ComputeContactsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * All contacts for the resource that are subscribed to the specified
     * notification categories, including contacts inherited from any parent
     * resources.
     *
     * Generated from protobuf field <code>repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1;</code>
     */
    private $contacts;
    /**
     * If there are more results than those appearing in this response, then
     * `next_page_token` is included. To get the next set of results, call this
     * method again using the value of `next_page_token` as `page_token` and the
     * rest of the parameters the same as the original request.
     *
     * 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\EssentialContacts\V1\Contact[]|\Google\Protobuf\Internal\RepeatedField $contacts
     *           All contacts for the resource that are subscribed to the specified
     *           notification categories, including contacts inherited from any parent
     *           resources.
     *     @type string $next_page_token
     *           If there are more results than those appearing in this response, then
     *           `next_page_token` is included. To get the next set of results, call this
     *           method again using the value of `next_page_token` as `page_token` and the
     *           rest of the parameters the same as the original request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * All contacts for the resource that are subscribed to the specified
     * notification categories, including contacts inherited from any parent
     * resources.
     *
     * Generated from protobuf field <code>repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getContacts()
    {
        return $this->contacts;
    }

    /**
     * All contacts for the resource that are subscribed to the specified
     * notification categories, including contacts inherited from any parent
     * resources.
     *
     * Generated from protobuf field <code>repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1;</code>
     * @param \Google\Cloud\EssentialContacts\V1\Contact[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setContacts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\EssentialContacts\V1\Contact::class);
        $this->contacts = $arr;

        return $this;
    }

    /**
     * If there are more results than those appearing in this response, then
     * `next_page_token` is included. To get the next set of results, call this
     * method again using the value of `next_page_token` as `page_token` and the
     * rest of the parameters the same as the original request.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * If there are more results than those appearing in this response, then
     * `next_page_token` is included. To get the next set of results, call this
     * method again using the value of `next_page_token` as `page_token` and the
     * rest of the parameters the same as the original request.
     *
     * 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;
    }

}

