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

namespace Google\Cloud\PrivateCatalog\V1beta1;

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

/**
 * Defines how to access Cloud Storage source.
 *
 * Generated from protobuf message <code>google.cloud.privatecatalog.v1beta1.GcsSource</code>
 */
class GcsSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. the cloud storage object path.
     *
     * Generated from protobuf field <code>string gcs_path = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $gcs_path = '';
    /**
     * Output only. Generation of the object, which is set when the content of an object starts
     * being written.
     *
     * Generated from protobuf field <code>int64 generation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $generation = 0;
    /**
     * Output only. The time when the object metadata was last changed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $gcs_path
     *           Output only. the cloud storage object path.
     *     @type int|string $generation
     *           Output only. Generation of the object, which is set when the content of an object starts
     *           being written.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time when the object metadata was last changed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Privatecatalog\V1Beta1\PrivateCatalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. the cloud storage object path.
     *
     * Generated from protobuf field <code>string gcs_path = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getGcsPath()
    {
        return $this->gcs_path;
    }

    /**
     * Output only. the cloud storage object path.
     *
     * Generated from protobuf field <code>string gcs_path = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setGcsPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->gcs_path = $var;

        return $this;
    }

    /**
     * Output only. Generation of the object, which is set when the content of an object starts
     * being written.
     *
     * Generated from protobuf field <code>int64 generation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getGeneration()
    {
        return $this->generation;
    }

    /**
     * Output only. Generation of the object, which is set when the content of an object starts
     * being written.
     *
     * Generated from protobuf field <code>int64 generation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setGeneration($var)
    {
        GPBUtil::checkInt64($var);
        $this->generation = $var;

        return $this;
    }

    /**
     * Output only. The time when the object metadata was last changed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return isset($this->update_time) ? $this->update_time : null;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. The time when the object metadata was last changed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

