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

namespace Google\Cloud\Domains\V1beta1\DnsSettings;

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

/**
 * Configuration for an arbitrary DNS provider.
 *
 * Generated from protobuf message <code>google.cloud.domains.v1beta1.DnsSettings.CustomDns</code>
 */
class CustomDns extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A list of name servers that store the DNS zone for this domain. Each name
     * server is a domain name, with Unicode domain names expressed in
     * Punycode format.
     *
     * Generated from protobuf field <code>repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name_servers;
    /**
     * The list of DS records for this domain, which are used to enable DNSSEC.
     * The domain's DNS provider can provide the values to set here. If this
     * field is empty, DNSSEC is disabled.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2;</code>
     */
    private $ds_records;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $name_servers
     *           Required. A list of name servers that store the DNS zone for this domain. Each name
     *           server is a domain name, with Unicode domain names expressed in
     *           Punycode format.
     *     @type \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord[]|\Google\Protobuf\Internal\RepeatedField $ds_records
     *           The list of DS records for this domain, which are used to enable DNSSEC.
     *           The domain's DNS provider can provide the values to set here. If this
     *           field is empty, DNSSEC is disabled.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A list of name servers that store the DNS zone for this domain. Each name
     * server is a domain name, with Unicode domain names expressed in
     * Punycode format.
     *
     * Generated from protobuf field <code>repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNameServers()
    {
        return $this->name_servers;
    }

    /**
     * Required. A list of name servers that store the DNS zone for this domain. Each name
     * server is a domain name, with Unicode domain names expressed in
     * Punycode format.
     *
     * Generated from protobuf field <code>repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNameServers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->name_servers = $arr;

        return $this;
    }

    /**
     * The list of DS records for this domain, which are used to enable DNSSEC.
     * The domain's DNS provider can provide the values to set here. If this
     * field is empty, DNSSEC is disabled.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDsRecords()
    {
        return $this->ds_records;
    }

    /**
     * The list of DS records for this domain, which are used to enable DNSSEC.
     * The domain's DNS provider can provide the values to set here. If this
     * field is empty, DNSSEC is disabled.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2;</code>
     * @param \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDsRecords($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord::class);
        $this->ds_records = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CustomDns::class, \Google\Cloud\Domains\V1beta1\DnsSettings_CustomDns::class);

