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

namespace Google\Cloud\BareMetalSolution\V2;

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

/**
 * Request for SubmitProvisioningConfig.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.SubmitProvisioningConfigRequest</code>
 */
class SubmitProvisioningConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent project and location containing the
     * ProvisioningConfig.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The ProvisioningConfig to create.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $provisioning_config = null;
    /**
     * Optional. Email provided to send a confirmation with provisioning config
     * to.
     *
     * Generated from protobuf field <code>string email = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $email = '';

    /**
     * @param string                                                $parent             Required. The parent project and location containing the
     *                                                                                  ProvisioningConfig. Please see
     *                                                                                  {@see BareMetalSolutionClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig Required. The ProvisioningConfig to create.
     *
     * @return \Google\Cloud\BareMetalSolution\V2\SubmitProvisioningConfigRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioningConfig): self
    {
        return (new self())
            ->setParent($parent)
            ->setProvisioningConfig($provisioningConfig);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent project and location containing the
     *           ProvisioningConfig.
     *     @type \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $provisioning_config
     *           Required. The ProvisioningConfig to create.
     *     @type string $email
     *           Optional. Email provided to send a confirmation with provisioning config
     *           to.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent project and location containing the
     * ProvisioningConfig.
     *
     * 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 project and location containing the
     * ProvisioningConfig.
     *
     * 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 ProvisioningConfig to create.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig|null
     */
    public function getProvisioningConfig()
    {
        return $this->provisioning_config;
    }

    public function hasProvisioningConfig()
    {
        return isset($this->provisioning_config);
    }

    public function clearProvisioningConfig()
    {
        unset($this->provisioning_config);
    }

    /**
     * Required. The ProvisioningConfig to create.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.ProvisioningConfig provisioning_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig $var
     * @return $this
     */
    public function setProvisioningConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BareMetalSolution\V2\ProvisioningConfig::class);
        $this->provisioning_config = $var;

        return $this;
    }

    /**
     * Optional. Email provided to send a confirmation with provisioning config
     * to.
     *
     * Generated from protobuf field <code>string email = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Optional. Email provided to send a confirmation with provisioning config
     * to.
     *
     * Generated from protobuf field <code>string email = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEmail($var)
    {
        GPBUtil::checkString($var, True);
        $this->email = $var;

        return $this;
    }

}

