Class SpanContext.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SpanContext.Builder>
com.google.monitoring.v3.SpanContext.Builder
All Implemented Interfaces:
SpanContextOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SpanContext

public static final class SpanContext.Builder extends com.google.protobuf.GeneratedMessage.Builder<SpanContext.Builder> implements SpanContextOrBuilder
 The context of a span. This is attached to an
 [Exemplar][google.api.Distribution.Exemplar]
 in [Distribution][google.api.Distribution] values during aggregation.

 It contains the name of a span with format:

 projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
 
Protobuf type google.monitoring.v3.SpanContext
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The resource name of the span.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The resource name of the span.
    com.google.protobuf.ByteString
    The resource name of the span.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    The resource name of the span.
    setSpanNameBytes(com.google.protobuf.ByteString value)
    The resource name of the span.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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<SpanContext.Builder>
    • clear

      public SpanContext.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<SpanContext.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<SpanContext.Builder>
    • getDefaultInstanceForType

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

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

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

      public SpanContext.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<SpanContext.Builder>
    • mergeFrom

      public SpanContext.Builder mergeFrom(SpanContext other)
    • isInitialized

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

      public SpanContext.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<SpanContext.Builder>
      Throws:
      IOException
    • getSpanName

      public String getSpanName()
       The resource name of the span. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
      
       `[TRACE_ID]` is a unique identifier for a trace within a project;
       it is a 32-character hexadecimal encoding of a 16-byte array.
      
       `[SPAN_ID]` is a unique identifier for a span within a trace; it
       is a 16-character hexadecimal encoding of an 8-byte array.
       
      string span_name = 1;
      Specified by:
      getSpanName in interface SpanContextOrBuilder
      Returns:
      The spanName.
    • getSpanNameBytes

      public com.google.protobuf.ByteString getSpanNameBytes()
       The resource name of the span. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
      
       `[TRACE_ID]` is a unique identifier for a trace within a project;
       it is a 32-character hexadecimal encoding of a 16-byte array.
      
       `[SPAN_ID]` is a unique identifier for a span within a trace; it
       is a 16-character hexadecimal encoding of an 8-byte array.
       
      string span_name = 1;
      Specified by:
      getSpanNameBytes in interface SpanContextOrBuilder
      Returns:
      The bytes for spanName.
    • setSpanName

      public SpanContext.Builder setSpanName(String value)
       The resource name of the span. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
      
       `[TRACE_ID]` is a unique identifier for a trace within a project;
       it is a 32-character hexadecimal encoding of a 16-byte array.
      
       `[SPAN_ID]` is a unique identifier for a span within a trace; it
       is a 16-character hexadecimal encoding of an 8-byte array.
       
      string span_name = 1;
      Parameters:
      value - The spanName to set.
      Returns:
      This builder for chaining.
    • clearSpanName

      public SpanContext.Builder clearSpanName()
       The resource name of the span. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
      
       `[TRACE_ID]` is a unique identifier for a trace within a project;
       it is a 32-character hexadecimal encoding of a 16-byte array.
      
       `[SPAN_ID]` is a unique identifier for a span within a trace; it
       is a 16-character hexadecimal encoding of an 8-byte array.
       
      string span_name = 1;
      Returns:
      This builder for chaining.
    • setSpanNameBytes

      public SpanContext.Builder setSpanNameBytes(com.google.protobuf.ByteString value)
       The resource name of the span. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
      
       `[TRACE_ID]` is a unique identifier for a trace within a project;
       it is a 32-character hexadecimal encoding of a 16-byte array.
      
       `[SPAN_ID]` is a unique identifier for a span within a trace; it
       is a 16-character hexadecimal encoding of an 8-byte array.
       
      string span_name = 1;
      Parameters:
      value - The bytes for spanName to set.
      Returns:
      This builder for chaining.