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

namespace Google\Cloud\Channel\V1;

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

/**
 * Request message for
 * [CloudChannelService.ImportCustomer][google.cloud.channel.v1.CloudChannelService.ImportCustomer]
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.ImportCustomerRequest</code>
 */
class ImportCustomerRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the reseller's account.
     * Parent takes the format: accounts/{account_id} or
     * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $parent = '';
    /**
     * Optional. The super admin of the resold customer generates this token to
     * authorize a reseller to access their Cloud Identity and purchase
     * entitlements on their behalf. You can omit this token after authorization.
     * See https://support.google.com/a/answer/7643790 for more details.
     *
     * Generated from protobuf field <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $auth_token = '';
    /**
     * Required. Choose to overwrite an existing customer if found.
     * This must be set to true if there is an existing customer with a
     * conflicting region code or domain.
     *
     * Generated from protobuf field <code>bool overwrite_if_exists = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $overwrite_if_exists = false;
    /**
     * Optional. Cloud Identity ID of a channel partner who will be the direct
     * reseller for the customer's order. This field is required for 2-tier
     * transfer scenarios and can be provided via the request Parent binding as
     * well.
     *
     * Generated from protobuf field <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $channel_partner_id = '';
    /**
     * Optional. Specifies the customer that will receive imported Cloud Identity
     * information.
     * Format: accounts/{account_id}/customers/{customer_id}
     *
     * Generated from protobuf field <code>string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    protected $customer = '';
    protected $customer_identity;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $domain
     *           Required. Customer domain.
     *     @type string $cloud_identity_id
     *           Required. Customer's Cloud Identity ID
     *     @type string $primary_admin_email
     *           Required. Customer's primary admin email.
     *     @type string $parent
     *           Required. The resource name of the reseller's account.
     *           Parent takes the format: accounts/{account_id} or
     *           accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
     *     @type string $auth_token
     *           Optional. The super admin of the resold customer generates this token to
     *           authorize a reseller to access their Cloud Identity and purchase
     *           entitlements on their behalf. You can omit this token after authorization.
     *           See https://support.google.com/a/answer/7643790 for more details.
     *     @type bool $overwrite_if_exists
     *           Required. Choose to overwrite an existing customer if found.
     *           This must be set to true if there is an existing customer with a
     *           conflicting region code or domain.
     *     @type string $channel_partner_id
     *           Optional. Cloud Identity ID of a channel partner who will be the direct
     *           reseller for the customer's order. This field is required for 2-tier
     *           transfer scenarios and can be provided via the request Parent binding as
     *           well.
     *     @type string $customer
     *           Optional. Specifies the customer that will receive imported Cloud Identity
     *           information.
     *           Format: accounts/{account_id}/customers/{customer_id}
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Customer domain.
     *
     * Generated from protobuf field <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDomain()
    {
        return $this->readOneof(2);
    }

    public function hasDomain()
    {
        return $this->hasOneof(2);
    }

    /**
     * Required. Customer domain.
     *
     * Generated from protobuf field <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDomain($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Required. Customer's Cloud Identity ID
     *
     * Generated from protobuf field <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCloudIdentityId()
    {
        return $this->readOneof(3);
    }

    public function hasCloudIdentityId()
    {
        return $this->hasOneof(3);
    }

    /**
     * Required. Customer's Cloud Identity ID
     *
     * Generated from protobuf field <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCloudIdentityId($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Required. Customer's primary admin email.
     *
     * Generated from protobuf field <code>string primary_admin_email = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPrimaryAdminEmail()
    {
        return $this->readOneof(8);
    }

    public function hasPrimaryAdminEmail()
    {
        return $this->hasOneof(8);
    }

    /**
     * Required. Customer's primary admin email.
     *
     * Generated from protobuf field <code>string primary_admin_email = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPrimaryAdminEmail($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Required. The resource name of the reseller's account.
     * Parent takes the format: accounts/{account_id} or
     * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The resource name of the reseller's account.
     * Parent takes the format: accounts/{account_id} or
     * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Optional. The super admin of the resold customer generates this token to
     * authorize a reseller to access their Cloud Identity and purchase
     * entitlements on their behalf. You can omit this token after authorization.
     * See https://support.google.com/a/answer/7643790 for more details.
     *
     * Generated from protobuf field <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getAuthToken()
    {
        return $this->auth_token;
    }

    /**
     * Optional. The super admin of the resold customer generates this token to
     * authorize a reseller to access their Cloud Identity and purchase
     * entitlements on their behalf. You can omit this token after authorization.
     * See https://support.google.com/a/answer/7643790 for more details.
     *
     * Generated from protobuf field <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setAuthToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->auth_token = $var;

        return $this;
    }

    /**
     * Required. Choose to overwrite an existing customer if found.
     * This must be set to true if there is an existing customer with a
     * conflicting region code or domain.
     *
     * Generated from protobuf field <code>bool overwrite_if_exists = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getOverwriteIfExists()
    {
        return $this->overwrite_if_exists;
    }

    /**
     * Required. Choose to overwrite an existing customer if found.
     * This must be set to true if there is an existing customer with a
     * conflicting region code or domain.
     *
     * Generated from protobuf field <code>bool overwrite_if_exists = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setOverwriteIfExists($var)
    {
        GPBUtil::checkBool($var);
        $this->overwrite_if_exists = $var;

        return $this;
    }

    /**
     * Optional. Cloud Identity ID of a channel partner who will be the direct
     * reseller for the customer's order. This field is required for 2-tier
     * transfer scenarios and can be provided via the request Parent binding as
     * well.
     *
     * Generated from protobuf field <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getChannelPartnerId()
    {
        return $this->channel_partner_id;
    }

    /**
     * Optional. Cloud Identity ID of a channel partner who will be the direct
     * reseller for the customer's order. This field is required for 2-tier
     * transfer scenarios and can be provided via the request Parent binding as
     * well.
     *
     * Generated from protobuf field <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setChannelPartnerId($var)
    {
        GPBUtil::checkString($var, True);
        $this->channel_partner_id = $var;

        return $this;
    }

    /**
     * Optional. Specifies the customer that will receive imported Cloud Identity
     * information.
     * Format: accounts/{account_id}/customers/{customer_id}
     *
     * Generated from protobuf field <code>string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getCustomer()
    {
        return $this->customer;
    }

    /**
     * Optional. Specifies the customer that will receive imported Cloud Identity
     * information.
     * Format: accounts/{account_id}/customers/{customer_id}
     *
     * Generated from protobuf field <code>string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setCustomer($var)
    {
        GPBUtil::checkString($var, True);
        $this->customer = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getCustomerIdentity()
    {
        return $this->whichOneof("customer_identity");
    }

}

