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

namespace Google\Cloud\Dataform\V1;

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

/**
 * Represents a single commit log.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1.CommitLogEntry</code>
 */
class CommitLogEntry extends \Google\Protobuf\Internal\Message
{
    /**
     * Commit timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp commit_time = 1;</code>
     */
    protected $commit_time = null;
    /**
     * The commit SHA for this commit log entry.
     *
     * Generated from protobuf field <code>string commit_sha = 2;</code>
     */
    protected $commit_sha = '';
    /**
     * The commit author for this commit log entry.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CommitAuthor author = 3;</code>
     */
    protected $author = null;
    /**
     * The commit message for this commit log entry.
     *
     * Generated from protobuf field <code>string commit_message = 4;</code>
     */
    protected $commit_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $commit_time
     *           Commit timestamp.
     *     @type string $commit_sha
     *           The commit SHA for this commit log entry.
     *     @type \Google\Cloud\Dataform\V1\CommitAuthor $author
     *           The commit author for this commit log entry.
     *     @type string $commit_message
     *           The commit message for this commit log entry.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * Commit timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp commit_time = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCommitTime()
    {
        return $this->commit_time;
    }

    public function hasCommitTime()
    {
        return isset($this->commit_time);
    }

    public function clearCommitTime()
    {
        unset($this->commit_time);
    }

    /**
     * Commit timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp commit_time = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCommitTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->commit_time = $var;

        return $this;
    }

    /**
     * The commit SHA for this commit log entry.
     *
     * Generated from protobuf field <code>string commit_sha = 2;</code>
     * @return string
     */
    public function getCommitSha()
    {
        return $this->commit_sha;
    }

    /**
     * The commit SHA for this commit log entry.
     *
     * Generated from protobuf field <code>string commit_sha = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCommitSha($var)
    {
        GPBUtil::checkString($var, True);
        $this->commit_sha = $var;

        return $this;
    }

    /**
     * The commit author for this commit log entry.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CommitAuthor author = 3;</code>
     * @return \Google\Cloud\Dataform\V1\CommitAuthor|null
     */
    public function getAuthor()
    {
        return $this->author;
    }

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

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

    /**
     * The commit author for this commit log entry.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CommitAuthor author = 3;</code>
     * @param \Google\Cloud\Dataform\V1\CommitAuthor $var
     * @return $this
     */
    public function setAuthor($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataform\V1\CommitAuthor::class);
        $this->author = $var;

        return $this;
    }

    /**
     * The commit message for this commit log entry.
     *
     * Generated from protobuf field <code>string commit_message = 4;</code>
     * @return string
     */
    public function getCommitMessage()
    {
        return $this->commit_message;
    }

    /**
     * The commit message for this commit log entry.
     *
     * Generated from protobuf field <code>string commit_message = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setCommitMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->commit_message = $var;

        return $this;
    }

}

