<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/logging/v2/log_entry.proto

namespace Google\Cloud\Logging\V2;

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

/**
 * Additional information about a potentially long-running operation with which
 * a log entry is associated.
 *
 * Generated from protobuf message <code>google.logging.v2.LogEntryOperation</code>
 */
class LogEntryOperation extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. An arbitrary operation identifier. Log entries with the
     * same identifier are assumed to be part of the same operation.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    private $id = '';
    /**
     * Optional. An arbitrary producer identifier. The combination of
     * `id` and `producer` must be globally unique.  Examples for `producer`:
     * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
     *
     * Generated from protobuf field <code>string producer = 2;</code>
     */
    private $producer = '';
    /**
     * Optional. Set this to True if this is the first log entry in the operation.
     *
     * Generated from protobuf field <code>bool first = 3;</code>
     */
    private $first = false;
    /**
     * Optional. Set this to True if this is the last log entry in the operation.
     *
     * Generated from protobuf field <code>bool last = 4;</code>
     */
    private $last = false;

    public function __construct() {
        \GPBMetadata\Google\Logging\V2\LogEntry::initOnce();
        parent::__construct();
    }

    /**
     * Optional. An arbitrary operation identifier. Log entries with the
     * same identifier are assumed to be part of the same operation.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Optional. An arbitrary operation identifier. Log entries with the
     * same identifier are assumed to be part of the same operation.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Optional. An arbitrary producer identifier. The combination of
     * `id` and `producer` must be globally unique.  Examples for `producer`:
     * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
     *
     * Generated from protobuf field <code>string producer = 2;</code>
     * @return string
     */
    public function getProducer()
    {
        return $this->producer;
    }

    /**
     * Optional. An arbitrary producer identifier. The combination of
     * `id` and `producer` must be globally unique.  Examples for `producer`:
     * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
     *
     * Generated from protobuf field <code>string producer = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setProducer($var)
    {
        GPBUtil::checkString($var, True);
        $this->producer = $var;

        return $this;
    }

    /**
     * Optional. Set this to True if this is the first log entry in the operation.
     *
     * Generated from protobuf field <code>bool first = 3;</code>
     * @return bool
     */
    public function getFirst()
    {
        return $this->first;
    }

    /**
     * Optional. Set this to True if this is the first log entry in the operation.
     *
     * Generated from protobuf field <code>bool first = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setFirst($var)
    {
        GPBUtil::checkBool($var);
        $this->first = $var;

        return $this;
    }

    /**
     * Optional. Set this to True if this is the last log entry in the operation.
     *
     * Generated from protobuf field <code>bool last = 4;</code>
     * @return bool
     */
    public function getLast()
    {
        return $this->last;
    }

    /**
     * Optional. Set this to True if this is the last log entry in the operation.
     *
     * Generated from protobuf field <code>bool last = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setLast($var)
    {
        GPBUtil::checkBool($var);
        $this->last = $var;

        return $this;
    }

}

