Class ScopeMetrics.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ScopeMetrics.Builder>
io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ScopeMetricsOrBuilder, Cloneable
Enclosing class:
ScopeMetrics

public static final class ScopeMetrics.Builder extends com.google.protobuf.GeneratedMessage.Builder<ScopeMetrics.Builder> implements ScopeMetricsOrBuilder
 A collection of Metrics produced by an Scope.
 
Protobuf type opentelemetry.proto.metrics.v1.ScopeMetrics
  • 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<ScopeMetrics.Builder>
    • clear

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

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

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

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

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

      public ScopeMetrics.Builder mergeFrom(ScopeMetrics other)
    • isInitialized

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

      public ScopeMetrics.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<ScopeMetrics.Builder>
      Throws:
      IOException
    • hasScope

      public boolean hasScope()
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
      Specified by:
      hasScope in interface ScopeMetricsOrBuilder
      Returns:
      Whether the scope field is set.
    • getScope

      public InstrumentationScope getScope()
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
      Specified by:
      getScope in interface ScopeMetricsOrBuilder
      Returns:
      The scope.
    • setScope

      public ScopeMetrics.Builder setScope(InstrumentationScope value)
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
    • setScope

      public ScopeMetrics.Builder setScope(InstrumentationScope.Builder builderForValue)
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
    • mergeScope

      public ScopeMetrics.Builder mergeScope(InstrumentationScope value)
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
    • clearScope

      public ScopeMetrics.Builder clearScope()
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
    • getScopeBuilder

      public InstrumentationScope.Builder getScopeBuilder()
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
    • getScopeOrBuilder

      public InstrumentationScopeOrBuilder getScopeOrBuilder()
       The instrumentation scope information for the metrics in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
      Specified by:
      getScopeOrBuilder in interface ScopeMetricsOrBuilder
    • getMetricsList

      public List<Metric> getMetricsList()
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
      Specified by:
      getMetricsList in interface ScopeMetricsOrBuilder
    • getMetricsCount

      public int getMetricsCount()
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
      Specified by:
      getMetricsCount in interface ScopeMetricsOrBuilder
    • getMetrics

      public Metric getMetrics(int index)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
      Specified by:
      getMetrics in interface ScopeMetricsOrBuilder
    • setMetrics

      public ScopeMetrics.Builder setMetrics(int index, Metric value)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • setMetrics

      public ScopeMetrics.Builder setMetrics(int index, Metric.Builder builderForValue)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • addMetrics

      public ScopeMetrics.Builder addMetrics(Metric value)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • addMetrics

      public ScopeMetrics.Builder addMetrics(int index, Metric value)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • addMetrics

      public ScopeMetrics.Builder addMetrics(Metric.Builder builderForValue)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • addMetrics

      public ScopeMetrics.Builder addMetrics(int index, Metric.Builder builderForValue)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • addAllMetrics

      public ScopeMetrics.Builder addAllMetrics(Iterable<? extends Metric> values)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • clearMetrics

      public ScopeMetrics.Builder clearMetrics()
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • removeMetrics

      public ScopeMetrics.Builder removeMetrics(int index)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • getMetricsBuilder

      public Metric.Builder getMetricsBuilder(int index)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • getMetricsOrBuilder

      public MetricOrBuilder getMetricsOrBuilder(int index)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
      Specified by:
      getMetricsOrBuilder in interface ScopeMetricsOrBuilder
    • getMetricsOrBuilderList

      public List<? extends MetricOrBuilder> getMetricsOrBuilderList()
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
      Specified by:
      getMetricsOrBuilderList in interface ScopeMetricsOrBuilder
    • addMetricsBuilder

      public Metric.Builder addMetricsBuilder()
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • addMetricsBuilder

      public Metric.Builder addMetricsBuilder(int index)
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • getMetricsBuilderList

      public List<Metric.Builder> getMetricsBuilderList()
       A list of metrics that originate from an instrumentation library.
       
      repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2;
    • getSchemaUrl

      public String getSchemaUrl()
       The Schema URL, if known. This is the identifier of the Schema that the metric data
       is recorded in. Notably, the last part of the URL path is the version number of the
       schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
       This schema_url applies to all metrics in the "metrics" field.
       
      string schema_url = 3;
      Specified by:
      getSchemaUrl in interface ScopeMetricsOrBuilder
      Returns:
      The schemaUrl.
    • getSchemaUrlBytes

      public com.google.protobuf.ByteString getSchemaUrlBytes()
       The Schema URL, if known. This is the identifier of the Schema that the metric data
       is recorded in. Notably, the last part of the URL path is the version number of the
       schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
       This schema_url applies to all metrics in the "metrics" field.
       
      string schema_url = 3;
      Specified by:
      getSchemaUrlBytes in interface ScopeMetricsOrBuilder
      Returns:
      The bytes for schemaUrl.
    • setSchemaUrl

      public ScopeMetrics.Builder setSchemaUrl(String value)
       The Schema URL, if known. This is the identifier of the Schema that the metric data
       is recorded in. Notably, the last part of the URL path is the version number of the
       schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
       This schema_url applies to all metrics in the "metrics" field.
       
      string schema_url = 3;
      Parameters:
      value - The schemaUrl to set.
      Returns:
      This builder for chaining.
    • clearSchemaUrl

      public ScopeMetrics.Builder clearSchemaUrl()
       The Schema URL, if known. This is the identifier of the Schema that the metric data
       is recorded in. Notably, the last part of the URL path is the version number of the
       schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
       This schema_url applies to all metrics in the "metrics" field.
       
      string schema_url = 3;
      Returns:
      This builder for chaining.
    • setSchemaUrlBytes

      public ScopeMetrics.Builder setSchemaUrlBytes(com.google.protobuf.ByteString value)
       The Schema URL, if known. This is the identifier of the Schema that the metric data
       is recorded in. Notably, the last part of the URL path is the version number of the
       schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
       https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
       This schema_url applies to all metrics in the "metrics" field.
       
      string schema_url = 3;
      Parameters:
      value - The bytes for schemaUrl to set.
      Returns:
      This builder for chaining.