All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.proto.metrics.v1.ScopeMetrics Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: opentelemetry/proto/metrics/v1/metrics.proto

package io.opentelemetry.proto.metrics.v1;

/**
 * 
 * A collection of Metrics produced by an Scope.
 * 
* * Protobuf type {@code opentelemetry.proto.metrics.v1.ScopeMetrics} */ public final class ScopeMetrics extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opentelemetry.proto.metrics.v1.ScopeMetrics) ScopeMetricsOrBuilder { private static final long serialVersionUID = 0L; // Use ScopeMetrics.newBuilder() to construct. private ScopeMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ScopeMetrics() { metrics_ = java.util.Collections.emptyList(); schemaUrl_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ScopeMetrics(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ScopeMetrics( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { io.opentelemetry.proto.common.v1.InstrumentationScope.Builder subBuilder = null; if (scope_ != null) { subBuilder = scope_.toBuilder(); } scope_ = input.readMessage(io.opentelemetry.proto.common.v1.InstrumentationScope.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(scope_); scope_ = subBuilder.buildPartial(); } break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { metrics_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } metrics_.add( input.readMessage(io.opentelemetry.proto.metrics.v1.Metric.parser(), extensionRegistry)); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); schemaUrl_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { metrics_ = java.util.Collections.unmodifiableList(metrics_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ScopeMetrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ScopeMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.metrics.v1.ScopeMetrics.class, io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder.class); } public static final int SCOPE_FIELD_NUMBER = 1; private io.opentelemetry.proto.common.v1.InstrumentationScope scope_; /** *
   * 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; * @return Whether the scope field is set. */ @java.lang.Override public boolean hasScope() { return scope_ != null; } /** *
   * 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; * @return The scope. */ @java.lang.Override public io.opentelemetry.proto.common.v1.InstrumentationScope getScope() { return scope_ == null ? io.opentelemetry.proto.common.v1.InstrumentationScope.getDefaultInstance() : scope_; } /** *
   * 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; */ @java.lang.Override public io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder getScopeOrBuilder() { return getScope(); } public static final int METRICS_FIELD_NUMBER = 2; private java.util.List metrics_; /** *
   * A list of metrics that originate from an instrumentation library.
   * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ @java.lang.Override public java.util.List getMetricsList() { return metrics_; } /** *
   * A list of metrics that originate from an instrumentation library.
   * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ @java.lang.Override public java.util.List getMetricsOrBuilderList() { return metrics_; } /** *
   * A list of metrics that originate from an instrumentation library.
   * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ @java.lang.Override public int getMetricsCount() { return metrics_.size(); } /** *
   * A list of metrics that originate from an instrumentation library.
   * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Metric getMetrics(int index) { return metrics_.get(index); } /** *
   * A list of metrics that originate from an instrumentation library.
   * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.MetricOrBuilder getMetricsOrBuilder( int index) { return metrics_.get(index); } public static final int SCHEMA_URL_FIELD_NUMBER = 3; private volatile java.lang.Object schemaUrl_; /** *
   * This schema_url applies to all metrics in the "metrics" field.
   * 
* * string schema_url = 3; * @return The schemaUrl. */ @java.lang.Override public java.lang.String getSchemaUrl() { java.lang.Object ref = schemaUrl_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); schemaUrl_ = s; return s; } } /** *
   * This schema_url applies to all metrics in the "metrics" field.
   * 
* * string schema_url = 3; * @return The bytes for schemaUrl. */ @java.lang.Override public com.google.protobuf.ByteString getSchemaUrlBytes() { java.lang.Object ref = schemaUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); schemaUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (scope_ != null) { output.writeMessage(1, getScope()); } for (int i = 0; i < metrics_.size(); i++) { output.writeMessage(2, metrics_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schemaUrl_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (scope_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getScope()); } for (int i = 0; i < metrics_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, metrics_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, schemaUrl_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.opentelemetry.proto.metrics.v1.ScopeMetrics)) { return super.equals(obj); } io.opentelemetry.proto.metrics.v1.ScopeMetrics other = (io.opentelemetry.proto.metrics.v1.ScopeMetrics) obj; if (hasScope() != other.hasScope()) return false; if (hasScope()) { if (!getScope() .equals(other.getScope())) return false; } if (!getMetricsList() .equals(other.getMetricsList())) return false; if (!getSchemaUrl() .equals(other.getSchemaUrl())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasScope()) { hash = (37 * hash) + SCOPE_FIELD_NUMBER; hash = (53 * hash) + getScope().hashCode(); } if (getMetricsCount() > 0) { hash = (37 * hash) + METRICS_FIELD_NUMBER; hash = (53 * hash) + getMetricsList().hashCode(); } hash = (37 * hash) + SCHEMA_URL_FIELD_NUMBER; hash = (53 * hash) + getSchemaUrl().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.opentelemetry.proto.metrics.v1.ScopeMetrics prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A collection of Metrics produced by an Scope.
   * 
