NAME
Google::Cloud::Automl::V1beta1::TextSegment - Compiled Protocol Buffers messages for google/cloud/automl/v1beta1/text_segment.proto
SYNOPSIS
use Google::Cloud::Automl::V1beta1::TextSegment;
my $msg = Google::Cloud::Automl::V1beta1::TextSegment::TextSegment->new({
content => $content,
start_offset => $start_offset,
end_offset => $end_offset,
});
# Read or update a field
my $val = $msg->content();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Automl::V1beta1::TextSegment::TextSegment->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/automl/v1beta1/text_segment.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::Automl::V1beta1::TextSegment::TextSegment
A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding.
Inherits from Protobuf::Message.
Accessors
$msg->content()/$msg->content($value)Type:
StringOutput only. The content of the TextSegment.
$msg->start_offset()/$msg->start_offset($value)Type:
Int64Required. Zero-based character index of the first character of the text segment (counting characters from the beginning of the text).
$msg->end_offset()/$msg->end_offset($value)Type:
Int64Required. Zero-based character index of the first character past the end of the text segment (counting character from the beginning of the text). The character at the end_offset is NOT included in the text segment.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Automl::V1beta1::TextSegment::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.