Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see
Model versions and lifecycle .
Send feedback
Class Segment.Builder (1.1.0)
Stay organized with collections
Save and categorize content based on your preferences.
public static final class Segment . Builder extends GeneratedMessageV3 . Builder<Segment . Builder > implements SegmentOrBuilder
Segment of the content.
Protobuf type google.cloud.vertexai.v1.Segment
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Segment . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Overrides
build()
buildPartial()
public Segment buildPartial ()
clear()
public Segment . Builder clear ()
Overrides
clearEndIndex()
public Segment . Builder clearEndIndex ()
Output only. End index in the given Part, measured in bytes. Offset from
the start of the Part, exclusive, starting at zero.
int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearField(Descriptors.FieldDescriptor field)
public Segment . Builder clearField ( Descriptors . FieldDescriptor field )
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Segment . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Overrides
clearPartIndex()
public Segment . Builder clearPartIndex ()
Output only. The index of a Part object within its parent Content object.
int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearStartIndex()
public Segment . Builder clearStartIndex ()
Output only. Start index in the given Part, measured in bytes. Offset from
the start of the Part, inclusive, starting at zero.
int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
clone()
public Segment . Builder clone ()
Overrides
getDefaultInstanceForType()
public Segment getDefaultInstanceForType ()
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
getEndIndex()
Output only. End index in the given Part, measured in bytes. Offset from
the start of the Part, exclusive, starting at zero.
int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
int
The endIndex.
getPartIndex()
public int getPartIndex ()
Output only. The index of a Part object within its parent Content object.
int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
int
The partIndex.
getStartIndex()
public int getStartIndex ()
Output only. Start index in the given Part, measured in bytes. Offset from
the start of the Part, inclusive, starting at zero.
int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
int
The startIndex.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
mergeFrom(Segment other)
public Segment . Builder mergeFrom ( Segment other )
Parameter
Name
Description
other
Segment
public Segment . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public Segment . Builder mergeFrom ( Message other )
Parameter
Name
Description
other
Message
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Segment . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Overrides
setEndIndex(int value)
public Segment . Builder setEndIndex ( int value )
Output only. End index in the given Part, measured in bytes. Offset from
the start of the Part, exclusive, starting at zero.
int32 end_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name
Description
value
int
The endIndex to set.
setField(Descriptors.FieldDescriptor field, Object value)
public Segment . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Overrides
setPartIndex(int value)
public Segment . Builder setPartIndex ( int value )
Output only. The index of a Part object within its parent Content object.
int32 part_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name
Description
value
int
The partIndex to set.
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Segment . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Overrides
setStartIndex(int value)
public Segment . Builder setStartIndex ( int value )
Output only. Start index in the given Part, measured in bytes. Offset from
the start of the Part, inclusive, starting at zero.
int32 start_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name
Description
value
int
The startIndex to set.
setUnknownFields(UnknownFieldSet unknownFields)
public final Segment . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[],[]]