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

namespace Google\Cloud\Domains\V1beta1;

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

/**
 * Defines an authorization code.
 *
 * Generated from protobuf message <code>google.cloud.domains.v1beta1.AuthorizationCode</code>
 */
class AuthorizationCode extends \Google\Protobuf\Internal\Message
{
    /**
     * The Authorization Code in ASCII. It can be used to transfer the domain
     * to or from another registrar.
     *
     * Generated from protobuf field <code>string code = 1;</code>
     */
    private $code = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $code
     *           The Authorization Code in ASCII. It can be used to transfer the domain
     *           to or from another registrar.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce();
        parent::__construct($data);
    }

    /**
     * The Authorization Code in ASCII. It can be used to transfer the domain
     * to or from another registrar.
     *
     * Generated from protobuf field <code>string code = 1;</code>
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * The Authorization Code in ASCII. It can be used to transfer the domain
     * to or from another registrar.
     *
     * Generated from protobuf field <code>string code = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->code = $var;

        return $this;
    }

}

