public final class TextLocator extends GeneratedMessageV3 implements TextLocatorOrBuilder
A locator for text. Indicates a particular part of the text of a request or
of an object referenced in the request.
For example, suppose the request field text
contains:
text: "The quick brown fox jumps over the lazy dog."
Then the locator:
source: "text"
start_position {
line: 1
column: 17
}
end_position {
line: 1
column: 19
}
refers to the part of the text: "fox".
Protobuf type google.monitoring.v3.TextLocator
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
END_POSITION_FIELD_NUMBER
public static final int END_POSITION_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
NESTED_LOCATOR_FIELD_NUMBER
public static final int NESTED_LOCATOR_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
NESTING_REASON_FIELD_NUMBER
public static final int NESTING_REASON_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
START_POSITION_FIELD_NUMBER
public static final int START_POSITION_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static TextLocator getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static TextLocator.Builder newBuilder()
newBuilder(TextLocator prototype)
public static TextLocator.Builder newBuilder(TextLocator prototype)
parseDelimitedFrom(InputStream input)
public static TextLocator parseDelimitedFrom(InputStream input)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TextLocator parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static TextLocator parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static TextLocator parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static TextLocator parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static TextLocator parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
parseFrom(CodedInputStream input)
public static TextLocator parseFrom(CodedInputStream input)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static TextLocator parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(InputStream input)
public static TextLocator parseFrom(InputStream input)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TextLocator parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static TextLocator parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static TextLocator parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<TextLocator> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public TextLocator getDefaultInstanceForType()
getEndPosition()
public TextLocator.Position getEndPosition()
The position of the last byte within the text.
.google.monitoring.v3.TextLocator.Position end_position = 3;
getEndPositionOrBuilder()
public TextLocator.PositionOrBuilder getEndPositionOrBuilder()
The position of the last byte within the text.
.google.monitoring.v3.TextLocator.Position end_position = 3;
getNestedLocator()
public TextLocator getNestedLocator()
If source
, start_position
, and end_position
describe a call on
some object (e.g. a macro in the time series query language text) and a
location is to be designated in that object's text, nested_locator
identifies the location within that object.
.google.monitoring.v3.TextLocator nested_locator = 4;
getNestedLocatorOrBuilder()
public TextLocatorOrBuilder getNestedLocatorOrBuilder()
If source
, start_position
, and end_position
describe a call on
some object (e.g. a macro in the time series query language text) and a
location is to be designated in that object's text, nested_locator
identifies the location within that object.
.google.monitoring.v3.TextLocator nested_locator = 4;
getNestingReason()
public String getNestingReason()
When nested_locator
is set, this field gives the reason for the nesting.
Usually, the reason is a macro invocation. In that case, the macro name
(including the leading '@') signals the location of the macro call
in the text and a macro argument name (including the leading '$') signals
the location of the macro argument inside the macro body that got
substituted away.
string nesting_reason = 5;
Returns |
---|
Type | Description |
String | The nestingReason.
|
getNestingReasonBytes()
public ByteString getNestingReasonBytes()
When nested_locator
is set, this field gives the reason for the nesting.
Usually, the reason is a macro invocation. In that case, the macro name
(including the leading '@') signals the location of the macro call
in the text and a macro argument name (including the leading '$') signals
the location of the macro argument inside the macro body that got
substituted away.
string nesting_reason = 5;
Returns |
---|
Type | Description |
ByteString | The bytes for nestingReason.
|
getParserForType()
public Parser<TextLocator> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getSource()
public String getSource()
The source of the text. The source may be a field in the request, in which
case its format is the format of the
google.rpc.BadRequest.FieldViolation.field field in
https://cloud.google.com/apis/design/errors#error_details. It may also be
be a source other than the request field (e.g. a macro definition
referenced in the text of the query), in which case this is the name of
the source (e.g. the macro name).
string source = 1;
Returns |
---|
Type | Description |
String | The source.
|
getSourceBytes()
public ByteString getSourceBytes()
The source of the text. The source may be a field in the request, in which
case its format is the format of the
google.rpc.BadRequest.FieldViolation.field field in
https://cloud.google.com/apis/design/errors#error_details. It may also be
be a source other than the request field (e.g. a macro definition
referenced in the text of the query), in which case this is the name of
the source (e.g. the macro name).
string source = 1;
Returns |
---|
Type | Description |
ByteString | The bytes for source.
|
getStartPosition()
public TextLocator.Position getStartPosition()
The position of the first byte within the text.
.google.monitoring.v3.TextLocator.Position start_position = 2;
getStartPositionOrBuilder()
public TextLocator.PositionOrBuilder getStartPositionOrBuilder()
The position of the first byte within the text.
.google.monitoring.v3.TextLocator.Position start_position = 2;
hasEndPosition()
public boolean hasEndPosition()
The position of the last byte within the text.
.google.monitoring.v3.TextLocator.Position end_position = 3;
Returns |
---|
Type | Description |
boolean | Whether the endPosition field is set.
|
hasNestedLocator()
public boolean hasNestedLocator()
If source
, start_position
, and end_position
describe a call on
some object (e.g. a macro in the time series query language text) and a
location is to be designated in that object's text, nested_locator
identifies the location within that object.
.google.monitoring.v3.TextLocator nested_locator = 4;
Returns |
---|
Type | Description |
boolean | Whether the nestedLocator field is set.
|
hasStartPosition()
public boolean hasStartPosition()
The position of the first byte within the text.
.google.monitoring.v3.TextLocator.Position start_position = 2;
Returns |
---|
Type | Description |
boolean | Whether the startPosition field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public TextLocator.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected TextLocator.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public TextLocator.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides