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

namespace Google\Cloud\Build\V1;

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

/**
 * Unique identifier for a build event stream.
 *
 * Generated from protobuf message <code>google.devtools.build.v1.StreamId</code>
 */
class StreamId extends \Google\Protobuf\Internal\Message
{
    /**
     * The id of a Build message.
     *
     * Generated from protobuf field <code>string build_id = 1;</code>
     */
    private $build_id = '';
    /**
     * The unique invocation ID within this build.
     * It should be the same as {invocation} (below) during the migration.
     *
     * Generated from protobuf field <code>string invocation_id = 6;</code>
     */
    private $invocation_id = '';
    /**
     * The component that emitted this event.
     *
     * Generated from protobuf field <code>.google.devtools.build.v1.StreamId.BuildComponent component = 3;</code>
     */
    private $component = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $build_id
     *           The id of a Build message.
     *     @type string $invocation_id
     *           The unique invocation ID within this build.
     *           It should be the same as {invocation} (below) during the migration.
     *     @type int $component
     *           The component that emitted this event.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Build\V1\BuildEvents::initOnce();
        parent::__construct($data);
    }

    /**
     * The id of a Build message.
     *
     * Generated from protobuf field <code>string build_id = 1;</code>
     * @return string
     */
    public function getBuildId()
    {
        return $this->build_id;
    }

    /**
     * The id of a Build message.
     *
     * Generated from protobuf field <code>string build_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setBuildId($var)
    {
        GPBUtil::checkString($var, True);
        $this->build_id = $var;

        return $this;
    }

    /**
     * The unique invocation ID within this build.
     * It should be the same as {invocation} (below) during the migration.
     *
     * Generated from protobuf field <code>string invocation_id = 6;</code>
     * @return string
     */
    public function getInvocationId()
    {
        return $this->invocation_id;
    }

    /**
     * The unique invocation ID within this build.
     * It should be the same as {invocation} (below) during the migration.
     *
     * Generated from protobuf field <code>string invocation_id = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setInvocationId($var)
    {
        GPBUtil::checkString($var, True);
        $this->invocation_id = $var;

        return $this;
    }

    /**
     * The component that emitted this event.
     *
     * Generated from protobuf field <code>.google.devtools.build.v1.StreamId.BuildComponent component = 3;</code>
     * @return int
     */
    public function getComponent()
    {
        return $this->component;
    }

    /**
     * The component that emitted this event.
     *
     * Generated from protobuf field <code>.google.devtools.build.v1.StreamId.BuildComponent component = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setComponent($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Build\V1\StreamId\BuildComponent::class);
        $this->component = $var;

        return $this;
    }

}

