Class TextLocator.Builder

  • All Implemented Interfaces:
    TextLocatorOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    TextLocator

    public static final class TextLocator.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
    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
    • Method Detail

      • 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.Builder<TextLocator.Builder>
      • clear

        public TextLocator.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • getDefaultInstanceForType

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

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

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

        public TextLocator.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • setField

        public TextLocator.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • clearField

        public TextLocator.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • clearOneof

        public TextLocator.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • setRepeatedField

        public TextLocator.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    int index,
                                                    Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • addRepeatedField

        public TextLocator.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • mergeFrom

        public TextLocator.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextLocator.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • mergeFrom

        public TextLocator.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextLocator.Builder>
        Throws:
        IOException
      • 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.
      • setSource

        public TextLocator.Builder setSource​(String value)
         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;
        Parameters:
        value - The source to set.
        Returns:
        This builder for chaining.
      • clearSource

        public TextLocator.Builder clearSource()
         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:
        This builder for chaining.
      • setSourceBytes

        public TextLocator.Builder setSourceBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for source to set.
        Returns:
        This builder for chaining.
      • 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.
      • setStartPosition

        public TextLocator.Builder setStartPosition​(TextLocator.Position value)
         The position of the first byte within the text.
         
        .google.monitoring.v3.TextLocator.Position start_position = 2;
      • mergeStartPosition

        public TextLocator.Builder mergeStartPosition​(TextLocator.Position value)
         The position of the first byte within the text.
         
        .google.monitoring.v3.TextLocator.Position start_position = 2;
      • clearStartPosition

        public TextLocator.Builder clearStartPosition()
         The position of the first byte within the text.
         
        .google.monitoring.v3.TextLocator.Position start_position = 2;
      • getStartPositionBuilder

        public TextLocator.Position.Builder getStartPositionBuilder()
         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;
        Specified by:
        hasEndPosition in interface TextLocatorOrBuilder
        Returns:
        Whether the endPosition field is set.
      • setEndPosition

        public TextLocator.Builder setEndPosition​(TextLocator.Position value)
         The position of the last byte within the text.
         
        .google.monitoring.v3.TextLocator.Position end_position = 3;
      • mergeEndPosition

        public TextLocator.Builder mergeEndPosition​(TextLocator.Position value)
         The position of the last byte within the text.
         
        .google.monitoring.v3.TextLocator.Position end_position = 3;
      • clearEndPosition

        public TextLocator.Builder clearEndPosition()
         The position of the last byte within the text.
         
        .google.monitoring.v3.TextLocator.Position end_position = 3;
      • getEndPositionBuilder

        public TextLocator.Position.Builder getEndPositionBuilder()
         The position of the last byte within the text.
         
        .google.monitoring.v3.TextLocator.Position end_position = 3;
      • 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.
      • setNestedLocator

        public TextLocator.Builder setNestedLocator​(TextLocator value)
         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;
      • setNestedLocator

        public TextLocator.Builder setNestedLocator​(TextLocator.Builder builderForValue)
         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;
      • mergeNestedLocator

        public TextLocator.Builder mergeNestedLocator​(TextLocator value)
         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;
      • clearNestedLocator

        public TextLocator.Builder clearNestedLocator()
         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;
      • getNestedLocatorBuilder

        public TextLocator.Builder getNestedLocatorBuilder()
         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;
        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.
      • setNestingReason

        public TextLocator.Builder setNestingReason​(String value)
         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;
        Parameters:
        value - The nestingReason to set.
        Returns:
        This builder for chaining.
      • clearNestingReason

        public TextLocator.Builder clearNestingReason()
         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:
        This builder for chaining.
      • setNestingReasonBytes

        public TextLocator.Builder setNestingReasonBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for nestingReason to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final TextLocator.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>
      • mergeUnknownFields

        public final TextLocator.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextLocator.Builder>