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

io.opentelemetry.proto.metrics.v1.ResourceMetrics 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 ScopeMetrics from a Resource.
 * 
* * Protobuf type {@code opentelemetry.proto.metrics.v1.ResourceMetrics} */ public final class ResourceMetrics extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opentelemetry.proto.metrics.v1.ResourceMetrics) ResourceMetricsOrBuilder { private static final long serialVersionUID = 0L; // Use ResourceMetrics.newBuilder() to construct. private ResourceMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ResourceMetrics() { scopeMetrics_ = java.util.Collections.emptyList(); schemaUrl_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ResourceMetrics(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ResourceMetrics( 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.resource.v1.Resource.Builder subBuilder = null; if (resource_ != null) { subBuilder = resource_.toBuilder(); } resource_ = input.readMessage(io.opentelemetry.proto.resource.v1.Resource.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(resource_); resource_ = subBuilder.buildPartial(); } break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { scopeMetrics_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } scopeMetrics_.add( input.readMessage(io.opentelemetry.proto.metrics.v1.ScopeMetrics.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)) { scopeMetrics_ = java.util.Collections.unmodifiableList(scopeMetrics_); } 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_ResourceMetrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ResourceMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.metrics.v1.ResourceMetrics.class, io.opentelemetry.proto.metrics.v1.ResourceMetrics.Builder.class); } public static final int RESOURCE_FIELD_NUMBER = 1; private io.opentelemetry.proto.resource.v1.Resource resource_; /** *
   * The resource for the metrics in this message.
   * If this field is not set then no resource info is known.
   * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return Whether the resource field is set. */ @java.lang.Override public boolean hasResource() { return resource_ != null; } /** *
   * The resource for the metrics in this message.
   * If this field is not set then no resource info is known.
   * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return The resource. */ @java.lang.Override public io.opentelemetry.proto.resource.v1.Resource getResource() { return resource_ == null ? io.opentelemetry.proto.resource.v1.Resource.getDefaultInstance() : resource_; } /** *
   * The resource for the metrics in this message.
   * If this field is not set then no resource info is known.
   * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ @java.lang.Override public io.opentelemetry.proto.resource.v1.ResourceOrBuilder getResourceOrBuilder() { return getResource(); } public static final int SCOPE_METRICS_FIELD_NUMBER = 2; private java.util.List scopeMetrics_; /** *
   * A list of metrics that originate from a resource.
   * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ @java.lang.Override public java.util.List getScopeMetricsList() { return scopeMetrics_; } /** *
   * A list of metrics that originate from a resource.
   * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ @java.lang.Override public java.util.List getScopeMetricsOrBuilderList() { return scopeMetrics_; } /** *
   * A list of metrics that originate from a resource.
   * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ @java.lang.Override public int getScopeMetricsCount() { return scopeMetrics_.size(); } /** *
   * A list of metrics that originate from a resource.
   * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.ScopeMetrics getScopeMetrics(int index) { return scopeMetrics_.get(index); } /** *
   * A list of metrics that originate from a resource.
   * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.ScopeMetricsOrBuilder getScopeMetricsOrBuilder( int index) { return scopeMetrics_.get(index); } public static final int SCHEMA_URL_FIELD_NUMBER = 3; private volatile java.lang.Object schemaUrl_; /** *
   * This schema_url applies to the data in the "resource" field. It does not apply
   * to the data in the "scope_metrics" field which have their own schema_url 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 the data in the "resource" field. It does not apply
   * to the data in the "scope_metrics" field which have their own schema_url 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 (resource_ != null) { output.writeMessage(1, getResource()); } for (int i = 0; i < scopeMetrics_.size(); i++) { output.writeMessage(2, scopeMetrics_.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 (resource_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getResource()); } for (int i = 0; i < scopeMetrics_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, scopeMetrics_.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.ResourceMetrics)) { return super.equals(obj); } io.opentelemetry.proto.metrics.v1.ResourceMetrics other = (io.opentelemetry.proto.metrics.v1.ResourceMetrics) obj; if (hasResource() != other.hasResource()) return false; if (hasResource()) { if (!getResource() .equals(other.getResource())) return false; } if (!getScopeMetricsList() .equals(other.getScopeMetricsList())) 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 (hasResource()) { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } if (getScopeMetricsCount() > 0) { hash = (37 * hash) + SCOPE_METRICS_FIELD_NUMBER; hash = (53 * hash) + getScopeMetricsList().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.ResourceMetrics parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.ResourceMetrics 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.ResourceMetrics parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.ResourceMetrics 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.ResourceMetrics parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.ResourceMetrics 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.ResourceMetrics parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.ResourceMetrics 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.ResourceMetrics parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.ResourceMetrics 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.ResourceMetrics 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.ResourceMetrics 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.ResourceMetrics 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 ScopeMetrics from a Resource.
   * 
* * Protobuf type {@code opentelemetry.proto.metrics.v1.ResourceMetrics} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opentelemetry.proto.metrics.v1.ResourceMetrics) io.opentelemetry.proto.metrics.v1.ResourceMetricsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ResourceMetrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_ResourceMetrics_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.metrics.v1.ResourceMetrics.class, io.opentelemetry.proto.metrics.v1.ResourceMetrics.Builder.class); } // Construct using io.opentelemetry.proto.metrics.v1.ResourceMetrics.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getScopeMetricsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (resourceBuilder_ == null) { resource_ = null; } else { resource_ = null; resourceBuilder_ = null; } if (scopeMetricsBuilder_ == null) { scopeMetrics_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { scopeMetricsBuilder_.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_ResourceMetrics_descriptor; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.ResourceMetrics getDefaultInstanceForType() { return io.opentelemetry.proto.metrics.v1.ResourceMetrics.getDefaultInstance(); } @java.lang.Override public io.opentelemetry.proto.metrics.v1.ResourceMetrics build() { io.opentelemetry.proto.metrics.v1.ResourceMetrics result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.ResourceMetrics buildPartial() { io.opentelemetry.proto.metrics.v1.ResourceMetrics result = new io.opentelemetry.proto.metrics.v1.ResourceMetrics(this); int from_bitField0_ = bitField0_; if (resourceBuilder_ == null) { result.resource_ = resource_; } else { result.resource_ = resourceBuilder_.build(); } if (scopeMetricsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { scopeMetrics_ = java.util.Collections.unmodifiableList(scopeMetrics_); bitField0_ = (bitField0_ & ~0x00000001); } result.scopeMetrics_ = scopeMetrics_; } else { result.scopeMetrics_ = scopeMetricsBuilder_.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.ResourceMetrics) { return mergeFrom((io.opentelemetry.proto.metrics.v1.ResourceMetrics)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opentelemetry.proto.metrics.v1.ResourceMetrics other) { if (other == io.opentelemetry.proto.metrics.v1.ResourceMetrics.getDefaultInstance()) return this; if (other.hasResource()) { mergeResource(other.getResource()); } if (scopeMetricsBuilder_ == null) { if (!other.scopeMetrics_.isEmpty()) { if (scopeMetrics_.isEmpty()) { scopeMetrics_ = other.scopeMetrics_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureScopeMetricsIsMutable(); scopeMetrics_.addAll(other.scopeMetrics_); } onChanged(); } } else { if (!other.scopeMetrics_.isEmpty()) { if (scopeMetricsBuilder_.isEmpty()) { scopeMetricsBuilder_.dispose(); scopeMetricsBuilder_ = null; scopeMetrics_ = other.scopeMetrics_; bitField0_ = (bitField0_ & ~0x00000001); scopeMetricsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getScopeMetricsFieldBuilder() : null; } else { scopeMetricsBuilder_.addAllMessages(other.scopeMetrics_); } } } 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.ResourceMetrics parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opentelemetry.proto.metrics.v1.ResourceMetrics) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private io.opentelemetry.proto.resource.v1.Resource resource_; private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.resource.v1.Resource, io.opentelemetry.proto.resource.v1.Resource.Builder, io.opentelemetry.proto.resource.v1.ResourceOrBuilder> resourceBuilder_; /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return Whether the resource field is set. */ public boolean hasResource() { return resourceBuilder_ != null || resource_ != null; } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return The resource. */ public io.opentelemetry.proto.resource.v1.Resource getResource() { if (resourceBuilder_ == null) { return resource_ == null ? io.opentelemetry.proto.resource.v1.Resource.getDefaultInstance() : resource_; } else { return resourceBuilder_.getMessage(); } } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder setResource(io.opentelemetry.proto.resource.v1.Resource value) { if (resourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resource_ = value; onChanged(); } else { resourceBuilder_.setMessage(value); } return this; } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder setResource( io.opentelemetry.proto.resource.v1.Resource.Builder builderForValue) { if (resourceBuilder_ == null) { resource_ = builderForValue.build(); onChanged(); } else { resourceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder mergeResource(io.opentelemetry.proto.resource.v1.Resource value) { if (resourceBuilder_ == null) { if (resource_ != null) { resource_ = io.opentelemetry.proto.resource.v1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); } else { resource_ = value; } onChanged(); } else { resourceBuilder_.mergeFrom(value); } return this; } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder clearResource() { if (resourceBuilder_ == null) { resource_ = null; onChanged(); } else { resource_ = null; resourceBuilder_ = null; } return this; } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public io.opentelemetry.proto.resource.v1.Resource.Builder getResourceBuilder() { onChanged(); return getResourceFieldBuilder().getBuilder(); } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public io.opentelemetry.proto.resource.v1.ResourceOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { return resourceBuilder_.getMessageOrBuilder(); } else { return resource_ == null ? io.opentelemetry.proto.resource.v1.Resource.getDefaultInstance() : resource_; } } /** *
     * The resource for the metrics in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.resource.v1.Resource, io.opentelemetry.proto.resource.v1.Resource.Builder, io.opentelemetry.proto.resource.v1.ResourceOrBuilder> getResourceFieldBuilder() { if (resourceBuilder_ == null) { resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.resource.v1.Resource, io.opentelemetry.proto.resource.v1.Resource.Builder, io.opentelemetry.proto.resource.v1.ResourceOrBuilder>( getResource(), getParentForChildren(), isClean()); resource_ = null; } return resourceBuilder_; } private java.util.List scopeMetrics_ = java.util.Collections.emptyList(); private void ensureScopeMetricsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { scopeMetrics_ = new java.util.ArrayList(scopeMetrics_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.metrics.v1.ScopeMetrics, io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder, io.opentelemetry.proto.metrics.v1.ScopeMetricsOrBuilder> scopeMetricsBuilder_; /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public java.util.List getScopeMetricsList() { if (scopeMetricsBuilder_ == null) { return java.util.Collections.unmodifiableList(scopeMetrics_); } else { return scopeMetricsBuilder_.getMessageList(); } } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public int getScopeMetricsCount() { if (scopeMetricsBuilder_ == null) { return scopeMetrics_.size(); } else { return scopeMetricsBuilder_.getCount(); } } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public io.opentelemetry.proto.metrics.v1.ScopeMetrics getScopeMetrics(int index) { if (scopeMetricsBuilder_ == null) { return scopeMetrics_.get(index); } else { return scopeMetricsBuilder_.getMessage(index); } } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder setScopeMetrics( int index, io.opentelemetry.proto.metrics.v1.ScopeMetrics value) { if (scopeMetricsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeMetricsIsMutable(); scopeMetrics_.set(index, value); onChanged(); } else { scopeMetricsBuilder_.setMessage(index, value); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder setScopeMetrics( int index, io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder builderForValue) { if (scopeMetricsBuilder_ == null) { ensureScopeMetricsIsMutable(); scopeMetrics_.set(index, builderForValue.build()); onChanged(); } else { scopeMetricsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder addScopeMetrics(io.opentelemetry.proto.metrics.v1.ScopeMetrics value) { if (scopeMetricsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeMetricsIsMutable(); scopeMetrics_.add(value); onChanged(); } else { scopeMetricsBuilder_.addMessage(value); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder addScopeMetrics( int index, io.opentelemetry.proto.metrics.v1.ScopeMetrics value) { if (scopeMetricsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeMetricsIsMutable(); scopeMetrics_.add(index, value); onChanged(); } else { scopeMetricsBuilder_.addMessage(index, value); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder addScopeMetrics( io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder builderForValue) { if (scopeMetricsBuilder_ == null) { ensureScopeMetricsIsMutable(); scopeMetrics_.add(builderForValue.build()); onChanged(); } else { scopeMetricsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder addScopeMetrics( int index, io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder builderForValue) { if (scopeMetricsBuilder_ == null) { ensureScopeMetricsIsMutable(); scopeMetrics_.add(index, builderForValue.build()); onChanged(); } else { scopeMetricsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder addAllScopeMetrics( java.lang.Iterable values) { if (scopeMetricsBuilder_ == null) { ensureScopeMetricsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, scopeMetrics_); onChanged(); } else { scopeMetricsBuilder_.addAllMessages(values); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder clearScopeMetrics() { if (scopeMetricsBuilder_ == null) { scopeMetrics_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { scopeMetricsBuilder_.clear(); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public Builder removeScopeMetrics(int index) { if (scopeMetricsBuilder_ == null) { ensureScopeMetricsIsMutable(); scopeMetrics_.remove(index); onChanged(); } else { scopeMetricsBuilder_.remove(index); } return this; } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder getScopeMetricsBuilder( int index) { return getScopeMetricsFieldBuilder().getBuilder(index); } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public io.opentelemetry.proto.metrics.v1.ScopeMetricsOrBuilder getScopeMetricsOrBuilder( int index) { if (scopeMetricsBuilder_ == null) { return scopeMetrics_.get(index); } else { return scopeMetricsBuilder_.getMessageOrBuilder(index); } } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public java.util.List getScopeMetricsOrBuilderList() { if (scopeMetricsBuilder_ != null) { return scopeMetricsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(scopeMetrics_); } } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder addScopeMetricsBuilder() { return getScopeMetricsFieldBuilder().addBuilder( io.opentelemetry.proto.metrics.v1.ScopeMetrics.getDefaultInstance()); } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder addScopeMetricsBuilder( int index) { return getScopeMetricsFieldBuilder().addBuilder( index, io.opentelemetry.proto.metrics.v1.ScopeMetrics.getDefaultInstance()); } /** *
     * A list of metrics that originate from a resource.
     * 
* * repeated .opentelemetry.proto.metrics.v1.ScopeMetrics scope_metrics = 2; */ public java.util.List getScopeMetricsBuilderList() { return getScopeMetricsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.metrics.v1.ScopeMetrics, io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder, io.opentelemetry.proto.metrics.v1.ScopeMetricsOrBuilder> getScopeMetricsFieldBuilder() { if (scopeMetricsBuilder_ == null) { scopeMetricsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.metrics.v1.ScopeMetrics, io.opentelemetry.proto.metrics.v1.ScopeMetrics.Builder, io.opentelemetry.proto.metrics.v1.ScopeMetricsOrBuilder>( scopeMetrics_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); scopeMetrics_ = null; } return scopeMetricsBuilder_; } private java.lang.Object schemaUrl_ = ""; /** *
     * This schema_url applies to the data in the "resource" field. It does not apply
     * to the data in the "scope_metrics" field which have their own schema_url 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 the data in the "resource" field. It does not apply
     * to the data in the "scope_metrics" field which have their own schema_url 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 the data in the "resource" field. It does not apply
     * to the data in the "scope_metrics" field which have their own schema_url 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 the data in the "resource" field. It does not apply
     * to the data in the "scope_metrics" field which have their own schema_url field.
     * 
* * string schema_url = 3; * @return This builder for chaining. */ public Builder clearSchemaUrl() { schemaUrl_ = getDefaultInstance().getSchemaUrl(); onChanged(); return this; } /** *
     * This schema_url applies to the data in the "resource" field. It does not apply
     * to the data in the "scope_metrics" field which have their own schema_url 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.ResourceMetrics) } // @@protoc_insertion_point(class_scope:opentelemetry.proto.metrics.v1.ResourceMetrics) private static final io.opentelemetry.proto.metrics.v1.ResourceMetrics DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opentelemetry.proto.metrics.v1.ResourceMetrics(); } public static io.opentelemetry.proto.metrics.v1.ResourceMetrics getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ResourceMetrics parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ResourceMetrics(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.ResourceMetrics getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy