Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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.
*
* 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.
*
* 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;
}
/**
*
* 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.
*
* 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;
}
}