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

namespace Google\Cloud\Logging\V2;

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

/**
 * Result returned from `TailLogEntries`.
 *
 * Generated from protobuf message <code>google.logging.v2.TailLogEntriesResponse</code>
 */
class TailLogEntriesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of log entries. Each response in the stream will order entries with
     * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed
     * between separate responses.
     *
     * Generated from protobuf field <code>repeated .google.logging.v2.LogEntry entries = 1;</code>
     */
    private $entries;
    /**
     * If entries that otherwise would have been included in the session were not
     * sent back to the client, counts of relevant entries omitted from the
     * session with the reason that they were not included. There will be at most
     * one of each reason per response. The counts represent the number of
     * suppressed entries since the last streamed response.
     *
     * Generated from protobuf field <code>repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2;</code>
     */
    private $suppression_info;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $entries
     *           A list of log entries. Each response in the stream will order entries with
     *           increasing values of `LogEntry.timestamp`. Ordering is not guaranteed
     *           between separate responses.
     *     @type array<\Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo>|\Google\Protobuf\Internal\RepeatedField $suppression_info
     *           If entries that otherwise would have been included in the session were not
     *           sent back to the client, counts of relevant entries omitted from the
     *           session with the reason that they were not included. There will be at most
     *           one of each reason per response. The counts represent the number of
     *           suppressed entries since the last streamed response.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Logging\V2\Logging::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of log entries. Each response in the stream will order entries with
     * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed
     * between separate responses.
     *
     * Generated from protobuf field <code>repeated .google.logging.v2.LogEntry entries = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEntries()
    {
        return $this->entries;
    }

    /**
     * A list of log entries. Each response in the stream will order entries with
     * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed
     * between separate responses.
     *
     * Generated from protobuf field <code>repeated .google.logging.v2.LogEntry entries = 1;</code>
     * @param array<\Google\Cloud\Logging\V2\LogEntry>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEntries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class);
        $this->entries = $arr;

        return $this;
    }

    /**
     * If entries that otherwise would have been included in the session were not
     * sent back to the client, counts of relevant entries omitted from the
     * session with the reason that they were not included. There will be at most
     * one of each reason per response. The counts represent the number of
     * suppressed entries since the last streamed response.
     *
     * Generated from protobuf field <code>repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSuppressionInfo()
    {
        return $this->suppression_info;
    }

    /**
     * If entries that otherwise would have been included in the session were not
     * sent back to the client, counts of relevant entries omitted from the
     * session with the reason that they were not included. There will be at most
     * one of each reason per response. The counts represent the number of
     * suppressed entries since the last streamed response.
     *
     * Generated from protobuf field <code>repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2;</code>
     * @param array<\Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSuppressionInfo($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo::class);
        $this->suppression_info = $arr;

        return $this;
    }

}

