<?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;

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

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The location in which to create the repository. Must be in the format
     *           `projects/&#42;&#47;locations/&#42;`.
     *     @type \Google\Cloud\Dataform\V1beta1\Repository $repository
     *           Required. The repository to create.
     *     @type string $repository_id
     *           Required. The ID to use for the repository, which will become the final component of
     *           the repository'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 repository. Must be in the format
     * `projects/&#42;&#47;locations/&#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 location in which to create the repository. Must be in the format
     * `projects/&#42;&#47;locations/&#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 repository to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataform\V1beta1\Repository|null
     */
    public function getRepository()
    {
        return $this->repository;
    }

    public function hasRepository()
    {
        return isset($this->repository);
    }

    public function clearRepository()
    {
        unset($this->repository);
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

