Class Trace.Builder

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

    public static final class Trace.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Trace.Builder>
    implements TraceOrBuilder
     A trace describes how long it takes for an application to perform an
     operation. It consists of a set of spans, each of which represent a single
     timed event within the operation.
     
    Protobuf type google.devtools.cloudtrace.v1.Trace
    • 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<Trace.Builder>
      • clear

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

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

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

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

        public Trace.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<Trace.Builder>
      • setField

        public Trace.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<Trace.Builder>
      • clearField

        public Trace.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<Trace.Builder>
      • clearOneof

        public Trace.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<Trace.Builder>
      • setRepeatedField

        public Trace.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<Trace.Builder>
      • addRepeatedField

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

        public Trace.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<Trace.Builder>
      • isInitialized

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

        public Trace.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<Trace.Builder>
        Throws:
        IOException
      • getProjectId

        public String getProjectId()
         Project ID of the Cloud project where the trace data is stored.
         
        string project_id = 1;
        Specified by:
        getProjectId in interface TraceOrBuilder
        Returns:
        The projectId.
      • getProjectIdBytes

        public com.google.protobuf.ByteString getProjectIdBytes()
         Project ID of the Cloud project where the trace data is stored.
         
        string project_id = 1;
        Specified by:
        getProjectIdBytes in interface TraceOrBuilder
        Returns:
        The bytes for projectId.
      • setProjectId

        public Trace.Builder setProjectId​(String value)
         Project ID of the Cloud project where the trace data is stored.
         
        string project_id = 1;
        Parameters:
        value - The projectId to set.
        Returns:
        This builder for chaining.
      • clearProjectId

        public Trace.Builder clearProjectId()
         Project ID of the Cloud project where the trace data is stored.
         
        string project_id = 1;
        Returns:
        This builder for chaining.
      • setProjectIdBytes

        public Trace.Builder setProjectIdBytes​(com.google.protobuf.ByteString value)
         Project ID of the Cloud project where the trace data is stored.
         
        string project_id = 1;
        Parameters:
        value - The bytes for projectId to set.
        Returns:
        This builder for chaining.
      • getTraceId

        public String getTraceId()
         Globally unique identifier for the trace. This identifier is a 128-bit
         numeric value formatted as a 32-byte hex string. For example,
         `382d4f4c6b7bb2f4a972559d9085001d`.
         
        string trace_id = 2;
        Specified by:
        getTraceId in interface TraceOrBuilder
        Returns:
        The traceId.
      • getTraceIdBytes

        public com.google.protobuf.ByteString getTraceIdBytes()
         Globally unique identifier for the trace. This identifier is a 128-bit
         numeric value formatted as a 32-byte hex string. For example,
         `382d4f4c6b7bb2f4a972559d9085001d`.
         
        string trace_id = 2;
        Specified by:
        getTraceIdBytes in interface TraceOrBuilder
        Returns:
        The bytes for traceId.
      • setTraceId

        public Trace.Builder setTraceId​(String value)
         Globally unique identifier for the trace. This identifier is a 128-bit
         numeric value formatted as a 32-byte hex string. For example,
         `382d4f4c6b7bb2f4a972559d9085001d`.
         
        string trace_id = 2;
        Parameters:
        value - The traceId to set.
        Returns:
        This builder for chaining.
      • clearTraceId

        public Trace.Builder clearTraceId()
         Globally unique identifier for the trace. This identifier is a 128-bit
         numeric value formatted as a 32-byte hex string. For example,
         `382d4f4c6b7bb2f4a972559d9085001d`.
         
        string trace_id = 2;
        Returns:
        This builder for chaining.
      • setTraceIdBytes

        public Trace.Builder setTraceIdBytes​(com.google.protobuf.ByteString value)
         Globally unique identifier for the trace. This identifier is a 128-bit
         numeric value formatted as a 32-byte hex string. For example,
         `382d4f4c6b7bb2f4a972559d9085001d`.
         
        string trace_id = 2;
        Parameters:
        value - The bytes for traceId to set.
        Returns:
        This builder for chaining.
      • getSpansList

        public List<TraceSpan> getSpansList()
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
        Specified by:
        getSpansList in interface TraceOrBuilder
      • getSpansCount

        public int getSpansCount()
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
        Specified by:
        getSpansCount in interface TraceOrBuilder
      • getSpans

        public TraceSpan getSpans​(int index)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
        Specified by:
        getSpans in interface TraceOrBuilder
      • setSpans

        public Trace.Builder setSpans​(int index,
                                      TraceSpan value)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • setSpans

        public Trace.Builder setSpans​(int index,
                                      TraceSpan.Builder builderForValue)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • addSpans

        public Trace.Builder addSpans​(TraceSpan value)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • addSpans

        public Trace.Builder addSpans​(int index,
                                      TraceSpan value)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • addSpans

        public Trace.Builder addSpans​(TraceSpan.Builder builderForValue)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • addSpans

        public Trace.Builder addSpans​(int index,
                                      TraceSpan.Builder builderForValue)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • addAllSpans

        public Trace.Builder addAllSpans​(Iterable<? extends TraceSpan> values)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • clearSpans

        public Trace.Builder clearSpans()
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • removeSpans

        public Trace.Builder removeSpans​(int index)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • getSpansBuilder

        public TraceSpan.Builder getSpansBuilder​(int index)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • addSpansBuilder

        public TraceSpan.Builder addSpansBuilder()
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • addSpansBuilder

        public TraceSpan.Builder addSpansBuilder​(int index)
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • getSpansBuilderList

        public List<TraceSpan.Builder> getSpansBuilderList()
         Collection of spans in the trace.
         
        repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
      • setUnknownFields

        public final Trace.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<Trace.Builder>
      • mergeUnknownFields

        public final Trace.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<Trace.Builder>