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

namespace Google\Cloud\Iap\V1;

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

/**
 * A TunnelDestGroup.
 *
 * Generated from protobuf message <code>google.cloud.iap.v1.TunnelDestGroup</code>
 */
class TunnelDestGroup extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Identifier for the TunnelDestGroup. Must be unique within the
     * project and contain only lower case letters (a-z) and dashes (-).
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Optional. Unordered list. List of CIDRs that this group applies to.
     *
     * Generated from protobuf field <code>repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $cidrs;
    /**
     * Optional. Unordered list. List of FQDNs that this group applies to.
     *
     * Generated from protobuf field <code>repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $fqdns;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Identifier for the TunnelDestGroup. Must be unique within the
     *           project and contain only lower case letters (a-z) and dashes (-).
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $cidrs
     *           Optional. Unordered list. List of CIDRs that this group applies to.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $fqdns
     *           Optional. Unordered list. List of FQDNs that this group applies to.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Identifier for the TunnelDestGroup. Must be unique within the
     * project and contain only lower case letters (a-z) and dashes (-).
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Identifier for the TunnelDestGroup. Must be unique within the
     * project and contain only lower case letters (a-z) and dashes (-).
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. Unordered list. List of CIDRs that this group applies to.
     *
     * Generated from protobuf field <code>repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCidrs()
    {
        return $this->cidrs;
    }

    /**
     * Optional. Unordered list. List of CIDRs that this group applies to.
     *
     * Generated from protobuf field <code>repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCidrs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->cidrs = $arr;

        return $this;
    }

    /**
     * Optional. Unordered list. List of FQDNs that this group applies to.
     *
     * Generated from protobuf field <code>repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFqdns()
    {
        return $this->fqdns;
    }

    /**
     * Optional. Unordered list. List of FQDNs that this group applies to.
     *
     * Generated from protobuf field <code>repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFqdns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->fqdns = $arr;

        return $this;
    }

}

