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

namespace Google\Cloud\Dataform\V1beta1;

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

/**
 * `CreateWorkspace` request message.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.CreateWorkspaceRequest</code>
 */
class CreateWorkspaceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The repository in which to create the workspace. Must be in the format
     * `projects/&#42;&#47;locations/&#42;&#47;repositories/&#42;`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The workspace to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Workspace workspace = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $workspace = null;
    /**
     * Required. The ID to use for the workspace, which will become the final component of
     * the workspace's resource name.
     *
     * Generated from protobuf field <code>string workspace_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $workspace_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The repository in which to create the workspace. Must be in the format
     *           `projects/&#42;&#47;locations/&#42;&#47;repositories/&#42;`.
     *     @type \Google\Cloud\Dataform\V1beta1\Workspace $workspace
     *           Required. The workspace to create.
     *     @type string $workspace_id
     *           Required. The ID to use for the workspace, which will become the final component of
     *           the workspace's resource name.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1Beta1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The repository in which to create the workspace. Must be in the format
     * `projects/&#42;&#47;locations/&#42;&#47;repositories/&#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 repository in which to create the workspace. Must be in the format
     * `projects/&#42;&#47;locations/&#42;&#47;repositories/&#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 workspace to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Workspace workspace = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataform\V1beta1\Workspace|null
     */
    public function getWorkspace()
    {
        return $this->workspace;
    }

    public function hasWorkspace()
    {
        return isset($this->workspace);
    }

    public function clearWorkspace()
    {
        unset($this->workspace);
    }

    /**
     * Required. The workspace to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Workspace workspace = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataform\V1beta1\Workspace $var
     * @return $this
     */
    public function setWorkspace($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataform\V1beta1\Workspace::class);
        $this->workspace = $var;

        return $this;
    }

    /**
     * Required. The ID to use for the workspace, which will become the final component of
     * the workspace's resource name.
     *
     * Generated from protobuf field <code>string workspace_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getWorkspaceId()
    {
        return $this->workspace_id;
    }

    /**
     * Required. The ID to use for the workspace, which will become the final component of
     * the workspace's resource name.
     *
     * Generated from protobuf field <code>string workspace_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setWorkspaceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->workspace_id = $var;

        return $this;
    }

}

