<?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;

/**
 * Request for the `RegisterDomain` method.
 *
 * Generated from protobuf message <code>google.cloud.domains.v1beta1.RegisterDomainRequest</code>
 */
class RegisterDomainRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource of the `Registration`. Must be in the
     * format `projects/&#42;&#47;locations/&#42;`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The complete `Registration` resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $registration = null;
    /**
     * The list of domain notices that you acknowledge. Call
     * `RetrieveRegisterParameters` to see the notices that need acknowledgement.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3;</code>
     */
    private $domain_notices;
    /**
     * The list of contact notices that the caller acknowledges. The notices
     * required here depend on the values specified in
     * `registration.contact_settings`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4;</code>
     */
    private $contact_notices;
    /**
     * Required. Yearly price to register or renew the domain.
     * The value that should be put here can be obtained from
     * RetrieveRegisterParameters or SearchDomains calls.
     *
     * Generated from protobuf field <code>.google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $yearly_price = null;
    /**
     * When true, only validation will be performed, without actually registering
     * the domain. Follows:
     * https://cloud.google.com/apis/design/design_patterns#request_validation
     *
     * Generated from protobuf field <code>bool validate_only = 6;</code>
     */
    private $validate_only = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource of the `Registration`. Must be in the
     *           format `projects/&#42;&#47;locations/&#42;`.
     *     @type \Google\Cloud\Domains\V1beta1\Registration $registration
     *           Required. The complete `Registration` resource to be created.
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $domain_notices
     *           The list of domain notices that you acknowledge. Call
     *           `RetrieveRegisterParameters` to see the notices that need acknowledgement.
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $contact_notices
     *           The list of contact notices that the caller acknowledges. The notices
     *           required here depend on the values specified in
     *           `registration.contact_settings`.
     *     @type \Google\Type\Money $yearly_price
     *           Required. Yearly price to register or renew the domain.
     *           The value that should be put here can be obtained from
     *           RetrieveRegisterParameters or SearchDomains calls.
     *     @type bool $validate_only
     *           When true, only validation will be performed, without actually registering
     *           the domain. Follows:
     *           https://cloud.google.com/apis/design/design_patterns#request_validation
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource of the `Registration`. Must be in the
     * format `projects/&#42;&#47;locations/&#42;`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent resource of the `Registration`. Must be in the
     * format `projects/&#42;&#47;locations/&#42;`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The complete `Registration` resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Domains\V1beta1\Registration|null
     */
    public function getRegistration()
    {
        return isset($this->registration) ? $this->registration : null;
    }

    public function hasRegistration()
    {
        return isset($this->registration);
    }

    public function clearRegistration()
    {
        unset($this->registration);
    }

    /**
     * Required. The complete `Registration` resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Domains\V1beta1\Registration $var
     * @return $this
     */
    public function setRegistration($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\Registration::class);
        $this->registration = $var;

        return $this;
    }

    /**
     * The list of domain notices that you acknowledge. Call
     * `RetrieveRegisterParameters` to see the notices that need acknowledgement.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDomainNotices()
    {
        return $this->domain_notices;
    }

    /**
     * The list of domain notices that you acknowledge. Call
     * `RetrieveRegisterParameters` to see the notices that need acknowledgement.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3;</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDomainNotices($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\DomainNotice::class);
        $this->domain_notices = $arr;

        return $this;
    }

    /**
     * The list of contact notices that the caller acknowledges. The notices
     * required here depend on the values specified in
     * `registration.contact_settings`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getContactNotices()
    {
        return $this->contact_notices;
    }

    /**
     * The list of contact notices that the caller acknowledges. The notices
     * required here depend on the values specified in
     * `registration.contact_settings`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4;</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setContactNotices($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactNotice::class);
        $this->contact_notices = $arr;

        return $this;
    }

    /**
     * Required. Yearly price to register or renew the domain.
     * The value that should be put here can be obtained from
     * RetrieveRegisterParameters or SearchDomains calls.
     *
     * Generated from protobuf field <code>.google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Type\Money|null
     */
    public function getYearlyPrice()
    {
        return isset($this->yearly_price) ? $this->yearly_price : null;
    }

    public function hasYearlyPrice()
    {
        return isset($this->yearly_price);
    }

    public function clearYearlyPrice()
    {
        unset($this->yearly_price);
    }

    /**
     * Required. Yearly price to register or renew the domain.
     * The value that should be put here can be obtained from
     * RetrieveRegisterParameters or SearchDomains calls.
     *
     * Generated from protobuf field <code>.google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Type\Money $var
     * @return $this
     */
    public function setYearlyPrice($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Money::class);
        $this->yearly_price = $var;

        return $this;
    }

    /**
     * When true, only validation will be performed, without actually registering
     * the domain. Follows:
     * https://cloud.google.com/apis/design/design_patterns#request_validation
     *
     * Generated from protobuf field <code>bool validate_only = 6;</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * When true, only validation will be performed, without actually registering
     * the domain. Follows:
     * https://cloud.google.com/apis/design/design_patterns#request_validation
     *
     * Generated from protobuf field <code>bool validate_only = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

}

