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

namespace Google\Cloud\DiscoveryEngine\V1;

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

/**
 * Response message for
 * [SiteSearchEngineService.ListTargetSites][google.cloud.discoveryengine.v1.SiteSearchEngineService.ListTargetSites]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.ListTargetSitesResponse</code>
 */
class ListTargetSitesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of TargetSites.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.TargetSite target_sites = 1;</code>
     */
    private $target_sites;
    /**
     * A token that 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 = '';
    /**
     * The total number of items matching the request.
     * This will always be populated in the response.
     *
     * 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 \Google\Cloud\DiscoveryEngine\V1\TargetSite[] $target_sites
     *           List of TargetSites.
     *     @type string $next_page_token
     *           A token that 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
     *           The total number of items matching the request.
     *           This will always be populated in the response.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\SiteSearchEngineService::initOnce();
        parent::__construct($data);
    }

    /**
     * List of TargetSites.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.TargetSite target_sites = 1;</code>
     * @return RepeatedField<\Google\Cloud\DiscoveryEngine\V1\TargetSite>
     */
    public function getTargetSites()
    {
        return $this->target_sites;
    }

    /**
     * List of TargetSites.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.TargetSite target_sites = 1;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\TargetSite[] $var
     * @return $this
     */
    public function setTargetSites($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\TargetSite::class);
        $this->target_sites = $arr;

        return $this;
    }

    /**
     * A token that 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 that 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;
    }

    /**
     * The total number of items matching the request.
     * This will always be populated in the response.
     *
     * Generated from protobuf field <code>int32 total_size = 3;</code>
     * @return int
     */
    public function getTotalSize()
    {
        return $this->total_size;
    }

    /**
     * The total number of items matching the request.
     * This will always be populated in the response.
     *
     * 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;
    }

}