* * Protobuf type {@code opentelemetry.proto.metrics.v1.ScopeMetrics} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opentelemetry.proto.metrics.v1.ScopeMetrics) io.opentelemetry.proto.metrics.v1.ScopeMetricsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ScopeMetrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ScopeMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.metrics.v1.ScopeMetrics.class, io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder.class); } // Construct using io.opentelemetry.proto.metrics.v1.ScopeMetrics.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getMetricsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (scopeBuilder_ == null) { scope_ = null; } else { scope_ = null; scopeBuilder_ = null; } if (metricsBuilder_ == null) { metrics_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { metricsBuilder_.clear(); } schemaUrl_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ScopeMetrics_descriptor; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.ScopeMetrics getDefaultInstanceForType() { return io.opentelemetry.proto.metrics.v1.ScopeMetrics.getDefaultInstance(); } @java.lang.Override public io.opentelemetry.proto.metrics.v1.ScopeMetrics build() { io.opentelemetry.proto.metrics.v1.ScopeMetrics result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.ScopeMetrics buildPartial() { io.opentelemetry.proto.metrics.v1.ScopeMetrics result = new io.opentelemetry.proto.metrics.v1.ScopeMetrics(this); int from_bitField0_ = bitField0_; if (scopeBuilder_ == null) { result.scope_ = scope_; } else { result.scope_ = scopeBuilder_.build(); } if (metricsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { metrics_ = java.util.Collections.unmodifiableList(metrics_); bitField0_ = (bitField0_ & ~0x00000001); } result.metrics_ = metrics_; } else { result.metrics_ = metricsBuilder_.build(); } result.schemaUrl_ = schemaUrl_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opentelemetry.proto.metrics.v1.ScopeMetrics) { return mergeFrom((io.opentelemetry.proto.metrics.v1.ScopeMetrics)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opentelemetry.proto.metrics.v1.ScopeMetrics other) { if (other == io.opentelemetry.proto.metrics.v1.ScopeMetrics.getDefaultInstance()) return this; if (other.hasScope()) { mergeScope(other.getScope()); } if (metricsBuilder_ == null) { if (!other.metrics_.isEmpty()) { if (metrics_.isEmpty()) { metrics_ = other.metrics_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureMetricsIsMutable(); metrics_.addAll(other.metrics_); } onChanged(); } } else { if (!other.metrics_.isEmpty()) { if (metricsBuilder_.isEmpty()) { metricsBuilder_.dispose(); metricsBuilder_ = null; metrics_ = other.metrics_; bitField0_ = (bitField0_ & ~0x00000001); metricsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMetricsFieldBuilder() : null; } else { metricsBuilder_.addAllMessages(other.metrics_); } } } if (!other.getSchemaUrl().isEmpty()) { schemaUrl_ = other.schemaUrl_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.opentelemetry.proto.metrics.v1.ScopeMetrics parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opentelemetry.proto.metrics.v1.ScopeMetrics) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private io.opentelemetry.proto.common.v1.InstrumentationScope scope_; private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.InstrumentationScope, io.opentelemetry.proto.common.v1.InstrumentationScope.Builder, io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder> scopeBuilder_; /** *
     * 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; * @return Whether the scope field is set. */ public boolean hasScope() { return scopeBuilder_ != null || scope_ != null; } /** *
     * 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; * @return The scope. */ public io.opentelemetry.proto.common.v1.InstrumentationScope getScope() { if (scopeBuilder_ == null) { return scope_ == null ? io.opentelemetry.proto.common.v1.InstrumentationScope.getDefaultInstance() : scope_; } else { return scopeBuilder_.getMessage(); } } /** *
     * 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; */ public Builder setScope(io.opentelemetry.proto.common.v1.InstrumentationScope value) { if (scopeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } scope_ = value; onChanged(); } else { scopeBuilder_.setMessage(value); } return this; } /** *
     * 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; */ public Builder setScope( io.opentelemetry.proto.common.v1.InstrumentationScope.Builder builderForValue) { if (scopeBuilder_ == null) { scope_ = builderForValue.build(); onChanged(); } else { scopeBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * 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; */ public Builder mergeScope(io.opentelemetry.proto.common.v1.InstrumentationScope value) { if (scopeBuilder_ == null) { if (scope_ != null) { scope_ = io.opentelemetry.proto.common.v1.InstrumentationScope.newBuilder(scope_).mergeFrom(value).buildPartial(); } else { scope_ = value; } onChanged(); } else { scopeBuilder_.mergeFrom(value); } return this; } /** *
     * 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; */ public Builder clearScope() { if (scopeBuilder_ == null) { scope_ = null; onChanged(); } else { scope_ = null; scopeBuilder_ = null; } return this; } /** *
     * 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; */ public io.opentelemetry.proto.common.v1.InstrumentationScope.Builder getScopeBuilder() { onChanged(); return getScopeFieldBuilder().getBuilder(); } /** *
     * 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; */ public io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder getScopeOrBuilder() { if (scopeBuilder_ != null) { return scopeBuilder_.getMessageOrBuilder(); } else { return scope_ == null ? io.opentelemetry.proto.common.v1.InstrumentationScope.getDefaultInstance() : scope_; } } /** *
     * 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; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.InstrumentationScope, io.opentelemetry.proto.common.v1.InstrumentationScope.Builder, io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder> getScopeFieldBuilder() { if (scopeBuilder_ == null) { scopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.InstrumentationScope, io.opentelemetry.proto.common.v1.InstrumentationScope.Builder, io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder>( getScope(), getParentForChildren(), isClean()); scope_ = null; } return scopeBuilder_; } private java.util.List metrics_ = java.util.Collections.emptyList(); private void ensureMetricsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { metrics_ = new java.util.ArrayList(metrics_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Metric, io.opentelemetry.proto.metrics.v1.Metric.Builder, io.opentelemetry.proto.metrics.v1.MetricOrBuilder> metricsBuilder_; /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public java.util.List getMetricsList() { if (metricsBuilder_ == null) { return java.util.Collections.unmodifiableList(metrics_); } else { return metricsBuilder_.getMessageList(); } } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public int getMetricsCount() { if (metricsBuilder_ == null) { return metrics_.size(); } else { return metricsBuilder_.getCount(); } } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public io.opentelemetry.proto.metrics.v1.Metric getMetrics(int index) { if (metricsBuilder_ == null) { return metrics_.get(index); } else { return metricsBuilder_.getMessage(index); } } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder setMetrics( int index, io.opentelemetry.proto.metrics.v1.Metric value) { if (metricsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMetricsIsMutable(); metrics_.set(index, value); onChanged(); } else { metricsBuilder_.setMessage(index, value); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder setMetrics( int index, io.opentelemetry.proto.metrics.v1.Metric.Builder builderForValue) { if (metricsBuilder_ == null) { ensureMetricsIsMutable(); metrics_.set(index, builderForValue.build()); onChanged(); } else { metricsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder addMetrics(io.opentelemetry.proto.metrics.v1.Metric value) { if (metricsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMetricsIsMutable(); metrics_.add(value); onChanged(); } else { metricsBuilder_.addMessage(value); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder addMetrics( int index, io.opentelemetry.proto.metrics.v1.Metric value) { if (metricsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMetricsIsMutable(); metrics_.add(index, value); onChanged(); } else { metricsBuilder_.addMessage(index, value); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder addMetrics( io.opentelemetry.proto.metrics.v1.Metric.Builder builderForValue) { if (metricsBuilder_ == null) { ensureMetricsIsMutable(); metrics_.add(builderForValue.build()); onChanged(); } else { metricsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder addMetrics( int index, io.opentelemetry.proto.metrics.v1.Metric.Builder builderForValue) { if (metricsBuilder_ == null) { ensureMetricsIsMutable(); metrics_.add(index, builderForValue.build()); onChanged(); } else { metricsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder addAllMetrics( java.lang.Iterable values) { if (metricsBuilder_ == null) { ensureMetricsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, metrics_); onChanged(); } else { metricsBuilder_.addAllMessages(values); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder clearMetrics() { if (metricsBuilder_ == null) { metrics_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { metricsBuilder_.clear(); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public Builder removeMetrics(int index) { if (metricsBuilder_ == null) { ensureMetricsIsMutable(); metrics_.remove(index); onChanged(); } else { metricsBuilder_.remove(index); } return this; } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public io.opentelemetry.proto.metrics.v1.Metric.Builder getMetricsBuilder( int index) { return getMetricsFieldBuilder().getBuilder(index); } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public io.opentelemetry.proto.metrics.v1.MetricOrBuilder getMetricsOrBuilder( int index) { if (metricsBuilder_ == null) { return metrics_.get(index); } else { return metricsBuilder_.getMessageOrBuilder(index); } } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public java.util.List getMetricsOrBuilderList() { if (metricsBuilder_ != null) { return metricsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(metrics_); } } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public io.opentelemetry.proto.metrics.v1.Metric.Builder addMetricsBuilder() { return getMetricsFieldBuilder().addBuilder( io.opentelemetry.proto.metrics.v1.Metric.getDefaultInstance()); } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public io.opentelemetry.proto.metrics.v1.Metric.Builder addMetricsBuilder( int index) { return getMetricsFieldBuilder().addBuilder( index, io.opentelemetry.proto.metrics.v1.Metric.getDefaultInstance()); } /** *
     * A list of metrics that originate from an instrumentation library.
     * 
* * repeated .opentelemetry.proto.metrics.v1.Metric metrics = 2; */ public java.util.List getMetricsBuilderList() { return getMetricsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Metric, io.opentelemetry.proto.metrics.v1.Metric.Builder, io.opentelemetry.proto.metrics.v1.MetricOrBuilder> getMetricsFieldBuilder() { if (metricsBuilder_ == null) { metricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Metric, io.opentelemetry.proto.metrics.v1.Metric.Builder, io.opentelemetry.proto.metrics.v1.MetricOrBuilder>( metrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); metrics_ = null; } return metricsBuilder_; } private java.lang.Object schemaUrl_ = ""; /** *
     * This schema_url applies to all metrics in the "metrics" field.
     * 
* * string schema_url = 3; * @return The schemaUrl. */ public java.lang.String getSchemaUrl() { java.lang.Object ref = schemaUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); schemaUrl_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * This schema_url applies to all metrics in the "metrics" field.
     * 
* * string schema_url = 3; * @return The bytes for schemaUrl. */ public com.google.protobuf.ByteString getSchemaUrlBytes() { java.lang.Object ref = schemaUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); schemaUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * This schema_url applies to all metrics in the "metrics" field.
     * 
* * string schema_url = 3; * @param value The schemaUrl to set. * @return This builder for chaining. */ public Builder setSchemaUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } schemaUrl_ = value; onChanged(); return this; } /** *
     * This schema_url applies to all metrics in the "metrics" field.
     * 
* * string schema_url = 3; * @return This builder for chaining. */ public Builder clearSchemaUrl() { schemaUrl_ = getDefaultInstance().getSchemaUrl(); onChanged(); return this; } /** *
     * This schema_url applies to all metrics in the "metrics" field.
     * 
* * string schema_url = 3; * @param value The bytes for schemaUrl to set. * @return This builder for chaining. */ public Builder setSchemaUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); schemaUrl_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:opentelemetry.proto.metrics.v1.ScopeMetrics) } // @@protoc_insertion_point(class_scope:opentelemetry.proto.metrics.v1.ScopeMetrics) private static final io.opentelemetry.proto.metrics.v1.ScopeMetrics DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opentelemetry.proto.metrics.v1.ScopeMetrics(); } public static io.opentelemetry.proto.metrics.v1.ScopeMetrics getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ScopeMetrics parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ScopeMetrics(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.ScopeMetrics getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy