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

io.opentelemetry.proto.common.v1.AnyValue 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/common/v1/common.proto

package io.opentelemetry.proto.common.v1;

/**
 * 
 * AnyValue is used to represent any type of attribute value. AnyValue may contain a
 * primitive value such as a string or integer or it may contain an arbitrary nested
 * object containing arrays, key-value lists and primitives.
 * 
* * Protobuf type {@code opentelemetry.proto.common.v1.AnyValue} */ public final class AnyValue extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opentelemetry.proto.common.v1.AnyValue) AnyValueOrBuilder { private static final long serialVersionUID = 0L; // Use AnyValue.newBuilder() to construct. private AnyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AnyValue() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AnyValue(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private AnyValue( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } 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: { java.lang.String s = input.readStringRequireUtf8(); valueCase_ = 1; value_ = s; break; } case 16: { value_ = input.readBool(); valueCase_ = 2; break; } case 24: { value_ = input.readInt64(); valueCase_ = 3; break; } case 33: { value_ = input.readDouble(); valueCase_ = 4; break; } case 42: { io.opentelemetry.proto.common.v1.ArrayValue.Builder subBuilder = null; if (valueCase_ == 5) { subBuilder = ((io.opentelemetry.proto.common.v1.ArrayValue) value_).toBuilder(); } value_ = input.readMessage(io.opentelemetry.proto.common.v1.ArrayValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opentelemetry.proto.common.v1.ArrayValue) value_); value_ = subBuilder.buildPartial(); } valueCase_ = 5; break; } case 50: { io.opentelemetry.proto.common.v1.KeyValueList.Builder subBuilder = null; if (valueCase_ == 6) { subBuilder = ((io.opentelemetry.proto.common.v1.KeyValueList) value_).toBuilder(); } value_ = input.readMessage(io.opentelemetry.proto.common.v1.KeyValueList.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opentelemetry.proto.common.v1.KeyValueList) value_); value_ = subBuilder.buildPartial(); } valueCase_ = 6; break; } case 58: { value_ = input.readBytes(); valueCase_ = 7; 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.common.v1.CommonProto.internal_static_opentelemetry_proto_common_v1_AnyValue_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.common.v1.CommonProto.internal_static_opentelemetry_proto_common_v1_AnyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.common.v1.AnyValue.class, io.opentelemetry.proto.common.v1.AnyValue.Builder.class); } private int valueCase_ = 0; private java.lang.Object value_; public enum ValueCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { STRING_VALUE(1), BOOL_VALUE(2), INT_VALUE(3), DOUBLE_VALUE(4), ARRAY_VALUE(5), KVLIST_VALUE(6), BYTES_VALUE(7), VALUE_NOT_SET(0); private final int value; private ValueCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ValueCase valueOf(int value) { return forNumber(value); } public static ValueCase forNumber(int value) { switch (value) { case 1: return STRING_VALUE; case 2: return BOOL_VALUE; case 3: return INT_VALUE; case 4: return DOUBLE_VALUE; case 5: return ARRAY_VALUE; case 6: return KVLIST_VALUE; case 7: return BYTES_VALUE; case 0: return VALUE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ValueCase getValueCase() { return ValueCase.forNumber( valueCase_); } public static final int STRING_VALUE_FIELD_NUMBER = 1; /** * string string_value = 1; * @return Whether the stringValue field is set. */ public boolean hasStringValue() { return valueCase_ == 1; } /** * string string_value = 1; * @return The stringValue. */ public java.lang.String getStringValue() { java.lang.Object ref = ""; if (valueCase_ == 1) { ref = value_; } 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(); if (valueCase_ == 1) { value_ = s; } return s; } } /** * string string_value = 1; * @return The bytes for stringValue. */ public com.google.protobuf.ByteString getStringValueBytes() { java.lang.Object ref = ""; if (valueCase_ == 1) { ref = value_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (valueCase_ == 1) { value_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BOOL_VALUE_FIELD_NUMBER = 2; /** * bool bool_value = 2; * @return Whether the boolValue field is set. */ @java.lang.Override public boolean hasBoolValue() { return valueCase_ == 2; } /** * bool bool_value = 2; * @return The boolValue. */ @java.lang.Override public boolean getBoolValue() { if (valueCase_ == 2) { return (java.lang.Boolean) value_; } return false; } public static final int INT_VALUE_FIELD_NUMBER = 3; /** * int64 int_value = 3; * @return Whether the intValue field is set. */ @java.lang.Override public boolean hasIntValue() { return valueCase_ == 3; } /** * int64 int_value = 3; * @return The intValue. */ @java.lang.Override public long getIntValue() { if (valueCase_ == 3) { return (java.lang.Long) value_; } return 0L; } public static final int DOUBLE_VALUE_FIELD_NUMBER = 4; /** * double double_value = 4; * @return Whether the doubleValue field is set. */ @java.lang.Override public boolean hasDoubleValue() { return valueCase_ == 4; } /** * double double_value = 4; * @return The doubleValue. */ @java.lang.Override public double getDoubleValue() { if (valueCase_ == 4) { return (java.lang.Double) value_; } return 0D; } public static final int ARRAY_VALUE_FIELD_NUMBER = 5; /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; * @return Whether the arrayValue field is set. */ @java.lang.Override public boolean hasArrayValue() { return valueCase_ == 5; } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; * @return The arrayValue. */ @java.lang.Override public io.opentelemetry.proto.common.v1.ArrayValue getArrayValue() { if (valueCase_ == 5) { return (io.opentelemetry.proto.common.v1.ArrayValue) value_; } return io.opentelemetry.proto.common.v1.ArrayValue.getDefaultInstance(); } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ @java.lang.Override public io.opentelemetry.proto.common.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { if (valueCase_ == 5) { return (io.opentelemetry.proto.common.v1.ArrayValue) value_; } return io.opentelemetry.proto.common.v1.ArrayValue.getDefaultInstance(); } public static final int KVLIST_VALUE_FIELD_NUMBER = 6; /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; * @return Whether the kvlistValue field is set. */ @java.lang.Override public boolean hasKvlistValue() { return valueCase_ == 6; } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; * @return The kvlistValue. */ @java.lang.Override public io.opentelemetry.proto.common.v1.KeyValueList getKvlistValue() { if (valueCase_ == 6) { return (io.opentelemetry.proto.common.v1.KeyValueList) value_; } return io.opentelemetry.proto.common.v1.KeyValueList.getDefaultInstance(); } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ @java.lang.Override public io.opentelemetry.proto.common.v1.KeyValueListOrBuilder getKvlistValueOrBuilder() { if (valueCase_ == 6) { return (io.opentelemetry.proto.common.v1.KeyValueList) value_; } return io.opentelemetry.proto.common.v1.KeyValueList.getDefaultInstance(); } public static final int BYTES_VALUE_FIELD_NUMBER = 7; /** * bytes bytes_value = 7; * @return Whether the bytesValue field is set. */ @java.lang.Override public boolean hasBytesValue() { return valueCase_ == 7; } /** * bytes bytes_value = 7; * @return The bytesValue. */ @java.lang.Override public com.google.protobuf.ByteString getBytesValue() { if (valueCase_ == 7) { return (com.google.protobuf.ByteString) value_; } return com.google.protobuf.ByteString.EMPTY; } 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 (valueCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); } if (valueCase_ == 2) { output.writeBool( 2, (boolean)((java.lang.Boolean) value_)); } if (valueCase_ == 3) { output.writeInt64( 3, (long)((java.lang.Long) value_)); } if (valueCase_ == 4) { output.writeDouble( 4, (double)((java.lang.Double) value_)); } if (valueCase_ == 5) { output.writeMessage(5, (io.opentelemetry.proto.common.v1.ArrayValue) value_); } if (valueCase_ == 6) { output.writeMessage(6, (io.opentelemetry.proto.common.v1.KeyValueList) value_); } if (valueCase_ == 7) { output.writeBytes( 7, (com.google.protobuf.ByteString) value_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (valueCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); } if (valueCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeBoolSize( 2, (boolean)((java.lang.Boolean) value_)); } if (valueCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeInt64Size( 3, (long)((java.lang.Long) value_)); } if (valueCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize( 4, (double)((java.lang.Double) value_)); } if (valueCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (io.opentelemetry.proto.common.v1.ArrayValue) value_); } if (valueCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (io.opentelemetry.proto.common.v1.KeyValueList) value_); } if (valueCase_ == 7) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 7, (com.google.protobuf.ByteString) value_); } 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.common.v1.AnyValue)) { return super.equals(obj); } io.opentelemetry.proto.common.v1.AnyValue other = (io.opentelemetry.proto.common.v1.AnyValue) obj; if (!getValueCase().equals(other.getValueCase())) return false; switch (valueCase_) { case 1: if (!getStringValue() .equals(other.getStringValue())) return false; break; case 2: if (getBoolValue() != other.getBoolValue()) return false; break; case 3: if (getIntValue() != other.getIntValue()) return false; break; case 4: if (java.lang.Double.doubleToLongBits(getDoubleValue()) != java.lang.Double.doubleToLongBits( other.getDoubleValue())) return false; break; case 5: if (!getArrayValue() .equals(other.getArrayValue())) return false; break; case 6: if (!getKvlistValue() .equals(other.getKvlistValue())) return false; break; case 7: if (!getBytesValue() .equals(other.getBytesValue())) return false; break; case 0: default: } 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(); switch (valueCase_) { case 1: hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; hash = (53 * hash) + getStringValue().hashCode(); break; case 2: hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getBoolValue()); break; case 3: hash = (37 * hash) + INT_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getIntValue()); break; case 4: hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getDoubleValue())); break; case 5: hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getArrayValue().hashCode(); break; case 6: hash = (37 * hash) + KVLIST_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKvlistValue().hashCode(); break; case 7: hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER; hash = (53 * hash) + getBytesValue().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opentelemetry.proto.common.v1.AnyValue parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.common.v1.AnyValue 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.common.v1.AnyValue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.common.v1.AnyValue 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.common.v1.AnyValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.common.v1.AnyValue parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.common.v1.AnyValue parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.common.v1.AnyValue 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.common.v1.AnyValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opentelemetry.proto.common.v1.AnyValue 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.common.v1.AnyValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.common.v1.AnyValue 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.common.v1.AnyValue 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; } /** *
   * AnyValue is used to represent any type of attribute value. AnyValue may contain a
   * primitive value such as a string or integer or it may contain an arbitrary nested
   * object containing arrays, key-value lists and primitives.
   * 
* * Protobuf type {@code opentelemetry.proto.common.v1.AnyValue} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opentelemetry.proto.common.v1.AnyValue) io.opentelemetry.proto.common.v1.AnyValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.common.v1.CommonProto.internal_static_opentelemetry_proto_common_v1_AnyValue_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.common.v1.CommonProto.internal_static_opentelemetry_proto_common_v1_AnyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.common.v1.AnyValue.class, io.opentelemetry.proto.common.v1.AnyValue.Builder.class); } // Construct using io.opentelemetry.proto.common.v1.AnyValue.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); valueCase_ = 0; value_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opentelemetry.proto.common.v1.CommonProto.internal_static_opentelemetry_proto_common_v1_AnyValue_descriptor; } @java.lang.Override public io.opentelemetry.proto.common.v1.AnyValue getDefaultInstanceForType() { return io.opentelemetry.proto.common.v1.AnyValue.getDefaultInstance(); } @java.lang.Override public io.opentelemetry.proto.common.v1.AnyValue build() { io.opentelemetry.proto.common.v1.AnyValue result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opentelemetry.proto.common.v1.AnyValue buildPartial() { io.opentelemetry.proto.common.v1.AnyValue result = new io.opentelemetry.proto.common.v1.AnyValue(this); if (valueCase_ == 1) { result.value_ = value_; } if (valueCase_ == 2) { result.value_ = value_; } if (valueCase_ == 3) { result.value_ = value_; } if (valueCase_ == 4) { result.value_ = value_; } if (valueCase_ == 5) { if (arrayValueBuilder_ == null) { result.value_ = value_; } else { result.value_ = arrayValueBuilder_.build(); } } if (valueCase_ == 6) { if (kvlistValueBuilder_ == null) { result.value_ = value_; } else { result.value_ = kvlistValueBuilder_.build(); } } if (valueCase_ == 7) { result.value_ = value_; } result.valueCase_ = valueCase_; 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.common.v1.AnyValue) { return mergeFrom((io.opentelemetry.proto.common.v1.AnyValue)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opentelemetry.proto.common.v1.AnyValue other) { if (other == io.opentelemetry.proto.common.v1.AnyValue.getDefaultInstance()) return this; switch (other.getValueCase()) { case STRING_VALUE: { valueCase_ = 1; value_ = other.value_; onChanged(); break; } case BOOL_VALUE: { setBoolValue(other.getBoolValue()); break; } case INT_VALUE: { setIntValue(other.getIntValue()); break; } case DOUBLE_VALUE: { setDoubleValue(other.getDoubleValue()); break; } case ARRAY_VALUE: { mergeArrayValue(other.getArrayValue()); break; } case KVLIST_VALUE: { mergeKvlistValue(other.getKvlistValue()); break; } case BYTES_VALUE: { setBytesValue(other.getBytesValue()); break; } case VALUE_NOT_SET: { break; } } 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.common.v1.AnyValue parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opentelemetry.proto.common.v1.AnyValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int valueCase_ = 0; private java.lang.Object value_; public ValueCase getValueCase() { return ValueCase.forNumber( valueCase_); } public Builder clearValue() { valueCase_ = 0; value_ = null; onChanged(); return this; } /** * string string_value = 1; * @return Whether the stringValue field is set. */ @java.lang.Override public boolean hasStringValue() { return valueCase_ == 1; } /** * string string_value = 1; * @return The stringValue. */ @java.lang.Override public java.lang.String getStringValue() { java.lang.Object ref = ""; if (valueCase_ == 1) { ref = value_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (valueCase_ == 1) { value_ = s; } return s; } else { return (java.lang.String) ref; } } /** * string string_value = 1; * @return The bytes for stringValue. */ @java.lang.Override public com.google.protobuf.ByteString getStringValueBytes() { java.lang.Object ref = ""; if (valueCase_ == 1) { ref = value_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (valueCase_ == 1) { value_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string string_value = 1; * @param value The stringValue to set. * @return This builder for chaining. */ public Builder setStringValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } valueCase_ = 1; value_ = value; onChanged(); return this; } /** * string string_value = 1; * @return This builder for chaining. */ public Builder clearStringValue() { if (valueCase_ == 1) { valueCase_ = 0; value_ = null; onChanged(); } return this; } /** * string string_value = 1; * @param value The bytes for stringValue to set. * @return This builder for chaining. */ public Builder setStringValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); valueCase_ = 1; value_ = value; onChanged(); return this; } /** * bool bool_value = 2; * @return Whether the boolValue field is set. */ public boolean hasBoolValue() { return valueCase_ == 2; } /** * bool bool_value = 2; * @return The boolValue. */ public boolean getBoolValue() { if (valueCase_ == 2) { return (java.lang.Boolean) value_; } return false; } /** * bool bool_value = 2; * @param value The boolValue to set. * @return This builder for chaining. */ public Builder setBoolValue(boolean value) { valueCase_ = 2; value_ = value; onChanged(); return this; } /** * bool bool_value = 2; * @return This builder for chaining. */ public Builder clearBoolValue() { if (valueCase_ == 2) { valueCase_ = 0; value_ = null; onChanged(); } return this; } /** * int64 int_value = 3; * @return Whether the intValue field is set. */ public boolean hasIntValue() { return valueCase_ == 3; } /** * int64 int_value = 3; * @return The intValue. */ public long getIntValue() { if (valueCase_ == 3) { return (java.lang.Long) value_; } return 0L; } /** * int64 int_value = 3; * @param value The intValue to set. * @return This builder for chaining. */ public Builder setIntValue(long value) { valueCase_ = 3; value_ = value; onChanged(); return this; } /** * int64 int_value = 3; * @return This builder for chaining. */ public Builder clearIntValue() { if (valueCase_ == 3) { valueCase_ = 0; value_ = null; onChanged(); } return this; } /** * double double_value = 4; * @return Whether the doubleValue field is set. */ public boolean hasDoubleValue() { return valueCase_ == 4; } /** * double double_value = 4; * @return The doubleValue. */ public double getDoubleValue() { if (valueCase_ == 4) { return (java.lang.Double) value_; } return 0D; } /** * double double_value = 4; * @param value The doubleValue to set. * @return This builder for chaining. */ public Builder setDoubleValue(double value) { valueCase_ = 4; value_ = value; onChanged(); return this; } /** * double double_value = 4; * @return This builder for chaining. */ public Builder clearDoubleValue() { if (valueCase_ == 4) { valueCase_ = 0; value_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.ArrayValue, io.opentelemetry.proto.common.v1.ArrayValue.Builder, io.opentelemetry.proto.common.v1.ArrayValueOrBuilder> arrayValueBuilder_; /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; * @return Whether the arrayValue field is set. */ @java.lang.Override public boolean hasArrayValue() { return valueCase_ == 5; } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; * @return The arrayValue. */ @java.lang.Override public io.opentelemetry.proto.common.v1.ArrayValue getArrayValue() { if (arrayValueBuilder_ == null) { if (valueCase_ == 5) { return (io.opentelemetry.proto.common.v1.ArrayValue) value_; } return io.opentelemetry.proto.common.v1.ArrayValue.getDefaultInstance(); } else { if (valueCase_ == 5) { return arrayValueBuilder_.getMessage(); } return io.opentelemetry.proto.common.v1.ArrayValue.getDefaultInstance(); } } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ public Builder setArrayValue(io.opentelemetry.proto.common.v1.ArrayValue value) { if (arrayValueBuilder_ == null) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); } else { arrayValueBuilder_.setMessage(value); } valueCase_ = 5; return this; } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ public Builder setArrayValue( io.opentelemetry.proto.common.v1.ArrayValue.Builder builderForValue) { if (arrayValueBuilder_ == null) { value_ = builderForValue.build(); onChanged(); } else { arrayValueBuilder_.setMessage(builderForValue.build()); } valueCase_ = 5; return this; } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ public Builder mergeArrayValue(io.opentelemetry.proto.common.v1.ArrayValue value) { if (arrayValueBuilder_ == null) { if (valueCase_ == 5 && value_ != io.opentelemetry.proto.common.v1.ArrayValue.getDefaultInstance()) { value_ = io.opentelemetry.proto.common.v1.ArrayValue.newBuilder((io.opentelemetry.proto.common.v1.ArrayValue) value_) .mergeFrom(value).buildPartial(); } else { value_ = value; } onChanged(); } else { if (valueCase_ == 5) { arrayValueBuilder_.mergeFrom(value); } else { arrayValueBuilder_.setMessage(value); } } valueCase_ = 5; return this; } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ public Builder clearArrayValue() { if (arrayValueBuilder_ == null) { if (valueCase_ == 5) { valueCase_ = 0; value_ = null; onChanged(); } } else { if (valueCase_ == 5) { valueCase_ = 0; value_ = null; } arrayValueBuilder_.clear(); } return this; } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ public io.opentelemetry.proto.common.v1.ArrayValue.Builder getArrayValueBuilder() { return getArrayValueFieldBuilder().getBuilder(); } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ @java.lang.Override public io.opentelemetry.proto.common.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { if ((valueCase_ == 5) && (arrayValueBuilder_ != null)) { return arrayValueBuilder_.getMessageOrBuilder(); } else { if (valueCase_ == 5) { return (io.opentelemetry.proto.common.v1.ArrayValue) value_; } return io.opentelemetry.proto.common.v1.ArrayValue.getDefaultInstance(); } } /** * .opentelemetry.proto.common.v1.ArrayValue array_value = 5; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.ArrayValue, io.opentelemetry.proto.common.v1.ArrayValue.Builder, io.opentelemetry.proto.common.v1.ArrayValueOrBuilder> getArrayValueFieldBuilder() { if (arrayValueBuilder_ == null) { if (!(valueCase_ == 5)) { value_ = io.opentelemetry.proto.common.v1.ArrayValue.getDefaultInstance(); } arrayValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.ArrayValue, io.opentelemetry.proto.common.v1.ArrayValue.Builder, io.opentelemetry.proto.common.v1.ArrayValueOrBuilder>( (io.opentelemetry.proto.common.v1.ArrayValue) value_, getParentForChildren(), isClean()); value_ = null; } valueCase_ = 5; onChanged();; return arrayValueBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.KeyValueList, io.opentelemetry.proto.common.v1.KeyValueList.Builder, io.opentelemetry.proto.common.v1.KeyValueListOrBuilder> kvlistValueBuilder_; /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; * @return Whether the kvlistValue field is set. */ @java.lang.Override public boolean hasKvlistValue() { return valueCase_ == 6; } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; * @return The kvlistValue. */ @java.lang.Override public io.opentelemetry.proto.common.v1.KeyValueList getKvlistValue() { if (kvlistValueBuilder_ == null) { if (valueCase_ == 6) { return (io.opentelemetry.proto.common.v1.KeyValueList) value_; } return io.opentelemetry.proto.common.v1.KeyValueList.getDefaultInstance(); } else { if (valueCase_ == 6) { return kvlistValueBuilder_.getMessage(); } return io.opentelemetry.proto.common.v1.KeyValueList.getDefaultInstance(); } } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ public Builder setKvlistValue(io.opentelemetry.proto.common.v1.KeyValueList value) { if (kvlistValueBuilder_ == null) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); } else { kvlistValueBuilder_.setMessage(value); } valueCase_ = 6; return this; } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ public Builder setKvlistValue( io.opentelemetry.proto.common.v1.KeyValueList.Builder builderForValue) { if (kvlistValueBuilder_ == null) { value_ = builderForValue.build(); onChanged(); } else { kvlistValueBuilder_.setMessage(builderForValue.build()); } valueCase_ = 6; return this; } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ public Builder mergeKvlistValue(io.opentelemetry.proto.common.v1.KeyValueList value) { if (kvlistValueBuilder_ == null) { if (valueCase_ == 6 && value_ != io.opentelemetry.proto.common.v1.KeyValueList.getDefaultInstance()) { value_ = io.opentelemetry.proto.common.v1.KeyValueList.newBuilder((io.opentelemetry.proto.common.v1.KeyValueList) value_) .mergeFrom(value).buildPartial(); } else { value_ = value; } onChanged(); } else { if (valueCase_ == 6) { kvlistValueBuilder_.mergeFrom(value); } else { kvlistValueBuilder_.setMessage(value); } } valueCase_ = 6; return this; } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ public Builder clearKvlistValue() { if (kvlistValueBuilder_ == null) { if (valueCase_ == 6) { valueCase_ = 0; value_ = null; onChanged(); } } else { if (valueCase_ == 6) { valueCase_ = 0; value_ = null; } kvlistValueBuilder_.clear(); } return this; } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ public io.opentelemetry.proto.common.v1.KeyValueList.Builder getKvlistValueBuilder() { return getKvlistValueFieldBuilder().getBuilder(); } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ @java.lang.Override public io.opentelemetry.proto.common.v1.KeyValueListOrBuilder getKvlistValueOrBuilder() { if ((valueCase_ == 6) && (kvlistValueBuilder_ != null)) { return kvlistValueBuilder_.getMessageOrBuilder(); } else { if (valueCase_ == 6) { return (io.opentelemetry.proto.common.v1.KeyValueList) value_; } return io.opentelemetry.proto.common.v1.KeyValueList.getDefaultInstance(); } } /** * .opentelemetry.proto.common.v1.KeyValueList kvlist_value = 6; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.KeyValueList, io.opentelemetry.proto.common.v1.KeyValueList.Builder, io.opentelemetry.proto.common.v1.KeyValueListOrBuilder> getKvlistValueFieldBuilder() { if (kvlistValueBuilder_ == null) { if (!(valueCase_ == 6)) { value_ = io.opentelemetry.proto.common.v1.KeyValueList.getDefaultInstance(); } kvlistValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.KeyValueList, io.opentelemetry.proto.common.v1.KeyValueList.Builder, io.opentelemetry.proto.common.v1.KeyValueListOrBuilder>( (io.opentelemetry.proto.common.v1.KeyValueList) value_, getParentForChildren(), isClean()); value_ = null; } valueCase_ = 6; onChanged();; return kvlistValueBuilder_; } /** * bytes bytes_value = 7; * @return Whether the bytesValue field is set. */ public boolean hasBytesValue() { return valueCase_ == 7; } /** * bytes bytes_value = 7; * @return The bytesValue. */ public com.google.protobuf.ByteString getBytesValue() { if (valueCase_ == 7) { return (com.google.protobuf.ByteString) value_; } return com.google.protobuf.ByteString.EMPTY; } /** * bytes bytes_value = 7; * @param value The bytesValue to set. * @return This builder for chaining. */ public Builder setBytesValue(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } valueCase_ = 7; value_ = value; onChanged(); return this; } /** * bytes bytes_value = 7; * @return This builder for chaining. */ public Builder clearBytesValue() { if (valueCase_ == 7) { valueCase_ = 0; value_ = null; 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.common.v1.AnyValue) } // @@protoc_insertion_point(class_scope:opentelemetry.proto.common.v1.AnyValue) private static final io.opentelemetry.proto.common.v1.AnyValue DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opentelemetry.proto.common.v1.AnyValue(); } public static io.opentelemetry.proto.common.v1.AnyValue getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AnyValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new AnyValue(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.common.v1.AnyValue getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy