Service Client: Google::Cloud::Pubsublite::V1::TopicStats::TopicStatsServiceClient
Client stub representing the remote TopicStatsService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to pubsublite.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Pubsublite::V1::TopicStats - Compiled Protocol Buffers messages for google/cloud/pubsublite/v1/topic_stats.proto
SYNOPSIS
use Google::Cloud::Pubsublite::V1::TopicStats;
my $msg = Google::Cloud::Pubsublite::V1::TopicStats::ComputeMessageStatsRequest->new({
topic => $topic,
partition => $partition,
start_cursor => $start_cursor,
end_cursor => $end_cursor,
});
# Read or update a field
my $val = $msg->topic();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Pubsublite::V1::TopicStats::ComputeMessageStatsRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/pubsublite/v1/topic_stats.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Pubsublite::V1::TopicStats::ComputeMessageStatsRequest
Compute statistics about a range of messages in a given topic and partition.
Inherits from Protobuf::Message.
Accessors
$msg->topic()/$msg->topic($value)Type:
StringRequired. The topic for which we should compute message stats.
$msg->partition()/$msg->partition($value)Type:
Int64Required. The partition for which we should compute message stats.
$msg->start_cursor()/$msg->start_cursor($value)Type:
Message(Google::Cloud::Pubsublite::V1::Common::Cursor)The inclusive start of the range.
$msg->end_cursor()/$msg->end_cursor($value)Type:
Message(Google::Cloud::Pubsublite::V1::Common::Cursor)The exclusive end of the range. The range is empty if end_cursor <= start_cursor. Specifying a start_cursor before the first message and an end_cursor after the last message will retrieve all messages.
Google::Cloud::Pubsublite::V1::TopicStats::ComputeMessageStatsResponse
Response containing stats for messages in the requested topic and partition.
Inherits from Protobuf::Message.
Accessors
$msg->message_count()/$msg->message_count($value)Type:
Int64The count of messages.
$msg->message_bytes()/$msg->message_bytes($value)Type:
Int64The number of quota bytes accounted to these messages.
$msg->minimum_publish_time()/$msg->minimum_publish_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The minimum publish timestamp across these messages. Note that publish timestamps within a partition are not guaranteed to be non-decreasing. The timestamp will be unset if there are no messages.
$msg->minimum_event_time()/$msg->minimum_event_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The minimum event timestamp across these messages. For the purposes of this computation, if a message does not have an event time, we use the publish time. The timestamp will be unset if there are no messages.
Google::Cloud::Pubsublite::V1::TopicStats::ComputeHeadCursorRequest
Compute the current head cursor for a partition.
Inherits from Protobuf::Message.
Accessors
$msg->topic()/$msg->topic($value)Type:
StringRequired. The topic for which we should compute the head cursor.
$msg->partition()/$msg->partition($value)Type:
Int64Required. The partition for which we should compute the head cursor.
Google::Cloud::Pubsublite::V1::TopicStats::ComputeHeadCursorResponse
Response containing the head cursor for the requested topic and partition.
Inherits from Protobuf::Message.
Accessors
$msg->head_cursor()/$msg->head_cursor($value)Type:
Message(Google::Cloud::Pubsublite::V1::Common::Cursor)The head cursor.
Google::Cloud::Pubsublite::V1::TopicStats::ComputeTimeCursorRequest
Compute the corresponding cursor for a publish or event time in a topic partition.
Inherits from Protobuf::Message.
Accessors
$msg->topic()/$msg->topic($value)Type:
StringRequired. The topic for which we should compute the cursor.
$msg->partition()/$msg->partition($value)Type:
Int64Required. The partition for which we should compute the cursor.
$msg->target()/$msg->target($value)Type:
Message(Google::Cloud::Pubsublite::V1::Common::TimeTarget)Required. The target publish or event time. Specifying a future time will return an unset cursor.
Google::Cloud::Pubsublite::V1::TopicStats::ComputeTimeCursorResponse
Response containing the cursor corresponding to a publish or event time in a topic partition.
Inherits from Protobuf::Message.
Accessors
$msg->cursor()/$msg->cursor($value)Type:
Message(Google::Cloud::Pubsublite::V1::Common::Cursor)If present, the cursor references the first message with time greater than or equal to the specified target time. If such a message cannot be found, the cursor will be unset (i.e. `cursor` is not present).
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Pubsublite::V1::TopicStats::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.