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

/**
 * `CommitWorkspaceChanges` request message.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest</code>
 */
class CommitWorkspaceChangesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The workspace's name.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * Required. The commit's author.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.CommitAuthor author = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $author = null;
    /**
     * Optional. The commit's message.
     *
     * Generated from protobuf field <code>string commit_message = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $commit_message = '';
    /**
     * Optional. Full file paths to commit including filename, rooted at workspace root. If
     * left empty, all files will be committed.
     *
     * Generated from protobuf field <code>repeated string paths = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $paths;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The workspace's name.
     *     @type \Google\Cloud\Dataform\V1beta1\CommitAuthor $author
     *           Required. The commit's author.
     *     @type string $commit_message
     *           Optional. The commit's message.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $paths
     *           Optional. Full file paths to commit including filename, rooted at workspace root. If
     *           left empty, all files will be committed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1Beta1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The workspace's name.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The workspace's name.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The commit's author.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.CommitAuthor author = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataform\V1beta1\CommitAuthor|null
     */
    public function getAuthor()
    {
        return $this->author;
    }

    public function hasAuthor()
    {
        return isset($this->author);
    }

    public function clearAuthor()
    {
        unset($this->author);
    }

    /**
     * Required. The commit's author.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1beta1.CommitAuthor author = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataform\V1beta1\CommitAuthor $var
     * @return $this
     */
    public function setAuthor($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataform\V1beta1\CommitAuthor::class);
        $this->author = $var;

        return $this;
    }

    /**
     * Optional. The commit's message.
     *
     * Generated from protobuf field <code>string commit_message = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCommitMessage()
    {
        return $this->commit_message;
    }

    /**
     * Optional. The commit's message.
     *
     * Generated from protobuf field <code>string commit_message = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCommitMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->commit_message = $var;

        return $this;
    }

    /**
     * Optional. Full file paths to commit including filename, rooted at workspace root. If
     * left empty, all files will be committed.
     *
     * Generated from protobuf field <code>repeated string paths = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPaths()
    {
        return $this->paths;
    }

    /**
     * Optional. Full file paths to commit including filename, rooted at workspace root. If
     * left empty, all files will be committed.
     *
     * Generated from protobuf field <code>repeated string paths = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPaths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->paths = $arr;

        return $this;
    }

}

