<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * `CreateFolder` request message.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.CreateFolderRequest</code>
 */
class CreateFolderRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The location in which to create the Folder. Must be in the format
     * `projects/{@*}locations/*`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The Folder to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $folder = null;
    /**
     * The ID to use for the Folder, which will become the final component of
     * the Folder's resource name.
     *
     * Generated from protobuf field <code>string folder_id = 3;</code>
     */
    protected $folder_id = '';

    /**
     * @param string                                $parent Required. The location in which to create the Folder. Must be in the format
     *                                                      `projects/&#42;/locations/*`. Please see
     *                                                      {@see DataformClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\Dataform\V1beta1\Folder $folder Required. The Folder to create.
     *
     * @return \Google\Cloud\Dataform\V1beta1\CreateFolderRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dataform\V1beta1\Folder $folder): self
    {
        return (new self())
            ->setParent($parent)
            ->setFolder($folder);
    }

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

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

    public function hasFolder()
    {
        return isset($this->folder);
    }

    public function clearFolder()
    {
        unset($this->folder);
    }

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

        return $this;
    }

    /**
     * The ID to use for the Folder, which will become the final component of
     * the Folder's resource name.
     *
     * Generated from protobuf field <code>string folder_id = 3;</code>
     * @return string
     */
    public function getFolderId()
    {
        return $this->folder_id;
    }

    /**
     * The ID to use for the Folder, which will become the final component of
     * the Folder's resource name.
     *
     * Generated from protobuf field <code>string folder_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setFolderId($var)
    {
        GPBUtil::checkString($var, True);
        $this->folder_id = $var;

        return $this;
    }

}

