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

namespace Google\Cloud\DevTools\Source\V1;

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

/**
 * A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.
 *
 * Generated from protobuf message <code>google.devtools.source.v1.CloudWorkspaceSourceContext</code>
 */
class CloudWorkspaceSourceContext extends \Google\Protobuf\Internal\Message
{
    /**
     * The ID of the workspace.
     *
     * Generated from protobuf field <code>.google.devtools.source.v1.CloudWorkspaceId workspace_id = 1;</code>
     */
    private $workspace_id = null;
    /**
     * The ID of the snapshot.
     * An empty snapshot_id refers to the most recent snapshot.
     *
     * Generated from protobuf field <code>string snapshot_id = 2;</code>
     */
    private $snapshot_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DevTools\Source\V1\CloudWorkspaceId $workspace_id
     *           The ID of the workspace.
     *     @type string $snapshot_id
     *           The ID of the snapshot.
     *           An empty snapshot_id refers to the most recent snapshot.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Source\V1\SourceContext::initOnce();
        parent::__construct($data);
    }

    /**
     * The ID of the workspace.
     *
     * Generated from protobuf field <code>.google.devtools.source.v1.CloudWorkspaceId workspace_id = 1;</code>
     * @return \Google\Cloud\DevTools\Source\V1\CloudWorkspaceId
     */
    public function getWorkspaceId()
    {
        return $this->workspace_id;
    }

    /**
     * The ID of the workspace.
     *
     * Generated from protobuf field <code>.google.devtools.source.v1.CloudWorkspaceId workspace_id = 1;</code>
     * @param \Google\Cloud\DevTools\Source\V1\CloudWorkspaceId $var
     * @return $this
     */
    public function setWorkspaceId($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\CloudWorkspaceId::class);
        $this->workspace_id = $var;

        return $this;
    }

    /**
     * The ID of the snapshot.
     * An empty snapshot_id refers to the most recent snapshot.
     *
     * Generated from protobuf field <code>string snapshot_id = 2;</code>
     * @return string
     */
    public function getSnapshotId()
    {
        return $this->snapshot_id;
    }

    /**
     * The ID of the snapshot.
     * An empty snapshot_id refers to the most recent snapshot.
     *
     * Generated from protobuf field <code>string snapshot_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSnapshotId($var)
    {
        GPBUtil::checkString($var, True);
        $this->snapshot_id = $var;

        return $this;
    }

}

