Class TextLocator.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TextLocator.Builder>
com.google.monitoring.v3.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.GeneratedMessage.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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public TextLocator.Builder mergeFrom(TextLocator other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.
    • getStartPosition

      public TextLocator.Position getStartPosition()
       The position of the first byte within the text.
       
      .google.monitoring.v3.TextLocator.Position start_position = 2;
      Specified by:
      getStartPosition in interface TextLocatorOrBuilder
      Returns:
      The startPosition.
    • 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;
    • setStartPosition

      public TextLocator.Builder setStartPosition(TextLocator.Position.Builder builderForValue)
       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;
    • getStartPositionOrBuilder

      public TextLocator.PositionOrBuilder getStartPositionOrBuilder()
       The position of the first byte within the text.
       
      .google.monitoring.v3.TextLocator.Position start_position = 2;
      Specified by:
      getStartPositionOrBuilder in interface TextLocatorOrBuilder
    • 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.
    • getEndPosition

      public TextLocator.Position getEndPosition()
       The position of the last byte within the text.
       
      .google.monitoring.v3.TextLocator.Position end_position = 3;
      Specified by:
      getEndPosition in interface TextLocatorOrBuilder
      Returns:
      The endPosition.
    • 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;
    • setEndPosition

      public TextLocator.Builder setEndPosition(TextLocator.Position.Builder builderForValue)
       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;
    • getEndPositionOrBuilder

      public TextLocator.PositionOrBuilder getEndPositionOrBuilder()
       The position of the last byte within the text.
       
      .google.monitoring.v3.TextLocator.Position end_position = 3;
      Specified by:
      getEndPositionOrBuilder in interface TextLocatorOrBuilder
    • 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.