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

namespace Google\Cloud\AppEngine\V1;

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

/**
 * A DNS resource record.
 *
 * Generated from protobuf message <code>google.appengine.v1.ResourceRecord</code>
 */
class ResourceRecord extends \Google\Protobuf\Internal\Message
{
    /**
     * Relative name of the object affected by this record. Only applicable for
     * `CNAME` records. Example: 'www'.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Data for this record. Values vary by record type, as defined in RFC 1035
     * (section 5) and RFC 1034 (section 3.6.1).
     *
     * Generated from protobuf field <code>string rrdata = 2;</code>
     */
    private $rrdata = '';
    /**
     * Resource record type. Example: `AAAA`.
     *
     * Generated from protobuf field <code>.google.appengine.v1.ResourceRecord.RecordType type = 3;</code>
     */
    private $type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Relative name of the object affected by this record. Only applicable for
     *           `CNAME` records. Example: 'www'.
     *     @type string $rrdata
     *           Data for this record. Values vary by record type, as defined in RFC 1035
     *           (section 5) and RFC 1034 (section 3.6.1).
     *     @type int $type
     *           Resource record type. Example: `AAAA`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Appengine\V1\DomainMapping::initOnce();
        parent::__construct($data);
    }

    /**
     * Relative name of the object affected by this record. Only applicable for
     * `CNAME` records. Example: 'www'.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Relative name of the object affected by this record. Only applicable for
     * `CNAME` records. Example: 'www'.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Data for this record. Values vary by record type, as defined in RFC 1035
     * (section 5) and RFC 1034 (section 3.6.1).
     *
     * Generated from protobuf field <code>string rrdata = 2;</code>
     * @return string
     */
    public function getRrdata()
    {
        return $this->rrdata;
    }

    /**
     * Data for this record. Values vary by record type, as defined in RFC 1035
     * (section 5) and RFC 1034 (section 3.6.1).
     *
     * Generated from protobuf field <code>string rrdata = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setRrdata($var)
    {
        GPBUtil::checkString($var, True);
        $this->rrdata = $var;

        return $this;
    }

    /**
     * Resource record type. Example: `AAAA`.
     *
     * Generated from protobuf field <code>.google.appengine.v1.ResourceRecord.RecordType type = 3;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Resource record type. Example: `AAAA`.
     *
     * Generated from protobuf field <code>.google.appengine.v1.ResourceRecord.RecordType type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AppEngine\V1\ResourceRecord\RecordType::class);
        $this->type = $var;

        return $this;
    }

}

