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

namespace Google\Cloud\Domains\V1alpha2;

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

/**
 * Defines the contact information associated with a `Registration`.
 * [ICANN](https://icann.org/) requires all domain names to have associated
 * contact information. The `registrant_contact` is considered the
 * domain's legal owner, and often the other contacts are identical.
 *
 * Generated from protobuf message <code>google.cloud.domains.v1alpha2.ContactSettings</code>
 */
class ContactSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Privacy setting for the contacts associated with the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $privacy = 0;
    /**
     * Required. The registrant contact for the `Registration`.
     * *Caution: Anyone with access to this email address, phone number,
     * and/or postal address can take control of the domain.*
     * *Warning: For new `Registration`s, the registrant receives an email
     * confirmation that they must complete within 15 days to avoid domain
     * suspension.*
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $registrant_contact = null;
    /**
     * Required. The administrative contact for the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $admin_contact = null;
    /**
     * Required. The technical contact for the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $technical_contact = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $privacy
     *           Required. Privacy setting for the contacts associated with the `Registration`.
     *     @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $registrant_contact
     *           Required. The registrant contact for the `Registration`.
     *           *Caution: Anyone with access to this email address, phone number,
     *           and/or postal address can take control of the domain.*
     *           *Warning: For new `Registration`s, the registrant receives an email
     *           confirmation that they must complete within 15 days to avoid domain
     *           suspension.*
     *     @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $admin_contact
     *           Required. The administrative contact for the `Registration`.
     *     @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $technical_contact
     *           Required. The technical contact for the `Registration`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Privacy setting for the contacts associated with the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPrivacy()
    {
        return $this->privacy;
    }

    /**
     * Required. Privacy setting for the contacts associated with the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPrivacy($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class);
        $this->privacy = $var;

        return $this;
    }

    /**
     * Required. The registrant contact for the `Registration`.
     * *Caution: Anyone with access to this email address, phone number,
     * and/or postal address can take control of the domain.*
     * *Warning: For new `Registration`s, the registrant receives an email
     * confirmation that they must complete within 15 days to avoid domain
     * suspension.*
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null
     */
    public function getRegistrantContact()
    {
        return $this->registrant_contact;
    }

    public function hasRegistrantContact()
    {
        return isset($this->registrant_contact);
    }

    public function clearRegistrantContact()
    {
        unset($this->registrant_contact);
    }

    /**
     * Required. The registrant contact for the `Registration`.
     * *Caution: Anyone with access to this email address, phone number,
     * and/or postal address can take control of the domain.*
     * *Warning: For new `Registration`s, the registrant receives an email
     * confirmation that they must complete within 15 days to avoid domain
     * suspension.*
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var
     * @return $this
     */
    public function setRegistrantContact($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class);
        $this->registrant_contact = $var;

        return $this;
    }

    /**
     * Required. The administrative contact for the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null
     */
    public function getAdminContact()
    {
        return $this->admin_contact;
    }

    public function hasAdminContact()
    {
        return isset($this->admin_contact);
    }

    public function clearAdminContact()
    {
        unset($this->admin_contact);
    }

    /**
     * Required. The administrative contact for the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var
     * @return $this
     */
    public function setAdminContact($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class);
        $this->admin_contact = $var;

        return $this;
    }

    /**
     * Required. The technical contact for the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null
     */
    public function getTechnicalContact()
    {
        return $this->technical_contact;
    }

    public function hasTechnicalContact()
    {
        return isset($this->technical_contact);
    }

    public function clearTechnicalContact()
    {
        unset($this->technical_contact);
    }

    /**
     * Required. The technical contact for the `Registration`.
     *
     * Generated from protobuf field <code>.google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var
     * @return $this
     */
    public function setTechnicalContact($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class);
        $this->technical_contact = $var;

        return $this;
    }

}

