Class TextLocator

  • All Implemented Interfaces:
    TextLocatorOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class TextLocator
    extends com.google.protobuf.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
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  TextLocator.Builder
      A locator for text.
      static class  TextLocator.Position
      The position of a byte within the text.
      static interface  TextLocator.PositionOrBuilder  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Detail

      • START_POSITION_FIELD_NUMBER

        public static final int START_POSITION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • END_POSITION_FIELD_NUMBER

        public static final int END_POSITION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NESTED_LOCATOR_FIELD_NUMBER

        public static final int NESTED_LOCATOR_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NESTING_REASON_FIELD_NUMBER

        public static final int NESTING_REASON_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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;
        Specified by:
        getSource in interface TextLocatorOrBuilder
        Returns:
        The source.
      • getSourceBytes

        public com.google.protobuf.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;
        Specified by:
        getSourceBytes in interface TextLocatorOrBuilder
        Returns:
        The bytes for source.
      • hasStartPosition

        public boolean hasStartPosition()
         The position of the first byte within the text.
         
        .google.monitoring.v3.TextLocator.Position start_position = 2;
        Specified by:
        hasStartPosition in interface TextLocatorOrBuilder
        Returns:
        Whether the startPosition field is set.
      • hasEndPosition

        public boolean hasEndPosition()
         The position of the last byte within the text.
         
        .google.monitoring.v3.TextLocator.Position end_position = 3;
        Specified by:
        hasEndPosition in interface TextLocatorOrBuilder
        Returns:
        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;
        Specified by:
        hasNestedLocator in interface TextLocatorOrBuilder
        Returns:
        Whether the nestedLocator field is set.
      • 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;
        Specified by:
        getNestedLocator in interface TextLocatorOrBuilder
        Returns:
        The nestedLocator.
      • 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;
        Specified by:
        getNestedLocatorOrBuilder in interface TextLocatorOrBuilder
      • 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;
        Specified by:
        getNestingReason in interface TextLocatorOrBuilder
        Returns:
        The nestingReason.
      • getNestingReasonBytes

        public com.google.protobuf.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;
        Specified by:
        getNestingReasonBytes in interface TextLocatorOrBuilder
        Returns:
        The bytes for nestingReason.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static TextLocator parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TextLocator parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TextLocator parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TextLocator parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TextLocator parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TextLocator parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TextLocator parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

        public TextLocator.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public TextLocator.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected TextLocator.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static TextLocator getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<TextLocator> parser()
      • getParserForType

        public com.google.protobuf.Parser<TextLocator> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public TextLocator getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder